:root {
  --milan-red: #C8102E;
  --night: #101214;
  --charcoal: #1E2228;
  --wine: #6B1E2A;
  --lake: #1F7A8C;
  --lake-soft: #A9D6DE;
  --sunset: #F28C28;
  --cream: #F6F1E7;
  --ink: #17181A;
  --indigo: #123C4A;
  --muted: #5F625F;
  --line: rgba(23, 24, 26, 0.14);
  --line-strong: rgba(23, 24, 26, 0.24);
  --line-dark: rgba(246, 241, 231, 0.16);
  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-data: "DIN Alternate", "Roboto Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --container: 1240px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 2px;
  --shadow: 0 1px 0 rgba(16, 18, 20, 0.04), 0 20px 44px -38px rgba(16, 18, 20, 0.42);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body,
button,
input,
textarea,
select {
  font-family: var(--font-sans);
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding-left: 1.2em;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

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

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--sunset);
  color: var(--night);
}

:focus-visible {
  outline: 3px solid var(--sunset);
  outline-offset: 3px;
}

#main-content {
  scroll-margin-top: 7rem;
}

.container {
  width: min(calc(100% - (var(--gutter) * 2)), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.65rem 1rem;
  background: var(--sunset);
  color: var(--night);
  font-size: 0.9rem;
  font-weight: 800;
  border: 1px solid var(--night);
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: var(--cream);
  background:
    linear-gradient(90deg, rgba(200, 16, 46, 0.16) 0, transparent 24%),
    var(--night);
  border-bottom: 1px solid var(--line-dark);
  box-shadow: 0 14px 30px -28px rgba(0, 0, 0, 0.75);
}

.command-bar {
  position: relative;
}

.command-bar__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  min-height: 72px;
  padding-block: 0.55rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  color: var(--cream);
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  background: var(--milan-red);
  color: #FFFFFF;
  font-family: var(--font-data);
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.brand__text {
  display: grid;
  gap: 0.05rem;
  line-height: 1.12;
  min-width: 0;
}

.brand__text strong {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.brand__text small {
  color: var(--lake-soft);
  font-family: var(--font-data);
  font-size: 0.6rem;
  letter-spacing: 0.13em;
  white-space: nowrap;
}

.brand--footer .brand__mark {
  width: 48px;
  height: 48px;
}

.brand--footer .brand__text strong {
  font-size: 1.15rem;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-self: start;
  min-width: 0;
  padding-left: 1rem;
  border-left: 1px solid var(--line-dark);
  color: var(--lake-soft);
  font-family: var(--font-data);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--sunset);
  box-shadow: 0 0 0 3px rgba(242, 140, 40, 0.18);
}

.command-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--milan-red);
  border-color: var(--milan-red);
  color: #FFFFFF;
}

.btn--primary:hover {
  background: #A80D26;
  border-color: #A80D26;
}

.btn--ghost {
  background: transparent;
  border-color: rgba(246, 241, 231, 0.28);
  color: var(--cream);
}

.btn--ghost:hover {
  border-color: var(--lake-soft);
  color: #FFFFFF;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 42px;
  padding: 0.55rem 0.7rem;
  background: transparent;
  border: 1px solid rgba(246, 241, 231, 0.28);
  border-radius: var(--radius);
  color: var(--cream);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.nav-toggle__label {
  white-space: nowrap;
}

.nav-toggle__icon {
  display: grid;
  gap: 4px;
  width: 16px;
}

.nav-toggle__icon i {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: transform 160ms ease, opacity 160ms ease;
}

.site-header[data-open] .nav-toggle__icon i:first-child {
  transform: translateY(3px) rotate(45deg);
}

.site-header[data-open] .nav-toggle__icon i:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

.site-nav {
  display: block;
  background: rgba(30, 34, 40, 0.98);
  border-top: 1px solid var(--line-dark);
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 48px;
}

.nav-index {
  display: flex;
  align-items: center;
  gap: clamp(0.55rem, 2vw, 1.35rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-index a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.8rem 0;
  border-bottom: 2px solid transparent;
  color: rgba(246, 241, 231, 0.72);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

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

.nav-index a[aria-current="page"] {
  border-bottom-color: var(--milan-red);
  color: var(--cream);
}

.nav-index a[aria-current="page"] .nav-index__num {
  color: var(--sunset);
}

.nav-index__num {
  color: var(--lake-soft);
  font-family: var(--font-data);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.nav-caption {
  color: rgba(169, 214, 222, 0.68);
  font-family: var(--font-data);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.reading-progress {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  z-index: 2;
  height: 3px;
  overflow: hidden;
  background: rgba(169, 214, 222, 0.16);
}

.reading-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--lake) 0%, var(--sunset) 58%, var(--milan-red) 100%);
}

.site-footer {
  margin-top: clamp(3rem, 8vw, 6rem);
  background:
    linear-gradient(120deg, rgba(18, 60, 74, 0.5) 0, transparent 38%),
    var(--night);
  color: var(--cream);
  border-top: 6px solid var(--milan-red);
}

.footer-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding-block: clamp(2rem, 5vw, 3.75rem) 1.25rem;
}

.footer-brand {
  min-width: 0;
}

.footer-note {
  max-width: 34ch;
  margin-top: 1rem;
  color: rgba(246, 241, 231, 0.7);
  font-size: 0.87rem;
  line-height: 1.75;
}

.footer-contact-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--sunset);
  font-size: 0.86rem;
  font-weight: 800;
  border-bottom: 1px solid currentColor;
}

.footer-contact-link:hover {
  color: #FFB05E;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.footer-col {
  min-width: 0;
}

.footer-col__title {
  margin: 0 0 0.7rem;
  color: var(--lake-soft);
  font-family: var(--font-data);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.4;
}

.footer-col__list {
  display: grid;
  gap: 0.52rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col__list a {
  color: rgba(246, 241, 231, 0.72);
  font-size: 0.86rem;
  transition: color 160ms ease;
}

.footer-col__list a:hover {
  color: #FFFFFF;
}

.footer-contact {
  min-width: 0;
  padding-left: 1.25rem;
  border-left: 1px solid var(--line-dark);
}

.footer-contact__line {
  margin-top: 0.35rem;
  color: var(--cream);
  font-family: var(--font-data);
  font-size: 0.78rem;
  line-height: 1.6;
  word-break: break-all;
}

.footer-contact__address {
  margin-top: 0.45rem;
  color: rgba(246, 241, 231, 0.7);
  font-size: 0.8rem;
  font-style: normal;
  line-height: 1.65;
}

.footer-contact__note {
  margin-top: 0.8rem;
  color: rgba(246, 241, 231, 0.54);
  font-size: 0.72rem;
  line-height: 1.65;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  grid-column: 1 / -1;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line-dark);
  color: rgba(246, 241, 231, 0.5);
  font-family: var(--font-data);
  font-size: 0.68rem;
  line-height: 1.7;
}

.footer-legal__copy {
  min-width: 0;
}

.footer-legal__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-legal__links li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.footer-legal__links li + li::before {
  content: "/";
  color: var(--lake);
}

.footer-legal__links a {
  color: rgba(246, 241, 231, 0.64);
}

.footer-legal__links a:hover {
  color: var(--sunset);
}

.section {
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

.zone-wine {
  background: var(--wine);
  color: var(--cream);
}

.zone-indigo {
  background: var(--indigo);
  color: var(--cream);
}

.zone-lake {
  background: var(--lake);
  color: #FFFFFF;
}

.editorial-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.25rem, 4vw, 3rem);
}

.rail-note {
  min-width: 0;
  color: var(--muted);
  font-family: var(--font-data);
  font-size: 0.74rem;
  line-height: 1.75;
  letter-spacing: 0.02em;
}

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

.content-column {
  min-width: 0;
}

.stack > * + * {
  margin-top: var(--stack-space, 1.1rem);
}

.prose {
  max-width: 68ch;
  font-size: clamp(1rem, 0.3vw + 0.94rem, 1.125rem);
  line-height: 1.75;
}

.prose > * + * {
  margin-top: 1.15em;
}

.prose h2,
.prose h3 {
  color: var(--ink);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.prose h2 {
  margin-top: 2em;
  font-size: clamp(1.6rem, 2.4vw, 2.4rem);
}

.prose h3 {
  margin-top: 1.7em;
  font-size: clamp(1.2rem, 1.5vw, 1.55rem);
}

.prose a {
  color: var(--lake);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.prose ul,
.prose ol {
  padding-left: 1.35em;
}

.prose li + li {
  margin-top: 0.45em;
}

.prose strong,
.prose b {
  color: var(--ink);
  font-weight: 900;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  color: var(--lake);
  font-family: var(--font-data);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.5;
}

.eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 2px;
  flex: 0 0 auto;
  background: var(--milan-red);
}

.display-title {
  color: var(--ink);
  font-size: clamp(2.5rem, 7vw, 5.25rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.lead {
  max-width: 46ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.2vw, 1.23rem);
  line-height: 1.7;
}

.meta {
  color: var(--muted);
  font-family: var(--font-data);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.data {
  color: var(--ink);
  font-family: var(--font-data);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0.18rem 0.55rem;
  border: 1px solid currentColor;
  color: var(--lake);
  font-family: var(--font-data);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.grid {
  display: grid;
  gap: var(--grid-gap, 1.25rem);
}

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

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

.card {
  min-width: 0;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel {
  min-width: 0;
  padding: clamp(1.1rem, 3vw, 1.8rem);
  background: var(--indigo);
  color: var(--cream);
  border: 1px solid rgba(169, 214, 222, 0.24);
  border-radius: var(--radius);
}

.section-index {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-data);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
}

.section-index a {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0 0.28rem 0.55rem;
  border-left: 2px solid transparent;
  color: var(--muted);
  line-height: 1.5;
  transition: color 160ms ease, border-color 160ms ease;
}

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

.section-index a[aria-current="location"] {
  color: var(--milan-red);
  border-left-color: var(--milan-red);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-family: var(--font-data);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--lake);
}

.breadcrumb a {
  color: var(--lake);
}

.media-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(18, 60, 74, 0.96), rgba(30, 34, 40, 0.92)),
    var(--charcoal);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame::after {
  content: "";
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  width: 2.1rem;
  height: 2.1rem;
  border-right: 1px solid rgba(246, 241, 231, 0.64);
  border-bottom: 1px solid rgba(246, 241, 231, 0.64);
  pointer-events: none;
}

.media-frame--wide {
  aspect-ratio: 21 / 9;
}

.media-frame--tilt {
  clip-path: polygon(0 2.5%, 100% 0, 100% 97.5%, 0 100%);
}

@media (min-width: 700px) {
  .grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 780px) {
  .grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .editorial-grid {
    grid-template-columns: minmax(150px, 0.32fr) minmax(0, 1.68fr);
  }

  .editorial-grid--flip {
    grid-template-columns: minmax(0, 1.68fr) minmax(150px, 0.32fr);
  }

  .editorial-grid--flip .rail-note {
    order: 2;
  }
}

@media (min-width: 760px) {
  .footer-shell {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .footer-columns {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .footer-contact {
    padding-left: 1.25rem;
    border-left: 1px solid var(--line-dark);
  }

  .footer-legal {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  .footer-shell {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr) minmax(0, 1.15fr);
    align-items: start;
  }

  .footer-columns {
    grid-column: auto;
    grid-row: auto;
  }

  .footer-legal {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1080px) {
  .status-line {
    display: none;
  }

  .command-bar__inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .command-actions {
    justify-self: end;
  }
}

@media (max-width: 860px) {
  .command-bar__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.35rem 0.8rem;
    min-height: 0;
    padding-block: 0.55rem;
  }

  .status-line {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 2;
    padding-left: 0;
    border-left: 0;
    color: rgba(169, 214, 222, 0.72);
    font-size: 0.62rem;
    white-space: normal;
  }

  .command-actions {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .site-nav {
    display: none;
  }

  .site-header[data-open] .site-nav {
    display: block;
  }

  .site-nav__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-height: 0;
    padding-block: 0.35rem 0.8rem;
  }

  .nav-index {
    flex-direction: column;
    gap: 0;
  }

  .nav-index a {
    justify-content: flex-start;
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--line-dark);
    border-left: 2px solid transparent;
    font-size: 0.95rem;
  }

  .nav-index a[aria-current="page"] {
    border-bottom-color: var(--line-dark);
    border-left-color: var(--milan-red);
    background: linear-gradient(90deg, rgba(200, 16, 46, 0.18), transparent 72%);
    padding-left: 0.55rem;
  }

  .nav-caption {
    display: none;
  }

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

  .footer-col:last-child {
    grid-column: 1 / -1;
  }

  .footer-contact {
    padding-top: 1.25rem;
    padding-left: 0;
    border-top: 1px solid var(--line-dark);
    border-left: 0;
  }
}

@media (max-width: 520px) {
  .brand__text strong {
    font-size: 0.94rem;
  }

  .brand__text small {
    font-size: 0.56rem;
  }

  .brand__mark {
    width: 38px;
    height: 38px;
  }

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

  .footer-col:last-child {
    grid-column: auto;
  }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
