:root {
  --bg: #0B3232;
  --bg-2: #0E3939;
  --surface: #124242;
  --surface-2: #174C4C;
  --line: #245A5A;
  --text: #EEF5F3;
  --muted: #A9C6C1;
  --lime: #8FD3C8;
  --lime-deep: #6FBFB3;
  --on-lime: #0B3232;
  --peach: #E9A39B;
  --teal: #1D5F5F;
  --maroon: #7A1C1C;
  --head-bg: #F4F8F7;
  --paper: #FFFFFF;
  --ink: #0B3232;
  --ink-soft: #456663;
  --rule: #DCE7E5;
  --wrap: 1140px;
  --gutter: 16px;
  --font-head: "Piazzolla", Georgia, serif;
  --font-body: "Ubuntu", "Segoe UI", Arial, sans-serif;
}

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

html, body { overflow-x: hidden; max-width: 100%; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
}

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

a { color: var(--teal); }

:focus-visible { outline: 3px solid var(--maroon); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.18;
  margin: 0 0 16px;
  color: var(--ink);
}

h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 16px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* Pill buttons */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--maroon);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  gap: 0.3em;
}
.pill:hover { background: #5E1414; }
.pill-lg { min-height: 52px; padding: 0 34px; font-size: 1.02rem; }
.pill-line { background: transparent; color: var(--maroon); border: 1.5px solid var(--maroon); }
.pill-line:hover { background: var(--maroon); color: #FFFFFF; }

/* Header: menu left, logo centred, link + pill right */
.site-head {
  position: static;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.head-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 0 24px;
}
.menu { position: relative; justify-self: start; }
.menu summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 6px;
  cursor: pointer;
  list-style: none;
  color: var(--ink);
  font-size: 0.95rem;
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 20;
  min-width: 200px;
  padding: 8px 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
}
.menu-panel a {
  display: block;
  padding: 10px 20px;
  color: var(--ink);
  text-decoration: none;
}
.menu-panel a:hover { background: var(--head-bg); }
.brand { display: inline-block; }
.site-head .brand img { height: 52px; width: auto; }
.head-end {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 22px;
}
.head-link { color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.head-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Footer */
.site-foot {
  background: var(--head-bg);
  border-top: 1px solid var(--rule);
  padding: 48px 0 36px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.foot-grid { display: grid; gap: 18px; }
.site-foot .brand img { height: 44px; width: auto; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot-nav a { color: var(--ink); text-decoration: none; }
.foot-nav a:hover { text-decoration: underline; }
.foot-note, .foot-copy { margin: 0; }

@media (max-width: 720px) {
  .head-row { padding: 0 12px; min-height: 64px; gap: 6px; }
  .site-head .brand img { height: 38px; }
  .menu-word, .head-link, .pill-long { display: none; }
  .head-end .pill { padding: 0 16px; }
}
.cform {
  padding: 0 var(--gutter, 20px);
  margin: clamp(40px, 6vw, 72px) 0;
}

.cform-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  border-top: 4px solid var(--cf-accent);
  border-radius: 18px;
  background: color-mix(in srgb, currentColor 4%, transparent);
}

.cform-inner h2 {
  margin: 0 0 8px;
}

.cform-intro {
  margin: 0 0 24px;
  opacity: 0.85;
}

.cform-form {
  display: grid;
  gap: 18px;
}

.cform-row {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.cform-row label {
  font-weight: 600;
  font-size: 0.95rem;
}

.cform input[type="text"],
.cform input[type="email"],
.cform select,
.cform textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  color: inherit;
  background: color-mix(in srgb, currentColor 6%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
  border-radius: 10px;
}

.cform textarea {
  resize: vertical;
  min-height: 150px;
}

.cform option {
  color: #111111;
  background: #FFFFFF;
}

.cform input:focus,
.cform select:focus,
.cform textarea:focus,
.cform-btn:focus-visible {
  outline: 3px solid var(--cf-accent);
  outline-offset: 2px;
}

.cform-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.95rem;
}

.cform-consent input {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--cf-accent);
}

.cform-consent a {
  color: inherit;
  text-decoration: underline;
}

.cform-btn {
  justify-self: start;
  min-height: 50px;
  padding: 0 28px;
  font: inherit;
  font-weight: 700;
  color: var(--cf-on);
  background: var(--cf-accent);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.cform-btn:hover {
  filter: brightness(1.08);
}

.cform-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cform-status {
  display: none;
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: 10px;
  font-weight: 600;
}

.cform-status:target {
  display: block;
}

.cform-ok {
  background: color-mix(in srgb, var(--cf-accent) 18%, transparent);
  border: 1px solid var(--cf-accent);
}

.cform-err {
  background: color-mix(in srgb, #C0392B 14%, transparent);
  border: 1px solid #C0392B;
}

@media (min-width: 720px) {
  .cform-form {
    grid-template-columns: 1fr 1fr;
  }

  .cform-wide,
  .cform-btn {
    grid-column: 1 / -1;
  }
}

.cform {
  --cf-accent: var(--lime);
  --cf-on: var(--on-lime);
  color: var(--text);
  padding-bottom: 24px;
}

.cform-inner h2 {
  color: var(--lime);
}

@media (max-width: 900px) {
  .legal-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .toc {
    position: static;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .head-nav {
    display: none;
  }

  .head-row .btn {
    margin-left: auto;
  }

  .foot-grid {
    grid-template-columns: 1fr;
  }

  .foot-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .head-row {
    min-height: 64px;
    gap: 12px;
  }

  .brand img {
    height: 38px;
  }

  .site-foot .brand img {
    height: 38px;
  }

  .btn-sm {
    padding: 0 12px;
    font-size: 0.85rem;
    white-space: nowrap;
  }
}

/* Page hero */
.page-hero { padding: clamp(48px, 7vw, 80px) 0 clamp(28px, 4vw, 40px); }
.crumbs { font-size: 0.92rem; color: var(--ink-soft); margin-bottom: 10px; }
.crumbs a { color: var(--ink-soft); }
.page-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); font-weight: 700; margin: 0 0 14px; }
.page-lead { max-width: 40em; font-size: 1.12rem; color: var(--ink-soft); }
.page-date { margin: 6px 0 0; color: var(--ink-soft); font-size: 0.9rem; }

/* Reading column */
.read { max-width: 800px; padding-top: 8px; }
.prose h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin: 40px 0 12px; }
.prose section:first-child h2, .prose > h2:first-child { margin-top: 0; }
.prose p, .prose li { color: #2F4F4C; }
.prose ul { padding-left: 22px; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--teal); }
.prose section { scroll-margin-top: 24px; }

/* Legal: contents list on top, never a sidebar */
.legal-grid { max-width: 800px; padding-top: 8px; padding-bottom: clamp(56px, 8vw, 96px); }
.toc { margin: 0 0 40px; padding: 0 0 24px; border-bottom: 1px solid var(--rule); }
.toc-title { margin: 0 0 10px; font-family: var(--font-head); font-weight: 700; }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; font-size: 0.95rem; }
.toc li { margin-bottom: 6px; break-inside: avoid; }
.toc a { color: var(--teal); }
main > .read:last-child { padding-bottom: clamp(56px, 8vw, 96px); }

/* Contact */
.mail-card { display: flex; gap: 16px; align-items: center; padding: 20px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); color: var(--teal); }
.mail-label { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }
.mail-card a { font-weight: 700; font-size: 1.1rem; word-break: break-all; }
.mail-hint { margin-top: 16px; font-size: 0.95rem; color: var(--ink-soft); }
.cform { --cf-accent: var(--maroon); --cf-on: #FFFFFF; color: var(--ink); }

@media (max-width: 640px) { .toc ol { columns: 1; } }
