:root {
  --paper: #ffffff;
  --soft: #fafafa;
  --ink: #111111;
  --carbon: #1c1c1c;
  --muted: #666666;
  --line: #e5e5e5;
  --danger: #9d2727;
  --success: #1f6a45;
  --warning: #8a5d16;
  --serif: "Cormorant Garamond", Didot, "Bodoni MT", Georgia, serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --shadow: 0 18px 48px rgba(0, 0, 0, .08);
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--soft);
  color: var(--carbon);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 12px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
}
.brand {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 500;
  letter-spacing: .32em;
  text-decoration: none;
}
.topbar__meta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .8rem; }

.page { width: min(1240px, calc(100% - 32px)); margin: 0 auto; padding: 38px 0 64px; }
.page--narrow { width: min(720px, calc(100% - 32px)); }
.hero { padding: clamp(32px, 7vw, 76px) 0 34px; text-align: center; }
.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: .72rem;
  letter-spacing: .36em;
  text-transform: uppercase;
}
h1, h2, h3 { color: var(--ink); font-family: var(--serif); font-weight: 400; }
h1 { margin: 0; font-size: clamp(2rem, 6vw, 4rem); letter-spacing: .08em; line-height: 1.03; text-transform: uppercase; }
h2 { margin: 0 0 16px; font-size: clamp(1.55rem, 3vw, 2.25rem); letter-spacing: .04em; }
h3 { margin: 0 0 10px; font-size: 1.35rem; }
.lead { max-width: 690px; margin: 20px auto 0; color: var(--muted); font-family: var(--serif); font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.55; }

.grid { display: grid; gap: 18px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: grid; gap: 16px; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.split { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }

.card {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: clamp(20px, 3vw, 30px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .02);
}
.card--raised { box-shadow: var(--shadow); }
.card--dark { background: var(--ink); color: white; border-color: var(--ink); }
.card--dark h2, .card--dark h3 { color: white; }
.card__label { margin: 0 0 8px; color: var(--muted); font-size: .72rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; }
.card__value { margin: 0; color: var(--ink); font-family: var(--serif); font-size: 2rem; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.nowrap { white-space: nowrap; }
.space-after { margin-bottom: 22px; }
.space-before { margin-top: 18px; }
.space-around { margin: 18px 0 26px; }
.full-row { grid-column: 1 / -1; }
.panel-title { font-size: clamp(1.8rem, 4vw, 3rem); }

.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 3px 0 18px; scrollbar-width: thin; }
.tab {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--muted);
  padding: 9px 14px;
}
.tab[aria-selected="true"] { border-color: var(--ink); background: var(--ink); color: white; }
.panel-section { display: none; }
.panel-section.is-active { display: block; }

.field { display: grid; gap: 7px; }
.field label, .field__label { color: var(--carbon); font-size: .73rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cfcfcf;
  border-radius: 0;
  background: white;
  color: var(--ink);
  padding: 11px 12px;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); outline: 1px solid var(--ink); }
.field--check { display: flex; align-items: flex-start; gap: 10px; }
.field--check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--ink); }
.field--check label { color: var(--muted); font-family: var(--serif); line-height: 1.45; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: white;
  padding: 10px 18px;
  font-family: var(--serif);
  font-size: .82rem;
  letter-spacing: .14em;
  text-decoration: none;
  text-transform: uppercase;
}
.btn:hover { background: white; color: var(--ink); }
.btn--light { border-color: var(--line); background: white; color: var(--ink); }
.btn--danger { border-color: var(--danger); background: var(--danger); }
.btn--small { min-height: 36px; padding: 7px 12px; font-size: .72rem; }
.icon-btn { border: 0; background: transparent; color: var(--muted); padding: 8px; }

.status {
  display: none;
  border-left: 3px solid var(--muted);
  background: #f4f4f4;
  padding: 12px 14px;
  color: var(--carbon);
  line-height: 1.45;
}
.status.is-visible { display: block; }
.status--success { border-color: var(--success); background: #f0f8f4; color: var(--success); }
.status--error { border-color: var(--danger); background: #fff3f3; color: var(--danger); }
.status--warning { border-color: var(--warning); background: #fff8eb; color: var(--warning); }

.badge { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: white; padding: 5px 9px; color: var(--muted); font-size: .72rem; }
.badge--success { border-color: #b8d9c7; color: var(--success); }
.badge--warning { border-color: #e3c997; color: var(--warning); }
.badge--danger { border-color: #e2b2b2; color: var(--danger); }

.data-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.data-row { display: grid; gap: 8px; border: 1px solid var(--line); background: white; padding: 14px; }
.data-row__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.data-row p { margin: 0; }
.empty { border: 1px dashed #cfcfcf; padding: 28px; color: var(--muted); text-align: center; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { border-bottom: 1px solid var(--line); padding: 12px; text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }

.information-box { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 22px; }
.information-box dl { display: grid; grid-template-columns: minmax(100px, .45fr) 1fr; gap: 8px 14px; margin: 0; }
.information-box dt { color: var(--muted); font-size: .75rem; text-transform: uppercase; }
.information-box dd { margin: 0; overflow-wrap: anywhere; }

.modal { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .64); }
.modal__body { width: min(620px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: white; padding: clamp(22px, 4vw, 36px); box-shadow: var(--shadow); }
.modal__body:focus { outline: 2px solid var(--ink); outline-offset: -4px; }

.catalog-frame { width: 100%; min-height: 70vh; border: 1px solid var(--line); background: #f2f2f2; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 900px) {
  .grid--4, .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .page { width: min(100% - 22px, 1240px); padding-top: 22px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .split { display: grid; }
  .topbar { min-height: 60px; padding-inline: 14px; }
  .topbar__meta span { display: none; }
  .brand { font-size: 1.02rem; }
  .card { padding: 18px; }
}

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

@media print {
  .topbar, .tabs, .btn, button { display: none !important; }
  .page { width: 100%; padding: 0; }
  .card { break-inside: avoid; box-shadow: none; }
}

.office-shell {
  background: #fff;
  color: #181818;
}
.office-shell .topbar {
  min-height: 92px;
  border-bottom-color: #000;
  background: #000;
  color: #fff;
  backdrop-filter: none;
}
.office-shell .brand {
  color: #fff;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  letter-spacing: .38em;
}
.office-shell .topbar__meta {
  color: rgba(255, 255, 255, .72);
}
.office-shell .topbar .btn--light {
  border-color: rgba(255, 255, 255, .42);
  background: transparent;
  color: #fff;
}
.office-shell .topbar .btn--light:hover {
  border-color: #fff;
  background: #fff;
  color: #000;
}
.office-shell .topbar :focus-visible {
  outline-color: #fff;
}
.office-shell .page {
  padding-top: clamp(32px, 5vw, 68px);
}
.office-shell .hero {
  padding-top: clamp(36px, 8vw, 92px);
}
.office-shell .card,
.office-shell .data-row,
.office-shell table {
  box-shadow: none;
}
.office-shell .card {
  border-color: #dedede;
}
.office-shell .tabs {
  position: sticky;
  z-index: 20;
  top: 92px;
  margin-inline: calc(clamp(12px, 2vw, 18px) * -1);
  padding: 14px clamp(12px, 2vw, 18px);
  border-block: 1px solid #ececec;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(12px);
}
.office-shell .tab {
  border: 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  padding-inline: 10px;
}
.office-shell .tab[aria-selected="true"] {
  border-bottom-color: #000;
  background: transparent;
  color: #000;
}
.office-shell .field input,
.office-shell .field select,
.office-shell .field textarea {
  border-color: #bdbdbd;
  background: #fff;
}
.office-shell .information-box {
  margin-top: 56px;
  padding-block: 30px 12px;
}

@media (max-width: 680px) {
  .office-shell .topbar { min-height: 72px; }
  .office-shell .topbar__meta span { display: none; }
  .office-shell .tabs { top: 72px; margin-inline: -11px; padding-inline: 11px; }
}
