:root { --ground: #f3f5f7; --paper: #ffffff; --ink: #17202b; --soft: #5b6878; --line: #d5dbe2; --accent: #2f6f8f; --accent-ink: #ffffff; --tint: #e8eef3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ground: #11171e; --paper: #182029; --ink: #e6ebf0; --soft: #94a2b2; --line: #26313c; --accent: #7fb7d3; --accent-ink: #0d1318; --tint: #1d2833; } }
:root[data-theme="dark"] { --ground: #11171e; --paper: #182029; --ink: #e6ebf0; --soft: #94a2b2; --line: #26313c; --accent: #7fb7d3; --accent-ink: #0d1318; --tint: #1d2833; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--ground); color: var(--ink); font: 17px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; padding: 28px 16px 40px; }
main { max-width: 64rem; margin: 0 auto; display: grid; gap: 22px; min-width: 0; }
main > * { min-width: 0; }
.top > div { min-width: 0; }
a { color: var(--accent); }
.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.mark { font: 600 15px/1 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); display: flex; align-items: center; gap: 10px; text-decoration: none; }
.mark span { font-size: 28px; letter-spacing: 0; }
h1 { font: 600 clamp(30px, 6vw, 44px)/1.12 Georgia, "Times New Roman", serif; margin: 22px 0 8px; text-wrap: balance; }
h2 { font: 600 clamp(22px, 4vw, 28px)/1.2 Georgia, "Times New Roman", serif; margin: 0; text-wrap: balance; }
.lede { margin: 0; color: var(--soft); max-width: 60ch; }
.tagline { margin: 0; font-weight: 600; color: var(--ink); max-width: 60ch; }
.tagline.sub { max-width: none; text-wrap: balance; }
.tagline.ways-lead { margin-top: 12px; font-weight: 400; color: var(--soft); }
.photo { flex: none; width: 112px; height: 112px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(0,0,0,.10); }
@media (max-width: 420px) { .photo { width: 84px; height: 84px; } }
figure { margin: 0; }
.slide { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); background: #fff; box-shadow: 0 2px 14px rgba(0,0,0,.06); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr)); gap: 12px; }
.card { display: grid; gap: 6px; align-content: start; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); text-decoration: none; color: var(--ink); }
.card:hover { border-color: var(--accent); }
.card:focus-visible, a.go:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.card b { font-size: 18px; }
.card span { color: var(--soft); font-size: 15px; }
.card i { font-style: normal; color: var(--accent); font-weight: 600; font-size: 15px; }
a.go { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 6px; text-decoration: none; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 16px; justify-self: start; }
.back { font-size: 15px; text-decoration: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0 0; }
small, .note { color: var(--soft); font-size: 14px; }
.wide { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
table { border-collapse: collapse; width: 100%; min-width: 46rem; font-size: 15px; line-height: 1.4; }
th, td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 10px 12px; vertical-align: top; text-align: left; }
th:last-child, td:last-child { border-right: 0; }
tr:first-child th { background: var(--ink); color: var(--ground); }
tr:first-child th:last-child { background: var(--accent); color: var(--accent-ink); }
tr:nth-child(2) th { background: var(--tint); color: var(--ink); }
td:first-child { width: 16%; color: var(--accent); }
td:last-child { background: var(--tint); }
.hero { max-width: 40rem; width: 100%; justify-self: center; }
.card { padding: 14px 16px; } .card b { font-size: 17px; } .card span { font-size: 14px; }
@media (min-height: 700px) { body { padding-top: 22px; } h1 { margin-top: 16px; } }
.home h1 { font-size: clamp(26px, 4vw, 34px); margin: 14px 0 6px; }
.home .photo { width: 92px; height: 92px; }
.home main { gap: 18px; }
.card .links { font-weight: 600; font-size: 15px; color: var(--soft); }
.card .links a { color: var(--accent); text-decoration: none; }
.card .links a:hover, small a:hover { text-decoration: underline; }
small a { color: var(--soft); }
.who { flex: none; display: grid; justify-items: center; gap: 2px; text-align: center; }
.who b { font-size: 15px; margin-top: 6px; }
.who span { font-size: 13px; color: var(--soft); }
.home .top > div:first-child { flex: 1; }
.home h1 { font-size: clamp(24px, 3.6vw, 32px); }
.try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 12px; }
.try span { font-size: 14px; color: var(--soft); }
.home .try a.go { padding: 9px 16px; font-size: 15px; }
.heroes { display: grid; grid-template-columns: 2.12fr 1.22fr; gap: 16px; align-items: start; }
.heroes .hero { max-width: none; }
.hero2 { margin: 0; display: grid; gap: 6px; }
.hero2 .slide { background: #fff; }
.hero2 figcaption { font-size: 13px; color: var(--soft); line-height: 1.4; }
@media (max-width: 760px) { .heroes { grid-template-columns: 1fr; } }
.ways { margin: 4px 0 0; padding-left: 22px; display: grid; gap: 2px; font-weight: 600; } .ways span { font-weight: 400; color: var(--soft); }
.home h1 { font-size: clamp(22px, 3.2vw, 28px); }
.home .cards { grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); }
.about { max-width: 40rem; } .about .top { align-items: center; justify-content: flex-start; gap: 22px; } .about .photo { width: 120px; height: 120px; }
.about h1 { margin: 0 0 4px; } .about .role { font-weight: 600; margin: 0; } .about .links { display: flex; flex-wrap: wrap; gap: 10px; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.bar .contact { font: 500 14px/1 system-ui, sans-serif; color: var(--accent); text-decoration: none; border: 1px solid currentColor; border-radius: 6px; padding: 7px 14px; }
.bar .contact:hover, .bar .contact:focus-visible { background: var(--accent); color: var(--accent-ink); }
.contactpage { max-width: 44rem; }
.contactpage form { display: grid; gap: 16px; }
.contactpage label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.contactpage label i { font-style: normal; font-weight: 400; color: var(--soft); }
.contactpage input, .contactpage textarea { font: inherit; font-weight: 400; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; min-width: 0; }
.contactpage input[type=file] { padding: 8px; }
.contactpage input:focus-visible, .contactpage textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.contactpage textarea { resize: vertical; }
.contactpage .two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); gap: 16px; }
.contactpage .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contactpage button.go { border: 0; cursor: pointer; }
.contactpage button.go:disabled { opacity: .6; cursor: wait; }
.contactpage .note { margin: 0; color: var(--soft); font-size: 14px; }
.said { margin: 0; padding: 12px 14px; border-radius: 6px; border: 1px solid var(--line); background: var(--tint); }
.said.bad { border-color: #b4532a; }

/* LAYOUT B (2026-11-27): the bar on top, the menu on the left, the page on the right */
body { padding: 0; }
header.site { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding: 10px 20px; background: var(--paper); border-bottom: 1px solid var(--line); }
header.site .acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
header.site .contact { font: 500 14px/1 system-ui, sans-serif; color: var(--accent); text-decoration: none; border: 1px solid currentColor; border-radius: 6px; padding: 8px 14px; }
header.site .contact:hover, header.site .contact:focus-visible { background: var(--accent); color: var(--accent-ink); }
header.site a.go { padding: 8px 14px; font-size: 14px; }
.shell { display: grid; grid-template-columns: 13.5rem minmax(0, 1fr); gap: 36px; max-width: 84rem; margin: 0 auto; padding: 26px 20px 40px; align-items: start; }
.shell main { margin: 0; max-width: 64rem; width: 100%; }
nav.side { position: sticky; top: 76px; display: grid; gap: 2px; font-size: 15px; }
nav.side a { color: var(--ink); text-decoration: none; padding: 7px 10px; border-radius: 6px; border-left: 3px solid transparent; }
nav.side a:hover { background: var(--tint); }
nav.side a:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
nav.side a[aria-current="page"] { background: var(--tint); border-left-color: var(--accent); border-radius: 0 6px 6px 0; font-weight: 600; }
nav.side .group { margin-top: 12px; padding: 4px 10px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
nav.side a.sub { padding-left: 22px; font-size: 14px; }
.home h1 { margin-top: 0; }
figure.lesson video { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); background: #000; }
code { font: 0.92em ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--tint); padding: 1px 5px; border-radius: 4px; }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-top: 14px; }
  nav.side { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  nav.side a, nav.side a.sub { padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; }
  nav.side a[aria-current="page"] { border-color: var(--accent); border-radius: 6px; }
  nav.side .group { display: none; }
}
@media (max-width: 480px) { header.site { padding: 10px 16px; } .shell { padding-left: 16px; padding-right: 16px; } header.site .contact { display: none; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; } }
.three { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; } .three figure:first-child { grid-column: 1 / -1; }
.three figure { display: grid; gap: 6px; }
.three figcaption { font-size: 14px; color: var(--soft); line-height: 1.4; } .three figcaption b { color: var(--ink); }
.three a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
@media (max-width: 640px) { .three { grid-template-columns: 1fr; } }
header.site .motto { flex: 1; font: 600 16px/1.3 system-ui, sans-serif; color: var(--ink); padding-left: 14px; border-left: 1px solid var(--line); }
@media (max-width: 860px) { header.site .motto { display: none; } }
/* the home page's left column: the menu, and under it the comparison sheet (his ask, 2026-11-27: "utilize the space below
   the tutorial"); one page, one scroll - the column is not pinned, so nothing scrolls on its own */
.sidecol { display: grid; gap: 22px; align-content: start; min-width: 0; }
.sidecol nav.side { position: static; }
.sidefig { display: grid; gap: 6px; }
.sidefig figcaption { font-size: 13px; color: var(--soft); line-height: 1.4; } .sidefig figcaption b { color: var(--ink); }
.three { grid-template-columns: 1fr; }
@media (max-width: 860px) { .sidefig { display: none; } }
.sidecol nav.side .group:first-child { margin-top: 0; }
/* the Tutorials heading looks like a menu header (his ask, 2026-11-27: "tutorial should get a header like this") */
nav.side .group { margin-top: 6px; padding: 7px 10px; font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); background: var(--tint); border-left: 3px solid var(--accent); border-radius: 0 6px 6px 0; }
.sidecol nav.side .group:first-child { margin-top: 0; }
nav.side a.sub { margin-top: 2px; }
/* the Tutorials page: an index first, then each lesson (2026-11-27) */
.tindex { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: t; }
.tindex a { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); text-decoration: none; color: var(--ink); }
.tindex a:hover { border-color: var(--accent); }
.tindex a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.tindex b { font-size: 17px; } .tindex span { color: var(--soft); font-size: 15px; }
section.lesson { display: grid; gap: 10px; scroll-margin-top: 80px; }
section.lesson h2 { margin-top: 10px; }
/* the side menu smaller and compact (his word, 2026-11-28) */
@media (min-width: 861px) {
  nav.side { gap: 0; font-size: 13px; }
  nav.side a { padding: 4px 8px; line-height: 1.35; }
}
/* Home: what Cube Root is, in plain text (2026-11-28, for search and AI readers) */
.what { display: grid; gap: 10px; max-width: 78ch; }
.what h2 { margin: 6px 0 0; font-size: 20px; }
.what p { margin: 0; }
.what dl { margin: 0; display: grid; grid-template-columns: minmax(150px, 15em) 1fr; gap: 6px 16px; }
.what dt { font-weight: 600; color: var(--ink); }
.what dd { margin: 0; color: var(--soft); }
@media (max-width: 640px) { .what dl { grid-template-columns: 1fr; } .what dd { margin-bottom: 6px; } }

/* THE CALLING CARDS (2026-11-28, his drawing and words: a card each - languages, kinds of work, what is derived, where it
   runs, what it replaces; simple words; "who else?" answered narrowly and honestly) */
/* two rows, four columns (his word 2026-11-28: "two rows ... stack two one over other if it is fitting"): the small cards
   stacked in pairs, the derived card the full height */
.cc { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: "nosdk nosdk" "der safe" "rep obs" "where where" "kind lang"; }
.c-nosdk { grid-area: nosdk; } .ccard.c-nosdk h2 { font-size: 22px; }
.ccard .langs4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ccard .langs4 li { grid-template-columns: 1fr; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--tint); }
.langs4 code { font: 600 14px/1.3 ui-monospace, Consolas, monospace; color: var(--accent); }
@media (max-width: 860px) { .ccard .langs4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.c-obs { grid-area: obs; }
.c-lang { grid-area: lang; } .c-kind { grid-area: kind; } .c-der { grid-area: der; } .c-safe { grid-area: safe; }
.c-rt { grid-area: rt; } .c-where { grid-area: where; } .c-rep { grid-area: rep; }
@media (max-width: 560px) { .cc { grid-template-columns: 1fr; grid-template-areas: "nosdk" "der" "safe" "rep" "obs" "where" "kind" "lang"; } }
.overlap { margin: 12px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--soft); }
.overlap a { color: var(--accent); font-weight: 600; }
.ccard { text-align: left; display: grid; gap: 10px; align-content: start; padding: 18px; border: 2px solid var(--ink); border-radius: 4px; background: var(--paper); }
.ccard.key { border-color: var(--accent); }
.ccard h2 { font: 600 18px/1.2 Georgia, "Times New Roman", serif; margin: 0; }
.ccard ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ccard li { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; font-size: 15px; line-height: 1.35; }
.ccard li b { font-weight: 600; }
.ccard li span { grid-column: 1; color: var(--soft); font-size: 14px; }
.ccard li i { grid-column: 2; grid-row: 1; font-style: normal; font-size: 13px; color: var(--soft); white-space: nowrap; }
.ccard li i.ok { color: var(--accent); font-weight: 600; }
.ccard li em { grid-column: 1; font-style: normal; color: var(--accent); font-size: 14px; font-weight: 600; }
.ccard .who { text-align: left; margin: 4px 0 0; padding-top: 8px; border-top: 1px solid var(--line); color: var(--soft); font-size: 13.5px; line-height: 1.45; }
.ccard .who b { color: var(--ink); }
.cctop { display: grid; gap: 4px; margin: 8px 0 -6px; }
.cchead { font: 600 clamp(22px, 3.4vw, 28px)/1.2 Georgia, "Times New Roman", serif; margin: 0; }
.ccsub { margin: 0; color: var(--soft); max-width: 70ch; }
.ours { margin: 16px 0 0; font: 600 17px/1.4 Georgia, "Times New Roman", serif; color: var(--accent); }
.stack { display: grid; gap: 0; margin-top: 4px; }
.stack .layer { display: grid; gap: 1px; padding: 8px 10px; border: 1.5px solid var(--ink); font-size: 14px; line-height: 1.35; }
.stack .layer span { color: var(--soft); font-size: 13px; }
.stack .you { border-radius: 4px 4px 0 0; background: var(--paper); }
.stack .ours { border-top: 0; border-radius: 0 0 4px 4px; background: var(--tint); }
.ccard .lead { margin: -2px 0 0; color: var(--soft); font-size: 14px; line-height: 1.4; }
.kicker { margin: 2px 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.quote { margin: 6px 0 0; padding: 2px 0 2px 12px; border-left: 3px solid var(--accent); display: grid; gap: 4px; max-width: 760px; }
.quote blockquote { margin: 0; font: italic 17px/1.45 Georgia, "Times New Roman", serif; color: var(--ink); }
.quote figcaption { font-size: 13px; color: var(--soft); }
.quote cite { font-style: italic; }
.quote .why { margin: 2px 0 0; font-size: 15px; line-height: 1.4; color: var(--ink); font-weight: 600; }
