/* Maddie's Lab — shared styles. Elfsight-clean SaaS look: white, airy, one clear CTA. */
:root {
  --bg: #ffffff;
  --card: #ffffff;
  --ink: #0f1f3d;
  --muted: #5b6b82;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --accent: #ff9f43;
  --accent-soft: #fff7ec;
  --brand-soft: #e8effe;
  --green: #1e9e6a;
  --green-soft: #e6f7ee;
  --red: #e05252;
  --line: #e3e9f5;
  --radius: 18px;
  --shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.02em; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 18px; padding-top: 12px; padding-bottom: 12px; position: relative; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 12px; display: inline-flex;
  align-items: center; justify-content: center; font-size: 1.25rem;
  background: linear-gradient(135deg, var(--brand), #7aa7f5);
  box-shadow: var(--shadow);
}
img.logo-mark {
  width: 56px;
  height: 56px;
  background: none;
  box-shadow: none;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
}
.nav { margin-left: auto; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav a, .nav button.nav-link { padding: 8px 16px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 0.95rem; transition: background .15s, color .15s; background: none; border: none; cursor: pointer; font-family: inherit; }
.nav a:hover, .nav button.nav-link:hover { background: var(--brand-soft); color: var(--brand-dark); text-decoration: none; }
.nav .cta {
  background: var(--brand); color: #fff; margin-left: 6px;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}
.nav .cta:hover { background: var(--brand-dark); color: #fff; }

/* ---------- hero ---------- */
.hero { padding: 96px 0 64px; text-align: center; }
.hero .kicker {
  display: inline-block; background: var(--brand-soft); color: var(--brand-dark);
  font-weight: 700; font-size: 0.85rem; padding: 6px 14px; border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 0 0 16px; letter-spacing: -0.03em; }
.hero h1 .hl {
  background: linear-gradient(120deg, var(--brand), var(--brand-dark));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lede { font-size: 1.15rem; color: var(--muted); max-width: 640px; margin: 0 auto 32px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  font: 700 1rem var(--font); padding: 14px 28px; border-radius: 999px;
  background: var(--brand); color: #fff; transition: transform .08s ease, background .15s;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}
.btn:hover { background: var(--brand-dark); text-decoration: none; color: #fff; }
.btn:active { transform: scale(0.97); }
.btn.secondary { background: #fff; color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; }
.btn.secondary:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn.ghost { background: transparent; color: var(--muted); box-shadow: none; border: 1.5px dashed var(--line); }
.btn.small { padding: 9px 18px; font-size: 0.9rem; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- sections ---------- */
.section { padding: 80px 0; }
.section.alt { background: #f6f9ff; }
.section h2 { text-align: center; font-size: 2rem; margin: 0 0 10px; letter-spacing: -0.02em; }
.section .sub { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 40px; }

/* ---------- tool grid ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.tool-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s;
  display: flex; flex-direction: column; gap: 8px; color: var(--ink);
}
.tool-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(37,99,235,.14); text-decoration: none; }
.tool-card .emoji { font-size: 2rem; }
.tool-card h3 { margin: 0; font-size: 1.08rem; }
.tool-card p { margin: 0; color: var(--muted); font-size: 0.92rem; flex: 1; }
.tool-card .go { color: var(--brand); font-weight: 700; font-size: 0.92rem; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 24px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; text-align: center; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.step .n {
  width: 44px; height: 44px; border-radius: 50%; margin: 0 auto 12px;
  background: var(--brand-soft); color: var(--brand-dark); font-weight: 800; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
}
.step h3 { margin: 0 0 6px; }
.step p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---------- pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 24px; align-items: stretch; }
.price-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; text-align: center; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.price-card.featured { border-color: var(--brand); box-shadow: var(--shadow); position: relative; }
.price-card .tag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: 0.75rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; }
.price-card h3 { margin: 0 0 4px; }
.price-card .price { font-size: 2.2rem; font-weight: 800; margin: 8px 0; }
.price-card .price span { font-size: 1rem; font-weight: 600; color: var(--muted); }
.price-card ul { list-style: none; padding: 0; margin: 16px 0; text-align: left; }
.price-card li { padding: 6px 0; color: var(--muted); }
.price-card li::before { content: "✓ "; color: var(--green); font-weight: 700; }
.price-card .btn { margin-top: auto; }

/* ---------- tool widget ---------- */
.tool-app { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 32px; margin: 40px 0; }
.dropzone {
  border: 2px dashed #b9cdf5; border-radius: var(--radius); padding: 56px 24px;
  text-align: center; cursor: pointer; transition: all .15s; background: #f7faff;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--brand); background: var(--brand-soft); }
.dropzone .dz-emoji { font-size: 3rem; }
.dropzone p { margin: 10px 0 4px; font-weight: 600; }
.dropzone small { color: var(--muted); }
.spinner { display: inline-block; width: 34px; height: 34px; border: 4px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 20px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.alert { border-radius: 12px; padding: 14px 18px; margin: 16px 0; font-size: 0.95rem; }
.alert.error { background: #fdecec; color: #a33; border: 1px solid #f5c6c6; }
.alert.ok { background: var(--green-soft); color: #14663f; border: 1px solid #bfe8d2; }
.alert.info { background: var(--brand-soft); color: var(--brand-dark); border: 1px solid #c9d8f8; }

.field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 20px 0; }
.field label { display: block; font-size: 0.8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.field input, .field textarea, .field select {
  width: 100%; font: 500 0.98rem var(--font); padding: 10px 12px; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
.field input.edited, .field textarea.edited { border-color: var(--accent); background: #fffdf6; }

table.editable { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.95rem; }
table.editable th { text-align: left; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: #93a1bb; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fafcff; }
table.editable td { padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.editable tbody tr:hover td { background: #f7faff; }
table.editable input { width: 100%; font: 500 0.95rem var(--font); padding: 7px 9px; border: 1.5px solid transparent; border-radius: 8px; background: transparent; color: var(--ink); }
table.editable input:hover { border-color: var(--line); background: #fff; }
table.editable input:focus { outline: 2px solid var(--brand); background: #fff; }
table.editable input.edited { border-color: var(--accent); background: #fffdf6; }
table.editable td.num input { text-align: right; }
.row-del { background: none; border: 0; color: var(--red); cursor: pointer; font-size: 1.1rem; padding: 4px 8px; border-radius: 8px; }
.row-del:hover { background: #fdecec; }

.download-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.download-bar .btn { flex: none; }
.consent { display: flex; gap: 10px; align-items: flex-start; background: var(--accent-soft); border: 1px solid #ffe0b3; border-radius: 12px; padding: 12px 14px; margin-top: 14px; font-size: 0.88rem; color: #7a5a2e; }
.consent input { margin-top: 4px; }
.stat-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.chip { background: var(--green-soft); color: #14663f; font-weight: 700; font-size: 0.85rem; padding: 6px 12px; border-radius: 999px; }

.result-preview { margin: 16px 0; text-align: center; }
.result-preview img { max-width: 100%; max-height: 380px; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.controls-row { display: flex; gap: 16px; flex-wrap: wrap; margin: 16px 0; align-items: flex-end; }
.control label { display: block; font-size: 0.8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.control input[type=range] { width: 220px; accent-color: var(--brand); }
.control input[type=number], .control select { font: 500 0.95rem var(--font); padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; width: 110px; }
.control input[type=text] { font: 500 0.95rem var(--font); padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; min-width: 180px; color: var(--ink); }
.control textarea { font: 500 0.95rem var(--font); padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; color: var(--ink); resize: vertical; }
.control input:focus, .control select:focus, .control textarea:focus { outline: 2px solid var(--brand); border-color: var(--brand); }

/* ---------- tabs (QR, sign) ---------- */
.tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tab-btn { font: 600 .95rem var(--font); padding: 10px 20px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; transition: all .15s; }
.tab-btn:hover { border-color: var(--brand); color: var(--brand-dark); }
.tab-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- multi-file list (merge, images-to-pdf) ---------- */
.file-list { list-style: none; padding: 0; margin: 16px 0; }
.file-list li { display: flex; align-items: center; gap: 12px; background: var(--brand-soft); border-radius: 10px; padding: 9px 14px; margin-bottom: 6px; font-size: .92rem; }
.file-list .fnum { font-weight: 800; color: var(--brand-dark); background: #fff; border-radius: 8px; min-width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; }
.file-list .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.file-list button { background: none; border: 0; color: var(--red); cursor: pointer; font-size: 1rem; padding: 4px 8px; border-radius: 8px; }
.file-list button:hover { background: #fdecec; }

/* ---------- document diff ---------- */
.compare-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.diff-wrap { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin: 16px 0; overflow-x: auto; font-size: .95rem; }
.diff-wrap .diff-add { background: var(--green-soft); color: #14663f; }
.diff-wrap .diff-del { background: #fdecec; color: #a33; text-decoration: line-through; }
@media (max-width: 640px) { .compare-row { grid-template-columns: 1fr; } }
textarea.hw-output { width: 100%; min-height: 220px; font: 500 1.05rem/1.7 var(--font); padding: 14px; border: 1.5px solid var(--line); border-radius: 12px; resize: vertical; }

/* ---------- faq ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; margin-bottom: 10px; box-shadow: var(--shadow); }
.faq summary { font-weight: 700; cursor: pointer; }
.faq summary::marker { color: var(--brand); }
.faq p { color: var(--muted); margin: 10px 0 0; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 80px; padding: 56px 0 32px; background: #f6f9ff; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr 1fr; gap: 24px; }
.footer-grid h4 { margin: 0 0 10px; font-size: 0.95rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 6px 0; }
.footer-grid a { color: var(--muted); font-size: 0.92rem; }
.footer-bottom { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin-top: 36px; }

/* ---------- comparison table ---------- */
.cmp-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 0.95rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cmp-table th, .cmp-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmp-table thead th { background: var(--brand-soft); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: #93a1bb; }
.cmp-table tbody tr:last-child th, .cmp-table tbody tr:last-child td { border-bottom: none; }
.cmp-table tbody tr:hover td, .cmp-table tbody tr:hover th { background: #f7faff; }
.cmp-table tbody th { font-weight: 700; white-space: nowrap; }
.muted { color: var(--muted); }

/* ---------- endpoint list ---------- */
ul.endpoints { list-style: none; padding: 0; margin: 20px 0; }
ul.endpoints li { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 10px; box-shadow: var(--shadow); }
ul.endpoints code.method { background: var(--green-soft); color: var(--green); font-weight: 700; padding: 2px 8px; border-radius: 6px; margin-right: 8px; font-size: 0.85em; }
ul.endpoints code.path { font-weight: 700; color: var(--brand-dark); }

.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--ink); padding: 8px 10px; margin-left: auto; border-radius: 10px; }
.nav-toggle:hover { background: var(--brand-soft); }
@media (max-width: 640px) {
  .section { padding: 48px 0; }
  .hero { padding: 56px 0 40px; }
  .tool-app { padding: 18px; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .site-header .nav { display: none; position: absolute; top: 100%; left: 12px; right: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); flex-direction: column; align-items: stretch; padding: 10px; gap: 2px; z-index: 60; margin-left: 0; }
  body.nav-open .site-header .nav { display: flex; }
  body.nav-open .nav-toggle { background: var(--brand-soft); }
  .site-header .nav a, .site-header .nav button.nav-link { text-align: left; padding: 12px 16px; }
  .site-header .nav .btn.small { margin: 6px 8px 4px; text-align: center; }
  table.editable { display: block; overflow-x: auto; }
}

/* footer logo — larger */
.site-footer .logo-mark {
  width: 96px;
  height: 96px;
}

/* ---------- plan cards (DocHub-style pricing) ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; margin-top: 24px; align-items: stretch; }
.plan-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; position: relative; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.plan-card.featured { border-color: var(--brand); box-shadow: var(--shadow); }
.plan-card .pop { position: absolute; top: -13px; right: 14px; background: var(--brand); color: #fff; font-size: 0.72rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; letter-spacing: 0.03em; }
.plan-head { display: flex; gap: 12px; align-items: center; }
.plan-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-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: 0.83rem; }
.plan-price-row { display: flex; flex-direction: column; align-items: stretch; gap: 12px; margin: 18px 0 6px; }
.plan-price { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.plan-price span { font-size: 0.92rem; font-weight: 600; color: var(--muted); }
.plan-card .btn { flex: none; text-align: center; margin-top: auto; }
.plan-list-head { font-weight: 700; font-size: 0.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: 0.9rem; }
.plan-card li::before { content: "✓"; position: absolute; left: 2px; color: var(--brand); font-weight: 800; }
.plan-card .spacer { flex: 1; }

/* ---------- feature comparison table ---------- */
.feat-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 28px 0 8px; font-size: 0.92rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); 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(--brand-soft); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: #93a1bb; }
.feat-table thead th:first-child { text-align: left; }
.feat-table tbody th { text-align: left; font-weight: 600; color: var(--ink); font-size: 0.9rem; }
.feat-table tbody tr:last-child th, .feat-table tbody tr:last-child td { border-bottom: none; }
.feat-table tr.group td { background: #f6f9ff; font-weight: 800; text-align: left; color: var(--brand-dark); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 10px 14px; }
.feat-table .yes { color: var(--brand); font-weight: 800; font-size: 1.05rem; }
.feat-table .no { color: var(--line); }
.feat-table td.dim { color: var(--muted); font-size: 0.88rem; }
.feat-table .tools { display: block; font-weight: 400; color: var(--muted); font-size: 0.8rem; margin-top: 2px; }

/* ---------- homepage demo widget ---------- */
.demo-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0 16px; }
.demo-tab { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 18px; font-weight: 700; font-size: 0.92rem; color: var(--muted); cursor: pointer; }
.demo-tab:hover { border-color: var(--brand); color: var(--brand-dark); }
.demo-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.demo-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 20px; align-items: start; }
@media (max-width: 760px) { .demo-grid { grid-template-columns: 1fr; } }
.demo-doc, .demo-out { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: relative; box-shadow: var(--shadow); }
.demo-doc img { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); display: block; }
.demo-badge { display: inline-block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-dark); background: var(--brand-soft); border-radius: 999px; padding: 3px 12px; margin-bottom: 12px; }
.demo-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin-bottom: 14px; }
.demo-table th, .demo-table td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.demo-table thead th { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: #93a1bb; }
.demo-table tbody th { color: var(--muted); font-weight: 600; width: 42%; }
.demo-note { font-size: 0.85rem; color: var(--muted); margin: 4px 0 0; }

/* ---------- story sections ---------- */
.pain-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 24px; }
.pain-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.pain-card .emoji { font-size: 1.8rem; }
.pain-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; margin: -8px 0 4px; }
.pain-card h3 { margin: 10px 0 6px; font-size: 1.02rem; }
.pain-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
@media (max-width: 700px) { .split-grid { grid-template-columns: 1fr; } }
.split-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.split-card h3 { margin: 0 0 8px; }
.split-card p { color: var(--muted); font-size: 0.95rem; }
.split-card .btn { margin-top: auto; align-self: flex-start; }
.faq-list details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 10px; box-shadow: var(--shadow); }
.faq-list summary { font-weight: 700; cursor: pointer; }
.faq-list summary::marker { color: var(--brand); }
.faq-list p { color: var(--muted); margin: 10px 0 0; font-size: 0.95rem; }
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 24px; align-items: stretch; }
.trust-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.trust-card h3 { margin: 0 0 6px; font-size: 1rem; }
.trust-card p { margin: 0 0 16px; color: var(--muted); font-size: 0.9rem; flex: 1; }
.trust-card .btn { margin-top: auto; align-self: flex-start; }

/* ---------- apps dashboard (/apps) ---------- */
.apps-shell {
  display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 28px;
  max-width: 1240px; margin: 0 auto; padding: 28px 20px 72px; align-items: start;
}
.apps-side { position: sticky; top: 88px; }
.side-group { display: flex; flex-direction: column; gap: 2px; }
.side-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: 0; background: transparent; cursor: pointer; font: 600 0.94rem var(--font);
  color: var(--muted); padding: 10px 14px; border-radius: 12px; transition: background .12s, color .12s;
}
.side-item:hover { background: #f1f5fd; color: var(--ink); }
.side-item.active { background: #e8effe; color: #1d4ed8; }
.side-ico { font-size: 1.05rem; width: 24px; text-align: center; flex: none; }
.side-head {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; color: #93a1bb;
  padding: 0 14px; margin: 20px 0 8px;
}
.apps-main { min-width: 0; }
.apps-topbar {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; margin-bottom: 20px;
}
.apps-tabs { display: flex; gap: 2px; border-bottom: 2px solid #e9effa; }
.apps-tab {
  border: 0; background: transparent; cursor: pointer; font: 700 0.98rem var(--font);
  color: var(--muted); padding: 12px 18px; margin-bottom: -2px;
  border-bottom: 3px solid transparent; transition: color .12s, border-color .12s;
}
.apps-tab:hover { color: var(--ink); }
.apps-tab.active { color: #1d4ed8; border-bottom-color: var(--brand); }
.apps-search {
  display: flex; align-items: center; gap: 8px; background: #fff;
  border: 1.5px solid var(--line); border-radius: 999px; padding: 9px 16px; min-width: 220px;
}
.apps-search input { border: 0; outline: 0; font: 500 0.94rem var(--font); color: var(--ink); width: 100%; background: transparent; }
.apps-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }

/* onboarding checklist */
.onboard {
  background: #fff; border: 1px solid #e6ecf7; border-radius: 18px;
  padding: 18px 22px; margin-bottom: 22px; box-shadow: 0 4px 18px rgba(15, 31, 61, .05);
}
.onboard-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.onboard-title { font-weight: 800; font-size: 1rem; }
.onboard-pct { font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.onboard-bar { height: 8px; background: #eef2fa; border-radius: 999px; overflow: hidden; margin-bottom: 12px; }
.onboard-fill { height: 100%; background: linear-gradient(90deg, var(--brand), #60a5fa); border-radius: 999px; transition: width .4s ease; }
.onboard-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; flex-wrap: wrap; }
.onboard-list li { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 600; color: var(--muted); }
.onboard-list li.done { color: var(--ink); }
.on-done {
  width: 22px; height: 22px; border-radius: 50%; background: var(--green-soft); color: var(--green);
  font-size: 0.8rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.on-todo {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid #d5deef; flex: none;
}
.on-label.done { text-decoration: line-through; color: var(--muted); }
button.on-label.linklike { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; color: var(--brand); font-weight: 700; }
a.on-label { color: var(--brand); font-weight: 700; }

/* app cards — Elfsight anatomy, our blue */
.pane-title { font-size: 1.7rem; letter-spacing: -0.01em; margin: 2px 0 18px; }
.side-divider { height: 1px; background: #e9effa; margin: 14px 8px 2px; }

/* app cards — Elfsight anatomy: borderless, large tinted thumb, icon + name + outlined pill, desc */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 24px 20px; }
.app-card {
  background: transparent; border: 0;
  display: flex; flex-direction: column; color: var(--ink);
  transition: transform .12s ease;
}
.app-card:hover { transform: translateY(-3px); text-decoration: none; }
.app-card:hover .app-thumb { box-shadow: 0 14px 30px rgba(37, 99, 235, .16); }
.app-thumb {
  margin: 0; height: 190px; border-radius: 18px;
  background: linear-gradient(135deg, #eef4ff, #dce9ff);
  display: flex; align-items: center; justify-content: center; font-size: 4rem;
  transition: box-shadow .12s ease; overflow: hidden;
}
.app-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app-body { padding: 14px 6px 4px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.app-name { font-weight: 800; font-size: 1.04rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.app-ico { font-size: 1.2rem; }
.app-desc { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.app-meta { margin-top: auto; padding-top: 10px; font-size: 0.82rem; font-weight: 700; color: #1d4ed8; }
.pill { font-size: 0.64rem; font-weight: 800; letter-spacing: 0.05em; padding: 3px 10px; border-radius: 999px; white-space: nowrap; background: transparent; border: 1.5px solid; }
.pill-best { border-color: var(--brand); color: #1d4ed8; }
.pill-new { border-color: var(--green); color: #14663f; }
/* bundle card: dark treatment like the reference pack card */
.bundle-card { background: #101828; border-radius: 20px; }
.bundle-card:hover .app-thumb { box-shadow: none; }
.bundle-card .app-thumb { margin: 12px 12px 0; background: rgba(255, 255, 255, .07); }
.bundle-card .app-body { padding: 14px 20px 22px; }
.bundle-card .app-name { color: #fff; }
.bundle-card .app-desc { color: #b9c6e2; }
.pill-suite { border-color: #fff; color: #fff; }

/* templates */
.tpl-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.tpl-chip { background: #f1f5fd; color: #33415c; font-size: 0.8rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; }
.tpl-card .btn { align-self: flex-start; margin-top: auto; }

/* pricing teaser */
.price-teaser {
  background: #fff; border: 1px solid #e6ecf7; border-radius: 20px; padding: 48px 32px;
  text-align: center; max-width: 640px; margin: 8px auto;
}
.price-teaser-ico { font-size: 2.6rem; margin-bottom: 12px; }
.price-teaser h2 { margin: 0 0 8px; }
.price-teaser .sub { color: var(--muted); max-width: 480px; margin: 0 auto 24px; }

/* empty states + locked */
.apps-empty { text-align: center; color: var(--muted); padding: 32px 0; }
.apps-empty-card {
  background: #fff; border: 1px dashed #c9d6f2; border-radius: 20px; padding: 56px 32px;
  text-align: center; max-width: 560px; margin: 8px auto;
}
.apps-empty-ico { font-size: 2.8rem; margin-bottom: 12px; }
.apps-empty-card h3 { margin: 0 0 8px; }
.apps-empty-card .sub { color: var(--muted); margin: 0 auto 24px; max-width: 420px; }
.apps-locked { text-align: center; padding: 96px 20px; max-width: 520px; margin: 0 auto; }
.apps-locked-ico { font-size: 3.2rem; margin-bottom: 16px; }
.apps-locked h2 { margin: 0 0 10px; }
.apps-locked .sub { color: var(--muted); margin: 0 auto 28px; }

@media (max-width: 900px) {
  .apps-shell { grid-template-columns: 1fr; }
  .apps-side { position: static; }
  .side-group { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .side-item { white-space: nowrap; width: auto; }
  .side-head { margin-top: 12px; }
}

/* ================= PORTAL APP CHROME ================= */
.portal-top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.portal-top .wrap { display: flex; align-items: center; gap: 14px; padding-top: 10px; padding-bottom: 10px; }
.portal-tag {
  font: 700 .72rem -apple-system,'Segoe UI',Roboto,sans-serif;
  letter-spacing: .08em; text-transform: uppercase;
  color: #1d4ed8; background: #e8effe; border-radius: 999px; padding: 4px 10px;
}
.portal-nav { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.portal-nav a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: .92rem; }
.portal-nav a:hover { background: var(--brand-soft); color: var(--brand-dark); text-decoration: none; }
.portal-foot { border-top: 1px solid var(--line); margin-top: 48px; }
.portal-foot .wrap { display: flex; gap: 18px; align-items: center; padding-top: 18px; padding-bottom: 18px; color: var(--muted); font-size: .85rem; }
.portal-foot a { color: var(--muted); }

/* Portal full-page auth screen */
.portal-auth { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.portal-auth-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; max-width: 420px; width: 100%; padding: 36px 32px; box-shadow: var(--shadow); text-align: center; }
.portal-auth-card .auth-emoji { font-size: 2.6rem; margin-bottom: 10px; }
.portal-auth-card h1 { font-size: 1.5rem; margin: 0 0 6px; letter-spacing: -.01em; }
.portal-auth-card .auth-sub { color: var(--muted); font-size: .93rem; margin: 0 0 20px; }

/* ================= MOBILE STICKY SECTION NAV =================
 * Slim sticky bar, mobile only. Collapsed by default: shows the current
 * section + expander. Tap to expand the section list, tap an item to jump. */
.secnav { display: none; }
@media (max-width: 640px) {
  .secnav {
    display: block; position: sticky; top: 0; z-index: 45;
    background: rgba(255,255,255,.97); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
  }
  .portal-top + .secnav { top: 0; }
  .secnav-bar {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    background: none; border: 0; padding: 11px 16px; cursor: pointer;
    font: 700 .88rem -apple-system,'Segoe UI',Roboto,sans-serif; color: var(--ink);
  }
  .secnav-current { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .secnav-chev { color: var(--muted); font-size: .8rem; transition: transform .15s; margin-left: 8px; }
  .secnav-bar[aria-expanded="true"] .secnav-chev { transform: rotate(180deg); }
  .secnav-list { border-top: 1px solid var(--line); padding: 6px 8px 10px; max-height: 46vh; overflow-y: auto; }
  .secnav-item {
    display: block; width: 100%; text-align: left; background: none; border: 0;
    padding: 11px 12px; border-radius: 10px; cursor: pointer;
    font: 600 .9rem -apple-system,'Segoe UI',Roboto,sans-serif; color: var(--ink);
  }
  .secnav-item:hover, .secnav-item:active { background: var(--brand-soft); }
}
