/* guabase.org -- GuaBase Spreadsheet Compendium
   CSS prefix rjh- on every class, per batch-3 assignment (port 9236).
   Colour values copied verbatim from the official guabase.com style sheet
   (see _planning/04-design-dna.md); do not invent new brand hex values. */

@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/work-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/work-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --rjh-green: #26c96f;
  --rjh-green-hover: #1fb864;
  --rjh-green-active: #18a85b;
  --rjh-green-text: #107a54;
  --rjh-green-soft: #eaf6ef;
  --rjh-on-green: #07130d;
  --rjh-deep: #07130d;
  --rjh-deep-2: #0c1511;
  --rjh-bg: #f6f7f9;
  --rjh-card: #ffffff;
  --rjh-ink: #18232c;
  --rjh-muted: #596779;
  --rjh-border: #dce1e8;
  --rjh-border-soft: #e9ecf1;
  --rjh-warn: #946000;
  --rjh-risk: #c63340;
  --rjh-radius: 8px;
  --rjh-radius-lg: 12px;
  --rjh-radius-sm: 4px;
  --rjh-maxw: 1320px;
  --rjh-font: 'Work Sans', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 16px/1.65 var(--rjh-font);
  color: var(--rjh-ink);
  background: var(--rjh-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--rjh-green-text); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--rjh-green-text); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--rjh-font); color: var(--rjh-ink); line-height: 1.22; margin: 0 0 .5em; font-weight: 800; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin-bottom: .4em; }
table { border-collapse: collapse; width: 100%; }
strong { color: var(--rjh-ink); }

.rjh-wrap { max-width: var(--rjh-maxw); margin: 0 auto; padding: 0 24px; }
.rjh-skip { position: absolute; left: -999px; top: 0; background: var(--rjh-ink); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 200; }
.rjh-skip:focus { left: 0; }

/* -------------------------------------------------- independence notice bar */
.rjh-topbar {
  background: var(--rjh-deep);
  color: #cfe9d9;
  font-size: 13.5px;
  text-align: center;
  padding: 8px 16px;
  line-height: 1.5;
}
.rjh-topbar strong { color: #ffffff; }

/* --------------------------------------------------------------- header/nav */
.rjh-header {
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--rjh-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(6px);
}
.rjh-header__in { display: flex; align-items: center; gap: 28px; min-height: 68px; padding: 10px 0; }
.rjh-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--rjh-ink); flex: none; min-height: 44px; }
.rjh-brand:hover { text-decoration: none; }
.rjh-brand img { width: 30px; height: 30px; }
.rjh-brand span { white-space: nowrap; }
.rjh-nav { display: flex; gap: 4px; flex-wrap: nowrap; overflow-x: auto; }
.rjh-nav a {
  color: var(--rjh-ink);
  font-weight: 600;
  font-size: 15px;
  padding: 10px 12px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--rjh-radius-sm);
  white-space: nowrap;
}
.rjh-nav a:hover { background: var(--rjh-green-soft); text-decoration: none; }
.rjh-nav a[aria-current="page"] { color: var(--rjh-green-text); }
.rjh-navtoggle { display: none; margin-left: auto; }

/* ----------------------------------------------------------------- buttons */
.rjh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 15.5px; line-height: 1;
  padding: 12px 20px; border-radius: var(--rjh-radius);
  border: 1px solid transparent; cursor: pointer; min-height: 44px;
}
.rjh-btn--primary { background: var(--rjh-green); color: var(--rjh-on-green); }
.rjh-btn--primary:hover { background: var(--rjh-green-hover); text-decoration: none; }
.rjh-btn--primary:active { background: var(--rjh-green-active); }
.rjh-btn--ghost { background: transparent; color: var(--rjh-ink); border-color: var(--rjh-border); }
.rjh-btn--ghost:hover { border-color: var(--rjh-green-text); color: var(--rjh-green-text); text-decoration: none; }
.rjh-btn--onDark { background: var(--rjh-green); color: var(--rjh-on-green); }

/* -------------------------------------------------------------------- hero */
.rjh-hero { background: radial-gradient(ellipse at 20% -10%, #12261c 0%, var(--rjh-deep) 55%), var(--rjh-deep-2); color: #e7f3ec; padding: 56px 0 44px; }
.rjh-hero__in { max-width: 820px; }
.rjh-hero h1 { color: #ffffff; font-size: clamp(32px, 4.4vw, 46px); margin-bottom: 14px; }
.rjh-hero__lede { color: #c6dccf; font-size: 18px; max-width: 640px; margin-bottom: 26px; }
.rjh-search { display: flex; gap: 10px; max-width: 720px; width: 100%; margin-bottom: 18px; }
.rjh-search input {
  flex: 1 1 auto; min-width: 0; min-height: 44px;
  border-radius: var(--rjh-radius); border: 1px solid #2a4538; background: #0f1d16;
  color: #fff; padding: 0 16px; font: inherit; font-size: 16px;
}
.rjh-search input::placeholder { color: #85a393; }
.rjh-search .rjh-btn { flex: none; }
.rjh-subnav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.rjh-subnav a { color: #a9cab7; font-size: 14.5px; font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.rjh-subnav a:hover { color: #fff; }

/* ------------------------------------------------------------- page heads */
.rjh-pagehead { padding: 40px 0 8px; }
.rjh-crumb { font-size: 13.5px; color: var(--rjh-muted); margin-bottom: 14px; }
.rjh-crumb a { color: var(--rjh-muted); display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.rjh-crumb span[aria-hidden] { margin: 0 6px; }
.rjh-crumb .rjh-crumb__current { color: var(--rjh-ink); }
.rjh-pagehead h1 { font-size: clamp(28px, 3.6vw, 38px); max-width: 900px; }
.rjh-pagehead__lede { font-size: 17.5px; color: var(--rjh-muted); max-width: 760px; }

/* ------------------------------------------------------------- page layout */
.rjh-pagebody { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; padding: 20px 0 64px; align-items: start; }
.rjh-pagebody__main { min-width: 0; }
.rjh-aside { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 16px; }
.rjh-asidecard { background: var(--rjh-green-soft); border-radius: var(--rjh-radius-lg); padding: 20px; }
.rjh-asidecard h2, .rjh-asidecard h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--rjh-green-text); margin-bottom: 10px; }
.rjh-asidecard ul { padding-left: 0; list-style: none; margin: 0; }
.rjh-asidecard li { margin-bottom: 8px; font-size: 14.5px; }
.rjh-asidecard a { color: var(--rjh-ink); font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.rjh-asidecard a:hover { color: var(--rjh-green-text); }
.rjh-asidecard p { font-size: 14px; color: var(--rjh-ink); margin-bottom: 0; }
@media (max-width: 1023px) {
  .rjh-pagebody { grid-template-columns: 1fr; }
  .rjh-aside { position: static; flex-direction: row; flex-wrap: wrap; }
  .rjh-asidecard { flex: 1 1 260px; }
}

/* ---------------------------------------------------------------- section */
.rjh-section { padding: 36px 0; border-top: 1px solid var(--rjh-border-soft); }
.rjh-section:first-child { border-top: none; padding-top: 8px; }
.rjh-section h2 { font-size: clamp(22px, 2.6vw, 27px); }
.rjh-section h3 { font-size: 18px; margin-top: 1.4em; }
.rjh-section__body { max-width: 860px; font-size: 16.5px; color: var(--rjh-ink); }
.rjh-section__body p { color: #2c3a46; }

/* ---------------------------------------------------------------- figures */
.rjh-figure { margin: 22px 0 28px; max-width: 860px; margin-left: auto; margin-right: auto; }
.rjh-figure img {
  width: 100%; height: auto; border-radius: var(--rjh-radius-lg);
  border: 1px solid var(--rjh-border); background: var(--rjh-card);
}
.rjh-figure--shot img { border: 1px solid var(--rjh-border-soft); box-shadow: 0 10px 30px -18px rgba(7,19,13,.35); }
.rjh-figure figcaption { font-size: 13.5px; color: var(--rjh-muted); margin-top: 10px; max-width: 760px; }
.rjh-figure figcaption strong { color: var(--rjh-muted); }

/* ----------------------------------------------------------------- slots */
.rjh-vslot, .rjh-gslot {
  aspect-ratio: 16 / 9; border-radius: var(--rjh-radius-lg);
  border: 1.5px dashed var(--rjh-border); background: var(--rjh-border-soft);
}
.rjh-gslot { aspect-ratio: 1440 / 900; }

/* ------------------------------------------------------------ category wall */
.rjh-wall { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.rjh-wall__card {
  background: var(--rjh-card); border: 1px solid var(--rjh-border); border-radius: var(--rjh-radius-lg);
  overflow: hidden; display: block; color: var(--rjh-ink);
}
.rjh-wall__card:hover { border-color: var(--rjh-green); text-decoration: none; }
.rjh-wall__thumb { aspect-ratio: 1 / 1; overflow: hidden; background: #eef1f0; }
.rjh-wall__thumb img { width: 100%; height: 100%; object-fit: cover; }
.rjh-wall__meta { padding: 12px 14px 15px; }
.rjh-wall__meta strong { display: block; font-size: 15px; margin-bottom: 2px; }
.rjh-wall__meta span { font-size: 12.5px; color: var(--rjh-muted); }
@media (max-width: 1023px) { .rjh-wall { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .rjh-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ------------------------------------------------------------- teaser grid */
.rjh-teasergrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rjh-teaser { background: var(--rjh-card); border: 1px solid var(--rjh-border); border-radius: var(--rjh-radius-lg); padding: 18px 20px; }
.rjh-teaser__kicker { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--rjh-green-text); margin-bottom: 6px; }
.rjh-teaser h3 { font-size: 17px; margin-bottom: 6px; }
.rjh-teaser p { font-size: 14.5px; color: var(--rjh-muted); margin-bottom: 10px; }
.rjh-teaser a.rjh-teaser__link { font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
@media (max-width: 1023px) { .rjh-teasergrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .rjh-teasergrid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------- term cards */
.rjh-terms { display: flex; flex-direction: column; gap: 14px; }
.rjh-term {
  background: var(--rjh-card); border: 1px solid var(--rjh-border); border-left: 4px solid var(--rjh-green);
  border-radius: var(--rjh-radius-lg); padding: 18px 22px;
}
.rjh-term__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.rjh-term__head h3 { margin: 0; font-size: 18px; }
.rjh-term__tag { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--rjh-green-text); background: var(--rjh-green-soft); padding: 3px 9px; border-radius: 999px; }
.rjh-term p { font-size: 15.5px; color: #2c3a46; margin-bottom: 0; }
.rjh-term--hidden { display: none; }
.rjh-glossary-filter { margin-bottom: 20px; }
.rjh-glossary-filter input {
  width: 100%; max-width: 420px; min-height: 44px; border: 1px solid var(--rjh-border);
  border-radius: var(--rjh-radius); padding: 0 14px; font: inherit; font-size: 16px;
}
.rjh-glossary-filter__count { font-size: 13.5px; color: var(--rjh-muted); margin-top: 8px; }

/* ----------------------------------------------------------------- tables */
.rjh-table-wrap { overflow-x: auto; margin: 18px 0 26px; border: 1px solid var(--rjh-border); border-radius: var(--rjh-radius-lg); }
.rjh-table { min-width: 560px; }
.rjh-table th, .rjh-table td { text-align: left; padding: 12px 16px; font-size: 15px; border-bottom: 1px solid var(--rjh-border-soft); }
.rjh-table th { background: var(--rjh-green-soft); color: var(--rjh-green-text); font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
.rjh-table tr:last-child td { border-bottom: none; }

/* ------------------------------------------------------------------ cards */
.rjh-card { background: var(--rjh-card); border: 1px solid var(--rjh-border); border-radius: var(--rjh-radius-lg); padding: 20px 22px; }
.rjh-card--warn { border-color: #f0dca4; background: #fdf8ec; }
.rjh-card--warn strong { color: var(--rjh-warn); }

/* ------------------------------------------------------------- calculator */
.rjh-calc { background: var(--rjh-card); border: 1px solid var(--rjh-border); border-radius: var(--rjh-radius-lg); padding: 26px; }
.rjh-calc__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 20px; margin-bottom: 18px; }
.rjh-field label { display: block; font-size: 13.5px; font-weight: 700; color: var(--rjh-ink); margin-bottom: 6px; }
.rjh-field input {
  width: 100%; min-height: 44px; border: 1px solid var(--rjh-border); border-radius: var(--rjh-radius);
  padding: 0 14px; font: inherit; font-size: 16px; color: var(--rjh-ink); background: #fff;
}
.rjh-field span.rjh-field__hint { display: block; font-size: 12.5px; color: var(--rjh-muted); margin-top: 4px; }
.rjh-calc__out { background: var(--rjh-bg); border-radius: var(--rjh-radius-lg); padding: 18px 20px; margin-top: 4px; }
.rjh-calc__row { display: flex; justify-content: space-between; align-items: baseline; padding: 7px 0; font-size: 15px; border-bottom: 1px dashed var(--rjh-border); }
.rjh-calc__row:last-child { border-bottom: none; font-weight: 800; font-size: 17px; color: var(--rjh-green-text); }
.rjh-calc__note { font-size: 13px; color: var(--rjh-muted); margin-top: 12px; }

/* ------------------------------------------------------------------ steps */
.rjh-steps { display: flex; flex-direction: column; gap: 0; }
.rjh-step { display: grid; grid-template-columns: 44px 1fr; gap: 18px; padding: 22px 0; border-top: 1px solid var(--rjh-border-soft); }
.rjh-step:first-child { border-top: none; }
.rjh-step__num {
  width: 44px; height: 44px; border-radius: 50%; background: var(--rjh-green-soft); color: var(--rjh-green-text);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px;
}
.rjh-step h3 { font-size: 19px; margin-bottom: 6px; }

/* ----------------------------------------------------------------- footer */
.rjh-footer { background: var(--rjh-deep); color: #c6dccf; padding: 48px 0 24px; margin-top: 40px; }
.rjh-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; margin-bottom: 32px; }
.rjh-footer h2 { color: #fff; font-size: 18px; margin-bottom: 10px; }
.rjh-footer h3 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px; }
.rjh-footer p { font-size: 14px; color: #9fbcac; }
.rjh-footer ul { list-style: none; padding: 0; margin: 0; }
.rjh-footer li { margin-bottom: 9px; }
.rjh-footer a { color: #c6dccf; font-size: 14.5px; display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.rjh-footer a:hover { color: #fff; }
.rjh-footer__bottom { border-top: 1px solid #1c3327; padding-top: 20px; font-size: 13px; color: #85a393; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }
.rjh-footer__disclaimer { font-size: 13px; color: #85a393; max-width: 820px; margin-bottom: 18px; line-height: 1.6; }
@media (max-width: 1023px) { .rjh-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .rjh-footer__grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------- misc */
.rjh-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rjh-note { font-size: 14px; color: var(--rjh-muted); }
.rjh-badge { display: inline-block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--rjh-green-soft); color: var(--rjh-green-text); padding: 3px 9px; border-radius: 999px; margin-left: 8px; vertical-align: middle; }
.rjh-destination { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--rjh-muted); }

/* ----------------------------------------------------------- 404 */
.rjh-404 { padding: 90px 0 110px; text-align: center; }
.rjh-404 h1 { font-size: clamp(30px, 5vw, 44px); }
.rjh-404 p { color: var(--rjh-muted); font-size: 17px; max-width: 520px; margin: 0 auto 26px; }

/* ----------------------------------------------------------- mobile nav */
@media (max-width: 860px) {
  .rjh-navtoggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; flex: none; border-radius: var(--rjh-radius); border: 1px solid var(--rjh-border);
    background: #fff; font-size: 20px;
  }
  .rjh-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff;
    border-bottom: 1px solid var(--rjh-border); flex-direction: column; padding: 10px 24px 16px; gap: 2px;
  }
  .rjh-nav.rjh-nav--open { display: flex; }
  .rjh-nav a { padding: 12px 8px; min-height: 44px; display: flex; align-items: center; }
  /* Brand text must shrink instead of forcing horizontal scroll at narrow
     widths -- the untruncated "GuaBase Spreadsheet Compendium" wordmark is
     wider than a 375px viewport can hold next to the 44px menu toggle. */
  .rjh-header__in { gap: 10px; }
  .rjh-brand { flex: 1 1 auto; min-width: 0; }
  .rjh-brand img { flex: none; }
  .rjh-brand span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (max-width: 420px) {
  .rjh-brand span { font-size: 16px; }
}

@media (max-width: 680px) {
  .rjh-hero { padding: 40px 0 34px; }
  .rjh-search { flex-direction: column; }
  .rjh-search .rjh-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

#browse-the-spreadsheet{max-width:var(--rjh-maxw);margin:0 auto;padding:36px 24px}
