:root {
  --paper: #f5f1e8;
  --ink: #211f1b;
  --muted: #6f675c;
  --line: #d8cec0;
  --accent: #b62f23;
  --accent-dark: #7d211a;
  --gold: #c58c2d;
  --panel: #ebe2d3;
  --shadow: 0 18px 50px rgb(74 50 28 / 14%);
  color-scheme: light;
  font-family:
    "Avenir Next", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgb(33 31 27 / 4%) 1px, transparent 1px),
    linear-gradient(180deg, rgb(33 31 27 / 4%) 1px, transparent 1px),
    var(--paper);
  background-size: 42px 42px;
  color: var(--ink);
}

a {
  color: inherit;
}

.site-header,
.hero,
.page-heading,
.contribute-hero,
.contribute-layout,
.home-links,
.filters,
.catalog-grid,
.method,
.footer {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
}

.brand,
.nav,
.hero-actions,
.footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0;
}

.brand-mark {
  width: clamp(24px, 3vw, 34px);
  height: clamp(24px, 3vw, 34px);
  border: 4px solid var(--ink);
  border-radius: 50%;
  box-shadow: inset 0 0 0 6px var(--gold);
}

.nav {
  gap: clamp(12px, 2vw, 28px);
  color: var(--muted);
  font-size: 0.94rem;
}

.nav a {
  text-decoration: none;
}

.nav a:hover {
  color: var(--ink);
}

.nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: clamp(28px, 6vw, 96px);
  align-items: center;
  padding: clamp(8px, 2vw, 24px) 0 clamp(28px, 5vw, 72px);
}

.contribute-hero {
  max-width: 980px;
  padding: clamp(8px, 2vw, 24px) 0 clamp(24px, 5vw, 56px);
}

.contribute-hero h1,
.page-heading h1,
.structure h1 {
  max-width: 820px;
  font-size: clamp(3rem, 7vw, 6.4rem);
}

.contribute-hero p,
.page-heading p,
.structure .section-heading p {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(1.04rem, 1.7vw, 1.28rem);
  line-height: 1.55;
}

.page-heading {
  padding: clamp(8px, 2vw, 24px) 0 22px;
}

.home-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0 0 clamp(56px, 8vw, 104px);
}

.home-links a {
  display: grid;
  gap: 10px;
  min-height: 150px;
  border: 1px solid var(--line);
  background: rgb(255 252 245 / 58%);
  padding: 18px;
  text-decoration: none;
}

.home-links a:hover {
  background: rgb(255 252 245 / 90%);
}

.home-links strong {
  font-size: 1.2rem;
}

.home-links span {
  color: var(--muted);
  line-height: 1.45;
}

.contribute-hero code,
.rule-list code,
.code-sample code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.contribute-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.35fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px);
  padding-bottom: clamp(56px, 8vw, 104px);
}

.contribute-steps {
  align-self: start;
  border-top: 2px solid var(--ink);
  padding-top: 18px;
}

.contribute-steps h2,
.contribute-section h2 {
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1;
}

.contribute-steps ol,
.rule-list {
  display: grid;
  gap: 12px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.contribute-steps ol {
  padding-left: 22px;
}

.contribute-main,
.field-grid,
.contact-grid,
.issue-guide {
  display: grid;
  gap: 16px;
}

.contribute-section {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-grid,
.issue-guide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.issue-guide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-grid article,
.contact-grid a,
.issue-guide article {
  border: 1px solid var(--line);
  background: rgb(255 252 245 / 54%);
  padding: 16px;
}

.contact-grid a {
  display: grid;
  gap: 8px;
  min-height: 120px;
  text-decoration: none;
}

.contact-grid a:hover {
  background: rgb(255 252 245 / 90%);
}

.field-grid h3,
.issue-guide h3 {
  margin-bottom: 8px;
}

.field-grid p,
.contact-grid span,
.issue-guide p,
.issue-guide li,
.section-note {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.section-note {
  max-width: 760px;
  margin-bottom: 16px;
}

.standard-table {
  display: grid;
  border: 1px solid var(--line);
  background: rgb(255 252 245 / 54%);
}

.standard-table > div {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(120px, 0.55fr) minmax(0, 1.5fr);
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
}

.standard-table > div:first-child {
  background: color-mix(in srgb, var(--panel), white 12%);
}

.standard-table > div:last-child {
  border-bottom: 0;
}

.standard-table span,
.standard-table code {
  overflow-wrap: anywhere;
}

.standard-table code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-weight: 800;
}

.issue-guide ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 20px;
}

.code-sample {
  overflow-x: auto;
  margin: 0;
  border: 1px solid var(--line);
  background: rgb(33 31 27 / 92%);
  color: var(--paper);
  padding: 18px;
  line-height: 1.45;
}

.code-sample code {
  font-size: 0.9rem;
}

.rule-list {
  padding-left: 20px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 8vw, 7.7rem);
  line-height: 0.91;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(1.04rem, 1.7vw, 1.35rem);
  line-height: 1.55;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  background: var(--ink);
  color: var(--paper);
}

.button.primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.button.secondary {
  background: transparent;
}

.button.secondary:hover {
  background: color-mix(in srgb, var(--ink), transparent 92%);
}

.signal-panel {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel), white 16%);
  box-shadow: var(--shadow);
  padding: clamp(22px, 3vw, 32px);
}

.signal-panel > div + div {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.metric {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.4rem, 6vw, 5rem);
  line-height: 1;
  margin-bottom: 8px;
}

.metric-label,
.status-line {
  color: var(--muted);
  font-weight: 700;
}

.metric-label {
  display: block;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.2;
}

.status-line {
  display: flex;
  gap: 10px;
  align-items: center;
  line-height: 1.4;
}

.status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #3a8f4e;
}

.filters {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 0 20px;
  border-top: 2px solid var(--ink);
}

h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1;
}

.filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 340px) repeat(4, minmax(110px, 150px));
  gap: 12px;
}

label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgb(255 252 245 / 72%);
  color: var(--ink);
  font: inherit;
  padding: 0 12px;
}

input:focus,
select:focus,
.button:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--gold), white 20%);
  outline-offset: 3px;
}

.nav a,
.button,
.home-links a,
.room-row,
.cinema-card-link,
.room-card-link,
.contact-grid a,
.pagination button {
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease, opacity 140ms ease;
}

.results-summary,
.room-table,
.pagination {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.results-summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 4px 0 14px;
  color: var(--muted);
}

.results-summary strong {
  color: var(--ink);
  font-size: 1.08rem;
}

.room-table {
  padding-bottom: 16px;
}

.room-table-head,
.room-row {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr 1fr 1fr;
  gap: 14px;
  align-items: start;
}

.room-table-head {
  position: sticky;
  top: 0;
  z-index: 1;
  border-block: 1px solid var(--ink);
  background: color-mix(in srgb, var(--paper), white 20%);
  padding: 11px 14px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#room-list {
  display: grid;
}

.room-row {
  border-bottom: 1px solid var(--line);
  background: rgb(255 252 245 / 54%);
  padding: 16px 14px;
  text-decoration: none;
}

.room-row:hover {
  background: rgb(255 252 245 / 88%);
}

.room-row a {
  text-decoration-color: color-mix(in srgb, var(--accent), transparent 30%);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.room-row > div {
  min-width: 0;
}

.room-row span,
.room-row strong,
.room-row small {
  display: block;
}

.room-row span,
.room-row strong {
  overflow-wrap: anywhere;
}

.room-row strong {
  margin: 3px 0 7px;
  font-size: 1.03rem;
}

.room-row small {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.35;
}

.room-name,
.cell-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.cell-label {
  display: none;
  margin-bottom: 5px;
}

.format-badge {
  width: fit-content;
  border: 1px solid color-mix(in srgb, var(--accent), var(--line) 40%);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.empty-result {
  border: 1px dashed var(--line);
  margin: 0;
  padding: 28px;
  color: var(--muted);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 clamp(48px, 8vw, 96px);
}

.pagination-pages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.pagination button {
  min-width: 42px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgb(255 252 245 / 72%);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.pagination button:hover:not(:disabled),
.pagination button[aria-current="page"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.detail-view,
.structure {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.detail-view {
  padding: clamp(20px, 4vw, 48px) 0 clamp(56px, 8vw, 104px);
}

.back-link {
  display: inline-flex;
  margin-bottom: 22px;
  color: var(--accent-dark);
  font-weight: 900;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  border-block: 2px solid var(--ink);
  padding: clamp(24px, 5vw, 56px) 0;
}

.detail-header h2 {
  max-width: 900px;
}

.detail-header .eyebrow a,
.detail-header h2 a {
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.detail-meta {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.45;
}

.detail-stamp {
  min-width: 120px;
  border: 1px solid var(--line);
  background: rgb(255 252 245 / 68%);
  padding: 18px;
  text-align: center;
}

.detail-stamp span {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3rem;
  line-height: 0.95;
}

.detail-stamp small {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 22px 0;
}

.spec-group {
  border: 1px solid var(--line);
  background: rgb(255 252 245 / 54%);
  padding: 18px;
}

.spec-group h3,
.sources-block h3,
.network-block h3 {
  margin-bottom: 14px;
  font-size: 1.05rem;
}

.spec-group dl,
.spec-group dd {
  margin: 0;
}

.spec-group dl {
  display: grid;
  gap: 13px;
}

.spec-group div {
  display: grid;
  gap: 3px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.spec-group dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.spec-group dd {
  overflow-wrap: anywhere;
}

.sources-block {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.source-list,
.tech-list,
.note-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.source-list li,
.tech-list li {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 8px 14px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.source-list small,
.tech-list small {
  grid-column: 2;
  color: var(--muted);
}

.source-list a,
.tech-list span {
  overflow-wrap: anywhere;
}

.tech-list strong {
  overflow-wrap: anywhere;
}

.note-list li {
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.5;
  padding: 12px 0;
}

.cinema-list-section {
  padding: 22px 0;
}

.cinema-list-section h3 {
  margin-bottom: 14px;
}

.cinema-list,
.room-card-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.cinema-card-link,
.room-card-link {
  display: grid;
  gap: 8px;
  min-height: 130px;
  border: 1px solid var(--line);
  background: rgb(255 252 245 / 58%);
  padding: 16px;
  text-decoration: none;
}

.cinema-card-link:hover,
.room-card-link:hover {
  background: rgb(255 252 245 / 90%);
}

.cinema-card-link strong,
.room-card-link strong {
  font-size: 1.08rem;
  overflow-wrap: anywhere;
}

.cinema-card-link span,
.room-card-link span,
.cinema-card-link small,
.room-card-link small,
.room-card-link em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.35;
}

.room-card-link span {
  width: fit-content;
  border: 1px solid color-mix(in srgb, var(--accent), var(--line) 40%);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.structure {
  padding: clamp(48px, 8vw, 96px) 0;
  border-top: 2px solid var(--ink);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 24px;
}

.network-tree {
  display: grid;
  gap: 16px;
}

.network-block {
  border: 1px solid var(--line);
  background: rgb(255 252 245 / 50%);
  padding: 18px;
}

.network-block h3 a,
.cinema-branch h4 a {
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

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

.cinema-branch section {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.cinema-branch h4 {
  margin: 0 0 5px;
}

.cinema-branch p {
  color: var(--muted);
  margin-bottom: 12px;
}

.cinema-branch ul {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.cinema-branch li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.cinema-branch a {
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.cinema-branch span {
  color: var(--muted);
  font-size: 0.86rem;
}

.method {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(24px, 6vw, 80px);
  padding: clamp(48px, 8vw, 96px) 0;
  border-top: 2px solid var(--ink);
}

.method-grid {
  display: grid;
  gap: 20px;
}

.method article {
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}

.method h3 {
  margin-bottom: 8px;
}

.method p {
  color: var(--muted);
  line-height: 1.55;
}

.footer {
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer div,
.footer-links {
  display: flex;
  gap: 10px;
}

.footer div {
  align-items: flex-start;
  flex-direction: column;
}

.footer strong {
  color: var(--ink);
}

.footer-links {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-links a {
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

@media (max-width: 860px) {
  .site-header,
  .filters,
  .method {
    align-items: stretch;
    flex-direction: column;
  }

  .hero,
  .method,
  .detail-header,
  .contribute-layout,
  .home-links {
    grid-template-columns: 1fr;
  }

  .detail-grid,
  .cinema-branch,
  .cinema-list,
  .room-card-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .room-table-head {
    display: none;
  }

  .room-row {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    border: 1px solid var(--line);
    margin-bottom: 12px;
  }

  .room-main {
    grid-column: 1 / -1;
  }

  .cell-label {
    display: block;
  }
}

@media (max-width: 560px) {
  .site-header {
    align-items: flex-start;
  }

  .nav {
    flex-wrap: wrap;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-start;
  }

  .filter-form,
  .room-row,
  .detail-grid,
  .cinema-branch,
  .cinema-list,
  .room-card-list,
  .field-grid,
  .contact-grid,
  .issue-guide,
  .standard-table > div,
  .source-list li,
  .tech-list li {
    grid-template-columns: 1fr;
  }

  .source-list small,
  .tech-list small {
    grid-column: auto;
  }

  .results-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .pagination {
    align-items: stretch;
    flex-direction: column;
  }
}
