:root {
  --ink: #17202a;
  --muted: #5c6773;
  --line: #d9e0e7;
  --paper: #fbfcfd;
  --panel: #ffffff;
  --green: #0f766e;
  --green-dark: #0b4f4a;
  --blue: #2855a3;
  --amber: #a16207;
  --red: #b42318;
  --shadow: 0 14px 38px rgba(22, 32, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: Arial, "Noto Sans KR", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 252, 253, 0.94);
}

.header-inner,
.section,
.footer-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  font-size: 15px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
}

.nav a {
  color: var(--muted);
  white-space: nowrap;
}

.nav a:hover {
  color: var(--ink);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 3px;
}

.hero {
  padding: 40px 0 24px;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.12), rgba(40, 85, 163, 0.08)),
    #f7fafb;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 32px;
  align-items: start;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-weight: 800;
  font-size: 14px;
}

h1,
h2,
h3 {
  line-height: 1.22;
  letter-spacing: 0;
  word-break: keep-all;
}

h1 {
  margin: 0 0 16px;
  font-size: 48px;
}

h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

h3 {
  margin: 0 0 10px;
  font-size: 19px;
}

.lead {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 18px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}

a.pill:hover {
  background: #eef3f7;
  color: var(--ink);
  text-decoration: none;
}

.tool-panel,
.result-panel,
.article-card,
.notice,
.toc-panel,
.content-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.tool-panel {
  padding: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  color: #2d3742;
  font-size: 14px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #c8d2dc;
  border-radius: 6px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
}

input:focus,
select:focus {
  outline: 3px solid rgba(15, 118, 110, 0.18);
  border-color: var(--green);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.segment {
  min-height: 44px;
  border: 1px solid #c8d2dc;
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.segment[aria-pressed="true"] {
  border-color: var(--green);
  background: #e9f7f5;
  color: var(--green-dark);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  padding: 12px 16px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.button:hover {
  background: var(--green-dark);
  text-decoration: none;
}

.button.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.button.secondary:hover {
  background: #eef3f7;
}

.helper {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.warning-note {
  border-left: 3px solid var(--amber);
  padding: 8px 10px;
  background: #fff8eb;
  color: #744c08;
}

.is-hidden {
  display: none;
}

.results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.result-panel {
  padding: 16px;
}

.metric-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  word-break: keep-all;
}

.metric-value {
  margin: 0;
  font-size: 27px;
  font-weight: 900;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.result-panel .metric-value {
  font-size: 26px;
}

.share-panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f7fafb;
}

.share-title {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.share-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.share-actions .button {
  min-height: 44px;
  padding: 10px 12px;
  font-size: 13px;
  word-break: keep-all;
}

.compact-share {
  box-shadow: none;
}

.embed-section {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.compact-embed {
  box-shadow: none;
}

.embed-code {
  width: 100%;
  min-height: 118px;
  margin-top: 10px;
  border: 1px solid #c8d2dc;
  border-radius: 6px;
  padding: 10px;
  resize: vertical;
  background: #f7fafb;
  color: #2d3742;
  font: 12px/1.5 Consolas, "Courier New", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.embed-actions {
  grid-template-columns: 1fr;
  margin-top: 8px;
}

.embed-preview {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #f7fafb;
}

.embed-preview iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 0;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 50;
  transform: translate(-50%, 18px);
  border-radius: 999px;
  padding: 11px 16px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.metric-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  word-break: keep-all;
}

.section {
  padding: 36px 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 18px;
}

.muted {
  color: var(--muted);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

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

.mini-tool {
  box-shadow: none;
}

.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.article-card {
  padding: 18px;
  box-shadow: none;
}

.article-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.notice {
  padding: 18px;
  background: #fff8eb;
  border-color: #f0d7a0;
  box-shadow: none;
}

.notice strong {
  color: var(--amber);
}

.breakdown {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.breakdown th,
.breakdown td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: right;
}

.breakdown th:first-child,
.breakdown td:first-child {
  text-align: left;
}

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

.page-hero {
  padding: 42px 0;
  background: #f7fafb;
  border-bottom: 1px solid var(--line);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.content-panel {
  padding: 26px;
  box-shadow: none;
}

.content-panel h2 {
  margin-top: 28px;
}

.content-panel h2:first-child {
  margin-top: 0;
}

.content-panel table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
}

.content-panel th,
.content-panel td {
  border: 1px solid var(--line);
  padding: 10px;
  text-align: left;
}

.faq-item {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 16px;
}

.faq-item h3 {
  font-size: 17px;
}

.content-panel .notice {
  margin-top: 24px;
}

.toc-panel {
  position: sticky;
  top: 84px;
  padding: 18px;
  box-shadow: none;
}

.toc-panel ul {
  padding-left: 18px;
  margin: 10px 0 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #edf2f5;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0;
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.content-article {
  max-width: 820px;
  margin: 0 auto;
}

.content-article h2 {
  margin-top: 2.25rem;
}

.content-article p,
.content-article li {
  line-height: 1.85;
}

.content-list,
.check-list {
  display: grid;
  gap: .65rem;
  padding-left: 1.35rem;
}

.check-list {
  list-style: "✓  ";
}

.guide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  color: var(--muted);
  font-size: .92rem;
}

.guide-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.guide-card-grid .content-panel {
  height: 100%;
}

.source-box {
  margin-top: 2.5rem;
}

.contact-form {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

.contact-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 10rem;
}

.consent-field label {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
}

.consent-field input {
  width: auto;
  margin-top: .25rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.changelog-entry + .changelog-entry {
  margin-top: 1rem;
}

.embed-page {
  min-width: 0;
  overflow-x: hidden;
  background: #fff;
}

.embed-shell {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 12px;
}

.embed-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.embed-card h1 {
  margin: 0 0 14px;
  font-size: 22px;
}

.embed-card .tool-panel {
  border: 0;
  box-shadow: none;
  padding: 0;
}

.embed-card .results {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.embed-powered {
  margin: 10px 0 0;
  text-align: right;
  font-size: 13px;
}

.narrow-section {
  width: min(1040px, calc(100% - 32px));
}

.seo-hero {
  padding: 34px 0 28px;
  border-bottom: 1px solid var(--line);
  background: #f3f8f8;
}

.seo-hero h1 {
  font-size: 40px;
}

.seo-primary {
  padding-top: 28px;
  padding-bottom: 52px;
}

.breadcrumb {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li:not(:last-child)::after {
  margin-left: 7px;
  color: #8b96a2;
  content: ">";
}

.seo-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 24px;
}

.seo-summary .result-panel {
  min-height: 138px;
}

.seo-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(310px, 0.88fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 24px;
}

.seo-summary > *,
.seo-two-column > *,
.comparison-grid > * {
  min-width: 0;
}

.condition-calculator h2,
.tool-panel h2,
.comparison-panel h2,
.related-section h2,
.popular-links h2,
.calculation-basis h2 {
  font-size: 22px;
}

.condition-calculator .button,
[data-hub-calculator] .button,
[data-salary-compare] .button {
  width: 100%;
  min-height: 46px;
  margin-top: 12px;
}

.condition-list {
  margin: 22px 0 0;
  border-top: 1px solid var(--line);
}

.condition-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.condition-list dt {
  color: var(--muted);
}

.condition-list dd {
  margin: 0;
  font-weight: 700;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.deduction-table,
.amount-table {
  width: 100%;
  border-collapse: collapse;
}

.deduction-table caption,
.amount-table caption {
  padding: 0 0 12px;
  color: var(--muted);
  text-align: left;
  font-size: 13px;
}

.deduction-table th,
.deduction-table td,
.amount-table th,
.amount-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.deduction-table th:first-child,
.amount-table th:first-child {
  text-align: left;
}

.deduction-table .total-row th,
.deduction-table .total-row td {
  border-top: 2px solid var(--ink);
  font-weight: 800;
}

.comparison-panel {
  margin-bottom: 24px;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.comparison-grid div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7fafb;
}

.comparison-grid span,
.comparison-grid strong {
  display: block;
}

.comparison-grid span {
  color: var(--muted);
  font-size: 13px;
}

.comparison-grid strong {
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 20px;
}

.neighbor-nav,
.related-link-grid,
.amount-link-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.neighbor-nav {
  justify-content: space-between;
  margin: 24px 0;
}

.related-section,
.popular-links,
.calculation-basis,
.seo-share {
  margin-top: 28px;
}

.related-link-grid a,
.amount-link-cloud a {
  display: block;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.related-link-grid a:hover,
.amount-link-cloud a:hover {
  border-color: var(--green);
  background: #f3f8f8;
  text-decoration: none;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.table-controls {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

.amount-table-wrap {
  border: 1px solid var(--line);
  background: #fff;
}

.amount-table {
  min-width: 820px;
}

.amount-table thead {
  position: sticky;
  top: 64px;
  background: #eef4f5;
}

.amount-table tbody tr:hover {
  background: #f7fafb;
}

.amount-table tr[hidden] {
  display: none;
}

.hub-results {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hub-results .result-panel {
  min-height: 122px;
}

.error-text {
  min-height: 24px;
  margin: 8px 0 0;
  color: var(--red);
  font-size: 14px;
}

.sitemap-groups h2 {
  margin-top: 34px;
}

.amount-link-cloud a {
  min-width: 150px;
}

@media (max-width: 900px) {
  .hero-grid,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .results,
  .article-grid,
  .mini-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toc-panel {
    position: static;
  }

  h1,
  .seo-hero h1 {
    font-size: 38px;
  }

  .seo-two-column {
    grid-template-columns: 1fr;
  }

  .seo-summary,
  .comparison-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
    gap: 10px;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .form-grid,
  .results,
  .share-actions,
  .article-grid,
  .mini-tools,
  .compact {
    grid-template-columns: 1fr;
  }

  .segmented {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 28px;
  }

  .metric-value {
    font-size: 22px;
  }

  .footer-inner {
    flex-direction: column;
  }

  .embed-shell {
    padding: 8px;
  }

  .embed-card {
    padding: 14px;
  }

  .embed-card .results {
    grid-template-columns: 1fr;
  }

  h1,
  .seo-hero h1 {
    font-size: 32px;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  h2 {
    font-size: 24px;
  }

  .seo-summary,
  .comparison-grid,
  .table-controls,
  .hub-results {
    grid-template-columns: 1fr;
  }

  .seo-summary .result-panel {
    min-height: 112px;
  }

  .neighbor-nav .button,
  .related-link-grid a,
  .amount-link-cloud a {
    width: 100%;
  }

  .content-panel,
  .tool-panel {
    padding: 18px;
  }

  .seo-hero .lead {
    font-size: 16px;
    overflow-wrap: anywhere;
    word-break: normal;
  }
}
