/* Suisse Retro — hero refinements + new component styles, loaded AFTER styles.css.
   Palette: cream #e8dcc0 page · panel #f1e7cf · teal #2f6b6b · mustard #d98a3d
   · brick #a8432f accent · ink #28231c. Bold geometric type, flat blocks, 2px ink. */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&display=swap');

:root {
  --sg: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --ink: #28231c; --cream: #e8dcc0; --panel: #f1e7cf; --panel2: #f7f0dd;
  --teal: #2f6b6b; --teal-dk: #1f4d4d; --mustard: #d98a3d; --mustard-lt: #f3e3c0;
  --brick: #a8432f; --brick-dk: #7a3022; --sand: #d8c59a;
}

body { font-family: var(--sg); background: var(--cream); color: var(--ink); }
h1, h2, h3, .section-summary-title, .entry-card span, .tab { font-family: var(--sg); letter-spacing: -0.01em; }

/* Header — flat teal block, ink rule, no gradient/shadow */
.app-header { background: var(--teal) !important; border-bottom: 3px solid var(--ink) !important; box-shadow: none !important; }
.app-header h1 { font-weight: 700; color: var(--panel2); }
.app-header .eyebrow { color: var(--mustard-lt); letter-spacing: .16em; text-transform: uppercase; }
.app-header p { color: #d8e7e3; }
.app-logo { border-radius: 6px; box-shadow: none !important; border: 2px solid var(--ink); background: var(--panel2); }
.version-badge { background: var(--mustard) !important; color: var(--ink) !important; border: 2px solid var(--ink) !important; border-radius: 4px; font-weight: 700; box-shadow: none !important; }

/* Notice panel — brick edge */
.notice-panel { background: var(--panel2); border: 2px solid var(--brick); border-radius: 4px; box-shadow: none; }

/* Entry mode cards — bordered blocks, brick when active */
.entry-card { background: var(--panel2); border: 2px solid var(--ink) !important; border-radius: 4px; box-shadow: none !important; font-weight: 500; }
.entry-card small { color: var(--teal); }
.entry-card.active { background: var(--brick) !important; color: var(--panel2) !important; }
.entry-card.active small, .entry-card.active span { color: var(--panel2) !important; }

/* Sidebar + inputs */
.sidebar { background: transparent; }
.field input, .field select, .field input[type="search"] { border: 2px solid var(--ink) !important; border-radius: 4px !important; background: var(--panel2); font-family: var(--sg); }
.diagnosis-list { border: 2px solid var(--ink); border-radius: 4px; background: var(--panel2); box-shadow: none; }
.diagnosis-item { border-bottom: 1.5px solid var(--sand); }
.diagnosis-item.active, .diagnosis-item[aria-current="true"] { background: var(--mustard-lt) !important; border-left: 4px solid var(--mustard) !important; }
.diagnosis-item-title { font-weight: 500; }

/* Reader + tabs */
.reader { background: var(--panel); border: 2px solid var(--ink); border-radius: 6px; box-shadow: none; }
.reader-toolbar { border-bottom: 2px solid var(--ink); }
#diagnosisTitle { font-weight: 700; }
.toolbar-actions button { border: 2px solid var(--ink) !important; border-radius: 4px !important; background: var(--panel2); color: var(--ink); font-family: var(--sg); font-weight: 500; box-shadow: none !important; }
.toolbar-actions button:hover { background: var(--mustard-lt); }
.tabs { border-bottom: 2px solid var(--ink); gap: 6px; }
.tab { border: 2px solid var(--ink) !important; border-radius: 4px !important; background: var(--panel2); color: var(--ink); font-weight: 500; padding: 5px 10px; box-shadow: none !important; }
.tab.active { background: var(--ink) !important; color: var(--panel2) !important; border-bottom: 2px solid var(--ink) !important; }

/* Section accordions */
.section-card { border: 2px solid var(--ink) !important; border-radius: 4px !important; background: var(--panel2); box-shadow: none !important; }
.section-card > summary { font-family: var(--sg); font-weight: 700; }
.section-summary-title { font-weight: 700; }

/* Roadmap panel */
.roadmap-panel { background: var(--panel2); border: 2px solid var(--ink); border-radius: 6px; box-shadow: none; }
.roadmap-grid article { border: 2px solid var(--ink); border-radius: 4px; background: var(--panel); }

/* ---------- Account button in header ---------- */
.cns-account { display: flex; align-items: center; gap: 8px; }
.cns-btn { font-family: var(--sg); font-weight: 700; border: 2px solid var(--ink); border-radius: 4px; padding: 7px 13px; cursor: pointer; background: var(--panel2); color: var(--ink); font-size: 13px; }
.cns-btn:hover { background: var(--mustard-lt); }
.cns-btn-primary { background: var(--brick); color: var(--panel2); }
.cns-btn-primary:hover { background: var(--brick-dk); }
.cns-btn-teal { background: var(--teal); color: var(--panel2); }
.cns-account .cns-chip { display: flex; align-items: center; gap: 8px; background: var(--teal-dk); color: var(--panel2); border: 2px solid var(--ink); border-radius: 4px; padding: 5px 10px; font-size: 13px; font-weight: 500; }
.cns-account .cns-chip .cns-status { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; padding: 1px 6px; border-radius: 3px; font-weight: 700; }
.cns-status-paid { background: var(--mustard); color: var(--ink); }
.cns-status-free { background: var(--panel2); color: var(--teal-dk); }

/* ---------- Modal (auth + upgrade) ---------- */
.cns-overlay { position: fixed; inset: 0; background: rgba(40,35,28,.55); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.cns-modal { background: var(--panel); border: 3px solid var(--ink); border-radius: 8px; width: 100%; max-width: 440px; max-height: 92vh; overflow-y: auto; }
.cns-modal-head { background: var(--teal); color: var(--panel2); padding: 14px 18px; border-bottom: 3px solid var(--ink); display: flex; justify-content: space-between; align-items: center; }
.cns-modal-head h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--panel2); }
.cns-modal-x { background: none; border: none; color: var(--panel2); font-size: 22px; cursor: pointer; line-height: 1; }
.cns-modal-body { padding: 18px; }
.cns-modal-body label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--teal-dk); margin: 0 0 5px; }
.cns-modal-body input, .cns-modal-body select { width: 100%; box-sizing: border-box; border: 2px solid var(--ink); border-radius: 4px; padding: 10px 11px; font-size: 14px; font-family: var(--sg); background: var(--panel2); margin: 0 0 13px; }
.cns-field-row { margin: 0 0 13px; }
.cns-modal .cns-btn { width: 100%; padding: 11px; font-size: 14px; margin-top: 4px; }
.cns-or { text-align: center; color: var(--muted); font-size: 12px; margin: 14px 0; position: relative; }
.cns-or::before, .cns-or::after { content: ""; position: absolute; top: 50%; width: 38%; height: 1.5px; background: var(--sand); }
.cns-or::before { left: 0; } .cns-or::after { right: 0; }
.cns-google { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; border: 2px solid var(--ink); border-radius: 4px; background: var(--panel2); padding: 10px; font-weight: 700; font-family: var(--sg); cursor: pointer; font-size: 14px; }
.cns-google:hover { background: #fff; }
.cns-switch { text-align: center; font-size: 13px; margin: 14px 0 0; color: var(--ink); }
.cns-switch a { color: var(--brick); font-weight: 700; cursor: pointer; text-decoration: underline; }
.cns-error { background: var(--mustard-lt); border: 2px solid var(--brick); color: var(--brick-dk); border-radius: 4px; padding: 8px 11px; font-size: 13px; margin: 0 0 13px; }

/* Upgrade sheet specifics */
.cns-price { text-align: center; margin: 0 0 14px; }
.cns-price .cns-amt { font-size: 34px; font-weight: 700; color: var(--brick); }
.cns-price .cns-sub { font-size: 13px; color: var(--teal-dk); }
.cns-pay-methods { display: grid; gap: 10px; }
.cns-pay { border: 2px solid var(--ink); border-radius: 6px; padding: 13px; cursor: pointer; background: var(--panel2); }
.cns-pay:hover { background: var(--mustard-lt); }
.cns-pay h4 { margin: 0 0 3px; font-size: 15px; font-weight: 700; }
.cns-pay p { margin: 0; font-size: 12.5px; color: var(--teal-dk); }
.cns-feature-list { list-style: none; padding: 0; margin: 0 0 16px; }
.cns-feature-list li { font-size: 13px; padding: 4px 0 4px 22px; position: relative; }
.cns-feature-list li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 700; }

/* ---------- Paywall lock panel (injected into #content) ---------- */
.cns-lock { border: 2px dashed var(--ink); border-radius: 6px; background: var(--panel2); padding: 26px 20px; text-align: center; margin: 8px 0; }
.cns-lock-badge { width: 46px; height: 46px; border-radius: 6px; background: var(--brick); color: var(--panel2); border: 2px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.cns-lock h3 { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.cns-lock p { margin: 0 0 16px; font-size: 14px; color: var(--teal-dk); max-width: 380px; margin-left: auto; margin-right: auto; }
.cns-lock .cns-btn { display: inline-block; width: auto; padding: 11px 22px; font-size: 14px; }
.cns-lock-note { margin-top: 10px; font-size: 12px; color: var(--muted); }

/* Locked-tab badge */
.tab .cns-lock-i { margin-left: 5px; opacity: .85; vertical-align: -1px; }

/* Free-version banner */
.cns-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--mustard-lt); border: 2px solid var(--mustard-dk, #a8651c); border-radius: 6px; padding: 9px 14px; margin: 0 0 12px; font-size: 13px; font-weight: 500; color: var(--brick-dk); }
.cns-banner .cns-btn { padding: 6px 12px; font-size: 12.5px; }

.cns-toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--ink); color: var(--panel2); border: 2px solid var(--mustard); border-radius: 6px; padding: 12px 20px; font-weight: 500; font-size: 14px; z-index: 1100; box-shadow: none; }
