/* 불사전쟁: readable policy documents, using locally hosted OFL fonts. */
@font-face {
  font-family: "YeonSung";
  src: url("./fonts/YeonSung-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "NanumGothic";
  src: url("./fonts/NanumGothic-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "NanumGothic";
  src: url("./fonts/NanumGothic-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --wood: #36241b;
  --gold: #a67b35;
  --paper: #fff8e9;
  --ink: #292922;
  --muted: #655546;
  --link: #704814;
  --line: #d4bd94;
  --wash: #f3e8d2;
  --content-width: 850px;
  font-family: "NanumGothic", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 100%;
}

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

html {
  scroll-padding-top: 24px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0 16px 40px;
  background: var(--wood);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.9;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

body > header,
body > nav,
body > footer,
main {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  min-width: 0;
}

body > header {
  padding: 28px 8px 20px;
  border-bottom: 2px solid var(--gold);
  color: var(--paper);
}

body > header :is(h1, h2, p) {
  color: inherit;
}

body > header :is(h1, h2) {
  margin: 0;
  padding: 0;
  border: 0;
}

body > header p {
  margin: 4px 0 0;
  font-size: 0.9375rem;
}

body > header .brand {
  font-family: "YeonSung", serif;
  font-size: 2rem;
  line-height: 1.35;
  text-decoration: none;
}

main {
  margin-top: 20px;
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid var(--gold);
  border-top: 4px solid var(--gold);
  background: var(--paper);
  box-shadow: 0 4px 0 #201811;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family: "YeonSung", "Apple SD Gothic Neo", serif;
  font-weight: 400;
  line-height: 1.45;
  text-wrap: pretty;
}

h1 {
  margin: 0 0 20px;
  font-size: clamp(2rem, 5vw, 2.5rem);
}

h2 {
  margin: 2.1em 0 0.75em;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 1.75rem;
}

h3 {
  margin: 1.6em 0 0.5em;
  font-size: 1.375rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1.1em;
}

ul,
ol {
  padding-inline-start: 1.5em;
}

li + li {
  margin-top: 0.5em;
}

li > :is(ul, ol) {
  margin-block: 0.5em;
}

strong,
b,
th,
dt {
  font-weight: 700;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  overflow-wrap: anywhere;
}

a:visited {
  color: #654357;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid #812f23;
  outline-offset: 4px;
}

body > header a,
body > header a:visited,
body > nav a,
body > nav a:visited,
body > footer a,
body > footer a:visited {
  color: var(--paper);
}

body > header :focus-visible,
body > nav :focus-visible,
body > footer :focus-visible {
  outline-color: #f5d48a;
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  margin-block: 16px 24px;
  padding-block: 8px;
  border-block: 1px solid var(--line);
  font-size: 0.9375rem;
  line-height: 1.6;
}

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  padding: 6px 2px;
}

nav a[aria-current="page"] {
  font-weight: 700;
  text-decoration-thickness: 3px;
}

body > header nav {
  margin: 14px 0 0;
  border-color: var(--gold);
  border-bottom: 0;
}

body > nav {
  margin-top: 8px;
  margin-bottom: 0;
  padding-inline: 8px;
  border: 0;
}

.hero {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--gold);
}

.hero h1 {
  margin-bottom: 12px;
}

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

.meta,
.updated,
small {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.8;
}

aside,
.notice {
  margin-block: 24px;
  padding: 16px 20px;
  border-left: 4px solid var(--gold);
  background: var(--wash);
  color: var(--ink);
}

aside > :last-child,
.notice > :last-child {
  margin-bottom: 0;
}

.policy-links {
  display: grid;
  gap: 0;
  margin-block: 24px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.policy-links > li,
.policy-links > a {
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.policy-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  font-size: 1.0625rem;
  font-weight: 700;
}

.policy-links p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.9375rem;
}

table {
  width: 100%;
  margin-block: 24px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.9375rem;
  line-height: 1.8;
}

caption {
  margin-bottom: 8px;
  color: var(--muted);
  text-align: left;
  font-weight: 700;
}

th,
td {
  padding: 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  word-break: normal;
  overflow-wrap: anywhere;
}

th {
  background: var(--wash);
}

td > :last-child {
  margin-bottom: 0;
}

.table-scroll {
  max-width: 100%;
  margin-block: 24px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: var(--muted) var(--wash);
}

.table-scroll table {
  margin: 0;
}

.table-scroll .wide-table {
  min-width: 600px;
}

dl {
  padding-block: 8px;
}

dt {
  margin-top: 1em;
}

dd {
  margin: 0.15em 0 0.8em;
  min-width: 0;
}

code,
pre {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font-size: 0.9em;
}

pre {
  max-width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--wash);
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

hr {
  height: 1px;
  margin-block: 32px;
  border: 0;
  background: var(--line);
}

footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.8;
}

body > footer {
  padding-inline: 8px;
  border-color: var(--gold);
  color: var(--paper);
}

footer a {
  display: inline-block;
  min-height: 44px;
  padding-block: 8px;
}

.skip-link {
  position: absolute;
  z-index: 10;
  inset: 8px auto auto 8px;
  max-width: calc(100% - 16px);
  padding: 10px 16px;
  transform: translateY(calc(-100% - 16px));
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
}

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

::selection {
  background: #e7c887;
  color: var(--ink);
}

@media (max-width: 480px) {
  body {
    padding-inline: 10px;
  }

  main {
    margin-top: 12px;
    padding: 24px 18px 32px;
  }

  h2 {
    font-size: 1.625rem;
  }

  nav {
    column-gap: 14px;
  }

  aside,
  .notice {
    padding: 14px;
  }

  table {
    font-size: 0.875rem;
  }

  th,
  td {
    padding: 10px 7px;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (forced-colors: active) {
  :focus-visible {
    outline: 3px solid Highlight !important;
  }

  a[aria-current="page"] {
    outline: 1px solid currentColor;
  }
}

@media print {
  :root,
  body,
  main {
    background: white;
    color: black;
  }

  body,
  main {
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  nav,
  .skip-link {
    display: none;
  }

  body > header,
  body > footer {
    color: black;
  }

  h1,
  h2,
  h3 {
    break-after: avoid;
  }

  aside,
  tr {
    break-inside: avoid;
  }

  a,
  a:visited,
  body > header a,
  body > footer a {
    color: black;
  }

  .table-scroll {
    overflow: visible;
  }

  .table-scroll .wide-table {
    min-width: 0;
  }
}

.policy-links > a { display:block; padding:18px 0; text-decoration:none; }
.policy-links > a span { display:block; margin-top:4px; font-weight:400; font-size:0.9rem; color:var(--muted, #675744); }


/* Approved launch artwork: intrinsic ratio preserves all lettering on phones. */
body > header .brand-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
}
.brand-icon {
  display: block;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 10px;
}
.brand-hero {
  margin: 0 0 24px;
  overflow: hidden;
  border: 1px solid var(--gold);
  background: var(--wood);
}
.brand-hero img {
  display: block;
  width: 100%;
  height: auto;
}
@media print {
  .brand-hero { display: none; }
}
