:root {
  --paper: #f2efe7;
  --soft: #e8e2d7;
  --ink: #1a1a18;
  --muted: #6d685f;
  --line: #c8c1b4;
  --accent: #bd4a2d;
  --green: #476653;
  --amber: #95671f;
  --blue: #456778;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, "Noto Sans KR", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
a,
summary {
  font: inherit;
}

button,
summary,
a {
  -webkit-tap-highlight-color: transparent;
}

.page {
  width: min(920px, calc(100% - 36px));
  margin: 0 auto;
  padding-bottom: 52px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 66px;
  border-bottom: 1px solid var(--ink);
}

.site-header strong {
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: 18px;
  font-weight: 400;
}

.site-header time {
  color: var(--muted);
  font-size: 11px;
}

.info-notice {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.info-notice > strong {
  color: var(--accent);
  font-size: 11px;
}

.info-notice p {
  margin: 0;
}

.info-notice p + p {
  margin-top: 4px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 28px;
  border: 1px solid var(--ink);
}

.tabs button {
  min-height: 58px;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
  transition: color 160ms ease, background-color 160ms ease;
}

.tabs button + button {
  border-left: 1px solid var(--ink);
}

.tabs button.active {
  color: var(--paper);
  background: var(--ink);
}

.tabs button:focus-visible,
.row:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.badge {
  display: inline-block;
  margin-bottom: 15px;
  padding: 5px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: clamp(38px, 7vw, 68px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.045em;
  word-break: keep-all;
}

.decision-summary {
  display: grid;
  grid-template-columns: minmax(220px, 0.82fr) minmax(0, 1.8fr);
  column-gap: 34px;
  padding-top: 36px;
  border-bottom: 1px solid var(--ink);
  animation: enter 400ms 40ms ease both;
}

.summary-intro {
  grid-row: 1 / span 2;
  padding-bottom: 28px;
}

.summary-intro h1 {
  max-width: 340px;
  margin: 0;
  font-size: clamp(38px, 5.3vw, 54px);
  line-height: 1.04;
}

.decision-conditions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.35fr);
  align-items: stretch;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.decision-conditions div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 17px 18px;
}

.decision-conditions div:first-child {
  padding-left: 0;
}

.decision-conditions span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.decision-conditions strong {
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: clamp(19px, 2.4vw, 25px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.025em;
  word-break: keep-all;
}

.decision-conditions > b {
  display: grid;
  place-items: center;
  padding: 0 12px;
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 400;
}

.decision-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.decision-results p {
  margin: 0;
  padding: 16px 18px;
}

.decision-results p:first-child {
  padding-left: 0;
}

.decision-results p + p {
  border-left: 1px solid var(--line);
}

.decision-results span {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 700;
}

.decision-results .available span {
  color: var(--green);
}

.decision-results .wait span {
  color: var(--accent);
}

.decision-results strong {
  display: block;
  font-size: 15px;
  line-height: 1.4;
  word-break: keep-all;
}

.status-matrix {
  padding-top: 26px;
  border-bottom: 1px solid var(--ink);
  animation: enter 430ms 70ms ease both;
}

.status-matrix > h2 {
  margin: 0 0 14px;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: 25px;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.status-head,
.status-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.92fr) repeat(2, minmax(0, 1.35fr));
}

.status-head {
  color: var(--ink);
  background: var(--soft);
  border-top: 1px solid var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.status-head span {
  padding: 10px 18px 8px;
  border-bottom: 3px solid transparent;
}

.status-head span:first-child {
  padding-left: 12px;
  color: var(--muted);
}

.status-head span:nth-child(2) {
  border-bottom-color: var(--green);
}

.status-head span:last-child {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.cell-label {
  display: none;
}

.status-row {
  padding: 0;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.status-row h3 {
  margin: 0;
  padding: 15px 18px 15px 0;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.02em;
  word-break: keep-all;
}

.status-row p {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  margin: 0;
  padding: 15px 18px;
  border-left: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.45;
  word-break: keep-all;
}

.status-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.status-row .status-wide {
  grid-column: 2 / -1;
}

.main-summary {
  display: grid;
  grid-template-columns: minmax(220px, 0.82fr) minmax(0, 1.8fr);
  column-gap: 34px;
  padding-top: 36px;
  border-bottom: 1px solid var(--ink);
  animation: enter 400ms 40ms ease both;
}

.main-intro {
  grid-row: 1 / span 2;
  padding-bottom: 28px;
}

.main-intro h1 {
  max-width: 340px;
  margin: 0;
  font-size: clamp(34px, 4.2vw, 44px);
  line-height: 1.05;
}

.main-intro p {
  max-width: 300px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
  word-break: keep-all;
}

.main-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.main-actions article {
  min-width: 0;
  padding: 18px;
}

.main-actions article:first-child {
  padding-left: 0;
}

.main-actions article + article {
  border-left: 1px solid var(--line);
}

.main-actions span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.main-actions strong {
  display: block;
  font-size: 16px;
  line-height: 1.4;
}

.main-actions p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  word-break: keep-all;
}

.main-note {
  grid-column: 1 / -1;
  display: flex;
  gap: 18px;
  align-items: baseline;
  margin: 0;
  padding: 13px 0 14px;
  font-size: 11px;
}

.main-note b {
  color: var(--accent);
}

.main-note span {
  color: var(--muted);
}

.summary-note {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: 24px;
  align-items: center;
  padding: 14px 0 16px;
  border-bottom: 1px solid var(--ink);
  font-size: 10.5px;
  line-height: 1.5;
  animation: enter 450ms 80ms ease both;
}

.summary-note strong {
  color: var(--accent);
}

.summary-note span {
  color: var(--muted);
  text-align: right;
}

.guide-grid p span {
  display: block;
}

.guide-grid p span + span {
  margin-top: 4px;
}

.timeline {
  padding-top: 34px;
  animation: enter 480ms 90ms ease both;
}

.hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
}

.event:first-of-type {
  border-top: 1px solid var(--ink);
}

.event {
  border-bottom: 1px solid var(--line);
}

.row {
  display: grid;
  grid-template-columns: 74px 1fr auto 18px;
  gap: 18px;
  align-items: center;
  width: 100%;
  min-height: 74px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.row:hover {
  background: rgb(255 255 255 / 22%);
}

.when {
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 16px;
}

.what {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.type {
  padding: 4px 7px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.official {
  color: var(--green);
}

.relay {
  color: var(--amber);
}

.expected {
  color: var(--accent);
}

.bank {
  color: var(--blue);
}

.chevron {
  color: var(--muted);
  font-size: 16px;
  transition: transform 160ms ease;
}

.row[aria-expanded="true"] .chevron {
  transform: rotate(45deg);
}

.proof {
  margin: 0 0 18px 74px;
  padding: 18px 20px;
  border-left: 2px solid var(--accent);
  background: var(--soft);
}

.proof:not([hidden]) {
  animation: proof-reveal 180ms ease both;
}

.proof.bank-proof {
  border-left-color: var(--blue);
}

.proof-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 700;
}

.proof blockquote {
  margin: 0 0 12px;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
}

.proof p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.privacy {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.hana-group {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.hana-group details {
  border-bottom: 1px solid var(--line);
}

.hana-group summary {
  padding: 15px 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  list-style-position: inside;
}

.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 0 0 18px;
}

.guide-grid > div {
  padding: 14px;
  background: rgb(255 255 255 / 28%);
}

.guide-grid b {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
}

.guide-grid p {
  color: var(--muted);
  font-size: 11px;
}

.doc-image-link {
  display: block;
  padding: 0 0 18px;
}

.doc-image-link img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  cursor: zoom-in;
}

.external-link {
  display: inline-block;
  margin-top: 13px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  text-underline-offset: 3px;
}

footer {
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid var(--ink);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

[hidden] {
  display: none !important;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes proof-reveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 650px) {
  .page {
    width: min(100% - 28px, 920px);
  }

  .site-header {
    min-height: 58px;
  }

  .site-header strong {
    font-size: 16px;
  }

  .info-notice {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 14px 0;
    font-size: 10.5px;
  }

  .tabs {
    margin-top: 20px;
  }

  .guide-grid {
    grid-template-columns: 1fr;
  }
  .decision-summary {
    grid-template-columns: 1fr;
    padding-top: 30px;
  }

  .summary-intro {
    grid-row: auto;
    padding-bottom: 24px;
  }

  .summary-intro h1 {
    max-width: none;
    font-size: clamp(37px, 11vw, 48px);
  }

  .decision-conditions {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.2fr);
  }

  .decision-conditions div {
    padding: 15px 10px;
  }

  .decision-conditions div:first-child {
    padding-left: 0;
  }

  .decision-conditions > b {
    padding: 0 4px;
  }

  .decision-conditions strong {
    font-size: 17px;
  }

  .decision-results p {
    padding: 14px 10px;
  }

  .decision-results p:first-child {
    padding-left: 0;
  }

  .status-matrix {
    padding-top: 22px;
  }

  .status-head {
    display: none;
  }

  .status-row {
    grid-template-columns: 1fr 1fr;
    padding: 0;
  }

  .status-row h3 {
    grid-column: 1 / -1;
    padding: 13px 0 9px;
    border-bottom: 1px solid var(--soft);
  }

  .status-row p {
    min-height: 84px;
    padding: 13px 10px;
    border-left: 0;
  }

  .status-row p.available {
    background: rgb(71 102 83 / 4%);
    box-shadow: inset 0 3px 0 var(--green);
  }

  .status-row p.wait {
    background: rgb(189 74 45 / 4%);
    box-shadow: inset 0 3px 0 var(--accent);
  }

  .cell-label {
    display: block;
    width: max-content;
    max-width: 100%;
    margin-bottom: 8px;
    padding: 3px 7px;
    border: 1px solid currentColor;
    border-radius: 999px;
    color: var(--green);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.3;
  }

  .status-row .wait .cell-label {
    color: var(--accent);
  }

  .status-row .status-wide .cell-label {
    color: var(--muted);
  }

  .status-row p + p {
    border-left: 1px solid var(--line);
  }

  .summary-note {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 13px 0 15px;
  }

  .summary-note span {
    text-align: left;
  }

  .status-row .status-wide {
    grid-column: 1 / -1;
    min-height: auto;
    border-left: 0;
    background: transparent;
    box-shadow: none;
  }

  .main-summary {
    grid-template-columns: 1fr;
    padding-top: 30px;
  }

  .main-intro {
    grid-row: auto;
    padding-bottom: 22px;
  }

  .main-intro h1 {
    max-width: none;
    font-size: clamp(34px, 10vw, 44px);
  }

  .main-intro p {
    max-width: none;
  }

  .main-actions article {
    padding: 15px 10px;
  }

  .main-actions article:first-child {
    padding-left: 0;
  }

  .main-note {
    justify-content: space-between;
    gap: 12px;
  }

  .row {
    grid-template-columns: 58px 1fr 18px;
    gap: 10px;
    padding: 13px 0;
  }

  .type {
    grid-column: 2;
    justify-self: start;
    margin-top: -7px;
  }

  .chevron {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .proof {
    margin-left: 58px;
  }
}

@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;
  }
}
