/* Kathuko site: the Graycells look (system fonts, light bands, rounded tiles), one stylesheet, no external assets. */
:root {
  --bg: #ffffff;
  --band: #f5f5f7;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --link: #0066cc;
  --rule: #d2d2d7;
  --nav: rgba(251, 251, 253, 0.8);
  --tile-dark: #000000;
  --tile-dark-text: #f5f5f7;
  --radius: 22px;
  --lamp: #c4741f;   /* Kathuko accent: the lamp flame, used sparingly */
  --apex: #1d2a3a;   /* APEX course colour */
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
    --bg: #000000;
    --band: #161617;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --link: #2997ff;
    --rule: #424245;
    --nav: rgba(22, 22, 23, 0.8);
    --tile-dark: #1d1d1f;
    --lamp: #e8a04a;
   color-scheme: dark; } }
:root[data-theme="dark"] {
    --bg: #000000;
    --band: #161617;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --link: #2997ff;
    --rule: #424245;
    --nav: rgba(22, 22, 23, 0.8);
    --tile-dark: #1d1d1f;
    --lamp: #e8a04a;
   color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; display: block; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.9em; }

/* Top bar */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: var(--nav);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 60%, transparent);
}
.nav .inner {
  max-width: 1024px; margin: 0 auto; padding: 0 22px;
  height: 48px; display: flex; align-items: center; gap: 28px;
}
.nav .brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 19px; color: var(--text); letter-spacing: -0.02em; margin-right: auto; }
.nav .brand:hover { text-decoration: none; }
.nav .menu { display: flex; gap: 28px; }
.nav a.item { color: var(--text); opacity: 0.8; font-size: 13px; letter-spacing: -0.01em; white-space: nowrap; }
.nav a.item:hover { opacity: 1; text-decoration: none; }
.nav a.item[aria-current="page"] { opacity: 1; font-weight: 600; }
@media (max-width: 820px) {
  .nav .inner { flex-direction: column; align-items: stretch; height: auto; gap: 0; padding: 0; }
  .nav .brand { height: 44px; padding: 0 22px; margin-right: 0; }
  .nav .menu { gap: 22px; overflow-x: auto; padding: 0 22px 10px; scrollbar-width: none; }
  .nav .menu::-webkit-scrollbar { display: none; }
}
@media (max-width: 480px) { .nav .brand { padding: 0 16px; } .nav .menu { gap: 16px; padding: 0 16px 10px; } }

/* Hero */
.hero { text-align: center; padding: 40px 22px 24px; }
.hero h1 {
  font-size: clamp(48px, 9vw, 96px); line-height: 1.05; font-weight: 700;
  letter-spacing: -0.015em; margin: 0 0 16px; text-wrap: balance;
}
.hero p.lede {
  font-size: clamp(21px, 2.6vw, 28px); line-height: 1.25; font-weight: 400;
  color: var(--muted); max-width: 760px; margin: 0 auto; letter-spacing: 0.004em; text-wrap: balance;
}
.hero .meaning { font-size: 15px; color: var(--muted); margin: 14px 0 0; }
.hero .meaning b { color: var(--lamp); font-weight: 600; }
.hero .icon { width: 128px; height: 128px; border-radius: 28px; margin: 0 auto 24px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18); }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }

/* Links with chevrons */
.links { display: flex; gap: 32px; justify-content: center; flex-wrap: wrap; margin-top: 16px; font-size: 19px; }
.chev::after { content: " ›"; }

/* Facts row under a hero */
.facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; margin-top: 22px; }
.facts span { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted);
  border: 1px solid var(--rule); border-radius: 999px; padding: 5px 12px; }

/* Full-width tiles */
.tiles { display: grid; gap: 12px; padding: 12px; max-width: 1400px; margin: 0 auto; }
.tile {
  background: var(--band); border-radius: var(--radius);
  text-align: center; padding: 30px 28px 28px; overflow: hidden;
}
.tile.dark { background: var(--tile-dark); color: var(--tile-dark-text); }
.tile h2 { font-size: clamp(32px, 4.6vw, 48px); line-height: 1.07; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.005em; text-wrap: balance; }
.tile p.sub { font-size: clamp(19px, 2.2vw, 24px); line-height: 1.25; margin: 0 auto; max-width: 640px; color: var(--muted); text-wrap: balance; }
.tile.dark p.sub { color: #a1a1a6; }
.tile.dark a { color: #2997ff; }
.tile .icons { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; margin-top: 20px; }
.tile .icons img { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 10px 26px rgba(0,0,0,0.35); }
.tile .icons .soon { width: 96px; height: 96px; border-radius: 22px; border: 1.5px dashed var(--rule);
  display: flex; align-items: center; justify-content: center; text-align: center; font-size: 12px; color: var(--muted); padding: 8px; }
@media (max-width: 480px) {
  .tile .icons { gap: 14px; }
  .tile .icons img, .tile .icons .soon { width: 68px; height: 68px; border-radius: 16px; }
  .tile .icons .soon { font-size: 10px; }
}
.badge {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--rule); border-radius: 999px; padding: 4px 12px; margin-bottom: 16px;
}
.two { grid-template-columns: 1fr 1fr; }
.three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 900px) { .three { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }
.tile.text-left { text-align: left; }
.tile .mini h3 { font-size: 21px; margin: 0 0 6px; }
.tile .mini p { margin: 0; color: var(--muted); }

/* A small sample-data card inside the project tile */
.sample { max-width: 640px; margin: 24px auto 0; text-align: left; display: grid; gap: 10px; }
.sample .row { display: flex; justify-content: space-between; align-items: center; gap: 16px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; padding: 14px 18px; }
.sample .row b { display: block; font-size: 17px; color: var(--tile-dark-text); }
.sample .row span { font-size: 14px; color: #a1a1a6; }
.sample .pill { flex: none; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  border-radius: 999px; padding: 4px 10px; background: rgba(232,160,74,0.18); color: #f2b870; }
.sample .pill.ok { background: rgba(48,209,88,0.16); color: #63e6a0; }

/* Reading sections */
.section { max-width: 760px; margin: 0 auto; padding: 64px 22px; }
.section.band { max-width: none; background: var(--band); }
.section.band > .in { max-width: 760px; margin: 0 auto; }
.section h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; margin: 0 0 20px; font-weight: 700; text-wrap: balance; }
.section h3 { font-size: 21px; margin: 32px 0 8px; }
.section p { margin: 0 0 14px; }
.section p.intro { color: var(--muted); font-size: 19px; }

/* Curriculum: parts as expanding rows */
.parts { margin-top: 28px; }
.parts .group { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); margin: 32px 0 8px; }
.parts .group:first-child { margin-top: 0; }
.parts summary .num { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; min-width: 2.2em; display: inline-block; }
.parts summary .t { flex: 1; }
.parts summary .tag { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--lamp); border: 1px solid currentColor; border-radius: 999px; padding: 2px 8px; align-self: center; white-space: nowrap; }
.parts details ul { margin: 12px 0 0; padding-left: 2.2em; color: var(--muted); }
.parts details li { margin: 4px 0; }
@media (max-width: 480px) { .parts summary .tag { display: none; } }

/* FAQ */
details { border-bottom: 1px solid var(--rule); padding: 18px 0; }
details:first-of-type { border-top: 1px solid var(--rule); }
.parts .group + details { border-top: 1px solid var(--rule); }
summary { cursor: pointer; font-weight: 600; font-size: 19px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 24px; line-height: 1; }
details[open] summary::after { content: "−"; }
details > p { margin: 12px 0 0; color: var(--muted); }

/* Footer */
.footer { background: var(--band); color: var(--muted); font-size: 12px; line-height: 1.5; }
.footer .inner { max-width: 1024px; margin: 0 auto; padding: 22px; }
.footer .row { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
  border-top: 1px solid var(--rule); padding-top: 14px; margin-top: 14px; }
.footer .support-link { display: inline-block; color: var(--text); font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.footer .contacts { display: grid; grid-template-columns: max-content max-content; gap: 3px 16px; }
.footer .contacts > div { display: contents; }
.footer .contacts .label { color: var(--muted); }
.footer .contacts a { color: var(--text); white-space: nowrap; }
@media (max-width: 480px) { .footer .contacts { grid-template-columns: 1fr; gap: 0; } .footer .contacts a { margin-bottom: 6px; } }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }
