:root {
  --red: #ef3f24;
  --red-dark: #c92813;
  --black: #111111;
  --ink: #282828;
  --muted: #6b6b6b;
  --line: #d8d8d8;
  --paper: #fffdfa;
  --white: #ffffff;
  --red-light: #f7deda;
  --blue: #00afec;
  --blue-light: #e6f3fd;
  --green: #3fa862;
  --green-light: #c8f1e3;
  --aloe: #00afaa;
  --yellow: #ffba00;
  --yellow-light: #fff5cc;
  --shadow: 0 18px 44px rgba(17, 17, 17, 0.12);
  --radius-sm: 14px;
  --radius: 22px;
  --radius-lg: 32px;
  --max: 1180px;
  --reading: 760px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.78;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  z-index: -2;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(rgba(17, 17, 17, 0.027) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 17, 17, 0.027) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 8px 14px;
  color: var(--white);
  background: var(--black);
  border-radius: 999px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  border-bottom: 1px solid rgba(17, 17, 17, 0.12);
  background: rgba(255, 253, 250, 0.92);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 40px), var(--max));
  min-height: 66px;
  margin: 0 auto;
}

.site-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.mark-shape {
  width: 34px;
  height: 24px;
  background: var(--red);
  clip-path: polygon(0 0, 78% 0, 100% 100%, 22% 100%);
}

.header-note {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--red);
}

.wrap {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  color: var(--red-dark);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 26px;
  height: 4px;
  content: "";
  background: var(--yellow);
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--muted);
  font-size: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 2px 11px;
  border: 1px solid var(--black);
  border-radius: 999px;
  color: var(--black);
  background: var(--white);
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
}

.directory-hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 72px;
}

.directory-hero::after {
  position: absolute;
  z-index: -1;
  top: 68px;
  right: -60px;
  width: 280px;
  height: 190px;
  content: "";
  background: var(--red-light);
  clip-path: polygon(18% 0, 100% 0, 82% 100%, 0 100%);
}

.directory-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 70px;
  align-items: center;
}

.directory-title {
  max-width: 720px;
  margin: 0;
  color: var(--black);
  font-size: clamp(58px, 8vw, 116px);
  font-weight: 900;
  letter-spacing: -0.065em;
  line-height: 0.92;
}

.directory-title span {
  position: relative;
  display: inline-block;
  z-index: 0;
}

.directory-title span::after {
  position: absolute;
  z-index: -1;
  right: -4px;
  bottom: 7px;
  left: -4px;
  height: 18px;
  content: "";
  background: var(--yellow);
  transform: rotate(-1deg);
}

.directory-intro {
  max-width: 620px;
  margin: 30px 0 0;
  color: #3d3d3d;
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.65;
}

.desk-card {
  position: relative;
  min-height: 400px;
  padding: 34px;
  color: var(--white);
  background: var(--black);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.desk-card::before,
.desk-card::after {
  position: absolute;
  content: "";
}

.desk-card::before {
  top: -19px;
  right: 34px;
  width: 62px;
  height: 38px;
  background: var(--blue);
  clip-path: polygon(0 0, 82% 0, 100% 100%, 18% 100%);
}

.desk-card::after {
  right: -16px;
  bottom: 42px;
  width: 36px;
  height: 36px;
  background: var(--green);
  transform: rotate(12deg);
}

.desk-kicker {
  color: var(--yellow);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.desk-card h2 {
  margin: 82px 0 18px;
  font-size: clamp(32px, 4vw, 50px);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.desk-card p {
  margin: 0;
  color: #d1d1d1;
}

.desk-number {
  position: absolute;
  right: 30px;
  bottom: 22px;
  color: transparent;
  font-size: 86px;
  font-weight: 900;
  line-height: 1;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.36);
}

.directory-section {
  padding: 48px 0 112px;
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--black);
}

.section-heading-row h2 {
  margin: 0;
  color: var(--black);
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.04em;
  line-height: 1.12;
}

.article-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.essay-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 54px;
  gap: 26px;
  align-items: center;
  padding: 36px 14px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background 180ms ease, padding 180ms ease;
}

.essay-card:hover,
.essay-card:focus-visible {
  padding-right: 26px;
  padding-left: 26px;
  outline: none;
  background: var(--yellow-light);
}

.essay-index {
  color: var(--red);
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.essay-main h3 {
  margin: 8px 0 12px;
  color: var(--black);
  font-size: clamp(25px, 3vw, 38px);
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.essay-main p {
  max-width: 760px;
  margin: 0;
  color: #555;
  font-size: 16px;
}

.essay-arrow {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 2px solid var(--black);
  border-radius: 50%;
  font-size: 23px;
  line-height: 1;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.essay-card:hover .essay-arrow,
.essay-card:focus-visible .essay-arrow {
  color: var(--white);
  background: var(--black);
  transform: translateX(4px);
}

.article-hero {
  position: relative;
  overflow: hidden;
  padding: 78px 0 70px;
  border-bottom: 1px solid var(--line);
}

.article-hero::before {
  position: absolute;
  z-index: -1;
  top: 72px;
  left: max(calc(50% + 270px), 76%);
  width: 310px;
  height: 260px;
  content: "";
  background: var(--red);
  clip-path: polygon(0 0, 74% 0, 100% 100%, 26% 100%);
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 34px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.breadcrumb:hover,
.breadcrumb:focus-visible {
  color: var(--red-dark);
}

.article-hero h1 {
  max-width: 900px;
  margin: 0;
  color: var(--black);
  font-size: clamp(45px, 7vw, 88px);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1.02;
}

.article-hero h1 .highlight {
  position: relative;
  z-index: 0;
  display: inline-block;
}

.article-hero h1 .highlight::after {
  position: absolute;
  z-index: -1;
  right: -4px;
  bottom: 5px;
  left: -4px;
  height: 15px;
  content: "";
  background: var(--yellow);
}

.article-deck {
  max-width: 720px;
  margin: 28px 0 28px;
  color: #4b4b4b;
  font-size: clamp(18px, 2.2vw, 23px);
}

.article-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, var(--reading));
  gap: 70px;
  justify-content: center;
  padding-top: 74px;
  padding-bottom: 120px;
}

.article-toc {
  position: sticky;
  top: 94px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow: auto;
}

.article-toc strong {
  display: block;
  margin-bottom: 14px;
  color: var(--black);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.article-toc a {
  display: block;
  padding: 6px 0 6px 13px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease;
}

.article-toc a:hover,
.article-toc a:focus-visible,
.article-toc a.is-active {
  border-left-color: var(--red);
  color: var(--black);
}

.prose {
  min-width: 0;
}

.lead {
  margin-top: 0;
  color: var(--black);
  font-size: 22px;
  font-weight: 650;
  line-height: 1.68;
}

.prose p {
  margin: 0 0 24px;
}

.prose h2 {
  scroll-margin-top: 98px;
  margin: 86px 0 26px;
  color: var(--black);
  font-size: clamp(31px, 4vw, 47px);
  letter-spacing: -0.045em;
  line-height: 1.16;
}

.prose h2::before {
  display: block;
  width: 54px;
  height: 9px;
  margin-bottom: 18px;
  content: "";
  background: var(--red);
  clip-path: polygon(0 0, 82% 0, 100% 100%, 18% 100%);
}

.prose h3 {
  scroll-margin-top: 98px;
  margin: 56px 0 20px;
  color: var(--black);
  font-size: 27px;
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.prose strong {
  color: var(--black);
}

.prose a {
  color: #087cab;
}

.prose a:hover,
.prose a:focus-visible {
  color: var(--red-dark);
}

.pull-quote {
  position: relative;
  margin: 38px 0;
  padding: 31px 34px 31px 38px;
  color: var(--black);
  background: var(--yellow-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 22px;
  font-weight: 750;
  line-height: 1.55;
}

.pull-quote::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 9px;
  content: "";
  background: var(--yellow);
}

.flow-card {
  margin: 32px 0;
  padding: 26px;
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 var(--black);
}

.flow-title {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.flow span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 12px;
  border: 1px solid var(--black);
  border-radius: 999px;
  color: var(--black);
  background: var(--white);
  font-size: 13px;
  font-weight: 740;
  line-height: 1.25;
}

.flow i {
  color: var(--red);
  font-size: 18px;
  font-style: normal;
  font-weight: 900;
}

.flow-card.decision {
  background: var(--red-light);
  box-shadow: 8px 8px 0 var(--red);
}

.comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.comparison-card {
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.comparison-card.data {
  border-top: 9px solid var(--blue);
}

.comparison-card.decision {
  border-top: 9px solid var(--red);
}

.comparison-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.comparison-card p {
  margin: 0;
  color: #555;
  font-size: 15px;
}

.decision-question {
  margin: 34px 0;
  padding: 28px 30px;
  color: var(--white);
  background: var(--black);
  border-radius: var(--radius);
  font-size: 20px;
  font-weight: 720;
}

.decision-question small {
  display: block;
  margin-bottom: 9px;
  color: var(--yellow);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contract-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 32px 0;
}

.contract-item {
  min-height: 156px;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
}

.contract-item:nth-child(4n + 1) {
  background: var(--red-light);
}

.contract-item:nth-child(4n + 2) {
  background: var(--blue-light);
}

.contract-item:nth-child(4n + 3) {
  background: var(--yellow-light);
}

.contract-item:nth-child(4n + 4) {
  background: var(--green-light);
}

.contract-no {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.contract-item h3 {
  margin: 20px 0 6px;
  font-size: 21px;
}

.contract-item p {
  margin: 0;
  color: #555;
  font-size: 14px;
  line-height: 1.55;
}

.case-nav {
  display: flex;
  gap: 8px;
  margin: 32px 0 18px;
  padding: 5px;
  background: #ecebe7;
  border-radius: 999px;
}

.case-tab {
  flex: 1;
  padding: 12px 14px;
  border: 0;
  border-radius: 999px;
  color: #4d4d4d;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.case-tab[aria-selected="true"] {
  color: var(--white);
  background: var(--black);
}

.case-panel[hidden] {
  display: none;
}

.case-panel {
  padding: 28px;
  border: 2px solid var(--black);
  border-radius: var(--radius);
  background: var(--white);
}

.case-situation {
  margin-bottom: 24px;
  padding: 19px 21px;
  border-radius: var(--radius-sm);
  background: var(--yellow-light);
  font-size: 15px;
}

.case-panel h3 {
  margin-top: 0;
}

.table-wrap {
  overflow-x: auto;
  margin: 26px 0;
  border: 1px solid var(--black);
  border-radius: var(--radius-sm);
  background: var(--white);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.55;
}

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

th {
  color: var(--white);
  background: var(--black);
  font-size: 12px;
  letter-spacing: 0.04em;
}

td:first-child {
  width: 130px;
  color: var(--black);
  font-weight: 800;
}

tr:last-child td {
  border-bottom: 0;
}

.authority {
  margin: 34px 0;
  padding: 28px;
  color: var(--white);
  background: var(--black);
  border-radius: var(--radius);
}

.authority h3 {
  margin-top: 0;
  color: var(--white);
}

.authority-step {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.authority-step:last-child {
  border-bottom: 0;
}

.authority-step b {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--black);
  background: var(--yellow);
  border-radius: 50%;
  font-size: 13px;
}

.authority-step strong {
  display: block;
  color: var(--white);
}

.authority-step span {
  color: #c9c9c9;
  font-size: 14px;
}

.checklist {
  margin: 30px 0;
  padding: 0;
  list-style: none;
  counter-reset: decisions;
}

.checklist li {
  position: relative;
  margin-bottom: 10px;
  padding: 18px 18px 18px 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  counter-increment: decisions;
}

.checklist li::before {
  position: absolute;
  top: 16px;
  left: 16px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  content: counter(decisions, decimal-leading-zero);
  color: var(--white);
  background: var(--red);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 900;
}

.closing {
  position: relative;
  overflow: hidden;
  margin: 72px 0 0;
  padding: 42px;
  color: var(--white);
  background: var(--red);
  border-radius: var(--radius-lg);
}

.closing::after {
  position: absolute;
  right: -40px;
  bottom: -36px;
  width: 180px;
  height: 130px;
  content: "";
  border: 24px solid var(--yellow);
  transform: rotate(-13deg);
}

.closing p {
  position: relative;
  z-index: 1;
  max-width: 590px;
  margin: 0 0 16px;
  color: var(--white);
  font-size: 24px;
  font-weight: 790;
  line-height: 1.5;
}

.closing p:last-child {
  margin-bottom: 0;
}

.sources {
  margin-top: 60px;
  padding-top: 28px;
  border-top: 2px solid var(--black);
}

.sources h2 {
  margin-top: 0;
  font-size: 26px;
}

.sources h2::before {
  display: none;
}

.sources ol {
  padding-left: 23px;
  color: var(--muted);
  font-size: 14px;
}

.sources li {
  margin-bottom: 8px;
}

.site-footer {
  color: #d2d2d2;
  background: var(--black);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(calc(100% - 40px), var(--max));
  min-height: 110px;
  margin: 0 auto;
  font-size: 13px;
}

.footer-inner a {
  color: var(--white);
}

@media (max-width: 900px) {
  .directory-grid {
    grid-template-columns: 1fr;
  }

  .desk-card {
    min-height: 330px;
  }

  .article-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .article-toc {
    position: static;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    margin-bottom: 46px;
    padding-bottom: 10px;
  }

  .article-toc strong {
    display: none;
  }

  .article-toc a {
    flex: 0 0 auto;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--white);
  }

  .article-toc a:hover,
  .article-toc a:focus-visible,
  .article-toc a.is-active {
    border-color: var(--red);
  }
}

@media (max-width: 680px) {
  body {
    font-size: 16px;
  }

  .header-inner,
  .wrap,
  .footer-inner {
    width: min(calc(100% - 28px), var(--max));
  }

  .header-note {
    display: none;
  }

  .directory-hero {
    padding: 72px 0 52px;
  }

  .directory-grid {
    gap: 46px;
  }

  .directory-title {
    font-size: clamp(54px, 20vw, 84px);
  }

  .desk-card {
    min-height: 300px;
    padding: 26px;
    border-radius: var(--radius);
  }

  .desk-card h2 {
    margin-top: 58px;
    font-size: 34px;
  }

  .essay-card {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 14px;
    padding: 28px 0;
  }

  .essay-index {
    align-self: start;
    font-size: 28px;
  }

  .essay-arrow {
    display: none;
  }

  .article-hero {
    padding: 50px 0;
  }

  .article-hero h1 {
    font-size: 50px;
  }

  .article-layout {
    padding-top: 42px;
    padding-bottom: 80px;
  }

  .comparison,
  .contract-grid {
    grid-template-columns: 1fr;
  }

  .flow-card {
    box-shadow: 5px 5px 0 var(--black);
  }

  .case-panel {
    padding: 20px;
  }

  .case-tab {
    padding: 11px 8px;
    font-size: 13px;
  }

  td:first-child {
    width: 104px;
  }

  th,
  td {
    padding: 12px;
  }

  .closing {
    padding: 30px 25px;
  }

  .closing p {
    font-size: 21px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 26px 0;
  }
}

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

@media print {
  .site-header,
  .article-toc,
  .site-footer,
  .case-nav {
    display: none !important;
  }

  body {
    background: #fff;
  }

  body::before {
    display: none;
  }

  .wrap,
  .article-layout {
    width: 100%;
    max-width: none;
  }

  .article-layout {
    display: block;
    padding: 0;
  }

  .case-panel[hidden] {
    display: block;
  }
}
