/* Sales Sparring app: clean and minimal.
   White and light gray, one accent color, system fonts, soft shadows.
   To change the accent, edit --accent, --accent-hover and --accent-wash below. */

:root {
  --accent: #D9480F;
  --accent-hover: #C2410C;
  --accent-wash: rgba(217,72,15,0.08);
  --accent-ring: rgba(217,72,15,0.28);
  --on-accent: #FFFFFF;

  --ink: #1D1D1F;
  --ink-dim: #515154;
  --ink-faint: #86868B;
  --bg: #F5F5F7;
  --bg-raised: #FFFFFF;
  --bg-raised-2: #F5F5F7;
  --bg-inset: #FAFAFC;
  --line-soft: #E5E5EA;
  --line-strong: #C7C7CC;
  --bubble: #E9E9EB;
  --green: #248A3D;
  --green-wash: rgba(52,199,89,0.12);
  --amber: #B25000;
  --red: #D70015;
  --shadow-s: 0 1px 2px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-m: 0 2px 6px rgba(0,0,0,0.04), 0 12px 32px rgba(0,0,0,0.06);
  --radius-s: 12px;
  --radius-m: 18px;
  --radius-l: 22px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Helvetica Neue', 'Segoe UI', system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Helvetica Neue', 'Segoe UI', system-ui, sans-serif;
  /* older names still used in a few places */
  --hot: var(--accent); --hot-2: var(--accent); --hot-dim: var(--accent-ring); --hot-wash: var(--accent-wash);
  --teal: var(--green); --teal-wash: var(--green-wash); --volt: var(--ink); --volt-wash: var(--bg-raised-2);
  --gold: var(--accent); --gold-dim: var(--accent-ring); --gold-wash: var(--accent-wash); --rust: var(--red);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  padding-top: var(--safe-t);
  padding-bottom: var(--safe-b);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  font-size: 16px;
  letter-spacing: -0.01em;
}
h1, h2, h3, .display { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; color: var(--ink); }
::selection { background: var(--accent-wash); }
button { font-family: inherit; letter-spacing: inherit; }
a { color: var(--accent); }

.app { max-width: 880px; margin: 0 auto; padding: 18px 20px 56px; }

/* ---------- Top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 -20px 36px; flex-wrap: wrap;
  padding: 10px 20px 14px; border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; z-index: 10;
  background: rgba(245,245,247,0.8); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.brandmark { display: flex; align-items: center; gap: 12px; }
.brandmark .mark { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }
.brandmark .mark::before { content: ''; width: 26px; height: 26px; border-radius: 7px; flex: none;
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 13l5-5 3 3 6-6'/%3E%3Cpath d='M14 5h4v4'/%3E%3C/svg%3E") center/15px no-repeat; }
.brandmark .tagline { font-size: 12.5px; color: var(--ink-faint); }
@media (max-width: 640px) { .brandmark .tagline { display: none; } }
.round-indicator { display: none; }
.round-indicator.show { display: none; }
.nav-links { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav-link { font-size: 13.5px; font-weight: 500; color: var(--ink-dim); background: none; border: none; cursor: pointer; padding: 6px 11px; border-radius: 999px; }
.nav-link:hover { color: var(--ink); background: rgba(0,0,0,0.05); }
.signed-in-as { font-size: 12.5px; color: var(--ink-faint); }
.signed-in-as button { margin-left: 8px; background: none; border: none; color: var(--accent); cursor: pointer; font-size: inherit; padding: 0; }
.signed-in-as button:hover { text-decoration: underline; }

/* ---------- Setup screen ---------- */
.hero h1 { font-size: clamp(34px, 5.6vw, 52px); margin: 0 0 14px; max-width: 18ch; }
.hero p.lede { font-size: 19px; line-height: 1.45; color: var(--ink-dim); max-width: 54ch; margin: 0 0 36px; }

.field-label { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); margin: 8px 0 12px; }

.biz-input {
  width: 100%; font-family: inherit; font-size: 17px; padding: 14px 16px; margin-bottom: 24px;
  background: var(--bg-raised); border: 1px solid var(--line-strong); border-radius: var(--radius-s); color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.biz-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.biz-input::placeholder { color: var(--ink-faint); }

.tailor-row { display: flex; align-items: center; gap: 12px; margin: -12px 0 30px; flex-wrap: wrap; }
.tailor-btn { font-size: 14px; font-weight: 500; padding: 8px 16px; border-radius: 999px; border: none; background: var(--accent-wash); color: var(--accent); cursor: pointer; transition: background .15s ease; }
.tailor-btn:hover { background: rgba(217,72,15,0.14); }
.tailor-btn:disabled { opacity: 0.5; cursor: default; }
.tailor-status { font-size: 13px; color: var(--ink-faint); }
.objection-source-note { font-size: 13px; color: var(--green); margin: -6px 0 18px; display: none; }
.objection-source-note.show { display: block; }
.objection-source-note button { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 13px; margin-left: 8px; padding: 0; }

.track-record { background: var(--bg-raised); border: none; box-shadow: var(--shadow-s);
  border-radius: var(--radius-m); padding: 18px 20px; margin-bottom: 32px; font-size: 15px; line-height: 1.55; display: none; }
.track-record.show { display: block; }
.track-record .tr-label, .invite-card .tr-label { font-size: 12px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px; }
.track-record.loading { color: var(--ink-faint); }

/* "How does this conversation start?" tiles */
.setting-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 32px; }
@media (max-width: 760px) { .setting-grid { grid-template-columns: 1fr 1fr; } }
.setting-tile { text-align: left; background: var(--bg-raised); border: 1.5px solid transparent; border-radius: var(--radius-m); box-shadow: var(--shadow-s);
  padding: 18px 16px 16px; cursor: pointer; color: var(--ink); display: flex; flex-direction: column; gap: 8px; min-height: 124px;
  transition: box-shadow .2s ease, border-color .2s ease; }
.setting-tile:hover { box-shadow: var(--shadow-m); }
.setting-tile .st-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-raised-2); }
.setting-tile .st-ico svg { width: 19px; height: 19px; stroke: var(--ink-dim); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.setting-tile .st-label { font-size: 16px; font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; }
.setting-tile .st-note { font-size: 13px; color: var(--ink-faint); line-height: 1.35; }
.setting-tile.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash), var(--shadow-s); }
.setting-tile.active .st-ico { background: var(--accent); }
.setting-tile.active .st-ico svg { stroke: var(--on-accent); }

/* Objections */
.objection-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
@media (max-width: 760px) { .objection-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .objection-grid { grid-template-columns: 1fr; } }
.objection-card { position: relative; text-align: left; background: var(--bg-raised); border: 1.5px solid transparent; border-radius: var(--radius-s); box-shadow: var(--shadow-s);
  padding: 14px 15px; cursor: pointer; color: var(--ink); transition: box-shadow .2s ease, border-color .2s ease; }
.objection-card:hover { box-shadow: var(--shadow-m); }
.objection-card.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash), var(--shadow-s); }
.objection-card .oc-quote { font-size: 14.5px; font-weight: 500; line-height: 1.4; margin-bottom: 6px; }
.objection-card .oc-label { font-size: 12px; font-weight: 500; color: var(--ink-faint); }
.objection-card.active .oc-label { color: var(--accent); }
.objection-card .oc-recommend { font-size: 12px; font-weight: 500; color: var(--green); margin-top: 6px; }
.objection-card.custom { border: 1.5px dashed var(--line-strong); box-shadow: none; }
.objection-card.custom.active { border: 1.5px solid var(--accent); }
.objection-card.team .oc-label { color: var(--green); }
.obj-score-tag { font-size: 11.5px; color: var(--ink-faint); margin-top: 6px; }
.oc-remove { position: absolute; top: 6px; right: 10px; font-size: 18px; line-height: 1; color: var(--ink-faint); cursor: pointer; }
.oc-remove:hover { color: var(--red); }
.show-more-btn { background: none; border: none; color: var(--accent); font-weight: 500; font-size: 14px; cursor: pointer; padding: 0; margin: -4px 0 20px; }
.show-more-btn:hover { text-decoration: underline; }
.custom-obj-row { display: flex; gap: 10px; align-items: center; margin: 0 0 24px; }
.custom-obj-row .biz-input { margin-bottom: 0; flex: 1; font-size: 15px; }
.custom-obj-row .tailor-btn { white-space: nowrap; padding: 13px 18px; }
@media (max-width: 560px) { .custom-obj-row { flex-direction: column; align-items: stretch; } }
.custom-obj-meta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: -14px 0 28px; min-height: 18px; }
.share-obj { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-dim); cursor: pointer; }
.share-obj input { accent-color: var(--accent); }

/* Mood / difficulty: segmented control */
.difficulty-row { display: inline-flex; gap: 2px; margin-bottom: 10px; flex-wrap: wrap; background: rgba(118,118,128,0.12); padding: 3px; border-radius: 12px; }
.diff-btn { font-size: 14.5px; font-weight: 500; padding: 9px 22px; border-radius: 9px; border: none; background: transparent; color: var(--ink); cursor: pointer; transition: background .15s ease, box-shadow .15s ease; }
.diff-btn:hover { background: rgba(255,255,255,0.5); }
.diff-btn.active { background: var(--bg-raised); box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 1px rgba(0,0,0,0.04); font-weight: 600; }
.diff-btn.diff-easy.active, .diff-btn.diff-medium.active, .diff-btn.diff-hard.active { color: var(--ink); }
.diff-btn .suggested-badge { display: block; font-size: 10.5px; font-weight: 500; margin-top: 1px; color: var(--accent); }
.difficulty-note { font-size: 13px; color: var(--ink-faint); margin-bottom: 34px; min-height: 1em; }

/* Buttons */
.start-btn { font-family: var(--font); font-size: 17px; font-weight: 500; letter-spacing: -0.01em; padding: 15px 26px; border-radius: 999px; border: none; cursor: pointer; width: 100%;
  background: var(--accent); color: var(--on-accent); transition: background .15s ease; }
.start-btn:hover { background: var(--accent-hover); }
.start-btn:disabled { opacity: 0.4; cursor: default; }
.start-btn.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.start-btn.secondary:hover { background: var(--accent-wash); }
.start-hint { font-size: 13.5px; color: var(--accent); margin-top: 12px; text-align: center; }
.primary-btn { font-weight: 500; font-size: 15px; padding: 12px 22px; border-radius: 999px; border: none; background: var(--accent); color: var(--on-accent); cursor: pointer; }
.primary-btn:hover { background: var(--accent-hover); }
.ghost-btn { font-size: 14px; font-weight: 500; padding: 9px 16px; border-radius: 999px; border: none; background: rgba(0,0,0,0.05); color: var(--ink); cursor: pointer; }
.ghost-btn:hover { background: rgba(0,0,0,0.08); }
.export-btn { font-size: 14px; font-weight: 500; padding: 8px 15px; border-radius: 999px; border: none; background: var(--accent-wash); color: var(--accent); cursor: pointer; }
.export-btn:hover { background: rgba(217,72,15,0.14); }
.export-btn:disabled { opacity: 0.5; cursor: default; }
.export-note { font-size: 13px; color: var(--green); margin-top: 10px; }

/* ---------- The practice room ---------- */
.room { display: none; }
.room.show { display: block; }
.setup-screen.hide { display: none; }

.brief-card { position: relative; background: var(--bg-raised); border: none; box-shadow: var(--shadow-s);
  border-radius: var(--radius-m); padding: 16px 20px; margin-bottom: 12px; font-size: 15px; line-height: 1.55; }
.brief-card .bc-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; color: var(--ink-faint); margin-bottom: 6px; }
.brief-card strong { color: var(--ink); font-weight: 600; }
.opening-hint { font-size: 14px; color: var(--ink-dim); background: transparent; border: none; padding: 2px 4px; margin-bottom: 16px; line-height: 1.5; }

.ring { border: none; border-radius: var(--radius-l); overflow: hidden; margin-bottom: 14px; background: var(--bg-raised); box-shadow: var(--shadow-m); }
.ring-bar { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); background: var(--bg-raised); }
.ring-bar .live-dot { width: 8px; height: 8px; border-radius: 50%; background: #FF3B30; animation: live 1.6s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(255,59,48,0.5); } 70% { box-shadow: 0 0 0 8px rgba(255,59,48,0); } 100% { box-shadow: 0 0 0 0 rgba(255,59,48,0); } }
.ring-bar .ring-live { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: #FF3B30; }
.ring-bar .ring-meta { font-size: 13px; color: var(--ink-faint); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ring-bar .ring-timer { font-family: var(--font); font-size: 17px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

.thread { display: flex; flex-direction: column; gap: 10px; min-height: 280px; padding: 20px 18px; }
.msg { max-width: 78%; padding: 10px 15px; border-radius: 20px; font-size: 16px; line-height: 1.42; opacity: 0; animation: rise 0.25s ease forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg.customer { position: relative; align-self: flex-start; margin-left: 40px; background: var(--bubble); color: var(--ink); border: none; border-bottom-left-radius: 6px; }
.msg.customer::before { content: ''; position: absolute; left: -40px; bottom: 0; width: 30px; height: 30px; border-radius: 50%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFFFFF'%3E%3Ccircle cx='12' cy='9' r='4'/%3E%3Cpath d='M4 21c0-4.4 3.6-7 8-7s8 2.6 8 7z'/%3E%3C/svg%3E") center 60%/20px no-repeat, linear-gradient(180deg, #A1A1A6, #8E8E93); }
.msg.rep { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 6px; }
.msg.system { align-self: center; background: none; color: var(--ink-faint); font-size: 13px; text-align: center; padding: 4px 14px; max-width: 90%; }
.msg-label { font-size: 11.5px; font-weight: 600; margin-bottom: 3px; display: flex; align-items: center; gap: 6px; opacity: 0.7; }
.msg.customer .msg-label { color: var(--ink-dim); opacity: 1; }
.speak-btn { background: none; border: none; color: var(--ink-faint); cursor: pointer; padding: 0; font-size: 12px; line-height: 1; }
.speak-btn:hover { color: var(--accent); }
.thinking { align-self: flex-start; margin-left: 40px; display: flex; gap: 5px; padding: 14px 16px; background: var(--bubble); border-radius: 20px; border-bottom-left-radius: 6px; }
.thinking span { width: 7px; height: 7px; border-radius: 50%; background: #8E8E93; animation: bounce 1.1s infinite ease-in-out; }
.thinking span:nth-child(2) { animation-delay: 0.15s; }
.thinking span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

.ring-controls { padding: 12px 14px 14px; border-top: 1px solid var(--line-soft); background: var(--bg-inset); }
.mode-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 10px; flex-wrap: wrap; }
.mode-toggle { display: inline-flex; background: rgba(118,118,128,0.12); border: none; border-radius: 9px; padding: 2px; gap: 2px; }
.mode-toggle button { font-size: 13px; font-weight: 500; padding: 6px 16px; border-radius: 7px; border: none; background: transparent; color: var(--ink); cursor: pointer; }
.mode-toggle button.active { background: var(--bg-raised); box-shadow: 0 1px 3px rgba(0,0,0,0.12); font-weight: 600; }
.speak-toggle { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-dim); cursor: pointer; user-select: none; }
.speak-toggle input { accent-color: var(--accent); }

.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; font-family: inherit; font-size: 16px; padding: 11px 16px; background: var(--bg-raised); border: 1px solid var(--line-strong); border-radius: 22px;
  color: var(--ink); resize: none; min-height: 44px; max-height: 140px; }
.composer textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.mic-btn { font-size: 17px; width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; border: none; background: rgba(0,0,0,0.05); color: var(--ink-dim); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.mic-btn.listening { background: #FF3B30; color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,59,48,0.45); } 50% { box-shadow: 0 0 0 9px rgba(255,59,48,0); } }
.send-btn { font-weight: 500; font-size: 15px; height: 44px; padding: 0 20px; border-radius: 999px; border: none; background: var(--accent); color: var(--on-accent); cursor: pointer; flex-shrink: 0; }
.send-btn:hover { background: var(--accent-hover); }
.send-btn:disabled { opacity: 0.4; cursor: default; }
.talk-panel { display: none; flex-direction: column; align-items: center; gap: 10px; padding: 16px 0 6px; }
.talk-panel.show { display: flex; }
.talk-mic-btn { width: 76px; height: 76px; border-radius: 50%; border: none; background: var(--accent); color: var(--on-accent); font-size: 28px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-m); }
.talk-mic-btn.listening { background: #FF3B30; color: #fff; animation: pulse 1.2s infinite; }
.talk-status { font-size: 13.5px; color: var(--ink-faint); }
.talk-transcript { font-size: 15px; color: var(--ink); min-height: 20px; text-align: center; max-width: 90%; }

.room-actions { display: flex; justify-content: space-between; align-items: center; padding-top: 6px; gap: 10px; }
.end-btn { font-weight: 500; font-size: 15px; padding: 12px 22px; border-radius: 999px; border: none; background: var(--ink); color: #fff; cursor: pointer; }
.end-btn:hover { background: #000; }
.end-btn:disabled { opacity: 0.4; cursor: default; }

/* ---------- Feedback ---------- */
.feedback { display: none; }
.feedback.show { display: block; }
.fb-heading { font-size: clamp(32px, 5vw, 44px); margin: 0 0 6px; }
.fb-sub { color: var(--ink-faint); font-size: 15px; margin: 0 0 24px; }
.score-badges-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 18px; }
.score-badges-row:empty { display: none; }
.score-badge { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; background: var(--bg-raised); border: none; box-shadow: var(--shadow-s); border-radius: var(--radius-m); padding: 18px 20px; }
.score-badge.rapport { background: var(--bg-raised); }
.score-badge .score-tag { flex-basis: 100%; font-size: 13px; font-weight: 500; color: var(--ink-faint); }
.score-badge .score-num { font-family: var(--font-display); font-size: 52px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; color: var(--ink); }
.score-badge.rapport .score-num { color: var(--ink); }
.score-badge .score-den { font-size: 17px; color: var(--ink-faint); font-weight: 500; }
.score-badge .score-trend { font-size: 13px; font-weight: 600; color: var(--green); margin-left: auto; }
.fb-body { font-size: 16px; line-height: 1.7; color: var(--ink); white-space: pre-wrap; background: var(--bg-raised); border: none; box-shadow: var(--shadow-s); border-radius: var(--radius-m); padding: 22px 24px; }
.fb-loading { color: var(--ink-faint); font-size: 15px; }
.fb-saved-note { font-size: 13.5px; color: var(--green); margin-top: 14px; }
.fb-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }

/* ---------- Auth, team setup, paywall ---------- */
.auth-screen { max-width: 420px; margin: 48px auto; }
.auth-screen h1 { font-size: 40px; margin: 0 0 10px; }
.auth-screen p.lede { color: var(--ink-dim); font-size: 17px; line-height: 1.45; margin: 0 0 28px; }
.auth-field { margin-bottom: 2px; }
.auth-field label { font-size: 13px; font-weight: 500; color: var(--ink-dim); display: block; margin-bottom: 6px; }
.auth-error { color: var(--red); font-size: 14px; margin-top: 12px; }
.auth-switch { font-size: 14.5px; color: var(--ink-dim); margin-top: 22px; text-align: center; }
.auth-switch button { background: none; border: none; color: var(--accent); font-weight: 500; cursor: pointer; font-size: inherit; padding: 0; }
.auth-switch button:hover { text-decoration: underline; }
.team-setup { max-width: 520px; }
.choice-card { background: var(--bg-raised); border: none; box-shadow: var(--shadow-s); border-radius: var(--radius-m); padding: 24px; margin-bottom: 16px; }
.choice-card h3 { font-size: 21px; margin: 0 0 16px; }
.choice-card .biz-input { margin-bottom: 14px; }
.fine-print { font-size: 13px; color: var(--ink-faint); margin: 10px 0 0; }
.link-btn { display: block; text-align: center; text-decoration: none; }
.paywall-history { margin-top: 18px; text-align: center; }
.unavailable-note { background: var(--bg-raised); box-shadow: var(--shadow-s); border-radius: var(--radius-m); padding: 16px 18px; font-size: 14.5px; color: var(--ink-dim); margin-bottom: 20px; }

/* ---------- History, team, manager ---------- */
.subscreen { display: none; }
.subscreen.show { display: block; }
.subscreen-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 10px; }
.subscreen-header h2 { font-size: clamp(30px, 5vw, 40px); margin: 0; }
.history-row { background: var(--bg-raised); border: none; box-shadow: var(--shadow-s); border-radius: var(--radius-m); padding: 16px 20px; margin-bottom: 10px; cursor: pointer; transition: box-shadow .2s ease; }
.history-row:hover { box-shadow: var(--shadow-m); }
.history-row-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.history-row-title { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; }
.history-row-meta { font-size: 13px; color: var(--ink-faint); }
.history-row-scores { display: flex; gap: 8px; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.history-row-scores span { background: var(--bg-raised-2); border: none; border-radius: 999px; padding: 4px 11px; color: var(--ink); }
.history-row-feedback { display: none; white-space: pre-wrap; font-size: 14.5px; line-height: 1.6; color: var(--ink-dim); margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.history-row.expanded .history-row-feedback { display: block; }
.empty-note { color: var(--ink-faint); font-size: 15px; padding: 18px 0; }

.table-scroll { overflow-x: auto; background: var(--bg-raised); border-radius: var(--radius-m); box-shadow: var(--shadow-s); }
.team-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.team-table th { text-align: left; padding: 12px 14px; color: var(--ink-faint); font-size: 12px; font-weight: 600; border-bottom: 1px solid var(--line-soft); }
.team-table td { padding: 13px 14px; border-bottom: 1px solid var(--line-soft); }
.team-table tr:last-child td { border-bottom: none; }
.team-table tr.rep-row { cursor: pointer; }
.team-table tr.rep-row:hover td { background: var(--bg-inset); }
.team-table .focus-cell { color: var(--ink-dim); font-size: 13.5px; max-width: 260px; }
.team-name { font-weight: 600; }
.rep-detail td { background: var(--bg-inset); padding: 14px 16px; }
.rep-detail .history-row { cursor: default; }
.rep-detail .history-row-feedback { display: block; }
.role-tag { font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-wash); padding: 2px 8px; border-radius: 999px; margin-left: 6px; }
.invite-card { background: var(--bg-raised); border: none; box-shadow: var(--shadow-s); border-radius: var(--radius-m); padding: 20px 22px; margin-bottom: 28px; }
.invite-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.invite-help { font-size: 15px; line-height: 1.5; }
.invite-help strong { font-family: ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: 0.06em; color: var(--ink); background: var(--bg-raised-2); padding: 1px 6px; border-radius: 6px; }
.invite-link { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12.5px; color: var(--ink-faint); margin-top: 10px; word-break: break-all; }
.plan-line { font-size: 14px; color: var(--ink-dim); margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.plan-line a { color: var(--accent); font-weight: 500; text-decoration: none; }
.plan-line a:hover { text-decoration: underline; }
.mgr-subhead { font-size: 24px; margin: 40px 0 8px; }
.obj-actions { white-space: nowrap; }
.obj-actions button { padding: 6px 11px; font-size: 12.5px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .msg { opacity: 1; }
}

.forgot-link { background: none; border: none; padding: 0; margin: -14px 0 20px; font-size: 14px; font-weight: 400; color: var(--accent); cursor: pointer; }
.forgot-link:hover { text-decoration: underline; }
.forgot-link:disabled { opacity: .5; }

/* Plan choice (monthly / yearly) */
.plan-intro { margin: 12px 0 0; color: var(--ink-dim); font-size: 14px; }
.plan-intro strong { color: var(--ink); }
.plan-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.plan-btn { flex: 1 1 200px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 18px; border-radius: 14px; text-decoration: none;
  background: var(--bg-raised); border: 1px solid var(--accent); color: var(--accent); font-weight: 600; font-size: 15px; }
.plan-btn small { font-size: 12.5px; font-weight: 500; opacity: 0.85; }
.plan-btn:hover { background: var(--accent-wash); text-decoration: none; }
.plan-btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.plan-btn.primary:hover { background: var(--accent-hover); }
#paywallPlans .plan-buttons { margin-top: 4px; }

/* Progress row: streak, level, score trend */
.progress-row { display: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.progress-row.show { display: grid; }
@media (max-width: 760px) { .progress-row.show { grid-template-columns: 1fr; } }
.pr-card { background: var(--bg-raised); border-radius: var(--radius-m); box-shadow: var(--shadow-s); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.pr-label { font-size: 12px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink-faint); }
.pr-big { font-family: var(--font-display); font-size: 32px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
.pr-big span { font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--ink-dim); }
.pr-level { font-family: var(--font-display); font-size: 24px; font-weight: 600; letter-spacing: -0.02em; color: var(--accent); }
.pr-sub { font-size: 13px; color: var(--ink-dim); line-height: 1.4; }
.pr-dots { display: flex; gap: 6px; margin: 2px 0; }
.pr-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--line-soft); }
.pr-dot.done { background: var(--accent); }
.pr-dot.today:not(.done) { background: transparent; border: 2px dashed var(--accent); box-sizing: border-box; }
.pr-bar { height: 8px; background: var(--bg-raised-2); border-radius: 99px; overflow: hidden; margin-top: 4px; }
.pr-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.pr-trend { font-weight: 600; }
.pr-trend.up { color: var(--green); }
.pr-trend.down { color: var(--amber); }

/* Scorecard: best moment first (peak-end) */
.best-moment { display: none; background: var(--bg-raised); border-radius: var(--radius-m); box-shadow: 0 0 0 2px var(--accent), var(--shadow-s); padding: 18px 20px; margin-bottom: 14px; }
.best-moment.show { display: block; }
.bm-label { font-size: 12px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.bm-text { font-size: 16.5px; line-height: 1.5; white-space: pre-wrap; }

/* After-round progress / level up */
.level-up { display: none; margin-top: 14px; padding: 14px 18px; border-radius: var(--radius-m); background: var(--bg-raised); box-shadow: var(--shadow-s); }
.level-up.show { display: block; }
.level-up.big { box-shadow: 0 0 0 2px var(--accent), var(--shadow-m); }
.lu-title { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--accent); margin-bottom: 4px; }
.lu-sub { font-size: 14px; color: var(--ink-dim); }

/* Team size and plan tiers */
.seat-line { font-size: 14px; color: var(--ink-dim); margin-top: 12px; }
.seat-line strong { color: var(--ink); }
.seat-line.full { color: var(--amber); }
.plan-tier { margin-top: 14px; }
.plan-tier-name { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: -4px; }
.plan-large { font-size: 13.5px; color: var(--ink-dim); margin-top: 12px; }

/* Industry editions */
.privacy-note { font-size: 13px; color: var(--ink-dim); background: var(--bg-raised); border-radius: var(--radius-s); padding: 8px 12px; margin: -14px 0 26px; box-shadow: var(--shadow-s); }
.industry-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; font-size: 14px; color: var(--ink-dim); }
.industry-line select { font: inherit; font-size: 14px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg-raised); color: var(--ink); }
.industry-note { font-size: 13px; color: var(--green); }
