:root {
  --paper: #fff4dc;
  --surface: #fffdf7;
  --ink: #171918;
  --muted: #5e5a50;
  --teal: #0d7e9c;
  --yellow: #ffd84d;
  --line: #171918;
  --body: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  --display: "Arial Rounded MT Bold", "Avenir Next", Avenir, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
[dir="rtl"] { text-align: right; unicode-bidi: plaintext; }
body { min-height: 100%; margin: 0; color: var(--ink); background: var(--paper); font-family: var(--body); font-size: 17px; line-height: 1.65; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:where(a, summary):focus-visible { outline: 4px solid var(--yellow); outline-offset: 3px; }
::selection { color: var(--ink); background: var(--yellow); }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 500; padding: 10px 14px; border: 2px solid var(--line); color: var(--ink); background: var(--yellow); font-weight: 800; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.legal-header { border-bottom: 2px solid var(--line); background: rgba(255, 244, 220, .96); }
.legal-header-inner, .legal-main, .legal-footer { width: min(780px, calc(100% - 36px)); margin-inline: auto; }
.legal-header-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.legal-brand { color: var(--ink); font-family: var(--display); font-size: 22px; font-weight: 800; text-decoration: none; }
.back-link { min-height: 44px; display: inline-flex; align-items: center; font-size: 14px; font-weight: 800; }
.legal-nav { display: flex; align-items: center; gap: 18px; }
.legal-nav a { min-height: 44px; display: inline-flex; align-items: center; color: var(--ink); font-size: 14px; font-weight: 800; }
.legal-main { padding-block: clamp(38px, 7vw, 76px); }
.legal-main h1, .legal-main h2 { margin: 0; font-family: var(--display); line-height: 1.08; letter-spacing: -.03em; text-wrap: balance; }
.legal-main h1 { max-width: 16ch; font-size: clamp(40px, 7vw, 68px); }
.legal-main h1::after { content: ""; width: min(330px, 74%); height: 7px; display: block; margin-top: 14px; background: var(--teal); transform: skewX(-16deg); }
.legal-main h2 { margin-top: 42px; font-size: 25px; }
.legal-main p, .legal-main li { max-width: 72ch; }
.legal-main p { margin: 12px 0 0; }
.legal-main ul, .legal-main ol { padding-left: 24px; }
.legal-main li + li { margin-top: 7px; }
.lede { color: var(--muted); font-size: 20px; }
.notice { margin-top: 26px; padding: 18px 20px; border: 2px solid var(--line); border-radius: 14px; background: var(--yellow); box-shadow: 4px 5px 0 var(--ink); }
.notice strong { display: block; }
.data-table-wrap { margin-top: 18px; overflow-x: auto; padding: 4px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 11px 13px; border-bottom: 1px solid #c8bfae; text-align: left; }
th:last-child, td:last-child { text-align: right; }
tr:last-child td { border-bottom: 0; }
th { background: #f4e7cf; }
code { padding: 2px 5px; border-radius: 4px; background: #efe4cf; font-size: .9em; }
.guide-main { width: min(980px, calc(100% - 36px)); }
.guide-kicker { margin-bottom: 10px; color: var(--teal); font-size: 12px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.guide-main > .lede { max-width: 760px; }
.language-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 28px; padding: 16px 18px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 4px 5px 0 var(--ink); }
.language-panel label { display: grid; }
.language-panel label span { color: var(--muted); font-size: 13px; }
.language-panel select { min-width: 190px; min-height: 46px; padding: 8px 36px 8px 12px; border: 2px solid var(--line); border-radius: 9px; color: var(--ink); background: #fff; font: inherit; font-weight: 700; }
.guide-toc { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 28px; padding: 18px; border-left: 6px solid var(--teal); background: rgba(255, 253, 247, .62); }
.guide-toc strong { width: 100%; }
.guide-toc a { font-size: 14px; font-weight: 800; }
.article-browser { margin-top: 34px; padding: 22px; border: 2px solid var(--line); border-radius: 16px; background: var(--yellow); box-shadow: 5px 6px 0 var(--ink); }
.article-browser-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.article-browser-head span { font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.browser-translation { display: none; }
body.has-translation .browser-translation { display: block; }
.article-browser-head .browser-label-translation { margin-top: 2px; color: #31565e; font-size: 11px; letter-spacing: 0; text-transform: none; }
.article-browser-head h2 { margin-top: 3px; font-size: 28px; }
.article-browser-head h2 .browser-title-translation { margin-top: 5px; color: #31565e; font-family: var(--body); font-size: 15px; font-weight: 700; letter-spacing: 0; line-height: 1.35; }
.article-browser-controls { display: flex; gap: 8px; }
.article-browser-controls button { width: 42px; height: 38px; border: 2px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--surface); box-shadow: 2px 3px 0 var(--ink); font: 900 18px/1 var(--body); cursor: pointer; }
.article-browser-controls button:hover { color: #fff; background: var(--teal); }
.article-browser-rail { display: grid; grid-auto-flow: column; grid-auto-columns: 280px; gap: 12px; overflow-x: auto; margin-top: 16px; padding: 2px 3px 9px 2px; scroll-behavior: smooth; scroll-snap-type: x mandatory; scrollbar-color: var(--ink) rgba(255,255,255,.5); scrollbar-width: thin; }
.article-browser-rail a { min-height: 145px; display: flex; flex-direction: column; padding: 16px; border: 2px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface); box-shadow: 3px 4px 0 var(--ink); text-decoration: none; scroll-snap-align: start; }
.article-browser-rail a:nth-child(2) { background: #dceff1; }
.article-browser-rail a:nth-child(3) { background: #fff0b9; }
.article-browser-rail a:nth-child(4) { background: #d8eee7; }
.article-browser-rail a:hover { transform: translateY(-2px); box-shadow: 4px 6px 0 var(--ink); }
.article-browser-rail span { color: var(--teal); font-family: monospace; font-size: 12px; font-weight: 900; }
.article-browser-rail strong { margin-top: 13px; font-family: var(--display); font-size: 19px; line-height: 1.1; }
.article-browser-rail small { margin-top: auto; padding-top: 12px; color: var(--muted); font-size: 12px; }
.article-browser-rail .card-title-translation { margin-top: 5px; color: #174651; font-family: var(--body); font-size: 14px; font-weight: 800; line-height: 1.3; }
.article-browser-rail .card-subtitle-translation { margin-top: 3px; padding-top: 0; color: #31565e; font-size: 12px; line-height: 1.35; }
body.has-translation .article-browser-rail a { min-height: 220px; }
.guide-stories { display: grid; gap: 34px; margin-top: 54px; }
.guide-story { scroll-margin-top: 24px; padding: clamp(24px, 5vw, 52px); border: 2px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 5px 6px 0 var(--ink); }
.guide-story:nth-child(2) { border-top: 9px solid var(--teal); }
.guide-story:nth-child(3) { border-top: 9px solid var(--yellow); }
.guide-story:nth-child(4) { border-top: 9px solid #84cdbd; }
.story-header { margin-bottom: 24px; padding-bottom: 22px; border-bottom: 2px solid var(--line); }
.story-header > span { color: var(--teal); font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.guide-story .story-header h2 { max-width: 24ch; margin-top: 8px; font-size: clamp(29px, 4vw, 42px); }
.guide-story h3 { margin: 30px 0 0; font-family: var(--display); font-size: 23px; line-height: 1.15; }
.guide-story > p, .definition-list p, .risk-grid p, .calculation-example p { max-width: 76ch; }
.article-title-copy { font-size: 17px; font-weight: 800; }
.calculation-example { margin-top: 24px; padding: 20px; border: 2px solid var(--line); border-radius: 13px; background: #dceff1; box-shadow: 3px 4px 0 var(--ink); }
.calculation-example > span { display: block; margin-bottom: 7px; font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.calculation-example > strong { display: block; font-family: var(--display); font-size: clamp(18px, 2.5vw, 25px); line-height: 1.25; }
.example-copy { margin-top: 12px !important; }
.definition-list { display: grid; gap: 12px; margin-top: 24px; }
.definition-list > div { padding: 18px 20px; border: 2px solid var(--line); border-radius: 12px; background: #f6efdf; }
.definition-list > div:nth-child(even) { background: #eef7f5; }
.definition-list > div > strong { font-family: var(--display); font-size: 20px; }
.cost-components { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.risk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.risk-grid > div { padding: 17px 18px; border: 2px solid var(--line); border-radius: 11px; background: #f6efdf; }
.risk-grid strong { font-family: var(--display); }
.risk-grid p { margin-top: 5px; color: var(--muted); font-size: 15px; }
.story-calculator-link { min-height: 46px; width: fit-content; display: inline-flex; align-items: center; margin-top: 24px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 9px; color: #fff; background: var(--teal); box-shadow: 3px 4px 0 var(--ink); font-size: 14px; font-weight: 900; text-decoration: none; }
.story-calculator-link:hover { color: #fff; background: var(--ink); }
.source-box[aria-labelledby="sources-title"] { margin-top: 42px; }
.source-box[aria-labelledby="sources-title"] p { max-width: 76ch; }
.guide-article { margin-top: 44px; }
.guide-article section { position: relative; padding: 0 0 48px 74px; border-left: 2px solid #b9ad97; }
.guide-article section:last-child { padding-bottom: 8px; border-left-color: transparent; }
.section-number { position: absolute; top: 0; left: -24px; width: 46px; height: 46px; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 50%; color: #fff; background: var(--teal); font-size: 13px; font-weight: 900; box-shadow: 3px 3px 0 var(--ink); }
.guide-article .guide-check,
.guide-story .guide-check { margin-top: 22px; padding: 17px 20px; border: 2px solid var(--line); border-radius: 12px; background: #fff0b9; box-shadow: 3px 4px 0 var(--ink); }
.guide-check strong { display: block; }
.guide-check ul { margin-bottom: 0; }
.parallel-copy { display: none; max-width: 74ch; margin-top: 10px !important; padding: 11px 14px; border-left: 4px solid var(--teal); color: #174651; background: #e8f5f4; font-size: 15px; }
body.has-translation .parallel-copy { display: block; }
.list-copy ul { margin-block: 7px 0; }
.notice-copy { border: 2px solid var(--line); border-left-width: 6px; color: var(--ink); background: #fff4c1; }
.source-box { display: grid; gap: 8px; margin-top: 24px; padding: 18px 20px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); }
.source-box strong { margin-bottom: 2px; }
.source-box a { width: fit-content; }
.guide-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 46px; padding: 24px; border: 2px solid var(--line); border-radius: 14px; background: var(--yellow); box-shadow: 5px 6px 0 var(--ink); }
.guide-cta strong { font-family: var(--display); font-size: 21px; }
.guide-cta p { margin: 4px 0 0; }
.guide-cta a { flex: 0 0 auto; padding: 10px 14px; border: 2px solid var(--line); border-radius: 9px; color: #fff; background: var(--ink); font-weight: 800; text-decoration: none; }
.legal-footer { padding-block: 24px 42px; border-top: 2px solid var(--line); color: var(--muted); font-size: 14px; }
.legal-footer-nav { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 8px; }
.legal-footer-nav a { font-weight: 800; }
@media (max-width: 700px) {
  .language-panel, .guide-cta { align-items: stretch; flex-direction: column; }
  .language-panel select { width: 100%; }
  .article-browser { padding: 17px; }
  .article-browser-rail { grid-auto-columns: minmax(235px, 86%); }
  .guide-story { padding: 22px 18px; }
  .cost-components, .risk-grid { grid-template-columns: 1fr; }
  .guide-article section { padding-left: 38px; }
  .section-number { left: -19px; width: 36px; height: 36px; font-size: 11px; }
  .guide-cta a { align-self: flex-start; }
}
@media (max-width: 520px) { body { font-size: 16px; } .legal-header-inner { align-items: flex-start; flex-direction: column; padding-block: 12px; gap: 2px; } .legal-nav { flex-wrap: wrap; } .legal-main { padding-top: 34px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
