/* Vending Classes design system. Mobile-first. Palette from the brief:
   ivory #F5F1EA, charcoal #171717, sage #879783, warm orange #D98458.
   Orange is used for fills and borders; text on ivory uses a darker shade for contrast. */
:root {
  --ivory: #F5F1EA; --ivory-2: #EDE7DC; --ink: #171717; --ink-2: #3a3a38; --muted: #5a5a56;
  --sage: #879783; --sage-dark: #4d5e4a; --accent: #D98458; --accent-ink: #8A4A24;
  --line: #d6cfc2; --card: #fffdf9; --danger: #a12a1f; --ok: #2f6b3a; --warn: #8a5a00;
  --radius: 10px; --max: 1120px;
  --font: "Helvetica Neue", Arial, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 16px/1.6 var(--font); overflow-x: hidden; }
img, svg { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; border-radius: 6px; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.section { padding: 48px 0; }
.section.alt { background: var(--ivory-2); }
.section.dark { background: var(--ink); color: var(--ivory); }
.section.dark a { color: #f0b48e; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--accent-ink); margin-bottom: .6em; }
.dark .eyebrow { color: #f0b48e; }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 46rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* header */
.site-header { background: var(--ivory); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 12px; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.25rem; color: var(--ink); text-decoration: none; }
.brand span { color: var(--accent-ink); }
.nav-toggle { background: none; border: 1px solid var(--ink); border-radius: 8px; padding: 8px 12px; font: inherit; cursor: pointer; color: var(--ink); }
.nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--ivory); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
.nav.open { display: block; }
.nav a { display: block; padding: 10px 0; color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a[aria-current="page"] { border-bottom: 2px solid var(--accent); }
.nav .btn { display: inline-block; margin-top: 8px; }
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav { display: flex !important; position: static; border: 0; padding: 0; gap: 22px; align-items: center; background: none; }
  .nav a { padding: 4px 0; }
  .nav .btn { margin-top: 0; }
}

/* buttons */
.btn { display: inline-block; padding: 12px 20px; border-radius: 999px; border: 2px solid var(--ink); background: transparent; color: var(--ink); font: 600 1rem var(--font); text-decoration: none; cursor: pointer; text-align: center; min-height: 44px; }
.btn:hover { background: var(--ink); color: var(--ivory); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--ivory); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-small { padding: 6px 14px; min-height: 36px; font-size: .9rem; }
.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

/* hero + cards */
.hero { padding: 40px 0 56px; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr .85fr; } .hero { padding: 72px 0; } }
.hero .art { background: var(--sage); border-radius: 18px; padding: 24px; }
.grid { display: grid; gap: 16px; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { margin-bottom: .35em; }
.card.soon { background: transparent; border-style: dashed; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--ivory-2); border: 1px solid var(--line); color: var(--ink-2); }
.tag.ok { background: #e1eedf; border-color: #b9d3b5; color: #1e4a29; }
.tag.warn { background: #f7e8c8; border-color: #e3c98a; color: #5f3f00; }
.tag.bad { background: #f6dcd8; border-color: #e0aaa2; color: #7a1d14; }
.price { font: 700 3rem var(--serif); }
.price small { font: 400 1rem var(--font); color: var(--muted); }
ul.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
ul.ticks li { padding-left: 1.6em; position: relative; margin-bottom: .45em; }
ul.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--sage-dark); font-weight: 700; }
.disclaimer { border-left: 4px solid var(--accent); background: var(--ivory-2); padding: 12px 16px; font-size: .9rem; border-radius: 0 8px 8px 0; }
.draft-banner { background: #f7e8c8; border: 1px solid #e3c98a; padding: 10px 14px; border-radius: 8px; font-size: .9rem; margin-bottom: 20px; }

/* prose (lessons, legal) */
.prose { max-width: 44rem; }
.prose h2 { margin-top: 1.6em; font-size: 1.5rem; }
.prose h3 { margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }
.prose ul.checklist { list-style: none; padding-left: 0; }
.prose ul.checklist li span { margin-right: .5em; }
.callout { border-left: 4px solid var(--sage); background: #eef1ec; padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 0 0 1em; }
.qa { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin-bottom: 10px; background: var(--card); }
.qa summary { cursor: pointer; font-weight: 600; }
.qa p { margin: .6em 0 0; }

/* faq */
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: .6em 0 0; }

/* forms */
label { display: block; font-weight: 600; margin-bottom: 4px; font-size: .95rem; }
.field { margin-bottom: 14px; }
.help { font-size: .82rem; color: var(--muted); margin-top: 3px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid #8b8478; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; min-height: 44px; }
textarea { min-height: 90px; resize: vertical; }
input[aria-invalid="true"] { border-color: var(--danger); background: #fff6f5; }
.error-msg { color: var(--danger); font-weight: 600; font-size: .9rem; margin-top: 4px; }
.alert { padding: 12px 14px; border-radius: 8px; margin-bottom: 14px; border: 1px solid; }
.alert.err { background: #fbe9e6; border-color: #e0aaa2; color: #6d1810; }
.alert.ok { background: #e7f2e5; border-color: #b9d3b5; color: #1e4a29; }
.alert.info { background: #eef1ec; border-color: #c4cfc1; color: #26331f; }
.alert.warn { background: #f7e8c8; border-color: #e3c98a; color: #5f3f00; }
.check-row { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.check-row input { width: 22px; height: 22px; margin-top: 2px; flex: none; }
.check-row label { font-weight: 400; margin: 0; }
.auth-box { max-width: 440px; margin: 0 auto; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tabs button { flex: 1; padding: 10px; border: 2px solid var(--ink); background: transparent; border-radius: 8px; font: 600 1rem var(--font); cursor: pointer; min-height: 44px; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--ivory); }

/* footer */
.site-footer { background: var(--ink); color: var(--ivory); padding: 40px 0 28px; }
.site-footer a { color: #f0b48e; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 14px 0; padding: 0; list-style: none; }
.site-footer .disc { font-size: .85rem; color: #d9d3c7; max-width: 52rem; }

/* member portal */
.portal { min-height: 100vh; display: flex; flex-direction: column; }
.portal-top { background: var(--ink); color: var(--ivory); }
.portal-top .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 10px; max-width: none; }
.portal-top .brand { color: var(--ivory); }
.portal-top .brand span { color: #f0b48e; }
.portal-top .who { font-size: .85rem; display: none; }
.portal-top .nav-toggle { color: var(--ivory); border-color: var(--ivory); }
.portal-top .btn { border-color: var(--ivory); color: var(--ivory); }
.portal-top .btn:hover { background: var(--ivory); color: var(--ink); }
.portal-body { display: flex; flex: 1; flex-direction: column; }
.side { background: var(--ivory-2); border-bottom: 1px solid var(--line); padding: 10px 16px; display: none; }
.side.open { display: block; }
.side a { display: block; padding: 11px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; }
.side a[aria-current="page"] { background: var(--ink); color: var(--ivory); }
.side a:hover { background: var(--line); }
.side a[aria-current="page"]:hover { background: var(--ink); }
.main { flex: 1; padding: 20px 16px 60px; min-width: 0; max-width: 1100px; width: 100%; }
@media (min-width: 900px) {
  .portal-top .nav-toggle { display: none; }
  .portal-top .who { display: block; }
  .portal-body { flex-direction: row; }
  .side { display: block; width: 240px; flex: none; border-bottom: 0; border-right: 1px solid var(--line); padding: 20px 12px; }
  .main { padding: 28px 32px 60px; }
}
.demo-bar { background: #f7e8c8; color: #3f2a00; font-size: .85rem; padding: 6px 16px; text-align: center; border-bottom: 1px solid #e3c98a; }
.page-title { margin-bottom: .2em; }
.stat-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stat .n { font: 700 1.6rem var(--serif); overflow-wrap: anywhere; }
.stat .l { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.progress { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--sage-dark); }
.mod { margin-bottom: 14px; }
.lesson-link { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.lesson-link:hover strong { text-decoration: underline; }
.two-col { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.two-col > * { min-width: 0; }
.grid > * { min-width: 0; }
@media (min-width: 1000px) { .two-col { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: start; } .sticky { position: sticky; top: 16px; } }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 6px; margin: 0 0 14px; background: var(--card); min-width: 0; }
legend { font-weight: 700; padding: 0 6px; }
.fgrid { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .fgrid { grid-template-columns: 1fr 1fr; } }
.tbl-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--ivory-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.bar { height: 8px; background: var(--accent); border-radius: 4px; min-width: 2px; }
.bar.neg { background: var(--danger); }
.inv-table input { min-width: 84px; padding: 6px 8px; min-height: 36px; }
.inv-table input.wide { min-width: 150px; }
.score-big { font: 700 3rem var(--serif); line-height: 1; }
.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: var(--ink); color: var(--ivory); padding: 10px 18px; border-radius: 999px; z-index: 90; max-width: 90vw; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
.locked { opacity: .7; }
.paywall { border: 2px dashed var(--accent); background: #fff7f0; border-radius: var(--radius); padding: 20px; }

@media print {
  .site-header, .site-footer, .portal-top, .side, .no-print, .nav-toggle, .demo-bar, .toast, button { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .main { padding: 0; max-width: none; }
  .card, fieldset, .stat { break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* screenshots & photos */
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 20px rgba(0,0,0,.08); background: #fff; }
.shot figcaption { margin-top: 8px; font-size: .92rem; color: var(--muted); }
.proof-strip { display: grid; gap: 8px 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 0; }
/* cookie notice */
.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; max-width: 720px; margin: 0 auto; background: #171717; color: #F5F1EA; border-radius: 14px; padding: 16px 18px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.consent p { margin: 0 0 12px; font-size: .95rem; }
.consent a { color: #f0b48e; }
.consent .row { display: flex; gap: 10px; flex-wrap: wrap; }
