:root {
  --primary: #0b2545;
  --primary-700: #0a1f3a;
  --accent: #f4b400;
  --accent-700: #d39a00;
  --ink: #14213d;
  --muted: #5b6478;
  --bg: #fbfaf6;
  --surface: #ffffff;
  --border: #e5e3dc;
  --shadow-sm: 0 1px 2px rgba(11, 37, 69, 0.06);
  --shadow-md: 0 8px 24px rgba(11, 37, 69, 0.08);
  --shadow-lg: 0 20px 48px rgba(11, 37, 69, 0.12);
  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1140px;
  --display: 'Fraunces', Georgia, serif;
  --body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent-700); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; color: var(--ink); margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 2.5vw, 2.1rem); }
h3 { font-size: 1.2rem; font-family: var(--body); font-weight: 600; }
p  { margin: 0 0 1em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 246, 0.85);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.25rem; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--primary); }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--primary); color: #fff;
  font-family: var(--display); font-weight: 700; font-size: .95rem;
  letter-spacing: .02em;
}
.brand-logo { width: 44px; height: 44px; object-fit: contain; display: block; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.25rem; }
.site-nav a { color: var(--ink); font-weight: 500; font-size: .95rem; padding: .35rem .15rem; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--primary); border-bottom-color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--primary); border-bottom-color: var(--primary); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; transition: .2s; }

/* Hero */
.hero {
  background:
    radial-gradient(60% 80% at 90% 10%, rgba(244, 180, 0, .18), transparent 60%),
    radial-gradient(70% 100% at 10% 100%, rgba(11, 37, 69, .07), transparent 60%),
    var(--bg);
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem);
}
.hero-inner { display: grid; gap: 3rem; grid-template-columns: 1.2fr 1fr; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; color: var(--primary); font-weight: 600; margin-bottom: .75rem; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hero-art { position: relative; height: 360px; }
.hero-card {
  position: absolute; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  padding: 1.1rem 1.25rem; min-width: 150px;
}
.hero-card span { font-family: var(--display); font-size: 1.8rem; color: var(--primary); display: block; line-height: 1; }
.hero-card small { color: var(--muted); }
.hc-1 { top: 10%; left: 5%; transform: rotate(-3deg); }
.hc-2 { top: 45%; right: 5%; transform: rotate(2deg); background: var(--primary); color: #fff; }
.hc-2 span { color: var(--accent); }
.hc-2 small { color: rgba(255,255,255,.75); }
.hc-3 { bottom: 5%; left: 25%; transform: rotate(-1deg); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .75rem 1.15rem; border-radius: 999px; font-weight: 600; font-size: .95rem; transition: .15s ease; border: 1px solid transparent; cursor: pointer; font-family: inherit; }
.btn-sm { padding: .5rem .85rem; font-size: .85rem; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-700); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-ghost:hover { background: var(--primary); color: #fff; }

/* Sections */
.section { padding: clamp(2.5rem, 5vw, 4.5rem) 0; }
.section-head { max-width: 720px; margin-bottom: 2rem; }
.grid-3 { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.feature, .link-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-sm); transition: .2s;
}
.feature:hover, .link-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #d8d4c5; }
.link-card { display: block; color: var(--ink); }
.link-card h3 { color: var(--primary); }

/* CTA */
.cta {
  margin: 3rem 1.25rem; border-radius: 24px;
  background: linear-gradient(135deg, var(--primary), #163a6b);
  color: #fff;
}
.cta-inner { padding: clamp(2rem, 5vw, 3.5rem); text-align: center; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.85); margin-bottom: 1.5rem; }
.cta .btn-primary { background: var(--accent); color: var(--primary); }
.cta .btn-primary:hover { background: var(--accent-700); }

/* Prose pages */
.prose { padding: clamp(2rem, 5vw, 3.5rem) 1.25rem; max-width: 820px; margin: 0 auto; }
.page-header { margin-bottom: 2rem; }
.content h2 { margin-top: 2rem; }
.content blockquote { border-left: 4px solid var(--accent); margin: 1.5rem 0; padding: .25rem 1rem; color: var(--muted); font-style: italic; }
.content ul, .content ol { padding-left: 1.25rem; }
.content code { background: #efece1; padding: .1rem .35rem; border-radius: 4px; font-size: .9em; }

/* Card list (news) */
.card-list { list-style: none; padding: 0; display: grid; gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: .2s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card a { display: block; padding: 1.25rem 1.5rem; color: var(--ink); }
.card .meta { color: var(--muted); font-size: .85rem; margin: 0 0 .25rem; }
.card h2 { font-size: 1.3rem; margin: 0 0 .35rem; }

/* Regulations */
.reg-controls { display: flex; gap: .75rem; margin: 1.5rem 0; flex-wrap: wrap; }
.reg-controls input, .reg-controls select {
  font: inherit; padding: .65rem .9rem; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface); flex: 1; min-width: 200px;
}
.reg-controls input:focus, .reg-controls select:focus { border-color: var(--primary); outline: none; }
.reg-list { list-style: none; padding: 0; display: grid; gap: .85rem; }
.reg-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem 1.25rem; display: grid; gap: .5rem;
  grid-template-columns: 1fr auto; align-items: center; box-shadow: var(--shadow-sm);
  transition: .15s;
}
.reg-item:hover { border-color: #d8d4c5; box-shadow: var(--shadow-md); }
.reg-meta { grid-column: 1 / -1; display: flex; gap: .75rem; align-items: center; color: var(--muted); font-size: .85rem; }
.reg-title { margin: 0; font-family: var(--body); font-size: 1.05rem; font-weight: 600; }
.badge { background: #eaf0fa; color: var(--primary); border-radius: 999px; padding: .15rem .65rem; font-size: .75rem; font-weight: 600; }

/* Admin */
.callout { background: #fff7dc; border: 1px solid #f1e1a3; border-left: 4px solid var(--accent); padding: 1rem 1.15rem; border-radius: var(--radius-sm); margin: 1.5rem 0; }
.steps { padding-left: 1.25rem; }
.admin-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin: 1.5rem 0; box-shadow: var(--shadow-sm); }
.file-input { display: inline-flex; align-items: center; gap: .5rem; padding: .9rem 1.15rem; background: var(--primary); color: #fff; border-radius: 999px; cursor: pointer; font-weight: 600; }
.file-input input { display: none; }
.file-row { display: grid; grid-template-columns: 1.5fr 1fr 1fr auto; gap: .5rem; margin-top: .75rem; align-items: center; }
.file-row input, .file-row select { font: inherit; padding: .5rem .65rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); }
.file-row .name { font-size: .85rem; color: var(--muted); padding-left: .25rem; word-break: break-all; }
#generate { margin-top: 1rem; }
#generate:disabled { opacity: .5; cursor: not-allowed; }
.yaml-output { margin-top: 1.5rem; }
.yaml-output pre { background: #14213d; color: #f4f4f5; padding: 1rem 1.25rem; border-radius: var(--radius-sm); overflow-x: auto; font-size: .9rem; }

/* Footer */
.site-footer { background: var(--primary); color: #cdd5e3; margin-top: 4rem; padding: 3rem 0 1.5rem; }
.site-footer h3 { color: #fff; font-family: var(--body); font-size: 1rem; margin-bottom: .75rem; }
.site-footer a { color: #cdd5e3; }
.site-footer a:hover { color: var(--accent); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.footer-links { list-style: none; padding: 0; display: grid; gap: .35rem; }
.copyright { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.6); }

/* Responsive */
@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: .5rem 1.25rem; }
  .site-nav a { display: block; padding: .85rem 0; border-bottom: 1px solid var(--border); }
  .site-nav li:last-child a { border-bottom: 0; }
  .reg-item { grid-template-columns: 1fr; }
  .file-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
