:root {
  --bg: #071018;
  --bg-2: #0c1826;
  --panel: #102033;
  --panel-2: #163049;
  --ink: #e8eef6;
  --muted: #9aabbf;
  --line: rgba(158, 186, 214, 0.22);
  --mint: #3ddec0;
  --blue: #8eb6ff;
  --amber: #e3a15a;
  --danger: #ffb4a8;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  --wrap: 1120px;
  --pad: clamp(16px, 4vw, 32px);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 90% -10%, rgba(62, 120, 180, 0.18), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", "Avenir Next", "Helvetica Neue", sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue); text-underline-offset: 0.18em; }

a:hover { color: #d7e6ff; }

h1, h2, h3, h4 {
  font-family: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.02em;
  margin: 0 0 0.55em;
}

p { margin: 0 0 0.9em; }

button, input, select { font: inherit; color: inherit; }

button { cursor: pointer; }

[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--mint);
  color: #04221c;
  padding: 8px 12px;
  z-index: 20;
}

.skip:focus { top: 12px; }

.wrap {
  width: min(var(--wrap), calc(100% - var(--pad) * 2));
  margin-inline: auto;
}

.topbar {
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar .wrap {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  flex-wrap: wrap;
}

.site-head {
  position: sticky;
  top: 0;
  z-index: 8;
  background: rgba(7, 16, 24, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.head-row {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 74px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

.brand img {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.brand strong {
  display: block;
  font-family: "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.brand span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 10px;
  padding: 8px 12px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 0.95rem;
}

.nav a:hover,
.nav a[aria-current="page"] {
  background: var(--panel);
  color: var(--mint);
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: end;
  padding: 48px 0 20px;
}

.kicker {
  color: var(--mint);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

h1 { font-size: clamp(2.1rem, 5vw, 4rem); }

.lead {
  font-size: 1.16rem;
  color: #d5deea;
  max-width: 40rem;
}

.hero figure {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

figcaption,
.meta {
  color: var(--muted);
  font-size: 0.86rem;
  padding: 10px 14px 12px;
}

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 11px 16px;
  text-decoration: none;
  border: 1px solid transparent;
  background: var(--mint);
  color: #04221c;
  font-weight: 650;
}

.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.section { padding: 42px 0; }

.section h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 28px;
  align-items: start;
}

.panel {
  background: linear-gradient(180deg, rgba(22, 48, 73, 0.55), rgba(16, 32, 51, 0.9));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.stat {
  background: rgba(7, 16, 24, 0.45);
  border-radius: 14px;
  padding: 14px;
  border: 1px solid var(--line);
}

.stat b {
  display: block;
  font-family: "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.45rem;
  color: var(--amber);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 8px 0 18px;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip, .sort select {
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 12px;
}

.chip.is-on {
  background: var(--mint);
  color: #04221c;
  border-color: var(--mint);
}

.sort { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.card .body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

.card h3 { font-size: 1.28rem; margin: 0; }

.card h3 a { color: var(--ink); text-decoration: none; }

.card h3 a:hover { color: var(--mint); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mint);
  border: 1px solid rgba(61, 222, 192, 0.35);
  border-radius: 999px;
  padding: 3px 8px;
}

.card .more { margin-top: auto; }

.empty {
  display: none;
  color: var(--muted);
  padding: 12px 0 4px;
}

.tools {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}

.sheet-scroll { overflow-x: auto; max-width: 100%; }

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  font-size: 0.95rem;
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--mint);
  text-align: left;
}

.calc label, .match label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.calc input, .match input, .calc select {
  width: 100%;
  margin-top: 4px;
  background: #071018;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.out {
  background: #071018;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  min-height: 4.5em;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}

.hours { list-style: none; padding: 0; margin: 0; }

.hours li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.article { padding: 28px 0 10px; max-width: 820px; }

.article-hero {
  margin: 0 0 18px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.article-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.prose h2 { margin-top: 1.4em; font-size: 1.7rem; }

.term {
  background: none;
  border: 0;
  border-bottom: 1px dashed var(--mint);
  color: var(--mint);
  padding: 0;
  border-radius: 0;
}

.acc { border-top: 1px solid var(--line); }

.acc button {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 14px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.15rem;
}

.acc .panel-body { padding: 0 0 14px; color: #d5deea; }

.note {
  border-left: 3px solid var(--amber);
  padding: 4px 0 4px 14px;
  color: #d5deea;
}

.page-hero { padding: 36px 0 8px; }

.page-hero h1 { font-size: clamp(2rem, 4vw, 3.3rem); max-width: 16ch; }

.jobs { display: grid; gap: 14px; }

.job h3 { margin-bottom: 6px; }

.site-foot {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  background: #050b12;
  padding: 32px 0 18px;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 22px;
}

.foot-label {
  color: var(--mint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.site-foot ul { list-style: none; padding: 0; margin: 0; }

.site-foot li { margin: 0 0 6px; }

.site-foot a { color: #d5deea; text-decoration: none; }

.site-foot a:hover { color: var(--mint); }

.disclaimer {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.cookies {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 12;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  max-width: 860px;
  margin: 0 auto;
}

.cookies p { margin: 0; flex: 1 1 240px; }

.term-pop {
  width: min(520px, calc(100% - 24px));
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #102033;
  color: var(--ink);
  padding: 18px;
}

.term-pop::backdrop { background: rgba(3, 8, 14, 0.72); }

.term-x {
  float: right;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
}

.wide-figure {
  margin: 0 0 18px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.wide-figure img { width: 100%; object-fit: cover; max-height: 460px; }

.legal h2 { font-size: 1.45rem; margin-top: 1.3em; }

@media (max-width: 900px) {
  .hero, .split, .tools, .contact-grid, .foot-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr; }
  .sort { margin-left: 0; width: 100%; }
  .sort select { flex: 1; }
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #0b1622;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 16px 16px;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px; }
  .page-hero h1 { max-width: none; }
}

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .topbar .wrap span:last-child { width: 100%; }
  .hours li { flex-direction: column; gap: 0; }
  .cookies { left: 8px; right: 8px; }
  h1 { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
