/* Prompt Efficiently: Fraunces display + Inter body + IBM Plex Mono labels (self-hosted, OFL) */
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/inter-var.woff2') format('woff2');
  font-weight: 100 900; font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('assets/fonts/fraunces-var.woff2') format('woff2');
  font-weight: 300 700; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('assets/fonts/ibm-plex-mono-400.woff2') format('woff2');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('assets/fonts/ibm-plex-mono-500.woff2') format('woff2');
  font-weight: 500; font-display: swap;
}
:root {
  --accent: #6d5ae0;
  --accent-deep: #4f3fb8;
  --ink: #17141f;
  --muted: #5b5566;
  --line: #e6e2ef;
  --soft: #f6f4fb;
  --good: #157a4c;
  --warn: #b4530a;
  --bad: #b42318;
  --radius: 18px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-variation-settings: 'wght' 400;
  color: var(--ink);
  background: #fff;
  line-height: 1.55;
}
h1.display, h2.step-title, .step-card h3, .pro-band h3, .pro-card h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-variation-settings: 'opsz' 100, 'wght' 560;
  letter-spacing: -0.015em;
}
.brand, .cost-range, .pro-band .price, .pro-card .price {
  font-family: 'Fraunces', Georgia, serif;
  font-variation-settings: 'opsz' 60, 'wght' 600;
  letter-spacing: -0.01em;
}
.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.mono-label {
  font-family: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; text-decoration: none; color: var(--ink); }
.brand img { width: 30px; height: 30px; }
.brand .prompt-part { font-weight: 400; color: var(--ink); }
.topnav a { color: var(--muted); text-decoration: none; font-size: 14px; margin-left: 18px; }
.topnav a:hover { color: var(--ink); }

h1.display {
  font-size: clamp(36px, 7.5vw, 60px);
  line-height: 1.04; letter-spacing: -0.015em;
  margin: 12px 0 16px;
}
h1.display .accent { color: var(--accent); }
.lede { font-size: 17px; color: var(--muted); max-width: 620px; }
section { padding: 30px 0; }
.step-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.step-num {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px; font-weight: 700; color: var(--accent);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px;
  background: var(--soft);
}
h2.step-title { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }

.platform-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px;
}
.platform-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px;
  background: #fff; text-align: left; cursor: pointer; font: inherit;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.platform-card:hover { border-color: #cfc8e4; box-shadow: 0 4px 14px rgba(23,16,46,.07); transform: translateY(-1px); }
.platform-card:hover { border-color: var(--accent); }
.platform-card[aria-pressed="true"] { border-color: var(--accent); background: var(--soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.platform-card .p-name { font-weight: 700; font-size: 15px; }
.platform-card .p-free { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Plan comes from the signed-in account; no on-page picker. */
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.cta-row .size-select { flex: 1 1 200px; }
.cta-row .btn { flex: 1 1 170px; }
.free-counter { font-size: 13px; color: var(--muted); flex-basis: 100%; }

textarea.task-input {
  width: 100%; min-height: 120px; border: 1.5px solid var(--line); border-radius: 14px;
  padding: 14px; font: inherit; font-size: 15px; resize: vertical;
}
textarea.task-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(109,90,224,.15); }
.field-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
select.size-select {
  border: 1.5px solid var(--line); border-radius: 999px; padding: 9px 14px;
  font: inherit; font-weight: 600; background: #fff;
}
.btn {
  display: inline-block; border: none; border-radius: 999px; padding: 13px 26px;
  font: inherit; font-weight: 650; font-size: 15px; cursor: pointer;
  background: var(--ink); color: #fff; text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.btn:hover { background: #000; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(23,16,46,.18); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn.accent { background: var(--accent); }
.btn.accent:hover { background: var(--accent-deep); box-shadow: 0 6px 16px rgba(109,90,224,.35); }
.btn.ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn.ghost:hover { border-color: var(--ink); box-shadow: 0 4px 12px rgba(23,16,46,.08); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.result-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; background: #fff; margin-top: 14px;
  box-shadow: 0 1px 2px rgba(23,16,46,.04), 0 8px 24px rgba(23,16,46,.05);
}
.result-card .mono-label { margin-bottom: 6px; }
.cost-range { font-size: clamp(26px, 5vw, 36px); font-weight: 800; letter-spacing: -0.02em; }
.cost-sub { color: var(--muted); font-size: 15px; margin-top: 4px; }
.verdict {
  display: inline-block; margin-top: 12px; padding: 6px 14px; border-radius: 999px;
  font-weight: 800; font-size: 13px;
}
.verdict.fits { background: #e7f5ee; color: var(--good); }
.verdict.tight { background: #fdf1e5; color: var(--warn); }
.verdict.over { background: #fdecea; color: var(--bad); }
.flag-line { font-size: 13px; color: var(--warn); margin-top: 10px; }
.flag-line.muted-flag { color: var(--muted); }
.type-line { font-size: 13px; color: var(--muted); margin-top: 8px; font-style: italic; }
.meter { height: 8px; border-radius: 99px; background: var(--soft); margin-top: 14px; overflow: hidden; }
.meter > div { height: 100%; background: var(--accent); border-radius: 99px; }

details.how { margin-top: 14px; font-size: 14px; color: var(--muted); }
details.how summary { cursor: pointer; font-weight: 700; color: var(--ink); }

.optimised-box {
  border: 1.5px dashed var(--accent); border-radius: 14px; background: var(--soft);
  padding: 16px; margin-top: 14px; font-size: 15px; white-space: pre-wrap;
}
.saved-line { font-weight: 800; color: var(--good); margin-top: 10px; }
.tracker-line { font-size: 13px; color: var(--muted); margin-top: 4px; }

.pro-card {
  border-radius: var(--radius); padding: 26px; margin-top: 18px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
}
.pro-card h3 { font-size: 22px; font-weight: 800; }
.pro-card p { opacity: .92; margin-top: 6px; font-size: 15px; }
.pro-card .price { font-size: 30px; font-weight: 800; margin-top: 10px; }
.pro-card .price span { font-size: 15px; font-weight: 600; opacity: .85; }

.fine-print { font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); padding: 18px 0 40px; }
.cal-row { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.cal-row input {
  width: 110px; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit;
}
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 700; opacity: 0; transition: opacity .2s; pointer-events: none;
}
.toast.show { opacity: 1; }
.hidden { display: none !important; }

.cur-switch { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.cur-pill {
  border: 1.5px solid rgba(255,255,255,.45); border-radius: 999px; padding: 3px 12px;
  background: transparent; color: inherit; cursor: pointer; font: inherit; font-weight: 700; font-size: 13px;
  transition: background .15s ease, border-color .15s ease;
}
.cur-pill:hover { border-color: currentColor; }
.cur-pill[aria-pressed="true"] { background: rgba(255,255,255,.22); border-color: #fff; }
.pro-card .cur-pill { border-color: rgba(255,255,255,.45); }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 10px; width: max-content; animation: pe-marquee 30s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes pe-marquee { to { transform: translateX(-50%); } }
.mq-chip {
  display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); border-radius: 14px;
  padding: 10px 16px; background: #fff; white-space: nowrap;
  box-shadow: 0 6px 16px -12px rgba(23,16,46,.25);
  transition: border-color .15s ease, transform .15s ease;
}
.mq-chip:hover { border-color: var(--accent); transform: translateY(-1px); }
.mq-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.mq-logo { width: 22px; height: 22px; object-fit: contain; border-radius: 5px; flex: none; }
.logo-note { text-align: center; font-size: 11.5px; color: var(--muted); margin-top: 10px; }
.meter-badge { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-deep); background: var(--soft); border-radius: 999px; padding: 2px 8px; margin-top: 8px; }
.mq-name { font-weight: 700; font-size: 14px; }
.mq-free { font-size: 12px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none !important; flex-wrap: wrap; width: auto; justify-content: center; }
}

.topnav a.nav-active { color: var(--ink); font-weight: 700; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.stat-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: #fff; }
.stat-num { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 2px; }
.plan-line { font-weight: 800; font-size: 17px; }
.log-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.log-right { color: var(--muted); white-space: nowrap; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.set-name { font-weight: 700; font-size: 15px; }
.set-sub { font-size: 13px; color: var(--muted); margin-top: 2px; max-width: 420px; }
.set-actions { display: flex; gap: 8px; }
.signin-email { min-height: 0; flex: 1 1 220px; }
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-num { font-size: 20px; }
  .topnav a { margin-left: 10px; font-size: 13px; }
  .topnav a.nav-home { display: none; }
  .topbar { flex-wrap: nowrap; }
  .brand span { font-size: 15px; }
}

@media (max-width: 560px) {
  .platform-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .size-select, .cta-row .btn { width: 100%; flex-basis: auto; }
  .free-counter { text-align: center; }
  .result-card { padding: 16px; }
}
.pc-logo { width: 18px; height: 18px; object-fit: contain; border-radius: 4px; vertical-align: -3px; margin-right: 6px; }

/* Plan picker */
.plan-row { margin-top: 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.plan-label { font-weight: 600; font-size: 15px; }
.plan-row .flag-line { margin: 0; }
.result-logo { width: 18px; height: 18px; border-radius: 4px; vertical-align: -4px; margin-right: 7px; }
.result-logo.hidden { display: none; }
.plan-allow { font-size: 14px; color: var(--muted, #5a5470); }

/* Hamburger nav (mobile) */
.nav-burger { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.nav-burger span { display: block; width: 18px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; }
@media (max-width: 700px) {
  .topbar { position: relative; }
  .nav-burger { display: block; }
  .topnav { display: none; position: absolute; top: 100%; right: 0; z-index: 60; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(23,16,46,.14); padding: 8px 18px; flex-direction: column; min-width: 170px; }
  .topnav.open { display: flex; }
  .topnav a { margin: 0; padding: 10px 0; font-size: 15px; border-bottom: 1px solid var(--line); }
  .topnav a:last-child { border-bottom: none; }
  .topnav a.nav-home { display: block; }
}

/* Nav CTA + footer */
.nav-cta { background: var(--accent); color: #fff !important; padding: 8px 14px; border-radius: 999px; margin-left: 18px; font-weight: 600; }
.nav-cta:hover { background: var(--accent-deep); }
.site-footer { margin-top: 72px; border-top: 1px solid var(--line); padding: 40px 0 28px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.foot-brand img { width: 26px; height: 26px; }
.foot-name { font-weight: 700; margin-top: 8px; }
.foot-brand p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.foot-head { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.foot-col a, .foot-off { display: block; font-size: 14px; margin: 6px 0; }
.foot-col a { color: var(--ink); text-decoration: none; }
.foot-col a:hover { color: var(--accent); }
.foot-off { color: #b6b1c4; }
.foot-base { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
@media (max-width: 700px) {
  .nav-cta { margin: 6px 0 0; text-align: center; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

/* Extension page demo mock */
.ext-demo { max-width: 520px; margin: 24px auto 0; }
.ext-promptbox { border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; font-size: 15px; background: #fff; box-shadow: 0 1px 2px rgba(23,16,46,.04), 0 8px 24px rgba(23,16,46,.05); }
.ext-caret { display: inline-block; width: 2px; height: 16px; background: var(--accent); margin-right: 6px; vertical-align: -3px; animation: extBlink 1.1s steps(1) infinite; }
@keyframes extBlink { 50% { opacity: 0; } }
.ext-bubble { display: inline-block; margin-top: 10px; margin-left: 24px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 999px; box-shadow: 0 6px 18px rgba(23,16,46,.18); }

/* Settings toggle switch */
.switch { position: relative; width: 46px; height: 26px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background .18s ease; cursor: pointer; }
.switch .slider::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(23,16,46,.25); transition: transform .18s ease; }
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::after { transform: translateX(20px); }

/* Period toggle */
.period-switch { display: flex; gap: 6px; margin-bottom: 8px; }
.yearly-note { font-size: 13px; color: var(--good); font-weight: 600; margin-top: 4px; }
.yearly-note.hidden { display: none; }

/* Legal pages */
.legal-body { max-width: 640px; }
.legal-body h3 { font-family: 'Fraunces', Georgia, serif; font-size: 20px; margin: 26px 0 6px; }
.legal-body p { color: var(--muted); font-size: 15px; }
.legal-date { margin-top: 30px; font-size: 13px; }

/* Auth (sign in / sign up) */
.auth-section { max-width: 460px; }
.auth-logo { width: 52px; height: 52px; display: block; margin-bottom: 18px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field .mono-label { margin: 0; }
.auth-input {
  width: 100%; box-sizing: border-box;
  font: inherit; color: var(--ink);
  padding: 12px 14px;
  border: 1px solid var(--line, #e3ddf5); border-radius: 12px;
  background: #fff;
}
.auth-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(109,90,224,.15); }
.auth-error { color: #c0392b; font-size: 14px; margin: 0; }
.auth-form .btn { width: 100%; }
.auth-switch { text-align: center; }
.auth-switch a { color: var(--accent); font-size: 14px; }

/* Slim footer for the signed-in app pages: legal minimum only */
.app-footer { margin-top: 48px; padding: 18px 0 22px; text-align: center; }
.app-footer .foot-base { color: var(--muted); font-size: 14px; }
.app-footer a { color: inherit; }
