:root {
  --bg: #F2EFE9;
  --ink: #141413;
  --muted: #57534E;
  --rule: #D4CFC4;
  --accent: #C84B31;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

.sheet {
  min-height: 100dvh;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  max-width: 1320px;
  margin: 0 auto;
}

.band,
.col-seal,
.col-manifest,
.spec-row,
.spec-desc,
.cell-link,
.cell-static {
  min-width: 0;
}

.top-band {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: stretch;
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 1.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: block;
  flex-shrink: 0;
}

.brand-tld {
  color: var(--accent);
}

.top-coord {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.1rem 1.5rem;
  border-left: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--muted);
}

.top-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  border-left: 1px solid var(--rule);
}

.phase-tag {
  font-size: 0.78rem;
  color: var(--muted);
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--ink);
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
}

.lang-btn + .lang-btn {
  border-left: 1px solid var(--ink);
}

.lang-btn.is-active {
  background: var(--ink);
  color: var(--bg);
}

.lang-btn:focus-visible,
.cell-link:focus-visible,
.brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.main-band {
  display: grid;
  grid-template-columns: minmax(260px, 0.36fr) 1fr;
}

.col-seal {
  border-right: 1px solid var(--rule);
  padding: clamp(2rem, 4vw, 3.5rem) 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
}

.seal-block {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.seal-mark {
  width: 84px;
  height: 84px;
  display: block;
}

.seal-route {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

.seal-role {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.seal-note {
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 34ch;
}

.col-manifest {
  padding: clamp(2rem, 4vw, 3.5rem) clamp(1.25rem, 4vw, 3.25rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(2.25rem, 5vh, 4rem);
}

h1 {
  margin: 0;
  font-size: clamp(1.65rem, 4.2vw, 3.55rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.035em;
  max-width: min(22ch, 100%);
  overflow-wrap: break-word;
}

.spec-table {
  border-top: 1px solid var(--rule);
}

.spec-row {
  display: grid;
  grid-template-columns: 3.25rem minmax(170px, 0.42fr) 1fr;
  gap: 1rem 1.5rem;
  align-items: baseline;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--rule);
}

.spec-num {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
}

.spec-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.spec-desc {
  margin: 0;
  font-size: 0.93rem;
  color: var(--muted);
  max-width: 58ch;
}

.bottom-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
}

.cell-link,
.cell-static {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.cell-link + .cell-link,
.cell-link + .cell-static {
  border-left: 1px solid var(--rule);
}

.cell-label {
  font-size: 0.8rem;
  color: var(--muted);
  transition: color 0.14s ease;
}

.cell-value {
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.cell-link:hover {
  background: var(--ink);
  color: var(--bg);
}

.cell-link:hover .cell-label {
  color: #B8B2A6;
}

@media (max-width: 960px) {
  .top-band {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .top-coord {
    display: none;
  }
  .main-band {
    grid-template-columns: minmax(0, 1fr);
  }
  .col-seal {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1.5rem;
  }
  .seal-block {
    flex-direction: row;
    align-items: center;
  }
  .seal-mark {
    width: 60px;
    height: 60px;
  }
  .seal-note {
    border-top: 0;
    padding-top: 0;
  }
  .bottom-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cell-link:nth-child(3),
  .cell-static:nth-child(4) {
    border-top: 1px solid var(--rule);
  }
  .cell-link:nth-child(3) {
    border-left: 0;
  }
}

@media (max-width: 600px) {
  .brand {
    padding: 0.9rem 1rem;
  }
  .top-right {
    padding: 0.75rem 1rem;
  }
  .col-seal,
  .col-manifest {
    padding: 1.5rem 1rem;
  }
  .cell-link,
  .cell-static {
    padding: 1rem;
  }
  .phase-tag {
    display: none;
  }
  .spec-row {
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.35rem 0.65rem;
  }
  .spec-desc {
    grid-column: 2;
  }
  .bottom-band {
    grid-template-columns: minmax(0, 1fr);
  }
  .cell-link + .cell-link,
  .cell-link + .cell-static {
    border-left: 0;
    border-top: 1px solid var(--rule);
  }
}
