/* One quiet route through the existing Insurance documents. No new routing state. */
html { scroll-padding-top: 62px; }
.insurance-subnav { position: sticky; top: 0; z-index: 12; display: flex; align-items: center; gap: clamp(12px, 2.5vw, 30px);
  min-height: 48px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; border-bottom: 1px solid var(--line);
  background: rgba(20, 27, 39, .96); backdrop-filter: blur(12px); }
.insurance-subnav::-webkit-scrollbar { display: none; }
.insurance-subnav a { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-width: 44px; min-height: 44px; padding-inline: 12px; color: var(--muted);
  font-size: 12px; text-decoration: none; }
.insurance-subnav a:hover, .insurance-subnav a[aria-current="page"] { color: var(--ink); }
.insurance-subnav a[aria-current="page"] { box-shadow: inset 0 -2px var(--warm); }
.insurance-subnav a:focus-visible { outline-offset: -4px; }

/* The harbour exit row (user grant 07-B, IA brief wave 1, UXD nav rules; moved here from insurance-doc.css so every insurance text page
   has it): the same place on every page, sticky under the sub-nav, in the first view at 344 x 728. Its first link is the harbour, named by
   its origin (「항구에서 해 보기」, or 「← 항구로 돌아가기」 once app.js finds the harbour's saved state: data-k1-back). */
.ins-exits { position: sticky; top: 48px; z-index: 11; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding-top: 10px; padding-bottom: 10px;
  background: var(--paper); }   /* (F wave-1 look read: the band is opaque for its full height, so no half line shows through it) */
.ins-exits::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; background: linear-gradient(var(--paper), transparent); pointer-events: none; }   /* the 12 px fade sits below the band */
.ins-exit { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-size: 14px; text-decoration: none;
  border-bottom: 1px solid var(--line-strong); }
.ins-exit[data-k1-back]::before { content: "←"; margin-right: 8px; color: var(--warm); }
[data-k1-return][hidden] { display: none; }
html[data-no-world] :is(.ins-exits, .case-way):not(:has(a:not([hidden]), button:not([hidden]))) { display: none; }   /* (M-43: app.js hides the harbour exits on a device that cannot open it; .ins-exit's display would otherwise win) */
.ins-exit:hover, .ins-exit:focus-visible { border-bottom-color: var(--ink); }
.ins-exits .scroll-open { margin-left: auto; }   /* the page's 두루마리, at the end of the exits row */
/* every text page ends with two exits: the harbour, and one next step */
.page-exits { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin-top: 40px; padding-top: 18px; padding-bottom: 40px; border-top: 1px solid var(--line-strong); }
.page-exits .line-cta { margin: 0; flex: 1 0 100%; }   /* (F: one end pattern everywhere: the harbour line-link, then the next step as a full-width row with →) */
.case-index > p.case-way { margin: 16px 0 0; }   /* (UXD: ≥ 8 px from the last card: the line leaves the page, the cards expand within it) */
.case-way a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 14px; text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.contact-leave { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.insurance-next-copy { max-width: 650px; margin: 42px 0 4px; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* Cases opens on the actual example; IPO keeps the same route but reads like a compact technical document. */
.case-page .page-hero { padding-top: 54px; padding-bottom: 42px; }
.case-page .page-hero .eyebrow { margin-bottom: 12px; }
.case-page .block.tinted { padding-top: 68px; }
.ipo-page .page-hero { padding-top: 57px; padding-bottom: 57px; }
.ipo-page .block:not(.dark) { padding-top: 86px; padding-bottom: 92px; }
.ipo-page .flow-step .principle-no { color: var(--warm); }

/* The existing three-stage case stays interactive; its reasoning stays readable below every stage. */
.case-intro { max-width: 710px; margin: -15px 0 35px; color: var(--muted); font-size: 15px; line-height: 1.65; }
.case-topline { flex-wrap: wrap; gap: 8px 18px; }
.case-note { display: inline; }
.case-card .stage-control { border-top: 0; border-bottom: 1px solid var(--line); }
.case-card .stage-button { min-height: 52px; }
.case-stage-shell.stage-2 .case-stack .layer-short { display: inline; }
.case-reading h3 { margin-bottom: 17px; }
.case-reading > div > p:last-child { margin: 0; max-width: 370px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.case-boundary { max-width: 720px; margin: 24px 0 0; }
.case-reasoning { display: grid; grid-template-columns: minmax(200px, .55fr) minmax(0, 1.45fr); gap: clamp(38px, 6vw, 95px);
  margin-top: 88px; padding-top: 32px; border-top: 1px solid var(--line-strong); }
.case-reasoning-head h3 { margin: 21px 0 0; font-size: clamp(31px, 4vw, 58px); line-height: 1.08; letter-spacing: -.05em; font-weight: 520; }
.case-reasoning ol { margin: 0; padding: 0; list-style: none; }
.case-reasoning li { display: grid; grid-template-columns: minmax(115px, .42fr) minmax(0, 1fr); gap: 18px; padding: 20px 0;
  border-bottom: 1px solid var(--line); }
.case-reasoning li:first-child { border-top: 1px solid var(--line); }
.case-reasoning li span { color: var(--warm); font-size: 11px; letter-spacing: .03em; }
.case-reasoning li p { max-width: 610px; margin: 0; color: var(--ink); font-size: 14px; line-height: 1.65; }
.case-next { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 28px;
  margin-top: 48px; padding: 22px 0 0; border-top: 1px solid var(--line-strong); }
.case-next p { margin: 0; color: var(--muted); font-size: 14px; }
.case-next .line-cta { margin: 0; }

@media (max-width: 820px) {
  .ins-exits { top: 44px; }
  .insurance-subnav { gap: 18px; min-height: 44px; }
  .insurance-subnav a { font-size: 11px; }
  .case-page .page-hero { padding-top: 42px; padding-bottom: 30px; }
  .case-page .block.tinted { padding-top: 52px; }
  .case-page .case-heading { margin-bottom: 32px; }
  .ipo-page .page-hero { padding-top: 42px; padding-bottom: 38px; }
  .ipo-page .page-hero .hero-object-wrap { min-height: 285px; }
  .ipo-page .block:not(.dark) { padding-top: 74px; padding-bottom: 78px; }
  .ipo-page .flow { display: grid; grid-template-columns: minmax(0, 1fr); overflow: visible; margin-right: 0; padding-right: 0; border-top: 0; scroll-snap-type: none; }
  .ipo-page .flow-step { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 14px; max-width: none;
    min-width: 0; margin: 0; padding: 18px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .ipo-page .flow-step .principle-no { grid-row: 1 / 3; margin: 0; }
  .ipo-page .flow-step h3, .ipo-page .flow-step p { grid-column: 2; }
  .ipo-page .flow-hint { display: none; }
  .case-intro { margin: -12px 0 26px; font-size: 14px; }
  .case-card .stage-button { flex-wrap: wrap; gap: 1px 7px; padding: 10px 6px; font-size: 11px; line-height: 1.25; }
  .case-card .stage-index { font-size: 9px; }
  .case-card .case-visual { min-height: 300px; }
  .case-card .case-reading { min-height: 190px; }
  .case-card .case-reading h3 { font-size: 27px; }
  .case-reasoning { grid-template-columns: 1fr; gap: 30px; margin-top: 65px; }
  .case-reasoning li { grid-template-columns: 1fr; gap: 9px; padding: 18px 0; }
  .case-reasoning li p { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .insurance-subnav { scroll-behavior: auto; }
}

/* Phones: one header row in the insurance section (F row j). The brand dot stays as the home link at the left of the
   sub-nav row, the sub-nav shows where you are; 프로젝트 / 소개 stay in the footer. */
@media (max-width: 760px) {
  .site-shell:has(> .insurance-subnav) > .topbar { position: absolute; top: 0; left: 0; z-index: 13; height: 45px; padding: 0 0 0 max(var(--gutter), calc((100vw - var(--max)) / 2)); }
  .site-shell:has(> .insurance-subnav) > .topbar .topnav { display: none; }
  .site-shell:has(> .insurance-subnav) > .topbar .brand { justify-content: center; min-width: 30px; min-height: 44px; margin-left: -8px; font-size: 0; gap: 0; }
  .site-shell:has(> .insurance-subnav) > .topbar .brand i { width: 9px; height: 9px; }
  .site-shell:has(> .insurance-subnav) > .insurance-subnav { padding-left: calc(max(var(--gutter), calc((100vw - var(--max)) / 2)) + 24px); gap: 8px; }
}
