/* Vantage Pulse (built as Profit Tracking): the page itself (1 Dec 2026).
 *
 * The file is named pt_page on purpose (the spec called it
 * profit_tracking.css): every stylesheet is linked by name in the head
 * of every page, the pilot seller's page included, and that page is
 * pinned never to carry the word for what this feature tracks
 * (test/integration/pilot_login_test.rb). The reorder block has its own
 * sheet (pt_reorder.css) and the share dialog its own (pt_share.css).
 *
 * Every rule is scoped under .pt, the class on the page root, except
 * the tab bar rule at the end, which tightens the six phone tabs.
 *
 * Colours: the theme tokens for everything that follows light and
 * dark. The board is a fixed navy card in both themes (#1c2d35, text
 * #fcfcfc, mint #75c69e, labels #a7dcc2), so a screenshot looks the same
 * whichever theme the member uses.
 *
 * Phone rule (founder, 30 Nov 2026): nothing scrolls or swipes
 * sideways. Pills and button rows wrap onto further lines, the rings
 * are two by two, the lines table reads as stacked cards at 820px and
 * below (application.css .stack-cards), and every box may shrink
 * (min-width: 0), so the page fits from 320px up.
 */

.pt {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
}

.pt .pt-block,
.pt #own-tracker {
  margin-top: 14px;
}
.pt .pt-trackers-first { margin: 0 0 14px; }
.pt .pt-trackers-first #own-tracker { margin-top: 0; }

/* ---------- Links that look like links, buttons that look like links ---------- */

.pt .pt-link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--deep);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
:root[data-theme="dark"] .pt .pt-link { color: var(--mint-3); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pt .pt-link { color: var(--mint-3); }
}

/* ---------- The states without a board ---------- */

.pt .pt-state,
.pt .pt-consent {
  min-width: 0;
  max-width: 760px;
}
.pt .pt-state-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.3;
}
.pt .pt-state-text,
.pt .pt-consent-text {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
}
.pt .pt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.pt .pt-actions .btn,
.pt .pt-consent-button {
  min-height: 44px;
  max-width: 100%;
  white-space: normal;
}
.pt .pt-consent-form { margin: 14px 0 0; }
.pt .pt-consent-agree { margin: 8px 0 0; font-size: 12.5px; }
.pt .pt-consent-details { margin-top: 6px; }
.pt .pt-consent-details summary {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  list-style: none;
}
.pt .pt-consent-details summary::-webkit-details-marker { display: none; }
.pt .pt-consent-details .pt-consent { margin-top: 8px; border: 0; padding: 0; box-shadow: none; }

/* ---------- Source line ---------- */

.pt .pt-source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--ink-2);
}
.pt .pt-source-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--light);
  color: var(--deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
:root[data-theme="dark"] .pt .pt-source-chip { background: var(--surface-2); color: var(--mint-3); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pt .pt-source-chip { background: var(--surface-2); color: var(--mint-3); }
}
.pt .pt-source .pt-link { min-height: 32px; }
.pt .pt-source-note { flex: 1 1 100%; min-width: 0; }

/* ---------- Pills: they wrap, they never scroll sideways ---------- */

.pt .pt-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 12px;
  min-width: 0;
}
.pt .pt-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
.pt .pt-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.pt .pt-pill.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fcfcfc;
}
:root[data-theme="dark"] .pt .pt-pill.active { background: var(--mint); border-color: var(--mint); color: #1c2d35; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pt .pt-pill.active { background: var(--mint); border-color: var(--mint); color: #1c2d35; }
}

/* ---------- The board: fixed navy in both themes ---------- */

.pt .pt-board {
  min-width: 0;
  padding: 16px;
  border-radius: 6px;
  background: #1c2d35;
  color: #fcfcfc;
}
.pt .pt-board-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  min-width: 0;
}
.pt .pt-board-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: #fcfcfc;
}
.pt .pt-board-text {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: #fcfcfc;
}
.pt .pt-board-range {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
}
.pt .pt-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
  color: #a7dcc2;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pt .pt-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}
.pt .pt-stamp { font-size: 12.5px; color: #a7dcc2; }
.pt .pt-refresh-form { margin: 0; display: inline-flex; }
.pt .pt-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  background: transparent;
  color: #fcfcfc;
  font: 600 13px/1 var(--font);
  cursor: pointer;
}
.pt .pt-refresh:hover { background: rgba(255, 255, 255, 0.08); }
.pt .pt-refresh[disabled] { opacity: 0.6; cursor: default; }
.pt .pt-note {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  line-height: 1.45;
  color: #fcfcfc;
}

/* The four rings: two by two on phones, four across above 820px. */
.pt .pt-rings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 4px;
}
.pt .pt-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  margin: 0;
}
.pt .pt-ring-dial {
  position: relative;
  width: 132px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
}
.pt .pt-ring-svg { display: block; width: 100%; height: 100%; }
.pt .pt-ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 8;
}
.pt .pt-ring-value {
  fill: none;
  stroke: #75c69e;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .pt .pt-ring-value { animation: pt-ring-draw 900ms ease-out both; }
}
@keyframes pt-ring-draw {
  from { stroke-dashoffset: 326.7; }
  to   { stroke-dashoffset: 0; }
}
.pt .pt-ring-figure {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  text-align: center;
  font-family: var(--font);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
  line-height: 1.1;
  color: #fcfcfc;
  white-space: nowrap;
}
.pt .pt-ring-22 { font-size: 22px; }
.pt .pt-ring-18 { font-size: 18px; }
.pt .pt-ring-15 { font-size: 15px; }
.pt .pt-ring-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  text-align: center;
  min-width: 0;
}
.pt .pt-ring-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #a7dcc2;
}
.pt .pt-ring-chip {
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(117, 198, 158, 0.16);
  color: #fcfcfc;
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 821px) {
  .pt .pt-rings { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .pt .pt-ring-dial { width: 168px; }
  .pt .pt-ring-22 { font-size: 26px; }
  .pt .pt-ring-18 { font-size: 21px; }
  .pt .pt-ring-15 { font-size: 17px; }
}

.pt .pt-today { margin-top: 12px; }
.pt .pt-today-line,
.pt .pt-today-note,
.pt .pt-under,
.pt .pt-caption,
.pt .pt-coverage,
.pt .pt-basis {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #fcfcfc;
}
.pt .pt-today-line { font-weight: 600; font-variant-numeric: tabular-nums; }
.pt .pt-today-note,
.pt .pt-caption,
.pt .pt-basis { color: #a7dcc2; }
.pt .pt-under {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-variant-numeric: tabular-nums;
}
.pt .pt-basis { font-size: 12px; }
.pt .pt-share-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
  border: 0;
  border-radius: 6px;
  background: #75c69e;
  color: #1c2d35;
  font-weight: 700;
}
.pt .pt-share-button:hover { background: #5faf88; }

/* The reconnect strip above the board. */
.pt .pt-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 13.5px;
}
.pt .pt-strip p { margin: 0; flex: 1 1 220px; min-width: 0; }
.pt .pt-strip .btn { min-height: 44px; }

/* ---------- Your lines ---------- */

.pt .pt-lines { margin-top: 14px; min-width: 0; }
.pt .pt-section-title { margin: 0 0 4px; font-size: 17px; font-weight: 700; letter-spacing: -0.2px; }
.pt .pt-section-sub { margin: 0 0 12px; font-size: 13px; }
.pt .pt-lines-empty p { margin: 0; font-size: 13.5px; }
.pt .pt-lines-table { width: 100%; }
.pt .pt-lines-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pt .pt-line-product { min-width: 0; max-width: 420px; }
.pt .pt-line-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.pt .pt-line-asin { display: block; font-size: 12px; color: var(--muted); }
.pt .pt-line-reconcile { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-2); white-space: normal; }
.pt .pt-line-how { margin-top: 6px; font-size: 12.5px; white-space: normal; }
.pt .pt-line-how summary {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  color: var(--deep);
  cursor: pointer;
}
:root[data-theme="dark"] .pt .pt-line-how summary { color: var(--mint-3); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pt .pt-line-how summary { color: var(--mint-3); }
}
.pt .pt-line-layer {
  margin: 8px 0 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  display: grid;
  gap: 4px;
}
.pt .pt-line-layer div { display: flex; flex-wrap: wrap; gap: 2px 8px; min-width: 0; }
.pt .pt-line-layer dt { margin: 0; color: var(--muted); font-weight: 500; }
.pt .pt-line-layer dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.pt .pt-lines-download { margin: 10px 0 0; font-size: 13px; }
.pt .pt-lines-download .pt-link { display: inline-flex; align-items: center; min-height: 44px; }

@media (max-width: 820px) {
  .pt .pt-lines-table .num { text-align: left; white-space: normal; }
  .pt .pt-line-product { max-width: none; }
}

/* ---------- "How this is worked out" ---------- */

.pt .pt-how-body p { margin: 0 0 12px; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.pt .pt-how-body p:last-child { margin-bottom: 0; }

/* ---------- Foot ---------- */

.pt .pt-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
  margin-top: 18px;
  font-size: 13px;
}
.pt .pt-foot .pt-link { min-height: 44px; }
.pt .pt-turn-off-form { margin: 0; display: inline-flex; }

/* ---------- The sixth phone tab ---------- */

/* Six labels fit at 375px ("Messages" is the longest). The class is set
   on the tab bar only while the Pulse tab is there. */
@media (max-width: 820px) {
  .client-tabbar.has-profit .client-tab { margin: 4px 1px; font-size: 10px; }
}
/* At 320px "Messages" needs 45px and has 42px: drop the side margins and
   a touch of size so every label reads in full on the smallest phones. */
@media (max-width: 345px) {
  .client-tabbar.has-profit .client-tab { margin: 4px 0; font-size: 9.5px; letter-spacing: -0.1px; }
}
