/* ============================================================
 * Maddie's Lab Portal v2 — design system (Elfsight-style)
 * Clean, minimal, teal-accented. No marketing copy on surfaces.
 * ============================================================ */
:root {
  /* "Paper + Teal + Ink" (2026-10-06, Kuang memo — FINAL). No purple, no gradients. */
  --bg: #F7F4EC;
  --bg-soft: #E8F2EF;
  --ink: #17211F;
  --ink-2: #2c3a37;
  --muted: #5a6a64;
  --faint: #8a978f;
  --line: #e4ded0;
  --blue: #1E6F67;
  --blue-dark: #185a52;
  --blue-grad: #1E6F67;
  --blue-grad-hover: #185a52;
  --blue-soft: #E8F2EF;
  --green: #16a34a;
  --red: #e5484d;
  --amber: #f59e0b;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .07);
  --shadow-lg: 0 24px 64px rgba(16, 24, 40, .12);
  --font: -apple-system, BlinkMacSystemFont, Roboto, "Open Sans", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { letter-spacing: -.02em; line-height: 1.25; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: 2rem; font-weight: 800; }
h2 { font-size: 1.35rem; font-weight: 750; }
p { margin: 0 0 1em; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
main { min-height: 70vh; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo svg.logo-mark { width: 30px; height: 30px; color: var(--blue); flex: none; }
.main-nav { display: flex; gap: 4px; margin-left: 8px; }
.main-nav a {
  color: var(--ink-2); font-weight: 400; font-size: .88rem;
  padding: 8px 12px; border-radius: 10px;
}
.main-nav a:hover { background: var(--bg-soft); text-decoration: none; }
.main-nav a.active { background: none; color: var(--blue-dark); font-weight: 500; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.quota-pill {
  font-weight: 700; font-size: .82rem; color: var(--blue-dark);
  background: var(--blue-soft); padding: 8px 14px; border-radius: 999px; white-space: nowrap;
}
.quota-pill:hover { text-decoration: none; background: #d4e5ed; }
.quota-pill.low { color: #b42318; background: #fee4e2; }
.user-chip {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 999px; padding: 5px;
  background: #fff; cursor: pointer; font: 600 .85rem var(--font); color: var(--ink-2);
}
.user-chip .uname { display: none; }
.user-chip .avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--blue);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700;
}
.user-menu {
  position: absolute; top: 58px; right: 20px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 220px; padding: 6px; z-index: 200;
}
.user-menu button {
  display: block; width: 100%; text-align: left; border: 0; background: none;
  padding: 10px 12px; border-radius: 8px; font: 500 .9rem var(--font); color: var(--ink-2); cursor: pointer;
}
.user-menu button:hover { background: var(--bg-soft); }
.nav-toggle { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--blue-grad); color: #fff; border: 0; border-radius: 9999px;
  font: 700 1rem var(--font); padding: 13px 26px; cursor: pointer;
  transition: background .15s;
}
.btn:hover { background: var(--blue-grad-hover); text-decoration: none; color: #fff; }
.btn:disabled { background: #c9d2e3; cursor: default; }
.btn.secondary { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn.secondary:hover { border-color: var(--blue); color: var(--blue-dark); background: #fff; }
.btn.small { padding: 8px 18px; font-size: .88rem; border-radius: 9999px; }
.btn.block { width: 100%; }

/* ---------- catalog ---------- */
.catalog-hero { padding: 40px 0 8px; text-align: center; }
.catalog-hero h1 { margin-bottom: 6px; }
.catalog-hero .lede { color: var(--muted); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }
.catalog-tools { padding: 20px 0 48px; }
.search-row { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.search-input {
  flex: 1; min-width: 220px; font: 500 1rem var(--font); color: var(--ink);
  padding: 13px 18px 13px 44px; border: 0; border-radius: 12px;
  background: #f5f5f7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") 16px center no-repeat;
}
.search-input:focus { outline: none; box-shadow: 0 0 0 3px var(--blue-soft); background: #fff; }
.cat-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.cat-pill {
  border: 1.5px solid var(--line); background: #fff; border-radius: 999px;
  padding: 8px 18px; font: 600 .9rem var(--font); color: var(--muted); cursor: pointer;
}
.cat-pill:hover { border-color: var(--blue); color: var(--blue-dark); }
.cat-pill.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.section-title { font-size: 1.15rem; margin: 28px 0 14px; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.app-card {
  background: #fff; border: 0; border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column; color: var(--ink);
  transition: background .15s;
}
.app-card:hover { text-decoration: none; background: var(--bg-soft); }
.app-thumb {
  height: 96px; background: none;
  display: flex; align-items: center; justify-content: flex-start; padding: 20px 18px 0;
}
.app-thumb img { width: 56px; height: 56px; object-fit: contain; }
/* Lucide line-icon tiles */
.app-thumb img[src$=".svg"] {
  width: 56px; height: 56px; padding: 12px;
  background: var(--brand-soft, #eef4ff); border-radius: 16px;
  color: var(--blue);
}
.app-body { padding: 16px 18px 18px; }
.app-name { font-weight: 750; font-size: 1rem; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.app-desc { color: var(--muted); font-size: .88rem; line-height: 1.5; margin: 0; }
.pill { font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1px solid currentColor; background: transparent; }
.pill-best { color: var(--blue-dark); }
.pill-new { color: var(--green); }
.no-results { text-align: center; color: var(--muted); padding: 48px 0; }

/* ---------- tool runner ---------- */
.tool-head { padding: 36px 0 4px; }
.tool-head .crumb { color: var(--muted); font-size: .88rem; margin-bottom: 10px; }
.tool-head .crumb a { color: var(--muted); }
.tool-head h1 { display: flex; align-items: center; gap: 14px; }
.tool-head h1 img { width: 52px; height: 52px; }
.tool-head .lede { color: var(--muted); max-width: 640px; }
.tool-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 28px; margin: 20px 0 48px;
}
.dropzone {
  border: 2px dashed #c9d6ee; border-radius: var(--radius); background: var(--bg-soft);
  padding: 44px 24px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--blue); background: var(--blue-soft); }
.dropzone .dz-icon { font-size: 2.4rem; margin-bottom: 8px; }
.dropzone .dz-title { font-weight: 700; font-size: 1.05rem; }
.dropzone .dz-hint { color: var(--muted); font-size: .88rem; margin-top: 4px; }
.spinner {
  width: 40px; height: 40px; margin: 24px auto; border-radius: 50%;
  border: 4px solid var(--line); border-top-color: var(--blue);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.alert { border-radius: 12px; padding: 13px 18px; font-size: .93rem; margin-bottom: 18px; }
.alert.ok { background: #e7f6ec; color: #166534; }
.alert.err { background: #fee4e2; color: #b42318; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 18px; }
.field label { display: block; font-size: .78rem; font-weight: 700; color: var(--muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .04em; }
.field input, .field select {
  width: 100%; font: 500 .95rem var(--font); color: var(--ink);
  padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 9999px; background: #fff;
}
.field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.field input.edited { border-color: var(--amber); background: #fffaeb; }
table.editable { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.editable th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 8px; border-bottom: 2px solid var(--line); }
table.editable td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.editable td.num { text-align: right; }
table.editable input { width: 100%; font: 500 .9rem var(--font); padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; }
table.editable input:hover { border-color: var(--line); }
table.editable input:focus { outline: none; border-color: var(--blue); }
table.editable input.edited { border-color: var(--amber); background: #fffaeb; }
.row-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-size: .88rem; color: var(--muted); }
.consent input { margin-top: 4px; }

/* ---------- tool input forms ---------- */
.controls-row { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; align-items: flex-end; }
.control { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.control > label { font-size: .82rem; font-weight: 600; color: var(--muted); }
.control input[type="text"], .control input[type="number"], .control select {
  font: 500 1rem var(--font); color: var(--ink);
  padding: 16px 20px; border: 0; border-radius: 12px;
  background: #f2f4f7; min-width: 0; width: 100%;
}
.control input:focus, .control select:focus { outline: none; background: #e9edf2; box-shadow: 0 0 0 2px var(--blue-soft); }
.control input::placeholder { color: #98a2b3; }
.control select {
  appearance: none; -webkit-appearance: none; padding-right: 42px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
.control input[type="range"] { accent-color: var(--blue); padding: 0; border: 0; background: transparent; }

/* ---------- auth page ---------- */
.auth-page { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 400px; text-align: center; }
.auth-logo { width: 64px; height: 64px; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; }
.auth-logo svg { width: 52px; height: 52px; color: var(--blue); }
.auth-card h1 { font-size: 1.65rem; margin-bottom: 24px; }
.provider-btn {
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%;
  background: #fff; border: 1.5px solid var(--line); border-radius: 9999px;
  padding: 14px; font: 600 1rem var(--font); color: var(--ink); cursor: pointer; margin-bottom: 12px;
}
.provider-btn:hover { border-color: var(--blue); background: var(--bg-soft); }
.provider-btn .pi { font-size: 1.3rem; }
.auth-email { margin-top: 4px; text-align: left; }
.auth-err { background: #fee4e2; color: #b42318; border-radius: 10px; padding: 11px 15px; font-size: .88rem; margin-bottom: 14px; }
.auth-label { display: block; font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: 16px; }
.auth-input {
  display: block; width: 100%; margin-top: 6px; font: 500 1rem var(--font); color: var(--ink);
  padding: 13px 18px; border: 1.5px solid var(--line); border-radius: 9999px;
  background: #fff;
}
.auth-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
/* Floating-label fields (Google-style): label sits in a notch in the border */
.fl-field { position: relative; margin-bottom: 16px; }
.fl-field .auth-input { margin-top: 0; border-radius: 12px; padding: 15px 18px; }
.fl-field .auth-input:focus { box-shadow: none; }
.fl-field label {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-size: 1rem; font-weight: 500; color: var(--muted); pointer-events: none;
  background: #fff; padding: 0 6px; border-radius: 4px;
  transition: top .15s ease, font-size .15s ease, color .15s ease;
}
.fl-field .auth-input:focus + label,
.fl-field .auth-input:not(:placeholder-shown) + label {
  top: 0; font-size: .72rem; font-weight: 700; color: var(--blue);
}
.pass-wrap { position: relative; }
.pass-wrap .auth-input { padding-right: 52px; }
.eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 0; background: none; font-size: 1.25rem; cursor: pointer; padding: 10px; color: var(--muted);
}
.auth-switch { margin-top: 22px; color: var(--muted); font-size: .92rem; }
.auth-switch a { font-weight: 600; }
.auth-check { padding: 24px 0; }
.auth-check .big { font-size: 3rem; margin-bottom: 12px; }

/* ---------- pricing ---------- */
.price-hero { text-align: center; padding: 40px 0 8px; }
.bill-toggle { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 20px 0 28px; font-weight: 600; color: var(--faint); }
.bill-toggle .on { color: var(--ink); }
.switch { position: relative; width: 52px; height: 30px; background: #c9d2e3; border-radius: 999px; border: 0; cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; background: #fff; border-radius: 50%; transition: left .18s; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.switch.annual { background: var(--blue); }
.switch.annual::after { left: 25px; }
.switch.on { background: var(--blue); }
.switch.on::after { left: 25px; }
.price-cols { display: grid; grid-template-columns: 210px 1fr; gap: 22px; align-items: start; max-width: 980px; margin: 0 auto; padding-bottom: 56px; }
.plan-rail { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 84px; }
.plan-btn {
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 14px;
  font: 600 1rem var(--font); color: var(--blue); cursor: pointer;
}
.plan-btn:hover { border-color: var(--blue); }
.plan-btn.sel { border-color: var(--ink); color: var(--ink); box-shadow: var(--shadow); }
.plan-btn .cur { display: block; font-size: .7rem; color: var(--green); font-weight: 700; margin-top: 2px; }
.plan-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 36px 34px; overflow: hidden; }
.plan-deal { position: absolute; top: 0; right: 22px; background: var(--ink); color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: .07em; padding: 6px 14px; border-radius: 0 0 10px 10px; }
.plan-ribbon { position: absolute; top: 22px; right: -6px; background: #f43f5e; color: #fff; font-size: .78rem; font-weight: 700; padding: 6px 20px 6px 14px; clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%); }
.plan-name { font-size: 1.5rem; font-weight: 800; margin: 0; }
.plan-aud { color: var(--muted); margin: 4px 0 20px; }
.plan-price { font-size: 3.4rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.plan-price .cur { font-size: 1.5rem; font-weight: 600; vertical-align: top; position: relative; top: 8px; }
.plan-price .per { font-size: 1.05rem; font-weight: 500; color: var(--faint); }
.plan-was { color: var(--faint); text-decoration: line-through; font-size: 1.4rem; font-weight: 600; margin-left: 10px; }
.plan-save { display: inline-block; background: var(--bg-soft); color: var(--ink-2); font-size: .82rem; font-weight: 600; padding: 7px 16px; border-radius: 999px; margin: 16px 0 4px; }
.plan-cta { width: 100%; margin: 20px 0 6px; }
.plan-feats { list-style: none; margin: 16px 0 0; padding: 0; }
.plan-feats li { padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: .97rem; }
.plan-feats li:last-child { border: none; }
.plan-feats li.off { color: var(--faint); text-decoration: line-through; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; margin-top: 24px; }
.site-footer .wrap { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: .88rem; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 16px; margin-left: auto; }
.site-footer a { color: var(--muted); }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 13px 22px; border-radius: 999px;
  font: 600 .9rem var(--font); box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 1000; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .site-header .wrap { height: 52px; gap: 10px; }
  .site-header .logo { font-size: 1rem; white-space: nowrap; }
  .site-header .logo-mark { width: 22px; height: 22px; }
  .header-right { gap: 8px; }
  .usage { min-width: 0; }
  .usage .u-label { display: none; }
  .usage .u-bar { width: 48px; }
  .user-chip { padding: 4px; }
  .user-chip .uname { display: none; }
  .user-chip .avatar { width: 28px; height: 28px; font-size: .8rem; }
  .logout-btn { padding: 6px 10px; font-size: .8rem; }
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 1.1rem; cursor: pointer; }
  .site-header .wrap.menu-open .main-nav {
    display: flex; position: absolute; top: 64px; left: 0; right: 0; background: #fff;
    flex-direction: column; padding: 12px 20px 20px; border-bottom: 1px solid var(--line); margin: 0;
  }
  .price-cols { grid-template-columns: 1fr; }
  .plan-rail { flex-direction: row; overflow-x: auto; position: static; padding-bottom: 4px; }
  .plan-btn { white-space: nowrap; }
  .tool-card { padding: 20px; }
  h1 { font-size: 1.6rem; }
}

/* ---------- usage stats (Elfsight dashboard pattern) ---------- */
.usage { display: flex; flex-direction: column; gap: 3px; text-decoration: none; min-width: 110px; }
.usage:hover { text-decoration: none; }
.usage .u-label { font-size: .68rem; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.usage .u-label b { color: var(--ink); }
.usage .u-bar { height: 4px; background: #eef1f7; border-radius: 999px; overflow: hidden; }
.usage .u-bar i { display: block; height: 100%; background: var(--blue); border-radius: 999px; }
.usage.low .u-bar i { background: var(--red); }

/* ---------- personal settings ---------- */
.set-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); margin: 20px 0 24px; overflow: hidden; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); font-size: .95rem; }
.set-row:last-child { border-bottom: 0; }
.set-row span { color: var(--muted); }
.set-row b { font-weight: 650; }

.pi-ic { width: 20px; height: 20px; color: var(--muted); flex: none; }
.eye-ic { width: 20px; height: 20px; display: block; }
.eye { display: inline-flex; align-items: center; justify-content: center; }

.sso-row { display: flex; flex-direction: column; gap: 0; margin-bottom: 0; }
.sso-row[hidden] { display: none; }
.sso-btn .pi-ic { width: 20px; height: 20px; }
.sso-btn span { flex: 1; text-align: center; }

.logout-btn { background: none; border: 1.5px solid var(--line); border-radius: 9999px; padding: 8px 16px; font: 600 .85rem var(--font); color: var(--muted); cursor: pointer; white-space: nowrap; }
.logout-btn:hover { border-color: var(--blue); color: var(--blue-dark); }
.header-right { display: flex; align-items: center; gap: 10px; }
@media (max-width: 640px) { .logout-btn { padding: 8px 12px; } }

.acct-tabs { display: flex; gap: 4px; margin: 4px 0 24px; border-bottom: 1px solid var(--line); }
.acct-tabs a { padding: 10px 16px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.acct-tabs a:hover { color: var(--ink); text-decoration: none; }
.acct-tabs a.active { color: var(--blue-dark); border-bottom-color: var(--blue); }

.btn.danger { background: #fff; color: #c0362c; border: 1.5px solid #f3c1bb; }
.btn.danger:hover { background: #fef2f0; border-color: #c0362c; }
.btn.block { width: 100%; }

.auth-sub { color: var(--muted); font-size: .95rem; margin: -16px 0 24px; text-align: center; }

.show-pass { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); margin: 0 0 16px; cursor: pointer; }
.show-pass input { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; }

.logo-icon { display: inline-flex; align-items: center; }
.logo-icon .logo-mark { width: 30px; height: 30px; color: var(--ink); }

.dz-head { font-weight: 800; font-size: 1.05rem; margin-bottom: 10px; color: var(--ink); }

/* ---------- help center ---------- */
.help-wrap { max-width: 800px; margin: 0 auto; padding: 32px 20px 64px; }
.help-wrap h1 { margin-bottom: 8px; }
.help-cats { display: grid; gap: 32px; margin-bottom: 48px; }
.help-cat h2 { font-size: 1.1rem; margin-bottom: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-size: .85rem; }
.help-link { display: block; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; text-decoration: none; color: var(--ink); font-weight: 600; }
.help-link:hover { border-color: var(--blue); text-decoration: none; }
.help-link .help-blurb { display: block; font-weight: 400; color: var(--muted); font-size: .9rem; margin-top: 4px; }
.help-ticket { border-top: 1px solid var(--line); padding-top: 32px; }
.help-ticket h2 { margin-bottom: 8px; }
.help-ticket .auth-label { display: block; margin: 16px 0; }
.help-ticket textarea { resize: vertical; }
.help-back { display: inline-block; margin-bottom: 16px; color: var(--muted); text-decoration: none; }
.help-blurb-lg { font-size: 1.1rem; color: var(--muted); margin-bottom: 24px; }
.help-steps { margin: 0 0 24px 20px; line-height: 1.8; }
.help-steps li { margin-bottom: 8px; }
.help-tip { background: var(--brand-soft, #eef4ff); border-radius: 12px; padding: 16px; margin-bottom: 24px; }

/* ---------- pricing: 4 cards side-by-side + compare table (matches marketing /api) ---------- */
.price-hero { text-align: center; padding: 44px 0 8px; }
.price-hero h1 { margin-bottom: 6px; }
.price-hero .lede { font-size: 1.05rem; margin-bottom: 18px; }
.bill-toggle { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; font-size: .92rem; color: var(--muted); }
.bill-toggle .on { color: var(--ink); }
.bill-toggle .switch { width: 52px; height: 30px; border-radius: 999px; border: 0; background: var(--blue); position: relative; cursor: pointer; }
.bill-toggle .switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .15s; }
.bill-toggle .switch.annual::after { left: 25px; }
.plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; max-width: 1180px; margin: 26px auto 0; padding-bottom: 8px; align-items: stretch; }
.plan-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 28px; position: relative; display: flex; flex-direction: column; }
.plan-card.pop { border: 2px solid var(--blue); box-shadow: var(--shadow-lg); }
.plan-card .pop { position: absolute; top: -13px; right: 14px; background: var(--blue); color: #fff; font-size: .72rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; letter-spacing: .03em; }
.plan-head { display: flex; gap: 12px; align-items: center; }
.plan-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--blue-soft); display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem; flex: none; }
.plan-name { font-weight: 800; font-size: 1.05rem; }
.plan-aud { color: var(--muted); font-size: .83rem; }
.plan-price { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; margin-top: 18px; }
.plan-price .cur { font-size: 1.9rem; }
.plan-price .per { font-size: .92rem; font-weight: 600; color: var(--muted); }
.plan-save { color: var(--muted); font-size: .83rem; }
.plan-card .btn { width: 100%; margin-top: 18px; }
.plan-card .spacer { flex: 1; }
.plan-list-head { font-weight: 700; font-size: .9rem; margin: 14px 0 2px; padding-top: 14px; border-top: 1px solid var(--line); }
.plan-card ul { list-style: none; padding: 0; margin: 6px 0 0; }
.plan-card li { padding: 5px 0 5px 26px; position: relative; color: var(--muted); font-size: .9rem; }
.plan-card li::before { content: "✓"; position: absolute; left: 2px; color: var(--blue); font-weight: 800; }
.compare-wrap { max-width: 1180px; margin: 0 auto; padding: 40px 20px 64px; }
.compare-wrap h2 { margin-bottom: 12px; }
.feat-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 8px 0; font-size: .92rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.feat-table th, .feat-table td { padding: 12px 14px; text-align: center; border-bottom: 1px solid var(--line); vertical-align: middle; }
.feat-table thead th { background: var(--blue-soft); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.feat-table thead th:first-child { text-align: left; }
.feat-table tbody th { text-align: left; font-weight: 600; color: var(--ink); font-size: .9rem; }
.feat-table tbody tr:last-child th, .feat-table tbody tr:last-child td { border-bottom: none; }
.feat-table tr.group td { background: var(--blue-soft); font-weight: 800; text-align: left; color: var(--blue-dark); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; padding: 10px 14px; }
.feat-table .yes { color: var(--blue); font-weight: 800; font-size: 1.05rem; }
.feat-table .no { color: var(--line); }
.feat-table td.dim { color: var(--muted); font-size: .88rem; }
.feat-table .tools { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; margin-top: 2px; }
@media (max-width: 1020px) {
  .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .plan-grid { grid-template-columns: 1fr; }
}

/* ---------- review layout (doc tool results: your document + fields) ---------- */
.review-layout { display: grid; grid-template-columns: minmax(300px, 430px) minmax(0, 1fr); gap: 28px; align-items: start; }
.review-src { position: sticky; top: 88px; }
.review-src h3 { margin: 0 0 10px; font-size: 1rem; }
.review-frame { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #f8fafc; }
.review-frame img { display: block; width: 100%; height: auto; max-height: 72vh; object-fit: contain; }
.review-frame embed { display: block; width: 100%; height: 72vh; border: 0; }
.review-zoom { margin-top: 8px; background: none; border: 0; color: var(--blue); font: 600 .85rem var(--font); cursor: pointer; padding: 0; }
.review-zoom:hover { text-decoration: underline; }
.download-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
@media (max-width: 920px) {
  .review-layout { grid-template-columns: 1fr; }
  .review-src { position: static; }
  .review-frame img { max-height: 340px; }
  .review-frame embed { height: 420px; }
}

/* ---------- catalog tag icons (replaces best-seller/new text pills) ---------- */
.tag-ic { width: 14px; height: 14px; vertical-align: -2px; margin-left: 6px; }

/* ---------- Google sign-in button container ---------- */
#sso-google { display: flex; justify-content: center; margin: 6px 0 16px; }
.lucide-icon { width: 1.1em; height: 1.1em; vertical-align: -0.2em; flex-shrink: 0; }
.btn .lucide-icon { width: 16px; height: 16px; margin-right: 8px; vertical-align: -3px; }
.alert .lucide-icon { width: 18px; height: 18px; margin-right: 8px; vertical-align: -3px; }
.chip .lucide-icon { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
.nav-toggle span + span { margin-top: 5px; }
