:root {
  --bg: #f3efe4;
  --surface: #fffdf8;
  --surface-alt: #f8f2e5;
  --surface-strong: #1f1f18;
  --text: #16150f;
  --text-muted: #4c4a3f;
  --border: #b9ae8f;
  --accent: #005a8c;
  --accent-strong: #003c5e;
  --accent-soft: #d7ecf7;
  --success: #14532d;
  --danger: #8a1c1c;
  --shadow: 0 12px 32px rgba(39, 35, 22, 0.14);
  --radius: 18px;
  --focus: 3px solid #0b6ea8;
  --content-width: 78rem;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(0, 90, 140, 0.12), transparent 24rem),
    linear-gradient(180deg, #f7f4ea 0%, var(--bg) 30%, #efe8d8 100%);
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.65;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin-top: 0;
}

a {
  color: var(--accent-strong);
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: var(--focus);
  outline-offset: 3px;
}

img,
video {
  max-width: 100%;
  height: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  border-radius: 0.8rem;
  background: var(--surface-strong);
  color: #fff;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.site-header,
.site-footer {
  padding: 1.25rem 1rem;
}

.site-shell {
  max-width: var(--content-width);
  margin: 0 auto;
}

.site-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.brand-block {
  max-width: 42rem;
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.site-title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.08;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-subtitle {
  margin: 0.75rem 0 0;
  max-width: 54rem;
  color: var(--text-muted);
  font-size: 1.08rem;
}

.site-nav {
  margin-top: 1.25rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 0.25rem);
  background: rgba(255, 253, 248, 0.82);
  box-shadow: var(--shadow);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 1rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.9rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
}

.site-nav a[aria-current="page"] {
  background: var(--accent);
  border-color: var(--accent-strong);
  color: #fff;
}

main {
  display: block;
  padding: 0 1rem 2rem;
}

.stack {
  display: grid;
  gap: 1.5rem;
}

.hero-card,
.card,
.panel,
.status-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
}

.hero-card,
.card,
.panel {
  padding: clamp(1.2rem, 2.6vw, 2rem);
}

.hero-card {
  background:
    linear-gradient(145deg, rgba(215, 236, 247, 0.9), rgba(255, 253, 248, 0.96)),
    var(--surface);
}

.hero-card h2,
.hero-card h1,
.card h2,
.panel h2 {
  margin-top: 0;
  line-height: 1.2;
}

.grid {
  display: grid;
  gap: 1.25rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.button,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.9rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--accent-strong);
  border-radius: 0.95rem;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.button.secondary,
button.secondary {
  background: var(--surface-alt);
  color: var(--text);
  border-color: var(--border);
}

.button.link-like {
  text-decoration: none;
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

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

.notice {
  padding: 0.9rem 1rem;
  border-left: 5px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0.9rem;
}

.warning {
  border-left-color: #a16207;
  background: #fbf2d2;
}

.danger {
  border-left-color: var(--danger);
  background: #fbe3e3;
}

.muted {
  color: var(--text-muted);
}

.meta {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.field-group {
  display: grid;
  gap: 1rem;
}

label,
legend {
  font-weight: 700;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="range"],
textarea,
select {
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #8d8367;
  border-radius: 0.9rem;
  background: #fff;
  color: var(--text);
  font: inherit;
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

input[type="range"] {
  padding: 0.3rem 0;
}

.field-help {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.results-list {
  display: grid;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.results-item button {
  width: 100%;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}

.results-item a {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
  min-height: 3.4rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.results-item a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.results-item button[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 700;
}

.player-shell {
  display: grid;
  gap: 1rem;
}

.player-display {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: #fff;
}

.player-visual {
  margin-top: 1rem;
  border-radius: 1rem;
  background: #000;
  overflow: hidden;
}

.player-visual[hidden] {
  display: none;
}

.player-status {
  min-height: 1.5rem;
}

.time-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-variant-numeric: tabular-nums;
}

.footer-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.site-footer {
  color: var(--text-muted);
}

.site-footer a {
  color: var(--accent-strong);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.empty-state {
  padding: 1rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px dashed var(--border);
}

.inline-list {
  padding-left: 1.2rem;
}

.card p:last-child,
.panel p:last-child {
  margin-bottom: 0;
}

@media (max-width: 48rem) {
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav a {
    width: 100%;
    justify-content: center;
  }

  .time-row {
    flex-direction: column;
  }
}
