﻿:root {
  --paper: #f3f5f8;
  --paper-2: #ffffff;
  --ink: #17202b;
  --muted: #5c6775;
  --line: #e2e7ee;
  --accent: #1d4f91;
  --accent-dark: #153a6b;
  --accent-soft: #e7eef7;
  --pine: #0f5c48;
  --pine-soft: #e5f4ef;
  --warn: #7a5412;
  --warn-bg: #f7f1e6;
  --on-dark: #c5ced8;
  --shadow: 0 1px 2px rgba(23, 32, 43, 0.04);
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --max: 1080px;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  background: var(--paper);
}
@view-transition {
  navigation: auto;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}
img { max-width: 100%; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: white;
  padding: 0.5rem 0.8rem;
  z-index: 10;
}
.skip:focus { top: 0.5rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}
.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
  font: inherit;
  font-weight: 600;
}
.nav {
  display: flex;
  gap: 0.2rem;
  align-items: center;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
}
.nav a:hover { color: var(--ink); background: var(--paper); }
.nav a[aria-current="page"] {
  color: var(--accent-dark);
  background: var(--accent-soft);
}
.page-home .site-header {
  background: rgba(16, 21, 28, 0.78);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.page-home .nav a { color: #e8eef6; }
.page-home .nav a:hover { color: white; background: rgba(255, 255, 255, 0.08); }
.page-home .nav a[aria-current="page"] { color: white; background: rgba(126, 176, 239, 0.22); }
.page-home .nav-toggle {
  color: white;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.28);
}

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.25rem 1.25rem 4rem;
}

.page-home .stage-band {
  flex: 1;
  display: flex;
  align-items: center;
}
.stage-band {
  position: relative;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(ellipse 50% 70% at 78% 42%, rgba(48, 116, 214, 0.42), transparent 62%),
    radial-gradient(ellipse 40% 50% at 12% 88%, rgba(18, 36, 64, 0.9), transparent 70%),
    #10151c;
}
.stage-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 72% 45%, #000 20%, transparent 72%);
  pointer-events: none;
}
.stage-band .wrap { position: relative; width: 100%; padding-top: 1.4rem; padding-bottom: 2.4rem; }
.stage-copy { position: relative; z-index: 1; max-width: 40rem; }
.stage-band h1 {
  color: white;
  font-size: clamp(2.8rem, 6vw, 4.7rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}
.stage-band .kicker { color: #8eb6ef; }
.stage-band .lead { color: rgba(232, 238, 246, 0.76); max-width: 36rem; }
.stage-band .button.secondary {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.35);
}
.stage-band .button.secondary:hover { background: white; color: var(--ink); border-color: white; }
.kicker {
  margin: 0 0 0.7rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
h1 {
  margin: 0;
  font-weight: 650;
  font-size: clamp(2.15rem, 4vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}
.lead {
  margin: 0.9rem 0 0;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.05rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.35rem;
}
.hero-side {
  background: var(--paper-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.25rem 1.1rem;
  box-shadow: var(--shadow);
}
.hero-side p {
  margin: 0;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}
.hero-side p:first-child { border-top: 0; }
.hero-side strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero-side span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.1rem;
}

.button, button.button {
  display: inline-block;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border: 0;
  border-radius: 10px;
  padding: 0.68rem 1rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.button:hover, button.button:hover { background: var(--accent-dark); color: white; }
.button.secondary {
  background: var(--paper-2);
  color: var(--ink);
  border: 1px solid var(--line);
}
.button.secondary:hover { background: var(--paper); color: var(--ink); border-color: #c5d0dc; }
.button.is-disabled {
  background: var(--line);
  color: var(--muted);
  cursor: default;
}
.button.is-disabled:hover { background: var(--line); color: var(--muted); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin: 2.2rem 0 0.85rem;
}
h2 {
  margin: 0;
  font-weight: 680;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}
h3 {
  margin: 0;
  font-weight: 680;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}
.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.05rem 1.05rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.card a.title {
  color: var(--ink);
  text-decoration: none;
}
.card a.title:hover { color: var(--accent); }
.meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.badge {
  background: var(--pine-soft);
  color: var(--pine);
  border-radius: 999px;
  padding: 0.16rem 0.5rem;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 650;
  font-size: 0.75rem;
}
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.card p { margin: 0.4rem 0 0; color: var(--muted); flex: 1; }
.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 0.85rem;
}
.card .more {
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}
.card .more::after { content: " →"; }

.catalog-head {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(16rem, 0.7fr);
  gap: 1.25rem 2rem;
  align-items: end;
  padding-bottom: 1.35rem;
  border-bottom: 1px solid var(--line);
}
.catalog-head .lead { margin-top: 0.55rem; }
.catalog-head .filter { margin: 0; }
.catalog .section-head:first-of-type { margin-top: 1.35rem; }
.filter { margin: 0.2rem 0 1.1rem; }
.filter input, .field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  font: inherit;
}
.field textarea { min-height: 9rem; resize: vertical; }
.filter input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
}

h1 + .detail,
h1 + .form,
h1 + .prose { margin-top: 1.25rem; }
.detail {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 1.25rem;
  align-items: start;
}
.prose p { color: var(--muted); }
.prose h2 { margin: 1.6rem 0 0.45rem; }
.panel {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.05rem 1.1rem;
  box-shadow: var(--shadow);
}
.panel h2 { font-size: 1.08rem; margin-bottom: 0.55rem; }
.panel p { margin-top: 0; color: var(--muted); }
.pending {
  display: block;
  background: var(--warn-bg);
  color: var(--warn);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
}

.form {
  display: grid;
  gap: 0.85rem;
  max-width: 40rem;
}
.field label {
  display: block;
  margin-bottom: 0.32rem;
  font-size: 0.9rem;
  font-weight: 650;
}
.hint { color: var(--muted); font-size: 0.9rem; }
.status {
  min-height: 1.4rem;
  color: var(--pine);
}

.facts {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 0.4rem 1rem;
  margin: 1.2rem 0 0;
}
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.site-footer {
  flex-shrink: 0;
  background: var(--ink);
  color: var(--on-dark);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.4rem 1.25rem 1.6rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-footer a { color: white; text-decoration: none; font-weight: 600; }
.site-footer a:hover { color: white; text-decoration: underline; }
.site-footer strong {
  color: white;
  font-weight: 650;
  letter-spacing: -0.02em;
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .detail, .catalog-head, .grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav-toggle { display: inline-block; }
  .page-home .nav { background: #141a22; }
  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--paper-2);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem 0.8rem 0.8rem;
    gap: 0.15rem;
  }
  .nav.is-open { display: flex; }
  .grid, .facts { grid-template-columns: 1fr; }
  .header-inner { position: relative; }
}
@keyframes vt-reveal {
  from { opacity: 1; }
  to { opacity: 0; }
}
::view-transition-old(root) {
  z-index: 2;
  animation: 0.42s ease both vt-reveal;
}
::view-transition-new(root) {
  z-index: 1;
  animation: none;
  opacity: 1;
}
::view-transition-group(root) {
  animation-duration: 0.42s;
  animation-timing-function: ease;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  @view-transition { navigation: none; }
  .card { transition: none; animation: none; }
  ::view-transition-old(root),
  ::view-transition-new(root),
  ::view-transition-group(root) { animation: none; }
}
