/* Africa Shield Cyber Centre
   Olive ops desk · radar green · night · alert red */

:root {
  --night: #070B07;
  --olive: #1A2E1A;
  --olive-mid: #243824;
  --radar: #3DFF9A;
  --radar-dim: rgba(61, 255, 154, 0.16);
  --alert: #E11D48;
  --alert-soft: rgba(225, 29, 72, 0.18);
  --ivory: #0c120c;
  --ivory-deep: #070B07;
  --paper: #122012;
  --ink: #e8f5e8;
  --muted: #8aa68a;
  --line: rgba(61, 255, 154, 0.12);
  --line-strong: rgba(61, 255, 154, 0.28);
  --burgundy: #E11D48;
  --fill: #3DFF9A;
  --fill-ink: #070B07;
  --gold: #3DFF9A;
  --gold-line: #3DFF9A;
  --pine: #3DFF9A;
  --pine-soft: rgba(61, 255, 154, 0.08);
  --warn: #E11D48;
  --serif: "Syne", "Avenir Next", "Segoe UI", sans-serif;
  --sans: "DM Sans", "Avenir Next", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "Source Code Pro", ui-monospace, monospace;
  --frame: min(74rem, calc(100% - clamp(1.4rem, 5vw, 5.5rem)));
  --wide: min(86rem, calc(100% - clamp(1.2rem, 4vw, 4rem)));
  --shadow: 0 0 0 1px rgba(61, 255, 154, 0.08), 0 22px 50px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);
  color-scheme: dark;
}

[data-theme="evening"],
[data-theme="day"] {
  --ivory: #0c120c;
  --ivory-deep: #070B07;
  --paper: #122012;
  --ink: #e8f5e8;
  --muted: #8aa68a;
  --line: rgba(61, 255, 154, 0.12);
  --line-strong: rgba(61, 255, 154, 0.28);
  --burgundy: #E11D48;
  --fill: #3DFF9A;
  --fill-ink: #070B07;
  --gold: #3DFF9A;
  --gold-line: #3DFF9A;
  --pine: #3DFF9A;
  --pine-soft: rgba(61, 255, 154, 0.08);
  --warn: #E11D48;
  --shadow: 0 0 0 1px rgba(61, 255, 154, 0.08), 0 22px 50px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  font-size: clamp(17px, 0.2vw + 16px, 19px);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(ellipse 70% 50% at 12% -8%, rgba(61, 255, 154, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 40% at 96% 0%, rgba(225, 29, 72, 0.1), transparent 50%),
    linear-gradient(180deg, var(--olive) 0%, var(--night) 42%, var(--night) 100%);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image:
    linear-gradient(rgba(61, 255, 154, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 255, 154, 0.35) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 20%, transparent 75%);
}

main, .mast, .site-footer { position: relative; z-index: 1; }

body.page-map {
  min-height: 100vh;
}

img { max-width: 100%; height: auto; }

a { color: inherit; }

button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: rgba(61, 255, 154, 0.28); color: var(--night); }

:focus-visible {
  outline: 2px solid var(--radar);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: 0;
  transform: translateY(-120%);
  background: var(--fill);
  color: var(--fill-ink);
  padding: 0.7rem 1rem;
  z-index: 20;
}

.skip:focus { transform: none; }

.frame { width: var(--frame); margin-inline: auto; }
.wide { width: var(--wide); margin-inline: auto; }

.kicker {
  margin: 0 0 0.9rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--burgundy);
  font-weight: 500;
}

h1, h2, h3, .serif { font-family: var(--serif); font-weight: 500; letter-spacing: -0.03em; }

h1 {
  margin: 0;
  font-size: clamp(3.1rem, 1.2rem + 5.4vw, 6.6rem);
  line-height: 0.94;
  font-weight: 460;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 1.2rem + 2vw, 3.3rem);
  line-height: 1.05;
}

h3 { margin: 0; font-size: 1.45rem; line-height: 1.2; }

p { margin: 0; }

.lede {
  max-width: 40rem;
  font-size: 1.18rem;
  line-height: 1.55;
  color: var(--ink);
}

.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 0.86em; }

.mast {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--ivory) 88%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.mast-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4.6rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  margin-right: auto;
}

.crest {
  width: 2.4rem;
  height: 2.4rem;
  color: var(--gold);
  flex: none;
}

.brand-name {
  display: block;
  font-family: var(--serif);
  font-style: normal;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  line-height: 1;
}

.brand-sub {
  display: block;
  margin-top: 0.22rem;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem 1.05rem;
}

.nav a {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--muted);
  padding: 0.35rem 0;
}

.nav a:hover { color: var(--ink); }

.nav a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -1px 0 var(--gold-line);
}

.nav-btn, .text-btn, .icon-btn {
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-btn {
  display: none;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  padding: 0.7rem 0;
}

.theme-btn {
  border: 1px solid var(--line-strong);
  background: transparent;
  padding: 0.45rem 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.66rem;
  cursor: pointer;
  color: var(--muted);
}

.theme-btn:hover { color: var(--ink); border-color: var(--gold-line); }

.hero { padding: clamp(3.5rem, 8vw, 7.2rem) 0 clamp(2.5rem, 5vw, 4rem); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 0.7fr);
  gap: clamp(2rem, 5vw, 5.5rem);
  align-items: end;
}

.hero .lede { margin-top: 1.5rem; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.7rem 1.2rem;
  text-decoration: none;
  border: 1px solid var(--fill);
  background: var(--fill);
  color: var(--fill-ink);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  cursor: pointer;
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn:hover { transform: translateY(-1px); }

.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.aside-card, .panel {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: clamp(1.2rem, 2vw, 1.7rem);
}

.aside-card p + p,
.stack > * + * { margin-top: 0.85rem; }

.rule {
  height: 1px;
  background: linear-gradient(90deg, var(--gold-line), transparent 80%);
  border: 0;
  margin: 1rem 0;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  margin-top: 2.2rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}

section { padding: clamp(3rem, 6vw, 5.5rem) 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: end;
  margin-bottom: clamp(1.5rem, 3vw, 2.4rem);
}

.section-head p { max-width: 34rem; color: var(--muted); }

.figure-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.figure {
  background: var(--paper);
  padding: 1.25rem 1.15rem 1.35rem;
  min-height: 8.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.figure b {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 1rem + 1.6vw, 2.7rem);
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.figure span { color: var(--muted); font-size: 0.92rem; }

.ledger {
  width: 100%;
  border-collapse: collapse;
}

.ledger th {
  text-align: left;
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 0 0 0.7rem;
  border-bottom: 1px solid var(--line-strong);
}

.ledger td {
  padding: 0.95rem 0.8rem 0.95rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.ledger tr:last-child td { border-bottom: 0; }

.ledger a { text-decoration: none; border-bottom: 1px solid var(--gold-line); }

.ledger a:hover { border-bottom-color: var(--burgundy); }

.sub { display: block; color: var(--muted); font-size: 0.88rem; margin-top: 0.15rem; }

.scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.bars { display: grid; gap: 0.85rem; }

.bar-row { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr auto; gap: 0.8rem; align-items: center; }

.bar-track {
  height: 2px;
  background: var(--line);
  position: relative;
}

.bar-track span {
  position: absolute;
  inset: -1px auto -1px 0;
  background: var(--burgundy);
  width: var(--w, 0%);
}

.bar-row em { font-style: normal; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
}

.room-list { list-style: none; margin: 0; padding: 0; }

.room-list li { border-top: 1px solid var(--line); }

.room-list a {
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding: 1.15rem 0;
  text-decoration: none;
}

.room-list a:hover .room-title { color: var(--burgundy); }

.room-index { font-family: var(--mono); font-size: 0.75rem; color: var(--gold); }

.room-title { font-family: var(--serif); font-size: 1.7rem; letter-spacing: -0.03em; }

.note {
  border-left: 1px solid var(--gold-line);
  padding-left: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: end;
  margin-bottom: 1.2rem;
}

.field { display: flex; flex-direction: column; gap: 0.35rem; min-width: min(100%, 16rem); flex: 1; }

.field.grow { flex: 2; }

label .req { color: var(--burgundy); }

input, select, textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  padding: 0.7rem 0;
  border-radius: 0;
}

textarea { min-height: 8rem; resize: vertical; }

input:focus, select:focus, textarea:focus { outline: none; border-bottom-color: var(--burgundy); }

.field-error { color: var(--burgundy); font-size: 0.85rem; min-height: 1.1em; }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.pager .actions { margin-top: 0; }

.live { min-height: 1.2em; }

.pin-list { list-style: none; margin: 0; padding: 0; max-height: min(62vh, 40rem); overflow: auto; }

.pin-list button {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0.2rem;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem 1rem;
}

.pin-list button[aria-current="true"],
.pin-list button:hover { color: var(--burgundy); }

.map-layout {
  display: grid;
  grid-template-columns: minmax(17rem, 24rem) minmax(0, 1fr);
  min-height: calc(100vh - 4.6rem);
}

.map-panel {
  padding: 1.3rem 1.3rem 2rem;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  overflow: auto;
}

#map {
  min-height: 32rem;
  height: 100%;
  background: var(--ivory-deep);
}

.leaflet-container { font-family: var(--sans); background: var(--ivory-deep); }

.pin-wrap { background: transparent !important; border: 0 !important; }
.pin {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid var(--radar);
  background: radial-gradient(circle at 40% 35%, rgba(61, 255, 154, 0.95), rgba(26, 46, 26, 0.85) 70%);
  box-shadow:
    0 0 0 4px var(--radar-dim),
    0 0 18px rgba(61, 255, 154, 0.45);
}

.pin::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px solid rgba(61, 255, 154, 0.35);
  animation: pulse-ring 2.8s var(--ease) infinite;
}

.pin.live::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid var(--alert);
  box-shadow: 0 0 12px rgba(225, 29, 72, 0.55);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem 1.5rem;
}

.form-grid .full { grid-column: 1 / -1; }

.status {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pine);
}

.jobs, .events { display: grid; gap: 0; }

.job, .event {
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1rem 2rem;
}

.job h3, .event h3 { font-size: 1.7rem; }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem 0.7rem; margin-top: 0.7rem; }

.tags span {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.learn {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
}

.module-nav { position: sticky; top: 6rem; align-self: start; display: grid; gap: 0.45rem; }

.module-nav a { text-decoration: none; color: var(--muted); }

.module-nav a:hover { color: var(--ink); }

.lesson + .lesson { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }

.lesson ul, .prose ul { padding-left: 1.1rem; }
.lesson li + li, .prose li + li { margin-top: 0.4rem; }

.quiz { margin-top: 1.4rem; display: grid; gap: 1rem; }
.quiz fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.quiz legend { font-family: var(--serif); font-size: 1.2rem; margin-bottom: 0.4rem; }
.choice { display: flex; gap: 0.6rem; align-items: flex-start; }

.offices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }

.office h3 { font-size: 1.55rem; margin-bottom: 0.4rem; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 1.2rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
}

dialog {
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  padding: 1.5rem;
  max-width: min(36rem, calc(100% - 2rem));
  box-shadow: var(--shadow);
}

dialog::backdrop { background: rgba(28, 23, 18, 0.46); }

.site-footer {
  padding: 3rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}

.site-footer a { color: var(--ink); }

.footer-base {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}

.lang { display: flex; gap: 0.7rem; font-size: 0.75rem; letter-spacing: 0.12em; }

.lang button[aria-pressed="true"] { color: var(--ink); }

.empty {
  padding: 2rem 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.6rem;
}

.auth-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  min-height: calc(100vh - 4.6rem);
}

.auth-copy { padding: clamp(2rem, 6vw, 5rem); display: flex; flex-direction: column; justify-content: flex-end; }
.auth-form { padding: clamp(2rem, 6vw, 5rem); background: var(--paper); border-left: 1px solid var(--line); }

.tabs { display: flex; gap: 1.2rem; margin-bottom: 1.6rem; }
.tabs button { background: none; border: 0; padding: 0.3rem 0; cursor: pointer; color: var(--muted); letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.72rem; }
.tabs button[aria-selected="true"] { color: var(--ink); box-shadow: inset 0 -1px 0 var(--gold-line); }

.hidden { display: none !important; }

@media (max-width: 1180px) {
  .nav-btn { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--ivory);
    border-bottom: 1px solid var(--line);
    padding: 0.6rem clamp(1.2rem, 5vw, 2rem) 1.2rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
  .nav.is-open { display: flex; }
  .nav a { font-family: var(--serif); font-size: 1.7rem; color: var(--ink); padding: 0.25rem 0; }
}

@media (max-width: 980px) {
  .hero-grid, .split, .learn, .map-layout, .auth-grid, .footer-grid, .form-grid, .job, .event, .offices {
    grid-template-columns: 1fr;
  }
  .figure-row { grid-template-columns: 1fr 1fr; }
  .map-layout { min-height: 0; }
  #map { height: 68vh; min-height: 22rem; }
  .map-panel { border-right: 0; border-top: 1px solid var(--line); }
  .module-nav { position: static; grid-auto-flow: column; overflow-x: auto; }
  .auth-form { border-left: 0; border-top: 1px solid var(--line); }
  .room-list a { grid-template-columns: 3rem 1fr; }
  .room-list a span:last-child { display: none; }
}

@media (max-width: 640px) {
  .figure-row, .bar-row, .timeline { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: start; }
  .mast-row { min-height: 4.1rem; }
  h1 { font-size: clamp(2.7rem, 12vw, 3.6rem); }
  .hide-sm { display: none; }
}

@media (min-width: 1400px) {
  :root { --frame: min(80rem, calc(100% - 8rem)); --wide: min(96rem, calc(100% - 6rem)); }
}

@media (min-width: 1800px) {
  html { font-size: 20px; }
  .btn, .theme-btn, .nav a { min-height: 2.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
  .pin::before,
  .pin.live::after { animation: none; }
  .radar-sweep { animation: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 0.9s var(--ease) both; }
  .rise-late { animation-delay: 0.12s; }
  .pin.live::after { animation: ring 2.4s var(--ease) infinite; }
  .bar-track span { transition: width 0.8s var(--ease); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes ring {
  from { transform: scale(0.7); opacity: 0.7; }
  to { transform: scale(1.9); opacity: 0; }
}

@keyframes pulse-ring {
  0% { transform: scale(0.85); opacity: 0.65; }
  70% { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}

@keyframes sweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.radar-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at center, rgba(61, 255, 154, 0.08), transparent 62%),
    var(--paper);
}

.radar-sweep {
  position: absolute;
  inset: -20%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(61, 255, 154, 0.18) 40deg, transparent 70deg);
  animation: sweep 8s linear infinite;
  pointer-events: none;
  opacity: 0.7;
}

.desk-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--radar);
}

.desk-status::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--radar);
  box-shadow: 0 0 10px var(--radar);
  animation: pulse-ring 1.8s var(--ease) infinite;
}

@media print {
  .mast, .theme-btn, .nav-btn, .actions, .site-footer, .no-print { display: none !important; }
  body { background: white; color: black; }
  a { text-decoration: none; }
}

/* —— Premium evening SOC + device coverage (320 → 4K) —— */
[data-theme="evening"] body {
  background:
    radial-gradient(1000px 520px at 12% -12%, rgba(212, 188, 148, 0.14), transparent 55%),
    radial-gradient(820px 460px at 100% 0%, rgba(80, 140, 160, 0.1), transparent 50%),
    radial-gradient(640px 420px at 50% 110%, rgba(110, 36, 48, 0.12), transparent 58%),
    var(--ivory);
}

[data-theme="evening"] .mast {
  background: color-mix(in srgb, var(--ivory) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom-color: color-mix(in srgb, var(--gold-line) 35%, var(--line));
}

[data-theme="evening"] .figure,
[data-theme="evening"] .job,
[data-theme="evening"] .aside-card {
  box-shadow: 0 1px 0 rgba(255, 248, 236, 0.04) inset, 0 18px 42px rgba(0, 0, 0, 0.35);
  border-color: color-mix(in srgb, var(--gold-line) 28%, var(--line));
}

[data-theme="evening"] .ledger tbody tr:hover {
  background: color-mix(in srgb, var(--gold) 10%, transparent);
}

.btn,
.theme-btn,
.nav-btn,
.nav a,
.text-btn,
.field input,
.field select,
.field textarea {
  min-height: 44px;
  touch-action: manipulation;
}

.mast {
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

.site-footer {
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
}

.hero h1 {
  font-size: clamp(2.2rem, 7.5vw, 4.4rem);
  max-width: 16ch;
}

.lede {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  max-width: 42ch;
}

.figure-row {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: clamp(0.7rem, 1.6vw, 1.2rem);
}

@media (max-width: 359px) {
  .brand-sub { display: none; }
  .figure-row { grid-template-columns: 1fr; }
  .actions .btn { width: 100%; }
}

@media (min-width: 1440px) {
  :root {
    --frame: min(84rem, calc(100% - 7rem));
    --wide: min(100rem, calc(100% - 5rem));
  }
}

@media (min-width: 2000px) {
  html { font-size: 21px; }
  .figure-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: no-preference) {
  .arn-reveal,
  .rise {
    will-change: opacity, transform;
  }
}
