/* Shared primitives (copy header/footer and site.* translations from /404.html):
   .container -> centered outer bounds, left-aligned content; .page -> page spacing
   .page--full-bleed -> edge-to-edge flex main; direct .screen-frame fills remaining height
   .body-text -> readable prose measure; .secondary-text -> secondary copy
   .notice -> ordinary legal-note text; .status -> plain text status
   .button -> solid text button; .button--quiet -> quiet secondary button
   .screen-frame -> real iframe/image border; .tool-list / .tool-list__row -> name/status/link list
   .tool-table -> equivalent three-column table; .visually-hidden -> accessible hidden text
   .skip-link -> keyboard bypass; :focus-visible -> shared focus ring
   Use h1/h2/h3 for hierarchy; keep data-i18n text targets on leaf elements.
   Font: Pretendard subset (SIL OFL 1.1), weights 400 and 600 only; other glyphs fall back to system sans.
   The adjacent, unchanged upstream license covers redistribution. Use 600 for headings/emphasis; no other weights.
*/

@font-face {
  font-family: "Pretendard";
  src: url("/assets/fonts/Pretendard-Regular.subset.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("/assets/fonts/Pretendard-SemiBold.subset.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: light;
  --color-bg: #ffffff;
  --color-ink: #171a1f;
  --color-secondary: #555e69;
  --color-hairline: #d9dde2;
  --color-accent: #17365d;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 20px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 80px;
  --text-small: 14px;
  --text-body: 17px;
  --text-h3: 22px;
  --text-h2: 30px;
  --text-h1: clamp(32px, 3.4vw, 46px);
  --content-max: 1280px;
  --gutter: 20px;
  --font-sans: "Pretendard", system-ui, -apple-system, "Segoe UI", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: auto; }
body {
  min-width: 0;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: 400;
  font-synthesis: none;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
main { flex: 1; min-width: 0; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 {
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  word-break: keep-all;
  text-wrap: balance;
}
h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
p, li { word-break: keep-all; }
strong, b { font-weight: 600; }
small { font-size: var(--text-small); }
img, iframe, svg { max-width: 100%; }
img { height: auto; }
button { font: inherit; cursor: pointer; }
a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
a:hover { text-decoration-thickness: 2px; }
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}
[id] { scroll-margin-block-start: var(--space-4); }

.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  text-align: left;
}
.page { padding-block: var(--space-6) var(--space-7); }
.page > * + * { margin-block-start: var(--space-4); }
.page > section + section { margin-block-start: var(--space-7); }
.page--full-bleed {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}
.page--full-bleed > .screen-frame {
  flex: 1 1 0;
  min-height: 0;
  margin: 0;
}
.page--not-found { padding-block-start: var(--space-7); }
.body-text { max-width: 68ch; }
.secondary-text, .notice, .status { color: var(--color-secondary); }
.secondary-text, .notice { font-size: var(--text-small); line-height: 1.7; }
.notice { max-width: 88ch; }
.status { font-size: var(--text-small); line-height: 1.5; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-accent);
  border-radius: 2px;
  background: var(--color-accent);
  color: var(--color-bg);
  font-size: var(--text-body);
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
}
.button:hover { text-decoration: underline; }
.button--quiet {
  border-color: var(--color-hairline);
  background: var(--color-bg);
  color: var(--color-accent);
}
.screen-frame {
  display: block;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--color-hairline);
  background: var(--color-bg);
}

.tool-list { margin: 0; padding: 0; list-style: none; }
.tool-list__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: var(--space-2) var(--space-4);
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--color-hairline);
}
.tool-list__row > :last-child { grid-column: 1 / -1; }
.tool-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.tool-table th, .tool-table td {
  padding: var(--space-4) var(--space-2);
  border-bottom: 1px solid var(--color-hairline);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  font-weight: 400;
}
.tool-table th { color: var(--color-secondary); font-size: var(--text-small); }
.tool-table th:first-child, .tool-table td:first-child { width: 46%; padding-left: 0; }
.tool-table th:last-child, .tool-table td:last-child { padding-right: 0; }

.site-header { border-bottom: 1px solid var(--color-hairline); }
.site-header__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  padding-block: var(--space-4) var(--space-2);
}
.brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-ink);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}
.brand-mark { flex: none; width: 23px; height: 27px; }
.brand-mark__outer { fill: var(--color-ink); }
.brand-mark__inner { fill: var(--color-accent); }
.site-nav {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-4);
  min-width: 0;
  font-size: 16px;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--color-ink);
  text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; }
.site-nav a[aria-current="page"] { text-decoration-thickness: 2px; }
.language-switch { display: flex; gap: var(--space-1); grid-column: 2; grid-row: 1; }
.language-switch .button { padding-inline: var(--space-2); font-size: var(--text-small); }
.language-switch [aria-pressed="true"] { border-color: var(--color-accent); text-decoration: underline; }
.site-footer {
  margin-block-start: auto;
  padding-block: var(--space-5);
  border-top: 1px solid var(--color-hairline);
  color: var(--color-secondary);
  font-size: var(--text-small);
}
.site-footer a { color: inherit; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  z-index: 100;
  top: var(--space-2);
  left: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg);
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

@media (min-width: 768px) {
  :root { --gutter: 40px; }
  .page:not(.page--full-bleed) { padding-block-start: var(--space-7); }
  .tool-list__row { grid-template-columns: minmax(0, 1fr) minmax(100px, 0.25fr) minmax(140px, 0.35fr); }
  .tool-list__row > :last-child { grid-column: auto; }
}
@media (min-width: 1100px) {
  :root { --gutter: 48px; }
  .site-header__inner { grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--space-5); padding-block: var(--space-4); }
  .site-nav { grid-column: 2; grid-row: 1; gap: var(--space-5); }
  .language-switch { grid-column: 3; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
