/* Goutin renewal — shared styles */
:root {
  --ink: #1f2a33;
  --ink-2: #4a5763;
  --ink-3: #7a8691;
  --line: #e3e9ee;
  --line-2: #eef2f5;
  --bg: #f6f9fb;
  --paper: #ffffff;
  --brand: #1d8fae;
  --brand-ink: #0f6a83;
  --brand-soft: #e4f4f8;
  --sun: #e8452c;
  --leaf: #4a9b3c;
  --accent: var(--brand);
  --accent-soft: var(--brand-soft);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 40, 60, .05), 0 8px 24px rgba(20, 40, 60, .06);
  --wrap: 1200px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", sans-serif;
}
.accent-teal { --accent: #1d8fae; --accent-soft: #e4f4f8; --accent-ink: #0f6a83; }
.accent-blue { --accent: #3b7fd6; --accent-soft: #e8f0fc; --accent-ink: #2a5fa8; }
.accent-violet { --accent: #6f6bc8; --accent-soft: #efeefb; --accent-ink: #4f4aa3; }
.accent-amber { --accent: #c48a1e; --accent-soft: #fbf3e2; --accent-ink: #8a5f10; }
.accent-rose { --accent: #d4566b; --accent-soft: #fcebee; --accent-ink: #a33a4d; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; vertical-align: middle; }
a { color: inherit; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  box-shadow: 0 2px 12px rgba(20, 40, 60, .06);
}
.header-inner { display: flex; align-items: stretch; gap: 24px; height: 96px; }
.brand { display: block; flex: none; height: 100%; padding: 8px 0; }
.brand img { height: 100%; width: auto; display: block; }
.header-right { flex: 1; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; padding: 10px 0 0; min-width: 0; }
.util { display: flex; gap: 4px; font-size: 12px; letter-spacing: .02em; }
.util a { text-decoration: none; color: var(--ink-2); padding: 2px 8px; border-radius: 999px; }
.util a:hover { background: var(--line-2); color: var(--brand-ink); }
.gnb ul { list-style: none; display: flex; margin: 0; padding: 0; }
.gnb a {
  display: block; position: relative;
  padding: 14px 18px 16px; font-size: 16px; font-weight: 600;
  text-decoration: none; color: var(--ink); white-space: nowrap;
}
.gnb a::after {
  content: ""; position: absolute; left: 18px; right: 18px; bottom: 0; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--brand); transform: scaleX(0); transition: transform .2s;
}
.gnb a:hover, .gnb a[aria-current] { color: var(--brand-ink); }
.gnb a:hover::after, .gnb a[aria-current]::after { transform: scaleX(1); }
.nav-toggle { display: none; }
.gnb .util-m { display: none; }

/* ---------- home ---------- */
.hero {
  background: linear-gradient(180deg, #bfe8f0 0%, #d9f1f2 60%, var(--bg) 100%);
  padding: 28px 0 0;
}
.hero-inner { display: flex; align-items: flex-end; justify-content: center; gap: 0; }
.hero-inner img { display: block; border-radius: 18px; box-shadow: var(--shadow); }
.hero-side { width: 32%; max-width: 383px; border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.hero-main { width: 68%; max-width: 801px; border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }
.hero-banner { width: 100%; }
.quick { padding-top: 32px; padding-bottom: 56px; }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(6, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  display: flex; flex-direction: column; gap: 10px; min-height: 132px;
  padding: 20px 20px 18px; border-radius: var(--radius);
  background: var(--paper); box-shadow: var(--shadow); text-decoration: none;
  border-top: 4px solid var(--accent); transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(20, 40, 60, .06), 0 14px 32px rgba(20, 40, 60, .1); }
.card-no { font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .08em; }
.card-label { font-size: 18px; font-weight: 700; line-height: 1.35; color: var(--ink); flex: 1; }
.card-go { align-self: flex-end; color: var(--accent); font-weight: 700; }

/* ---------- 404 ---------- */
.nf-hero {
  background: linear-gradient(180deg, #bfe8f0 0%, #d9f1f2 60%, var(--bg) 100%);
  padding: 56px 0 16px;
}
.nf-inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: center; }
.nf-code {
  margin: 0; font-size: clamp(80px, 11vw, 136px); font-weight: 800; line-height: 1; letter-spacing: -.05em;
  background: linear-gradient(120deg, var(--brand) 20%, var(--leaf));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nf-text h1 { margin: 18px 0 0; font-size: 30px; line-height: 1.3; letter-spacing: -.02em; }
.nf-en { margin: 2px 0 0; font-size: 15px; font-weight: 600; letter-spacing: .02em; color: var(--brand-ink); }
.nf-desc { margin: 18px 0 0; color: var(--ink-2); }
.nf-desc[lang=en] { margin-top: 4px; font-size: 14px; color: var(--ink-3); }
.nf-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.nf-btn {
  display: inline-flex; align-items: center; padding: 11px 24px; border-radius: 999px;
  font-weight: 700; text-decoration: none; color: #fff; background: var(--brand);
  box-shadow: 0 6px 16px rgba(29, 143, 174, .28); transition: transform .15s, filter .15s;
}
.nf-btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.nf-btn.ghost { color: var(--brand-ink); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.nf-art { display: block; width: 100%; border-radius: 22px; box-shadow: 0 2px 4px rgba(20, 40, 60, .06), 0 18px 40px rgba(20, 40, 60, .12); }
.quick-title { margin: 0 0 14px; font-size: 16px; font-weight: 700; color: var(--ink-2); }
.nf .quick { padding-top: 48px; }

/* ---------- sub page ---------- */
.sub-hero {
  background: linear-gradient(120deg, var(--accent-soft), #fff 80%);
  border-bottom: 1px solid var(--line);
  padding: 30px 0 26px;
}
.crumbs { margin: 0 0 4px; font-size: 13px; color: var(--ink-3); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--accent-ink); }
.crumbs span { margin: 0 8px; opacity: .6; }
.sub-hero h1 { margin: 0; font-size: 32px; line-height: 1.3; letter-spacing: -.02em; color: var(--accent-ink); }

.layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; padding-top: 32px; padding-bottom: 64px; }
.layout.single { grid-template-columns: minmax(0, 1fr); }
.side { position: sticky; top: 120px; align-self: start; }
.side-badge { display: block; width: 100%; border-radius: 12px; margin-bottom: 12px; }
.side-nav { list-style: none; margin: 0; padding: 8px; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); }
.side-nav a {
  display: block; padding: 10px 14px; border-radius: 10px;
  font-size: 15px; font-weight: 500; text-decoration: none; color: var(--ink-2); line-height: 1.4;
}
.side-nav a:hover { background: var(--line-2); color: var(--ink); }
.side-nav a[aria-current] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }

.tabs { margin-bottom: 20px; }
.tabs ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tabs a {
  display: inline-block; padding: 7px 14px; border-radius: 999px;
  font-size: 14px; line-height: 1.4; font-weight: 500; text-decoration: none;
  background: var(--paper); color: var(--ink-2); border: 1px solid var(--line);
}
.tabs a:hover { border-color: var(--accent); color: var(--accent-ink); }
.tabs a[aria-current] { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }

.content {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 32px 36px; font-size: 16px; color: var(--ink);
}

/* legacy body content, normalized */
.content table { width: 100%; border-collapse: collapse; border-spacing: 0; }
.content td, .content th { vertical-align: top; padding: 6px 8px; }
.content td:empty { padding: 0; }
.content td.rule { height: 0; padding: 0; border-top: 1px dashed #d5dde3; }
.content .block > br:first-child { display: none; }
.content img { border-radius: 8px; }
.content td > img:only-child { display: block; margin: 4px 0; }
.content .dot {
  display: inline-block; width: 7px; height: 7px; margin: 0 9px 2px 2px; border-radius: 50%;
  background: var(--accent); vertical-align: middle; flex: none;
}
.content p { margin: .6em 0; }
.content a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.content a:has(.btn) { text-decoration: none; }
.content .a-center { text-align: center; }
.content .a-right { text-align: right; }
.content .cell-tint { background: #f7f8f4; }
.content .cell-head { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; text-align: center; }
.content table.grid { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 8px 0; }
.content table.grid td { border: 1px solid var(--line); padding: 10px 12px; }
.content table.checklist td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.content input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); vertical-align: middle; }
.content textarea { width: 100%; font: inherit; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; margin: 4px 0 4px 6px; border-radius: 999px;
  font-size: 14px; font-weight: 600; line-height: 1.4;
  color: var(--accent-ink); background: var(--accent-soft); border: 1px solid transparent;
}
.btn:hover { background: var(--accent); color: #fff; }
.btn-prev::before { content: "‹"; }
.btn-next::after { content: "›"; }
.btn-result { padding: 12px 32px; font-size: 17px; color: #fff; background: var(--accent); margin: 12px auto; }
.btn-result:hover { filter: brightness(1.08); }
a:has(.btn-result) { display: flex; justify-content: center; }

/* legacy text classes (colors kept, sizes modernized) */
.t-hidden { visibility: hidden; }
.t-defaults { font-weight: 700; color: var(--ink); }
.t-default, .t-black, .t-english, .t-englishb, .t-english2, .t-footer { color: inherit; }
.t-english2b { font-weight: 700; }
.t-gray { color: #8c969e; }
.t-red { color: #950035; }
.t-bold { font-weight: 700; }
.t-green { color: #1f5a4f; }
.t-blue { color: #2b8bbd; }
.t-recruit { color: #976414; }
.t-company { color: #12924a; font-weight: 700; }
.t-business { color: #004c65; }
.t-service { color: #003366; }
.t-consult { color: #8a7614; }
.t-news { color: #61467c; }
.t-data { color: #ab478d; font-weight: 700; }
.t-white { color: #fff; }

/* ---------- footer ---------- */
.site-footer { background: #26323b; color: #b9c4cc; font-size: 13px; line-height: 1.7; }
.footer-inner { padding: 28px 24px 32px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; align-items: center; }
.grant { margin: 0; display: flex; gap: 12px; align-items: flex-start; }
.grant img { flex: none; margin-top: 2px; }
.copy { margin: 0; color: #8d9aa4; }
.copy a { color: #cfd8de; text-decoration: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .gnb a { padding: 14px 12px 16px; font-size: 15px; }
  .gnb a::after { left: 12px; right: 12px; }
}
@media (max-width: 860px) {
  .header-inner { height: 68px; gap: 12px; }
  .header-right { flex-direction: row; justify-content: flex-end; align-items: center; padding: 0; gap: 8px; }
  .util { display: none; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 0 11px; border: 0; border-radius: 10px;
    background: var(--line-2); cursor: pointer;
  }
  .nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .gnb {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); box-shadow: 0 12px 24px rgba(20, 40, 60, .12);
    display: none; padding: 8px 16px 16px;
  }
  .nav-open .gnb { display: block; }
  .gnb ul { flex-direction: column; }
  .gnb a { padding: 14px 8px; border-bottom: 1px solid var(--line-2); }
  .gnb a::after { display: none; }
  .gnb .util-m { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 8px 0; }
  .gnb .util-m a { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 500; }

  .hero { padding-top: 16px; }
  .hero-side { display: none !important; }
  .hero-main { width: 100%; border-radius: 14px !important; }
  .cards, .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .card { min-height: 108px; }

  .sub-hero { padding: 20px 0 18px; }
  .sub-hero h1 { font-size: 24px; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 16px; }
  .side { position: static; }
  .side-badge { display: none; }
  .side-nav { display: flex; gap: 6px; overflow-x: auto; padding: 6px; scrollbar-width: none; }
  .side-nav a { white-space: nowrap; padding: 8px 12px; font-size: 14px; }
  .content { padding: 20px 16px; font-size: 15px; }
  /* layout tables collapse into a single column on small screens */
  .content table:not(.grid):not(.checklist),
  .content table:not(.grid):not(.checklist) > tbody,
  .content table:not(.grid):not(.checklist) > tbody > tr,
  .content table:not(.grid):not(.checklist) > tbody > tr > td { display: block; width: 100%; }
  .content table:not(.grid):not(.checklist) > tbody > tr > td:empty,
  .content table:not(.grid):not(.checklist) > tbody > tr > td:has(> br:only-child) { display: none; }
  .content table:not(.grid):not(.checklist) > tbody > tr > td.rule { display: block; }
  .content td { padding: 4px 0; }
  .content table.grid, .content table.checklist { display: block; overflow-x: auto; }
  .content table.grid td, .content table.checklist td { padding: 8px; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .footer-inner { padding: 24px 16px 28px; }
  .card-label { font-size: 16px; }
}
@media (max-width: 860px) {
  .nf-hero { padding: 20px 0 8px; }
  .nf-inner { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .nf-art { order: -1; border-radius: 16px; }
  .nf-text { text-align: center; }
  .nf-text h1 { font-size: 24px; }
  .nf-actions { justify-content: center; }
}
