/* RuangTalent policy pages - shared stylesheet */
:root {
  --accent: #b10c41;
  --accent-dark: #8d0934;
  --accent-soft: #fdf2f5;
  --ink: #111827;
  --text: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --surface: #f9fafb;
  --bg: #ffffff;
  --radius: 10px;
  --max: 1120px;
  --header-h: 64px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100;
}
.skip-link:focus { left: 12px; color: #fff; }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 16px; }

.brand { display: inline-block; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 20px; line-height: 1; letter-spacing: -0.03em; }
.brand span { color: var(--accent); }
.brand:hover { color: var(--ink); }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink); cursor: pointer;
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav a {
  display: block; padding: 8px 12px; border-radius: 8px;
  font-size: 13.5px; font-weight: 600; color: var(--text); text-decoration: none;
}
.site-nav a:hover { background: var(--surface); color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

/* Mobile menu overlay + scroll lock */
.nav-backdrop {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(17, 24, 39, 0.6);
  opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0.2s ease;
  touch-action: none;
}
.nav-backdrop.is-visible { opacity: 1; visibility: visible; }
html.nav-open, html.nav-open body { overflow: hidden; }

/* Collapse the menu earlier: five links need more room than 760px allows */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: var(--header-h);
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(17, 24, 39, 0.08);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; padding: 10px 20px 16px; gap: 2px; }
  .site-nav a { padding: 12px; font-size: 14.5px; }
}

/* Page head */
.page-head { border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fff 0%, var(--surface) 100%); }
.page-head .container { padding-top: 48px; padding-bottom: 40px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.eyebrow .icon { width: 18px; height: 18px; }
.page-head h1 { margin: 14px 0 12px; font-size: clamp(26px, 4vw, 38px); line-height: 1.2; letter-spacing: -0.02em; color: var(--ink); font-weight: 800; }
.page-head .lead { margin: 0; max-width: 720px; font-size: 16px; color: var(--text); }
.meta { margin-top: 18px; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.meta .icon { width: 16px; height: 16px; }

/* Layout */
.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; padding-top: 44px; padding-bottom: 72px; }

.toc { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; font-size: 13.5px; }
.toc-title { margin: 0 0 10px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a {
  display: block; padding: 6px 0 6px 14px; margin-left: -1px;
  border-left: 2px solid transparent; color: var(--text); text-decoration: none; font-weight: 500; line-height: 1.45;
}
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }

/* Content */
.content { min-width: 0; max-width: 760px; }
.content section + section { margin-top: 44px; }
.content h2 {
  margin: 0 0 14px; font-size: 21px; line-height: 1.3; letter-spacing: -0.01em;
  color: var(--ink); font-weight: 700; scroll-margin-top: calc(var(--header-h) + 24px);
}
.content h3 { margin: 24px 0 8px; font-size: 16px; color: var(--ink); font-weight: 700; }
.content p { margin: 0 0 14px; }
.content ul, .content ol { margin: 0 0 16px; padding-left: 22px; }
.content li { margin-bottom: 8px; padding-left: 4px; }
.content li::marker { color: var(--accent); }
.content strong { color: var(--ink); font-weight: 600; }

/* Table */
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 6px 0 20px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 14px 18px; vertical-align: top; }
thead th { background: var(--surface); color: var(--ink); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
tbody tr + tr td { border-top: 1px solid var(--line); }
tbody td:first-child { width: 42%; color: var(--ink); font-weight: 600; }

/* Callout */
.callout {
  display: flex; gap: 14px; padding: 16px 18px; margin: 20px 0;
  background: var(--accent-soft); border: 1px solid #f3c9d5; border-left: 3px solid var(--accent);
  border-radius: var(--radius); color: var(--text);
}
.callout .icon { color: var(--accent); margin-top: 2px; }
.callout p { margin: 0; }
.callout p + p { margin-top: 8px; }

/* Provider / info cards */
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 8px 0 18px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: #fff; }
.card h3 { margin: 0 0 4px; font-size: 14.5px; }
.card p { margin: 0; font-size: 13.5px; color: var(--text); }

/* Steps */
.steps { list-style: none; padding: 0 !important; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 0 0 0 48px; margin-bottom: 18px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
}

/* Button */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 8px; background: var(--accent); color: #fff;
  font-weight: 600; font-size: 14px; text-decoration: none; transition: background 0.15s ease;
}
.btn:hover { background: var(--accent-dark); color: #fff; }
.btn .icon { width: 18px; height: 18px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; padding-top: 28px; padding-bottom: 28px; font-size: 13px; color: var(--muted); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer a { color: var(--text); text-decoration: none; font-weight: 500; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }

/* Tablet */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; gap: 28px; padding-top: 28px; }
  .toc { position: static; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: var(--surface); }
  .toc ol { border-left: 0; columns: 2; column-gap: 24px; }
  .toc a { padding: 5px 0; border-left: 0; margin-left: 0; }
  .toc a.is-active { border-left: 0; }
}

/* Mobile */
@media (max-width: 760px) {
  :root { --header-h: 58px; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: var(--header-h);
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(17, 24, 39, 0.08);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; padding: 10px 20px 16px; gap: 2px; }
  .site-nav a { padding: 12px; font-size: 14.5px; }

  .page-head .container { padding-top: 32px; padding-bottom: 28px; }
  .toc ol { columns: 1; }
  .content h2 { font-size: 19px; }

  /* Table becomes stacked cards */
  .table-wrap { border: 0; border-radius: 0; overflow: visible; }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tbody tr { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; padding: 4px 0; }
  tbody tr + tr td { border-top: 0; }
  tbody td:first-child { width: 100%; padding-bottom: 2px; }
  td { padding: 8px 16px; }
  td[data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 2px;
    font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
  }
  .card-grid { grid-template-columns: 1fr; }
  .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media print {
  .site-header, .toc, .site-footer, .btn { display: none; }
  .layout { display: block; padding: 0; }
  body { font-size: 12pt; }
}