/* ============================================================
   Guide site — tables + detail sheet + about (2026-08 redesign)
   Owned pages: alllist(.en), gradelist(.en), detail, about-us(.en).
   Loaded AFTER /cdss-theme.css and /guide-layout.css.
   Design tokens (shared brief): page #eef2f8, card #fff/#d8dfeb,
   headings #0f1b2d/800, body #1e293b, muted #5b6b81,
   primary #1663d8, accent #0ea5a4.
   ============================================================ */

/* ---- 0) shared: never split Korean words mid-word ------------------ */
.gt-table th, .gt-table td,
.gt-intro, .gt-detail, .gt-empty, .gt-about-scope p {
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* ---- 1) list-page intro header -------------------------------------- */
.gt-intro { padding: 26px 4px 18px; }
.gt-page-title {
  margin: 0 0 6px;
  font-family: var(--cdss-font);
  font-size: 21px; font-weight: 800; letter-spacing: -.3px;
  color: #0f1b2d;
}
.gt-page-title::before {
  content: ""; display: inline-block; vertical-align: -2px;
  width: 5px; height: 18px; margin-right: 10px; border-radius: 3px;
  background: linear-gradient(180deg, #1663d8, #0ea5a4);
}
.gt-page-sub {
  margin: 0; font-size: 13.5px; line-height: 1.6; color: #5b6b81;
}

/* ---- 2) table system -------------------------------------------------
   The scroll box is the ONLY thing that scrolls horizontally; the page
   column never widens. */
.gt-scroll { overflow-x: auto; border-radius: 12px;
  border: 1px solid #d8dfeb; box-shadow: 0 1px 2px rgba(15,27,45,.05); }
.gt-table {
  width: 100%; margin: 0;
  border-collapse: separate; border-spacing: 0;
  font-family: var(--cdss-font);
  font-size: 13.5px !important; line-height: 1.65;
  background: #fff;
}
.gt-table thead th {
  position: sticky; top: 0; z-index: 2;
  padding: 13px 18px;
  background: #0f1b2d; color: #fff;
  font-weight: 700; font-size: 13px; letter-spacing: .4px;
  border: 0; text-align: left; white-space: nowrap;
}
/* header alignment always matches the body cells underneath it */
.gt-table thead th.gt-col-key { text-align: center; }
.gt-table.gt-table-3col thead th:nth-child(2) { text-align: center; }
.gt-table tbody td {
  padding: 15px 18px;
  border: 0; border-bottom: 1px solid #e3e9f2;
  color: #1e293b; background: #fff;
  vertical-align: middle;
}
.gt-table tbody tr:nth-child(even) td { background: #f4f7fb; }
.gt-table tbody tr:hover td { background: #eaf1fb; }
.gt-table tbody tr:last-child td { border-bottom: 0; }
/* key column: centered, never wraps awkwardly */
.gt-table .gt-col-key, .gt-table tbody td:first-child {
  text-align: center; white-space: nowrap;
  width: 1%; min-width: 116px;
}
.gt-table tbody td.gt-col-key { line-height: 1.9; font-weight: 700; color: #0f1b2d; }
.gt-table tbody td { text-align: left; }
/* 내용/RRL is a short-phrase column: size it to its content (like the chip
   column) and give ALL remaining width to 의미/예시 — desktop included
   (owner request 2026-08-18). !important beats the th's inline width:20%. */
.gt-table.gt-table-3col thead th:nth-child(2),
.gt-table.gt-table-3col tbody td:nth-child(2) {
  text-align: center; width: 132px !important; white-space: normal;
}
.gt-table.gt-table-3col tbody td:nth-child(2) {
  font-weight: 700; color: #0f1b2d;
}
.gt-table.gt-table-3col thead th:nth-child(3),
.gt-table.gt-table-3col tbody td:nth-child(3) { width: auto !important; }
/* 3-col tables: the key column only holds a chip — it never needs the
   116px floor that the alllist label column (매우낮음 etc.) requires */
.gt-table.gt-table-3col .gt-col-key { min-width: 64px; width: 88px !important; }

/* systematic tokens: KQ numbers, <I>–<IV> level codes */
.gt-kq {
  display: inline-block;
  font-weight: 800; font-size: 12px; letter-spacing: .3px;
  color: #0f4cab; background: #e7effc;
  border: 1px solid #c7d9f6; border-radius: 6px;
  padding: 1px 8px; white-space: nowrap; line-height: 1.7;
}
.gt-kq-lg { font-size: 13.5px; padding: 2px 10px; vertical-align: 3px; }
.gt-lvl { font-weight: 700; color: #0f1b2d; }

/* grade chips (A / B / C / I) — muted, consistently hued */
.gt-grade {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 8px;
  border-radius: 10px; border: 1px solid transparent;
  font-weight: 800; font-size: 15px; font-family: var(--cdss-font);
}
.gt-grade-a { background: #e2f3ea; color: #156d3f; border-color: #c2e5d1; }
.gt-grade-b { background: #e7effc; color: #0f4cab; border-color: #c7d9f6; }
.gt-grade-c { background: #fdecec; color: #b3261e; border-color: #f5cfcd; }
.gt-grade-i { background: #eef1f5; color: #5b6b81; border-color: #dbe2ec; }

/* radiation-dose chips (raylist + anywhere a 0–4 RRL appears):
   same geometry as grade chips, hue ramps with the dose */
.gt-dose-0 { background: #eef1f5; color: #5b6b81; border-color: #dbe2ec; }
.gt-dose-1 { background: #e2f3ea; color: #156d3f; border-color: #c2e5d1; }
.gt-dose-2 { background: #e0f4f4; color: #0b6e6d; border-color: #bfe5e4; }
.gt-dose-3 { background: #fdeee2; color: #9a4c12; border-color: #f5d8bf; }
.gt-dose-4 { background: #fdecec; color: #b3261e; border-color: #f5cfcd; }

/* ---- 3) department / region chips (detail page) ---------------------
   8 muted hues, assigned consistently by department name (JS hashes
   unknown names onto gt-hue-0..7). */
.gt-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gt-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 13px; border-radius: 999px;
  font-family: var(--cdss-font); font-size: 12.5px; font-weight: 700;
  border: 1px solid #dbe2ec; background: #eef1f5; color: #37465c;
  line-height: 1.7; white-space: nowrap;
}
.gt-hue-0 { background: #e7effc; color: #0f4cab; border-color: #c7d9f6; } /* blue   */
.gt-hue-1 { background: #e2f3ea; color: #156d3f; border-color: #c2e5d1; } /* green  */
.gt-hue-2 { background: #f3e9fb; color: #6b31a8; border-color: #e2cff3; } /* violet */
.gt-hue-3 { background: #fdeee2; color: #9a4c12; border-color: #f5d8bf; } /* amber  */
.gt-hue-4 { background: #e0f4f4; color: #0b6e6d; border-color: #bfe5e4; } /* teal   */
.gt-hue-5 { background: #fdecec; color: #b3261e; border-color: #f5cfcd; } /* red    */
.gt-hue-6 { background: #eaf0f7; color: #3b566e; border-color: #d4dfec; } /* slate  */
.gt-hue-7 { background: #fbeaf3; color: #a02c66; border-color: #f0cade; } /* pink   */
.gt-chip-region { background: #fff; color: #0b6e6d; border-color: #9fd8d7; }
.gt-chip-region .gt-chip-region-label {
  font-weight: 600; font-size: 11px; color: #5b6b81;
  border-right: 1px solid #d8dfeb; padding-right: 8px;
}

/* ---- 4) detail record sheet ----------------------------------------- */
.gt-detail { padding-bottom: 0; }
.gt-detail-head {
  padding: 24px 28px 20px;
  background: linear-gradient(180deg, #f7fafd 0%, #fff 100%);
  border-bottom: 1px solid #e3e9f2;
}
.gt-question {
  margin: 14px 0 0;
  font-family: var(--cdss-font);
  font-size: 18px; font-weight: 800; line-height: 1.55;
  letter-spacing: -.2px; color: #0f1b2d;
}
.gt-detail-body { padding: 22px 28px 32px; }
.gt-reco {
  position: relative;
  background: #f5f9ff;
  border: 1px solid #d8e4f8; border-left: 4px solid #1663d8;
  border-radius: 10px;
  padding: 16px 20px 17px;
  margin: 0 0 20px;
}
.gt-reco-label {
  font-size: 11.5px; font-weight: 800; letter-spacing: 1.2px;
  color: #1663d8; text-transform: uppercase; margin-bottom: 7px;
}
.gt-reco-text {
  margin: 0; font-size: 15px; line-height: 1.75; color: #1e293b;
  font-weight: 500;
}

/* indicator tiles: ONE uniform grid — all three tiles identical width,
   identical padding, identical label/value placement */
.gt-tiles {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px; align-items: stretch;
}
.gt-tile {
  border: 1px solid #d8dfeb; border-radius: 12px; background: #fff;
  padding: 14px 16px 12px;
  box-shadow: 0 1px 2px rgba(15,27,45,.04);
  min-width: 0;
}
.gt-tile-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 12px;
}
.gt-tile-label {
  font-size: 13px; font-weight: 800; color: #0f1b2d; letter-spacing: -.2px;
}
.gt-tile-label::before {
  content: ""; display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; margin-right: 7px; vertical-align: 1px;
  background: #0ea5a4;
}
.gt-tile-value {
  min-width: 30px; height: 30px; font-size: 14px;
}
/* the scale bars: identical geometry in every tile (flex fills the tile,
   each step gets an equal share regardless of 4 vs 5 steps) */
.gt-tile .progress-indicator {
  display: flex; width: 100%; margin: 0; padding: 4px 0 0;
}
.gt-tile .progress-indicator > li {
  flex: 1 1 0; min-width: 0; float: none; width: auto;
  font-size: 11px; color: #8494ab; text-align: center;
}
.gt-tile .progress-indicator > li .bubble,
.gt-tile .progress-indicator > li .bubble2 {
  width: 14px; height: 14px; margin-bottom: 6px;
}
.gt-tile .progress-indicator > li .bubble:before,
.gt-tile .progress-indicator > li .bubble:after,
.gt-tile .progress-indicator > li .bubble2:before,
.gt-tile .progress-indicator > li .bubble2:after { top: 6px; height: 3px; }
/* keep the existing completed-color logic; just lift text contrast */
.gt-tile .progress-indicator > li.completed { color: #1e293b; font-weight: 700; }

/* legacy region row: value now lives in the header chip; keep the markup
   (and its href) in the DOM but don't paint the broken 60px clipped row */
.gt-legacy-region { display: none !important; }

/* The record sheet must END with a real bottom edge — never a mid-air cut.
   Root cause of the old artifact: the 검사부위 row was a .region-item with
   height:60px + overflow-y:hidden holding a line-height:100px value, so the
   text was clipped and the card stopped dead right under it. That row is now
   .gt-legacy-region (hidden, markup + href kept); the sheet's own bottom
   padding plus the card's radius give a proper closing edge. The card also
   no longer has to reach a 560px floor, so short records don't trail a slab
   of empty white. */
body.gt-detail-page .w-section.mobile-wrapper {
  min-height: 0 !important;
  padding-bottom: 0;
}

/* Owner request (2026-08-18): detail.html is ALL white — no white-to-gray
   transition where the sheet ends. The page ground becomes #fff and the
   card sheds its border/shadow so it blends seamlessly; only the navy
   footer breaks the white. (html gets it via :has for modern browsers;
   the body rule alone already covers the full viewport since .cdss-body
   is a min-height:100vh flex column.) */
html:has(body.gt-detail-page) { background: #fff; }
body.gt-detail-page { background: #fff; }
body.gt-detail-page .w-section.mobile-wrapper {
  background: #fff;
  border-color: transparent;
  box-shadow: none;
  margin-bottom: 0;
}
body.gt-detail-page .cdss-footer { margin-top: auto; }

/* empty state (detail.html opened without a selected record) */
.gt-empty {
  padding: 88px 28px 96px; text-align: center;
}
.gt-empty-icon { font-size: 46px; color: #b9c5d6; line-height: 1; }
.gt-empty-title {
  margin-top: 16px;
  font-size: 17px; font-weight: 800; color: #0f1b2d;
}
.gt-empty-sub { margin: 8px 0 22px; font-size: 13.5px; color: #5b6b81; }
.gt-empty-btn {
  display: inline-block; padding: 10px 22px; border-radius: 10px;
  background: #1663d8; color: #fff !important;
  font-weight: 700; font-size: 14px; text-decoration: none;
  width: auto !important;
}
.gt-empty-btn:hover { background: #0f4cab; color: #fff; }

/* ---- 5) about-us contrast pass (light touch) ------------------------ */
.gt-about-scope { padding-bottom: 44px !important; }
/* stray empty <div class="w-nav navbar"> sits inside the content block and
   inherits the 1080px navbar width, painting a misaligned white band above
   the card. It carries no content or links — hide it (scoped: the real
   navbar lives outside .gt-about-scope). */
.gt-about-scope > .w-nav.navbar { display: none; }
/* Version badge. washington.css gives .version-text `padding-bottom:40px`,
   which (with the old stray <br>) pushed the label off-centre inside the
   pill. Reset the padding and centre the text with flex on both axes. */
.gt-about-scope .version-text {
  display: inline-flex; align-items: center; justify-content: center;
  margin: 10px auto 4px;
  padding: 0 16px !important;
  min-height: 30px; line-height: 1;
  border-radius: 999px; background: #eef1f5; border: 1px solid #dbe2ec;
  color: #37465c; font-size: 12.5px; font-weight: 700; letter-spacing: .2px;
}
.gt-about-scope p {
  color: #5b6b81; font-size: 14.5px; line-height: 1.8;
  max-width: 520px; margin-left: auto; margin-right: auto;
}
.gt-about-scope p strong { color: #0f1b2d; }
.gt-about-scope .link-upper { color: #5b6b81; font-size: 13px; }
.gt-about-scope .link-upper a {
  display: inline-block; width: auto; padding: 9px 20px;
  border: 1.5px solid #1663d8; border-radius: 10px;
  color: #1663d8; font-weight: 700; font-size: 13.5px;
  text-decoration: none; transition: background .15s;
}
.gt-about-scope .link-upper a:hover { background: rgba(22,99,216,.08); }
.gt-about-scope .action-button.grey {
  background: #eef1f5; color: #37465c; border-radius: 10px;
  font-weight: 700;
}

/* ---- 6) responsive ---------------------------------------------------
   ≤760px: tiles stack full-width (still identical to each other);
   ≤420px: tighter paddings, and no page-level horizontal overflow —
   wide tables scroll INSIDE .gt-scroll only. */
@media (max-width: 760px) {
  .gt-tiles { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  /* 3-col tables (gradelist, raylist) on phones: fixed layout so the given
     widths are honored exactly — auto layout was handing the long 의미/예시
     column no more room than the short 내용/RRL column. Chip column 56px,
     middle column 92px, last column takes ALL the remaining width. The
     inline style="width:NN%" on the th is beaten with !important. */
  .gt-table.gt-table-3col { table-layout: fixed; }
  .gt-table.gt-table-3col .gt-col-key {
    width: 56px !important; min-width: 0; padding-left: 6px; padding-right: 6px;
  }
  .gt-table.gt-table-3col thead th:nth-child(2),
  .gt-table.gt-table-3col tbody td:nth-child(2) {
    width: 92px !important; padding-left: 8px; padding-right: 8px;
  }
  .gt-table.gt-table-3col thead th:nth-child(3),
  .gt-table.gt-table-3col tbody td:nth-child(3) {
    width: auto !important;
  }
  /* fixed layout must never clip: long tokens (e.g. "recommendation)")
     may break mid-word in the narrow middle column */
  .gt-table.gt-table-3col tbody td:nth-child(2) { overflow-wrap: anywhere; }
  .gt-table.gt-table-3col thead th { white-space: normal; }
  /* "Grading" must fit its 56px column on one line, not split mid-word */
  .gt-table.gt-table-3col thead th:nth-child(1) {
    font-size: 10.5px; letter-spacing: 0; padding-left: 2px; padding-right: 2px;
  }
}
@media (max-width: 420px) {
  .gt-intro { padding: 18px 2px 14px; }
  .gt-detail-head { padding: 18px 16px 16px; }
  .gt-detail-body { padding: 16px 16px 24px; }
  .gt-question { font-size: 16.5px; }
  .gt-table thead th { padding: 11px 12px; }
  .gt-table tbody td { padding: 12px 12px; }
  .gt-reco { padding: 14px 14px 15px; }
}

/* ---- dept chip palette aligned with guide-data.css (list pages) ----
   detail's chip must show the SAME hue the user saw on the list row. */
.dept-blue   {--dept:#1663d8; --dept-bg:#e8effc;}
.dept-teal   {--dept:#0e8f8c; --dept-bg:#e0f3f2;}
.dept-violet {--dept:#6d4fc4; --dept-bg:#eeeafa;}
.dept-crimson{--dept:#bf3b4c; --dept-bg:#fbe9ec;}
.dept-magenta{--dept:#b03383; --dept-bg:#f9e8f3;}
.dept-amber  {--dept:#a8611a; --dept-bg:#f9efe0;}
.dept-green  {--dept:#2f8a4c; --dept-bg:#e5f4ea;}
.dept-sky    {--dept:#0f76b0; --dept-bg:#e3f2fa;}
.dept-olive  {--dept:#6f7d1e; --dept-bg:#f2f4de;}
.dept-slate  {--dept:#5b6b81; --dept-bg:#eceff4;}
.dept-rust   {--dept:#bb4d1f; --dept-bg:#faebe2;}
.dept-indigo {--dept:#4a44b5; --dept-bg:#eae9f9;}
.dept-navy   {--dept:#0f4cab; --dept-bg:#e7edf9;}
.gt-dept-chip[class*="dept-"] {
  background: var(--dept-bg); color: var(--dept); border-color: var(--dept-bg);
}

/* ---- about v2 (2026-09): about-us(.en) rebuilt as a real info page ---- */
.ab{padding-top:60px;color:#1e293b;}
.ab-hero{padding:48px 28px 36px;text-align:center;
  background:linear-gradient(180deg,#f4f7fc 0%,#fff 100%);border-bottom:1px solid #e3e9f2;}
.ab-hero .cdss-brand{margin:0 auto;}
.ab-tagline{margin:18px 0 0;padding:0;font-size:15px;font-weight:600;color:#475569;}
.ab-ver{display:inline-block;margin-top:14px;padding:4px 12px;border-radius:999px;
  background:#e8f0fc;color:#1663d8;font-size:12px;font-weight:700;letter-spacing:.02em;}
.ab-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;max-width:560px;margin:28px auto 0;}
.ab-stat{background:#fff;border:1px solid #d8dfeb;border-radius:14px;padding:14px 8px;
  box-shadow:0 1px 2px rgba(15,27,45,.05);}
.ab-stat b{display:block;font-size:24px;font-weight:800;color:#0f1b2d;letter-spacing:-.02em;}
.ab-stat span{font-size:12.5px;color:#5b6b81;font-weight:600;}
.ab-sec{padding:34px 40px 0;max-width:860px;margin:0 auto;box-sizing:border-box;}
.ab-sec h2{margin:0 0 12px;font-size:18px;font-weight:800;color:#0f1b2d;letter-spacing:-.01em;}
.ab-sec p{margin:0;padding:0;font-size:15px;line-height:1.8;color:#334155;word-break:keep-all;}
.ab-feats{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.ab-feat{display:flex;gap:14px;align-items:flex-start;padding:16px 18px;border:1px solid #d8dfeb;
  border-radius:14px;background:#fff;text-decoration:none;width:auto !important;
  transition:border-color .15s,box-shadow .15s,transform .15s;}
.ab-feat:hover{border-color:#1663d8;box-shadow:0 8px 20px rgba(22,99,216,.14);transform:translateY(-2px);}
.ab-feat .icon{flex:0 0 40px;width:40px;height:40px;border-radius:11px;background:#1663d8;color:#fff;
  font-size:22px;line-height:40px;text-align:center;}
.ab-feat b{display:block;font-size:15px;font-weight:700;color:#0f1b2d;margin-bottom:3px;}
.ab-feat span{display:block;font-size:13px;line-height:1.55;color:#5b6b81;word-break:keep-all;}
.ab-org{border:1px solid #d8dfeb;border-radius:14px;overflow:hidden;}
.ab-org div{display:flex;gap:18px;padding:15px 20px;font-size:14.5px;}
.ab-org div+div{border-top:1px solid #e3e9f2;}
.ab-org dt{flex:0 0 64px;margin:0;color:#5b6b81;font-weight:600;}
.ab-org dd{margin:0;color:#0f1b2d;font-weight:600;}
.ab-org dd small{display:block;margin-top:2px;font-size:12.5px;font-weight:500;color:#5b6b81;}
.ab-note{display:flex;gap:12px;padding:16px 18px;border-radius:14px;background:#fff8eb;
  border:1px solid #f6dfb0;color:#7a4b00;font-size:14px;line-height:1.7;word-break:keep-all;}
.ab-note .icon{font-size:22px;line-height:1.1;color:#d38b00;}
.ab-links{display:flex;flex-wrap:wrap;gap:10px;padding:30px 40px 44px;justify-content:center;}
.ab-links a{display:inline-flex;align-items:center;gap:8px;width:auto !important;padding:11px 20px;
  border-radius:10px;font-size:14px;font-weight:700;text-decoration:none;
  border:1.5px solid #1663d8;color:#1663d8 !important;transition:background .15s;}
.ab-links a:hover{background:rgba(22,99,216,.08);}
.ab-links a.pri{background:#1663d8;color:#fff !important;}
.ab-links a.pri:hover{background:#0f4cab;}
@media (max-width:640px){
  .ab-hero{padding:36px 16px 28px;}
  .ab-stats{gap:8px;}
  .ab-stat b{font-size:18px;white-space:nowrap;}
  .ab-stat span{font-size:11.5px;}
  .ab-sec{padding:28px 16px 0;}
  .ab-feats{grid-template-columns:1fr;}
  .ab-org div{flex-direction:column;gap:4px;}
  .ab-org dt{flex:none;font-size:13px;}
  .ab-links{padding:26px 16px 36px;}
  .ab-links a{flex:1 1 100%;justify-content:center;}
}
