:root {
  --bg: #e7ecef;
  --bg-deep: #cad6dd;
  --panel: rgba(250, 251, 251, 0.9);
  --panel-strong: #f4efe3;
  --panel-glass: rgba(255, 255, 255, 0.66);
  --ink: #15212a;
  --muted: #556773;
  --line: rgba(53, 82, 95, 0.18);
  --line-strong: rgba(31, 58, 69, 0.28);
  --accent: #1f6a73;
  --accent-soft: #d7ece8;
  --accent-deep: #0f4c53;
  --metal: #b78846;
  --metal-soft: #f3e3c7;
  --success: #1f6a4a;
  --danger: #8a3a32;
  --shadow: 0 24px 60px rgba(21, 33, 42, 0.12);
  --shadow-tight: 0 16px 30px rgba(21, 33, 42, 0.08);
  --radius: 26px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(31, 106, 115, 0.14), transparent 26%),
    radial-gradient(circle at left 20%, rgba(183, 136, 70, 0.12), transparent 24%),
    linear-gradient(180deg, #f5f8f9 0%, var(--bg) 55%, var(--bg-deep) 100%);
  color: var(--ink);
  font-family: "Iowan Old Style", "Baskerville", "Palatino Linotype", serif;
}

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

.page-shell {
  max-width: 1340px;
  margin: 0 auto;
  padding: 28px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin: 0 0 30px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 20px;
  background: rgba(244, 248, 249, 0.7);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 22px rgba(21, 33, 42, 0.06);
}

.site-header h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2.6vw, 2.35rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  max-width: 14ch;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-family: "Avenir Next Condensed", "Gill Sans", sans-serif;
  font-size: 0.78rem;
  color: var(--accent-deep);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.site-nav a,
.detail-actions a,
.detail-actions button,
.pagination a,
.search-bar button {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.72);
  font-family: "Avenir Next Condensed", "Gill Sans", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.2;
  color: inherit;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.site-nav a:hover,
.detail-actions a:hover,
.detail-actions button:hover,
.pagination a:hover,
.search-bar button:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 106, 115, 0.34);
}

.hero,
.detail-hero,
.panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(246, 249, 250, 0.92)),
    linear-gradient(120deg, rgba(215, 236, 232, 0.26), rgba(243, 227, 199, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero,
.detail-hero {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 28px;
  padding: 30px;
  margin-bottom: 24px;
  overflow: hidden;
}

.hero::before,
.detail-hero::before,
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero,
.detail-hero,
.panel,
.switch-card,
.switch-art,
.detail-art,
.stat-card,
.spec-card,
.translation-block,
.material-chip {
  position: relative;
}

.compact-hero {
  grid-template-columns: 1fr;
}

.hero-copy h2,
.detail-copy h2 {
  margin: 0 0 12px;
  font-size: clamp(2.15rem, 3vw, 3.2rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.lede {
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.6;
  max-width: 62ch;
}

.hero-stats,
.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stat-card,
.spec-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 239, 227, 0.92));
  border: 1px solid rgba(183, 136, 70, 0.18);
  border-radius: 20px;
  padding: 18px;
}

.stat-card span,
.spec-card span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  font-family: "Avenir Next Condensed", "Gill Sans", sans-serif;
}

.stat-card strong,
.spec-card strong {
  display: block;
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.stat-card small {
  color: var(--muted);
}

.search-bar {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.search-bar input {
  flex: 1;
  min-width: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font-size: 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.search-bar input:focus {
  outline: none;
  border-color: rgba(31, 106, 115, 0.5);
  box-shadow: 0 0 0 4px rgba(31, 106, 115, 0.12);
}

.search-bar button {
  cursor: pointer;
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.detail-actions button {
  cursor: pointer;
}

.panel {
  padding: 24px;
  margin-bottom: 24px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-header h3 {
  margin: 0 0 4px;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.panel-header p {
  margin: 0;
  color: var(--muted);
}

.pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-family: "Avenir Next Condensed", "Gill Sans", sans-serif;
}

.switch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}

.switch-card {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(246, 249, 250, 0.88));
  box-shadow: var(--shadow-tight);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.switch-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px rgba(21, 33, 42, 0.12);
  border-color: rgba(31, 106, 115, 0.22);
}

.switch-card-link {
  display: block;
  height: 100%;
}

.switch-art {
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(circle at top left, rgba(31, 106, 115, 0.16), transparent 38%),
    radial-gradient(circle at bottom right, rgba(183, 136, 70, 0.18), transparent 35%),
    linear-gradient(135deg, #edf3f4, #dde7eb);
  display: grid;
  place-items: center;
}

.switch-art img,
.detail-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.switch-art-fallback {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(31, 106, 115, 0.16), rgba(183, 136, 70, 0.2));
  color: var(--accent-deep);
  font-size: 2rem;
}

.detail-fallback {
  width: 140px;
  height: 140px;
}

.switch-body {
  padding: 16px 16px 18px;
}

.switch-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.switch-title-row h4 {
  margin: 0;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.switch-title-row span {
  color: var(--muted);
  font-size: 0.9rem;
  font-family: "Avenir Next Condensed", "Gill Sans", sans-serif;
}

.switch-snippet {
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 4.45em;
}

.mini-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.mini-metrics dt {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  margin-bottom: 4px;
  letter-spacing: 0.08em;
  font-family: "Avenir Next Condensed", "Gill Sans", sans-serif;
}

.mini-metrics dd {
  margin: 0;
  font-size: 1rem;
}

.material-chip {
  display: inline-block;
  margin: 14px 0 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(183, 136, 70, 0.12), rgba(31, 106, 115, 0.1));
  color: var(--accent-deep);
  font-size: 0.9rem;
  border: 1px solid rgba(183, 136, 70, 0.18);
}

.split-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-top: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

tbody tr:hover td {
  background: rgba(31, 106, 115, 0.04);
}

th {
  font-family: "Avenir Next Condensed", "Gill Sans", sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.detail-action-button:disabled {
  cursor: wait;
  opacity: 0.88;
}

.detail-art {
  min-height: 320px;
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(31, 106, 115, 0.18), transparent 28%),
    radial-gradient(circle at bottom left, rgba(183, 136, 70, 0.16), transparent 32%),
    linear-gradient(135deg, #eaf1f3, #dce6ea);
  display: grid;
  place-items: center;
}

.detail-list {
  display: grid;
  gap: 14px;
}

.detail-list dt {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  margin-bottom: 4px;
  letter-spacing: 0.08em;
  font-family: "Avenir Next Condensed", "Gill Sans", sans-serif;
}

.detail-list dd {
  margin: 0;
  line-height: 1.6;
  word-break: break-word;
}

.translation-block {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(31, 106, 115, 0.16);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(215, 236, 232, 0.46), rgba(255, 255, 255, 0.72));
}

.translation-block-title {
  margin-top: 10px;
  max-width: 34rem;
}

.translation-label {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-deep);
  font-family: "Avenir Next Condensed", "Gill Sans", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.translation-block p {
  margin: 0;
  line-height: 1.6;
}

.translation-status {
  margin: 14px 0 0;
  font-family: "Avenir Next Condensed", "Gill Sans", sans-serif;
}

.translation-status[data-kind="working"] {
  color: var(--muted);
}

.translation-status[data-kind="success"] {
  color: var(--success);
}

.translation-status[data-kind="error"] {
  color: var(--danger);
}

.link-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.8;
}

code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.94em;
  padding: 0.12em 0.35em;
  border-radius: 8px;
  background: rgba(21, 33, 42, 0.06);
}

@media (max-width: 900px) {
  .hero,
  .detail-hero,
  .split-panels {
    grid-template-columns: 1fr;
  }

  .site-header,
  .panel-header {
    align-items: start;
    flex-direction: column;
  }

  .hero-stats,
  .spec-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 16px;
  }

  .site-header {
    padding: 12px 14px;
  }

  .search-bar,
  .hero-stats,
  .spec-grid,
  .mini-metrics {
    grid-template-columns: 1fr;
    display: grid;
  }

  .search-bar {
    display: grid;
  }

  .hero,
  .detail-hero,
  .panel {
    padding: 20px;
  }
}
