/* ==========================================================================
   open10k.com — site styles
   Hand-written CSS, no build step and no external dependencies.
   Edit freely; everything keys off the custom properties in :root.
   ========================================================================== */

:root {
  --navy:        #0f2a4f;
  --navy-dark:   #0a1c36;
  --navy-light:  #1b3d6d;
  --blue:        #1d4ed8;
  --blue-hover:  #1e40af;
  --blue-soft:   #eff5ff;
  --amber:       #fde68a;
  --amber-line:  #d97706;
  --amber-soft:  #fffbeb;

  --ink:         #111827;
  --ink-soft:    #374151;
  --muted:       #6b7280;
  --line:        #e5e7eb;
  --line-soft:   #f0f2f5;
  --bg:          #f7f8fa;
  --card:        #ffffff;

  --radius:      10px;
  --radius-lg:   14px;
  --shadow-sm:   0 1px 2px rgba(15, 42, 79, .06), 0 1px 3px rgba(15, 42, 79, .08);
  --shadow-md:   0 4px 12px rgba(15, 42, 79, .10);
  --shadow-lg:   0 20px 50px rgba(10, 28, 54, .28);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;

  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 .5em;
  letter-spacing: -.02em;
}
h1 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--blue); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--blue-hover); text-decoration: underline; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 780px; }
.lead { font-size: 1.16rem; color: var(--muted); }
.center { text-align: center; }

/* ---------- Header / navigation ---------------------------------------- */

.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 12px rgba(10, 28, 54, .25);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.brand:hover { color: #fff; text-decoration: none; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: -.04em;
  flex: none;
}

.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
  position: relative;
  color: #c8d6ea;
  font-size: 1rem;
  font-weight: 500;
  padding: 24px 0;
  white-space: nowrap;
}
.nav a:hover { color: #fff; text-decoration: none; }
.nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 16px;
  width: 0;
  height: 2px;
  background: #60a5fa;
  transform: translateX(-50%);
  transition: width .25s ease;
}
.nav a:hover::after, .nav a.active::after { width: 100%; }
.nav a.active { color: #fff; font-weight: 600; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: #c8d6ea;
  padding: 8px;
  cursor: pointer;
  line-height: 0;
}
.nav-toggle:hover { color: #fff; }

/* ---------- Sections ---------------------------------------------------- */

main { flex: 1 0 auto; }

section { padding: 64px 0; }
section.hero { background: #fff; padding: 84px 0 72px; border-bottom: 1px solid var(--line); }
section.alt  { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
section.tight { padding: 48px 0; }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 999px;
  padding: 5px 13px;
  margin-bottom: 20px;
}

.hero h1 { max-width: 20ch; margin-inline: auto; }
.hero .lead { max-width: 62ch; margin-inline: auto; font-size: 1.24rem; }

/* ---------- Buttons ----------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  padding: 13px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease,
              box-shadow .15s ease, transform .1s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--blue); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--blue-hover); color: #fff; box-shadow: var(--shadow-md); }

.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: #b9c6da; color: var(--navy); background: #fbfcfe; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 30px; }

/* ---------- Feature grid ------------------------------------------------ */

.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .45em; }
.card p { font-size: .98rem; color: var(--muted); }

.card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  margin-bottom: 18px;
}

/* ---------- Download list ---------------------------------------------- */

.dl-list { display: grid; gap: 10px; margin-top: 8px; }

.dl-item {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  font: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 18px;
  cursor: pointer;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.dl-item:hover {
  border-color: #93b4ea;
  background: #fbfcff;
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.dl-badge {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #e8f5ee;
  color: #14804a;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.dl-body { flex: 1 1 auto; min-width: 0; }
/* Scoped to the list: .dl-meta is reused on table captions, where forcing
   display:block would break caption-side. */
.dl-body .dl-title, .dl-body .dl-meta { display: block; }
.dl-title { font-weight: 600; color: var(--ink); line-height: 1.35; }
.dl-ticker {
  display: inline-block;
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 700;
  color: var(--navy);
  background: var(--line-soft);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
  margin-right: 8px;
  vertical-align: 1px;
}
.dl-meta { font-size: .84rem; color: var(--muted); }
.dl-arrow { flex: none; color: #9aa6b8; font-size: 1.3rem; line-height: 1; }
.dl-item:hover .dl-arrow { color: var(--blue); }

/* ---------- Excel mock table (modal + feature) -------------------------- */

.xl {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
  background: #fff;
  font-variant-numeric: tabular-nums;
}
.xl th, .xl td {
  border: 1px solid #dfe3e8;
  padding: 7px 12px;
  text-align: right;
  white-space: nowrap;
}
.xl th {
  background: #f4f6f8;
  color: var(--ink);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.xl td.lbl, .xl th.lbl { text-align: left; }
.xl tr.total td { font-weight: 700; background: #f8fafc; color: var(--ink); }
.xl tr.sub td   { font-weight: 600; }
.xl tr.leaf td.lbl { color: var(--ink-soft); }
.xl .lvl1 { padding-left: 26px; }
.xl .lvl2 { padding-left: 48px; }

.xl .outline {
  display: inline-block;
  width: 15px;
  margin-right: 8px;
  color: #9aa6b8;
  font-family: var(--mono);
  font-size: .8rem;
  text-align: center;
  border: 1px solid #cbd2da;
  border-radius: 3px;
  line-height: 1.15;
  background: #fff;
  vertical-align: 1px;
}

/* amber cell = value filed under a different XBRL concept.
   Selector carries a `tr` so it outweighs `.xl tr.total td`, which would
   otherwise repaint the highlight away on subtotal rows. */
.xl tr td.amber {
  background: var(--amber);
  box-shadow: inset 0 0 0 1px var(--amber-line);
  cursor: help;
  position: relative;
  /* Lifts the cell — and the note anchored to it — above the header row. */
  z-index: 5;
}

.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* A hover note sits above its cell, and `overflow-x: auto` clips vertically as
   well as horizontally. Padding is part of the scrollable area, so reserving
   room inside the box keeps the note visible; the negative margin gives the
   reserved strip back to the layout. */
.scroll-x.has-notes { padding-top: 170px; margin-top: -170px; }

/* ---------- Tooltip (hover-note demo) ----------------------------------- */

.note { position: relative; }
.note .note-pop {
  position: absolute;
  bottom: calc(100% + 10px);
  right: -6px;
  width: 290px;
  background: #ffffe1;
  color: #1f2937;
  border: 1px solid #b7b795;
  border-radius: 6px;
  padding: 11px 13px;
  font-size: .82rem;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
  z-index: 20;
  font-family: var(--sans);
}
.note:hover .note-pop, .note:focus-visible .note-pop {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.note-pop code {
  font-family: var(--mono);
  font-size: .8em;
  background: rgba(0, 0, 0, .06);
  border-radius: 3px;
  padding: 1px 4px;
}

/* ---------- Modal ------------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 28, 54, .62);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}
.modal.open { display: flex; }

.modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
  padding: 32px;
  margin: auto;
}
.modal-box.wide { max-width: 720px; }
.modal-box h2 { margin-bottom: .3em; }
.modal-sub { color: var(--muted); font-size: .96rem; margin-bottom: 24px; }

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.modal-close {
  flex: none;
  background: none;
  border: 0;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}
.modal-close:hover { color: var(--ink); background: var(--line-soft); }

/* ---------- Forms ------------------------------------------------------- */

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field .req { color: #dc2626; }
.field input {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 11px 13px;
  border: 1px solid #cbd2da;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, .15);
}
.form-actions { display: flex; gap: 12px; margin-top: 22px; }
.form-actions .btn { flex: 1; }
.form-note { font-size: .82rem; color: var(--muted); margin-top: 16px; }

/* ---------- Callouts ---------------------------------------------------- */

.callout {
  background: var(--blue-soft);
  border: 1px solid #cddcfa;
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  padding: 22px 26px;
}
.callout h3 { margin-bottom: .35em; }
.callout p { color: var(--ink-soft); font-size: 1rem; }

.callout.amber {
  background: var(--amber-soft);
  border-color: #fcd9a0;
  border-left-color: var(--amber-line);
}

/* ---------- About ------------------------------------------------------- */

.bio { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: start; }
.bio-photo {
  width: 100%;
  /* Without this the height attribute on the img wins and the portrait stretches. */
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  display: block;
  background: var(--line-soft);
}
.bio-role { color: var(--muted); font-size: 1.05rem; margin-top: -.4em; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 22px; }
.chip {
  font-size: .84rem;
  font-weight: 600;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 14px;
}

/* ---------- Footer ------------------------------------------------------ */

.site-footer {
  background: var(--navy-dark);
  color: #93a4bd;
  margin-top: auto;
  padding: 32px 0;
  font-size: .9rem;
}
.site-footer a { color: #b8cbe6; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* ---------- Responsive -------------------------------------------------- */

@media (max-width: 860px) {
  .bio { grid-template-columns: 1fr; gap: 24px; }
  .bio-photo { max-width: 220px; }
}

@media (max-width: 780px) {
  body { font-size: 16px; }
  section { padding: 48px 0; }
  section.hero { padding: 56px 0 48px; }

  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--navy-light);
    padding: 6px 24px 16px;
    box-shadow: 0 8px 16px rgba(10, 28, 54, .3);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; }
  .nav a::after { display: none; }

  .modal-box { padding: 24px; }
  .dl-item { padding: 13px 14px; gap: 12px; }
  .note .note-pop { width: 230px; right: -20px; }
}

@media print {
  .site-header, .site-footer, .modal { display: none !important; }
  body { background: #fff; }
}
