/* Nano Learny site: shared by the landing page and the articles. Colors mirror mobile/src/theme. */
:root {
  color-scheme: light;
  --ink: #17211B;
  --ink-muted: #617068;
  --primary: #286447;
  --primary-container: #D8F2E2;
  --secondary: #E77943;
  --secondary-container: #FFE4D5;
  --background: #F6F8F4;
  --surface: #FFFFFF;
  --surface-variant: #E8EDE8;
  --outline: #C7D0C9;
  --error: #B3261E;
  --grid: rgba(40, 100, 71, 0.10);
  --grid-strong: rgba(40, 100, 71, 0.14);
  --radius: 12px;
  --cell: 24px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--background);
  background-image:
    linear-gradient(to right, var(--grid-strong) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-strong) 1px, transparent 1px),
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size:
    calc(var(--cell) * 5) calc(var(--cell) * 5),
    calc(var(--cell) * 5) calc(var(--cell) * 5),
    var(--cell) var(--cell),
    var(--cell) var(--cell);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
a { color: var(--primary); }
code { font-family: var(--mono); font-size: 0.88em; background: var(--surface-variant); padding: 1px 6px; border-radius: 6px; }
:not(pre) > code { white-space: nowrap; }
pre code { background: none; padding: 0; font-size: inherit; }
main, header, footer { max-width: 720px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font-weight: 700; font-size: 18px; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
header nav { display: flex; gap: 16px; font-size: 14px; }
header nav a { color: var(--ink-muted); text-decoration: none; }
header nav a:hover { color: var(--primary); }
main { padding-top: 48px; padding-bottom: 32px; }

h1 { font-size: 40px; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 8px; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0.02em; color: var(--primary); margin: 0 0 12px; }
.tagline { font-size: 26px; line-height: 1.25; font-weight: 600; margin: 0 0 16px; }
h2 { font-size: 24px; line-height: 1.3; margin: 56px 0 12px; }
h3 { font-size: 17px; line-height: 1.35; margin: 0 0 4px; }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; }
.lead { font-size: 19px; }
.muted { color: var(--ink-muted); }
.small { font-size: 14px; }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0; padding: 10px 16px;
  background: var(--primary-container); color: var(--primary);
  border-radius: 999px; font-size: 15px; font-weight: 600;
}
.badge svg { width: 18px; height: 18px; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 20px 0 0; }
.cta a { font-size: 15px; font-weight: 600; }

/* Cards, mirroring the app's CourseCard */
.card {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 24px;
}
.grid { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; margin: 16px 0 0; }
.grid.three { grid-template-columns: 1fr 1fr 1fr; }
.grid .card p:last-child { margin-bottom: 0; }
.grid .card h3 { margin-bottom: 6px; }

/* Hero illustration: a learny card and one lesson step */
.demo { margin: 32px 0 0; display: grid; gap: 16px; grid-template-columns: 1fr 1fr; align-items: start; }
.learny { display: grid; gap: 14px; }
.learny .row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.learny .title { font-weight: 600; font-size: 17px; line-height: 1.35; }
.streak { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 15px; white-space: nowrap; }
.streak svg { width: 18px; height: 18px; fill: var(--secondary); }
.bar { height: 8px; border-radius: 999px; background: var(--surface-variant); overflow: hidden; }
.bar span { display: block; height: 100%; width: 42%; background: var(--primary); border-radius: 999px; }
.learny .meta { font-size: 13px; color: var(--ink-muted); }
.step .label { font-size: 13px; font-weight: 600; color: var(--ink-muted); margin: 0 0 8px; }
.step .prompt { font-weight: 600; line-height: 1.4; margin: 0 0 12px; }
.step pre { margin: 0 0 12px; padding: 10px 12px; background: var(--surface-variant); border-radius: 8px; font: 13px/1.5 var(--mono); overflow-x: auto; }
.choices { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.choices li { border: 1px solid var(--outline); border-radius: 10px; padding: 8px 12px; font-size: 15px; }
.choices li.correct { border-color: var(--primary); background: var(--primary-container); color: var(--primary); font-weight: 600; }
.step .why { font-size: 14px; color: var(--ink-muted); margin: 0; }
figcaption { font-size: 13px; color: var(--ink-muted); margin-top: 8px; }

/* How it works: the steps next to the screen recording */
.how { display: grid; grid-template-columns: 1fr 240px; gap: 32px; align-items: start; }
.how .recording { margin: 16px 0 0; position: sticky; top: 24px; }

/* Screen recording of the app */
.recording { margin: 32px auto 0; max-width: 300px; text-align: center; }
.recording img { display: block; width: 100%; height: auto; border: 1px solid var(--outline); border-radius: 28px; }

.steps { list-style: none; counter-reset: step; margin: 16px 0 0; padding: 0; display: grid; gap: 16px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 36px 1fr; gap: 16px; align-items: start; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 999px;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 15px;
}
.steps p { margin: 0; }

.checks { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.checks li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; }
.checks svg { width: 22px; height: 22px; margin-top: 2px; fill: var(--primary); }

.plans { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; margin: 16px 0 0; }
.plans .price { font-size: 28px; font-weight: 700; line-height: 1.2; margin: 4px 0 8px; }
.plans .price small { font-size: 15px; font-weight: 400; color: var(--ink-muted); }
.plans ul { margin: 0; padding-left: 20px; }
.plans li { margin: 4px 0; }

/* Release waitlist */
.waitlist { margin: 16px 0 0; }
.waitlist form { display: flex; gap: 8px; margin: 12px 0 0; }
.waitlist label.sr-only, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.waitlist input[type="email"] {
  flex: 1; min-width: 0;
  font: inherit; color: var(--ink);
  padding: 10px 14px; border: 1px solid var(--outline); border-radius: 10px; background: var(--background);
}
.waitlist input[type="email"]:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.waitlist button {
  font: inherit; font-weight: 600; color: #fff; background: var(--primary);
  border: 0; border-radius: 10px; padding: 10px 18px; cursor: pointer; white-space: nowrap;
}
.waitlist button:hover { background: #1F5039; }
.waitlist .platform { display: flex; align-items: center; gap: 12px; margin: 0; padding: 0 4px; border: 0; white-space: nowrap; }
.waitlist .platform label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.waitlist .platform input { accent-color: var(--primary); margin: 0; }
.waitlist .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice { margin: 12px 0 0; padding: 10px 14px; border-radius: 10px; font-weight: 600; font-size: 15px; }
.notice.ok { background: var(--primary-container); color: var(--primary); }
.notice.err { background: var(--secondary-container); color: #8A3A12; }
.notice[hidden] { display: none; }

.faq { margin: 16px 0 0; }
.faq details { border-top: 1px solid var(--outline); padding: 14px 0; }
.faq details:last-child { border-bottom: 1px solid var(--outline); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-muted); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; }

.maker { margin: 16px 0 0; }
.maker .links { margin: 0; font-size: 15px; color: var(--ink-muted); }

.reading { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.reading a { font-weight: 600; }

/* Articles */
article h1 { font-size: 36px; }
article h2 { font-size: 23px; margin-top: 44px; }
article h3 { font-size: 18px; margin: 28px 0 6px; }
article p, article li { font-size: 18px; line-height: 1.65; }
article ul, article ol { padding-left: 22px; }
article li { margin: 6px 0; }
.byline { font-size: 14px; color: var(--ink-muted); margin: 0 0 24px; }
.aside { margin: 24px 0; }
.aside p:last-child { margin-bottom: 0; }
.disclosure { background: var(--secondary-container); border-color: #F3C3A8; }
.table-wrap { overflow-x: auto; margin: 16px 0 24px; border: 1px solid var(--outline); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.45; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--surface-variant); }
th { font-size: 13px; color: var(--ink-muted); font-weight: 600; background: var(--background); }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; white-space: nowrap; }
tr.ours td { background: #F2FAF5; }
.app { margin: 16px 0 0; }
.app h3 { margin: 0 0 2px; font-size: 19px; }
.app .facts { font-size: 14px; color: var(--ink-muted); margin: 0 0 10px; }
.app p { font-size: 17px; }
.app p:last-child { margin-bottom: 0; }

footer {
  margin-top: 32px; padding-top: 16px; padding-bottom: 48px;
  border-top: 1px solid var(--outline);
  color: var(--ink-muted); font-size: 14px;
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
}
footer nav { display: flex; flex-wrap: wrap; gap: 8px 16px; }
footer a { color: var(--ink-muted); text-decoration: none; }
footer a:hover { color: var(--primary); }

@media (max-width: 700px) {
  .demo, .grid, .grid.three, .plans, .how { grid-template-columns: 1fr; }
  .how .recording { margin: 16px auto 0; max-width: 280px; position: static; }
}
@media (max-width: 600px) {
  main, header, footer { padding-left: 16px; padding-right: 16px; }
  main { padding-top: 32px; }
  h1, article h1 { font-size: 32px; }
  h2 { font-size: 22px; }
  .tagline { font-size: 21px; }
  .lead { font-size: 17px; }
  article p, article li { font-size: 17px; }
  .card { padding: 20px; }
  header nav .wide { display: none; }
  .waitlist form { flex-direction: column; }
  /* The comparison table becomes one block per app */
  .table-wrap { overflow: visible; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; }
  .table-wrap tr { padding: 12px 14px; border-bottom: 1px solid var(--surface-variant); }
  .table-wrap tbody tr:last-child { border-bottom: 0; }
  .table-wrap td { border: 0; padding: 2px 0; display: grid; grid-template-columns: 96px 1fr; gap: 10px; }
  .table-wrap td::before { content: attr(data-label); font-size: 13px; color: var(--ink-muted); font-weight: 400; }
  .table-wrap td:first-child { display: block; font-size: 17px; white-space: normal; padding-bottom: 4px; }
  .table-wrap td:first-child::before { content: none; }
  tr.ours { background: #F2FAF5; }
  tr.ours td { background: none; }
}
