/* Made Simple master brand, bymadesimple.com
   Same family language as EMS, CMS, REMS, BMS and PMMS: cream pages, Lora + Inter,
   flat code-drawn art, yellow pill button with dark text, one italic emphasis phrase per headline.
   Own palette: ink indigo core, tangerine emphasis, the "study shelf" stripe as the signature device.
   Cream-forward in light mode; dark mode turns indigo-forward with cream text. */

:root {
  /* Core */
  --indigo: #26245E;
  --indigo-deep: #1A1944;
  --indigo-raised: #3A3780;
  --cream: #F9F6EF;
  --paper: #FFFEFA;
  --sand: #F1ECE1;
  --line: #E3DCCD;
  --ink: #1C1D2B;
  --ink-2: #4A4C5E;
  --muted: #5E6072;
  /* Action */
  --sun: #F5C443;
  --sun-hover: #EAB024;
  --sun-tint: #FCEFC8;
  --tangerine: #AD4A0B;
  --peach: #F6A97A;
  --link: #3B44B0;

  /* Study-area accents (pastel base / tint / deep). Pastels as fills only; text uses deep. */
  --est: #F0B9AB; --est-tint: #FDE6DA; --est-deep: #A2463B; --est-core: #4B2647;
  --cos: #A8DCC8; --cos-tint: #E2F2EA; --cos-deep: #2E6A56; --cos-core: #1F4A4E;
  --re:  #8DC2EA; --re-tint:  #E1EFFA; --re-deep:  #245E8A; --re-core:  #1C2F4A;
  --bar: #F26F60; --bar-tint: #FCE2DE; --bar-deep: #A3261E; --bar-core: #2A2724;
  --pm:  #50BBB9; --pm-tint:  #D1F1F0; --pm-deep:  #006F6F; --pm-core:  #1F3F24;
  --nail:#C9B6E8; --nail-tint:#F0EAF9; --nail-deep:#5B4A96; --nail-core:#3B2F63;
  --ins: #F2B04E; --ins-tint: #FCEFD6; --ins-deep: #7A5309; --ins-core: #2F3A45;

  /* Semantic roles */
  --bg: var(--cream);
  --bg-alt: var(--sand);
  --surface: var(--paper);
  --heading: var(--indigo);
  --text: var(--ink);
  --text-2: var(--ink-2);
  --emph: var(--tangerine);
  --band-bg: var(--indigo);
  --band-text: var(--cream);
  --band-text-2: #D9D6EA;
  --cta-bg: var(--sun);
  --cta-text: var(--indigo);
  --chip-bg: var(--sun-tint);
  --marker-color: #FBE3A0;
  --shadow-card: 0 18px 40px rgba(26,25,68,.10);
  --shadow-soft: 0 4px 14px rgba(26,25,68,.06);
  --shadow-cover: 0 14px 26px rgba(26,25,68,.28);

  --font-display: "Lora", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-hero: clamp(2.3rem, 1.4rem + 3vw, 3.6rem);
  --fs-h2: clamp(1.8rem, 1.35rem + 1.7vw, 2.6rem);
  --fs-h3: 1.35rem;
  --fs-lede: 1.2rem;
  --fs-body: 1.0625rem;
  --fs-small: .875rem;
  --fs-label: .78rem;
  --radius-card: 22px;
  --radius-sm: 14px;
  --wrap: 1160px;
  --read: 720px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14132B; --bg-alt: #1A1936; --surface: #201F43; --line: #34325F;
    --heading: #F6F1E3; --text: #E9E5DA; --text-2: #BDBAD0; --muted: #A3A0B8;
    --emph: #F5A56E; --link: #AEB4FF;
    --band-bg: #26245E; --band-text: #F9F6EF; --band-text-2: #CFCBE6;
    --chip-bg: #3A3260; --marker-color: rgba(245,196,67,.32);
    --est-tint: #3A2531; --cos-tint: #1E3631; --re-tint: #1C2D40; --bar-tint: #3A2220;
    --pm-tint: #143333; --nail-tint: #2C2547; --ins-tint: #3A2D14;
    --est-deep: #F4B3A6; --cos-deep: #9ED8C1; --re-deep: #9CCBF0; --bar-deep: #F7998E;
    --pm-deep: #7FD3D1; --nail-deep: #CDBDF0; --ins-deep: #F4C47A;
    --shadow-card: 0 18px 40px rgba(0,0,0,.35); --shadow-soft: 0 4px 14px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14132B; --bg-alt: #1A1936; --surface: #201F43; --line: #34325F;
  --heading: #F6F1E3; --text: #E9E5DA; --text-2: #BDBAD0; --muted: #A3A0B8;
  --emph: #F5A56E; --link: #AEB4FF;
  --band-bg: #26245E; --band-text: #F9F6EF; --band-text-2: #CFCBE6;
  --chip-bg: #3A3260; --marker-color: rgba(245,196,67,.32);
  --est-tint: #3A2531; --cos-tint: #1E3631; --re-tint: #1C2D40; --bar-tint: #3A2220;
  --pm-tint: #143333; --nail-tint: #2C2547; --ins-tint: #3A2D14;
  --est-deep: #F4B3A6; --cos-deep: #9ED8C1; --re-deep: #9CCBF0; --bar-deep: #F7998E;
  --pm-deep: #7FD3D1; --nail-deep: #CDBDF0; --ins-deep: #F4C47A;
  --shadow-card: 0 18px 40px rgba(0,0,0,.35); --shadow-soft: 0 4px 14px rgba(0,0,0,.25);
  color-scheme: dark;
}


* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: var(--fs-body); line-height: 1.6;
}
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--heading); }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--heading); line-height: 1.08; letter-spacing: -.01em; text-wrap: balance; margin: 0; }
h1 { font-size: var(--fs-hero); font-weight: 700; }
h2 { font-size: var(--fs-h2); font-weight: 700; }
h3 { font-size: var(--fs-h3); font-weight: 700; line-height: 1.2; }
h1 em, h2 em, h3 em { font-style: italic; font-weight: 600; color: var(--emph); }
p { margin: 0; }
.marker { background: linear-gradient(transparent 58%, var(--marker-color) 58%, var(--marker-color) 92%, transparent 92%); padding: 0 .1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 20px; }
.read { max-width: var(--read); }
.section { padding-block: clamp(56px, 7vw, 96px); }
.section.alt { background: var(--bg-alt); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.center { text-align: center; }
.center .lede, .center .stack { margin-inline: auto; }
.lede { font-size: var(--fs-lede); color: var(--text-2); max-width: 60ch; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-small); }

.label { font: 700 var(--fs-label)/1.2 var(--font-body); text-transform: uppercase; letter-spacing: .2em; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 6px; font: 800 .7rem/1 var(--font-body); text-transform: uppercase; letter-spacing: .16em; padding: 7px 11px; border-radius: 999px; background: var(--chip-bg); color: var(--heading); white-space: nowrap; }
.pill.live { background: var(--cos-tint); color: var(--cos-deep); }
.pill.soon { background: var(--sun-tint); color: #7A5309; }
.pill.dev { background: var(--line); color: var(--text-2); }
:root[data-theme="dark"] .pill.soon { color: var(--ins-deep); background: var(--ins-tint); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.soon { color: var(--ins-deep); background: var(--ins-tint); } }
.pill.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 800 .95rem/1 var(--font-body); text-transform: uppercase; letter-spacing: .06em; text-decoration: none; padding: 17px 30px; border-radius: 999px; border: 0; cursor: pointer; background: var(--cta-bg); color: var(--cta-text); box-shadow: 0 6px 16px rgba(234,176,36,.32); transition: background .15s, transform .15s; }
.btn:hover { background: var(--sun-hover); color: var(--indigo); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--heading); box-shadow: inset 0 0 0 2px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 2px var(--heading); background: transparent; }
.btn.sm { padding: 12px 18px; font-size: .8rem; }
.band .btn { background: var(--cream); color: var(--indigo); box-shadow: none; }
.band .btn:hover { background: var(--sun); }

/* Signature device: the study shelf. One segment per study area, once per page. */
.shelf { display: flex; height: 8px; width: 100%; }
.shelf span { flex: 1; }
.shelf span:nth-child(1) { background: var(--est); }
.shelf span:nth-child(2) { background: var(--cos); }
.shelf span:nth-child(3) { background: var(--re); }
.shelf span:nth-child(4) { background: var(--bar); }
.shelf span:nth-child(5) { background: var(--pm); }
.shelf span:nth-child(6) { background: var(--nail); }
.shelf span:nth-child(7) { background: var(--ins); }

/* Top bar + header */
.topbar { background: var(--indigo); color: var(--cream); font-size: .85rem; text-align: center; padding: 9px 16px; }
.topbar a { color: var(--sun); font-weight: 700; }
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--heading); }
.logo svg { width: 36px; height: 36px; flex: none; }
.logo b { font: 700 1.3rem/1 var(--font-display); }
.logo small { display: block; font: 700 .6rem/1 var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover, .nav a[aria-current] { color: var(--emph); }
@media (max-width: 900px) { .nav { display: none; } .site-header .btn { margin-left: auto; } }

/* Breadcrumbs */
.crumbs { font-size: .85rem; color: var(--muted); padding-block: 18px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--muted); }
.crumbs span[aria-hidden] { opacity: .6; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 26px; box-shadow: var(--shadow-soft); }
.grid { display: grid; gap: 20px; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.grid > * { min-width: 0; }

/* Mini cover: echoes each brand's cover anatomy in its own core color */
.cover { position: relative; border-radius: 12px; padding: 14px 14px 12px; color: #F9F6EF; aspect-ratio: 1100 / 1556; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-cover); overflow: hidden; max-width: 100%; }
.cover .k { font: 800 .5rem/1.2 var(--font-body); letter-spacing: .18em; text-transform: uppercase; opacity: .9; }
.cover .t { font: 700 1.05rem/1.05 var(--font-display); margin-top: 6px; }
.cover .t i { display: block; font-weight: 600; }
.cover .panel { margin-top: auto; background: #FFFEFA; border-radius: 60px 60px 10px 10px; height: 46%; border: 4px solid; display: grid; place-items: center; }
.cover .panel svg { width: 70%; height: 70%; }
.cover .f { font: 500 .45rem/1.3 var(--font-body); opacity: .75; border-top: 1px solid rgba(255,255,255,.25); padding-top: 5px; }

/* Area cards */
.area { display: grid; grid-template-columns: 112px 1fr; gap: 20px; align-items: start; text-decoration: none; color: inherit; transition: transform .18s, box-shadow .18s; }
.area:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.area h3 { font-size: 1.3rem; }
.area .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .85rem; color: var(--text-2); }
.area ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: .92rem; }
.area ul li::before { content: "→ "; color: var(--muted); }
.area .cover { width: 112px; }
.area .cover .t { font-size: .78rem; }
.area .cover .k { font-size: .38rem; }
.area .cover .f { display: none; }
.area .cover .panel { border-width: 3px; }

/* Band */
.band { background: var(--band-bg); color: var(--band-text); }
.band h2, .band h3 { color: var(--band-text); }
.band h2 em { color: var(--peach); }
.band .lede, .band p { color: var(--band-text-2); }
.band .label { color: var(--band-text-2); }

/* Callouts from the books */
.trap, .hook { border-radius: var(--radius-sm); padding: 16px 18px; font-size: .97rem; }
.trap { background: var(--est-tint); border-left: 5px solid var(--est-deep); }
.hook { background: var(--sun-tint); border-left: 5px solid #B88A12; color: var(--ink); }
:root[data-theme="dark"] .hook { background: var(--ins-tint); color: var(--text); border-left-color: var(--ins-deep); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hook { background: var(--ins-tint); color: var(--text); border-left-color: var(--ins-deep); } }
.trap b, .hook b { font: 800 .72rem/1 var(--font-body); letter-spacing: .16em; text-transform: uppercase; display: block; margin-bottom: 6px; }
.trap b { color: var(--est-deep); }
.answer-box { background: var(--surface); border: 2px solid var(--heading); border-radius: var(--radius-sm); padding: 20px 22px; }
.answer-box .label { color: var(--emph); margin-bottom: 8px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; }
.stat b { display: block; font: 700 2.4rem/1 var(--font-display); color: var(--heading); font-variant-numeric: tabular-nums; }
.stat span { display: block; font-size: .88rem; color: var(--text-2); margin-top: 6px; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 700 .72rem/1.2 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); background: var(--bg-alt); }
tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Article layout with TOC */
.article { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; }
.toc { position: sticky; top: 96px; font-size: .9rem; display: flex; flex-direction: column; gap: 8px; }
.toc a { color: var(--text-2); text-decoration: none; padding-left: 12px; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--heading); border-left-color: var(--emph); }
.prose { display: flex; flex-direction: column; gap: 22px; max-width: var(--read); }
.prose h2 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); margin-top: 28px; scroll-margin-top: 90px; }
.prose h3 { margin-top: 6px; }
.prose ul, .prose ol { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 920px) { .article { grid-template-columns: minmax(0, 1fr); } .toc { position: static; display: none; } }

.byline { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .88rem; color: var(--muted); align-items: center; }
.byline .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5; }

/* Product CTA box inside articles */
.offer { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 22px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 22px; box-shadow: var(--shadow-card); }
.offer .cover { width: 130px; }
@media (max-width: 520px) { .offer { grid-template-columns: 1fr; } .offer .cover { width: 120px; } }

/* FAQ */
details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 20px; }
details + details { margin-top: 10px; }
summary { cursor: pointer; font-weight: 700; color: var(--heading); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--muted); }
details[open] summary::after { content: "–"; }
details p { margin-top: 10px; color: var(--text-2); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-weight: 700; font-size: .85rem; color: var(--heading); }
select, input[type="email"], input[type="text"] { font: inherit; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); width: 100%; min-width: 0; }
.finder { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 18px; box-shadow: var(--shadow-card); }
@media (max-width: 720px) { .finder { grid-template-columns: 1fr; } }
.capture { display: flex; gap: 10px; flex-wrap: wrap; }
.capture input { flex: 1 1 240px; }

/* Footer */
.site-footer { background: var(--indigo-deep); color: #D9D6EA; padding-block: 64px 32px; font-size: .92rem; }
.site-footer h4 { color: #F9F6EF; font: 700 .75rem/1 var(--font-body); letter-spacing: .2em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer a { color: #D9D6EA; text-decoration: none; }
.site-footer a:hover { color: var(--sun); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-legal { border-top: 1px solid #34325F; margin-top: 40px; padding-top: 22px; display: flex; flex-direction: column; gap: 8px; font-size: .8rem; color: #A9A6C2; }
.site-footer .logo { color: #F9F6EF; }
.site-footer .logo small { color: #A9A6C2; }

/* Mockup ribbon so nobody mistakes a mockup for the live site */
.mock-ribbon { position: fixed; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); left: 14px; z-index: 50; background: var(--ink); color: #F9F6EF; font: 700 .72rem/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; padding: 10px 14px; border-radius: 999px; text-decoration: none; box-shadow: var(--shadow-card); }
.mock-ribbon:hover { color: var(--sun); }
:root[data-theme="dark"] .mock-ribbon { background: #F9F6EF; color: var(--indigo); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mock-ribbon { background: #F9F6EF; color: var(--indigo); } }

/* Skip link, mobile menu, current page */
.skip { position: absolute; left: -9999px; top: 8px; z-index: 60; background: var(--sun); color: var(--indigo); padding: 10px 14px; border-radius: 999px; font-weight: 800; }
.skip:focus { left: 12px; }
.nav a[aria-current="page"] { color: var(--emph); }
.mnav { display: none; position: relative; }
.mnav summary { list-style: none; cursor: pointer; width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--line); display: grid; place-content: center; gap: 4px; }
.mnav summary::-webkit-details-marker { display: none; }
.mnav summary span { display: block; width: 18px; height: 2px; background: var(--heading); border-radius: 2px; }
.mnav[open] summary { background: var(--surface); }
.mnav nav { position: absolute; right: 0; top: 54px; width: min(280px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-card); padding: 10px; display: flex; flex-direction: column; }
.mnav nav a { padding: 12px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; }
.mnav nav a:hover { background: var(--bg-alt); }
.mnav nav .btn { margin-top: 6px; color: var(--indigo); }
@media (max-width: 900px) { .mnav { display: block; } .head-cta { display: none; } }
.site-header .head-cta { margin-left: 0; }
.prose a, .read a { word-break: break-word; }
/* The mobile menu is a <details>; undo the FAQ styling it would otherwise inherit */
.mnav { background: none; border: 0; padding: 0; border-radius: 0; margin-left: auto; }
.mnav summary::after, .mnav[open] summary::after { content: none; }
.mnav summary { display: grid; justify-content: center; align-content: center; }
@media (max-width: 420px) { .logo small { display: none; } }
