/* BillRadar, style D: light, warm, with 3D depth (Nadya, TG 2583). Logo = her shield + her wordmark. */
:root {
  --teal: #0f6f68;
  --teal-dark: #0b4f4a;
  --teal-ink: #0d3d3a;
  --teal-soft: #e4f1ee;
  --teal-line: #b7dbd4;
  --cream: #f8f3ea;
  --cream-2: #fbf7f0;
  --paper: #fffdf9;
  --gold: #c99a3e;
  --gold-2: #e2b866;
  --gold-soft: #fbf1dc;
  --gold-line: #ecd29a;
  --red: #d8423a;
  --red-soft: #fde9e6;
  --green: #2f9a6c;
  --green-soft: #e3f4ec;
  --violet-soft: #ecebfb;
  --ink: #1d2a2c;
  --muted: #5f6c6d;
  --line: #ece3d3;
  --shadow: 0 1px 2px rgba(80, 60, 20, .05), 0 8px 24px rgba(80, 60, 20, .08);
  --shadow-lg: 0 2px 4px rgba(80, 60, 20, .06), 0 22px 50px rgba(80, 60, 20, .14);
  --r: 18px;
  --head: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--cream); }
body { margin: 0; color: var(--ink); font: 15px/1.45 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
       background: radial-gradient(900px 520px at 72% 18%, #fff6df 0%, rgba(255, 246, 223, 0) 65%),
                   radial-gradient(700px 500px at 96% 70%, #f6e7c8 0%, rgba(246, 231, 200, 0) 70%),
                   radial-gradient(900px 600px at 4% 96%, #efe5d4 0%, rgba(239, 229, 212, 0) 70%),
                   repeating-linear-gradient(90deg, rgba(255,255,255,0) 0 180px, rgba(255,255,255,.22) 180px 260px, rgba(255,255,255,0) 260px 420px),
                   linear-gradient(180deg, #f8f2e8 0%, #f3ebdd 100%);
       min-height: 100vh; }
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--head); letter-spacing: -.015em; }
.glow { position: fixed; inset: 0; pointer-events: none; z-index: 0;
        background: radial-gradient(520px 340px at 70% 36%, rgba(255, 206, 120, .30), rgba(255, 206, 120, 0) 70%),
                    radial-gradient(260px 200px at 86% 74%, rgba(255, 220, 150, .35), rgba(255, 220, 150, 0) 70%); }
.page { position: relative; z-index: 1; max-width: 1680px; margin: 0 auto; padding: 0 28px 28px; }
.small { font-size: 13px; color: var(--muted); }
.center { text-align: center; }

/* top bar */
.nav { position: relative; z-index: 2; max-width: 1640px; margin: 14px auto 14px; display: flex; align-items: center; gap: 48px;
       padding: 12px 28px; background: rgba(255, 253, 249, .78); backdrop-filter: blur(14px);
       border: 1px solid rgba(236, 227, 211, .9); border-radius: 22px; box-shadow: var(--shadow); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .shield { height: 50px; width: auto; filter: drop-shadow(0 4px 6px rgba(120, 90, 30, .18)); }
.brand .wordmark { height: 38px; width: auto; }
.links { display: flex; gap: 40px; font-size: 16px; font-weight: 500; }
.links a { text-decoration: none; color: #31403f; padding: 8px 0; border-bottom: 3px solid transparent; }
.links a.on { color: var(--teal-ink); font-weight: 600; border-color: var(--gold); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.case-pill { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-weight: 700; }
.replay { display: inline-block; margin-left: 10px; font: 700 11px/1 "Inter", sans-serif; letter-spacing: .02em; text-transform: none;
          color: #8a6a24; background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: 6px; padding: 3px 6px; vertical-align: middle; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 30px;
       border-radius: 14px; font: 600 18px/1 var(--head); text-decoration: none; cursor: pointer; border: 1.5px solid transparent; }
.btn.primary { background: linear-gradient(180deg, #13786f, #0d5f59); color: #fff; box-shadow: 0 10px 22px rgba(13, 95, 89, .28), inset 0 1px 0 rgba(255,255,255,.18); }
.btn.ghost { background: var(--paper); border-color: var(--gold-2); color: var(--teal-ink); box-shadow: var(--shadow); }
.btn.link { min-height: auto; padding: 0; color: var(--teal-ink); border-bottom: 2px dashed var(--teal); border-radius: 0; font-weight: 500; }
.btn.gold { background: linear-gradient(180deg, #d9ac56, #b98a33); color: #fff; box-shadow: 0 10px 22px rgba(185, 138, 51, .3); }

/* model chip */
.model { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 9px; white-space: nowrap;
         font-size: 12.5px; font-weight: 600; color: #2c3b5c; background: #eef1fb; border: 1px solid #dfe4f5; }
.model svg { width: 13px; height: 13px; color: #4b5fc4; }
.model.find { background: #e6f3f0; border-color: #cfe6e0; color: #1f4f4a; } .model.find svg { color: var(--teal); }
.model.read { background: #fbf1df; border-color: #f0dfb9; color: #6b4f19; } .model.read svg { color: var(--gold); }
.model.code, .model.device { background: #f3f1ec; border-color: #e6e0d4; color: #4a5354; } .model.code svg, .model.device svg { color: #8a8f8e; }
.model em { font-style: normal; font-weight: 700; font-size: 10.5px; color: #8a6a24; background: var(--gold-soft); border-radius: 5px; padding: 1px 4px; }

/* ---------- case screen (CASE_D) ---------- */
.case-page { font-size: 14px; }
.case-grid { display: grid; grid-template-columns: 196px 214px minmax(0, 1fr) 262px; gap: 16px; align-items: start; }
.side { padding: 6px 6px 0; }
.back { display: inline-block; text-decoration: none; color: #3b4a4a; margin: 6px 0 18px; font-size: 15px; }
.who { display: grid; gap: 3px; font-size: 14px; color: #3d4b4c; margin-bottom: 22px; }
.who strong { font-size: 15px; color: var(--ink); }
.side-links { display: grid; gap: 4px; }
.side-links a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: #2f3d3e; font-size: 15px; }
.side-links a svg { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: currentColor; stroke-width: 1.8; color: #4b5b5c; }
.side-links a.on { background: var(--teal-soft); color: var(--teal-ink); font-weight: 600; }
.side-links a.on svg { fill: var(--teal); stroke: none; }
.history { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.history h3 { font-size: 15px; margin: 0 0 12px; font-weight: 700; }
.history ol { list-style: none; padding: 0 0 0 4px; margin: 0; display: grid; gap: 16px; position: relative; }
.history ol::before { content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 1.5px; background: #d6d0c4; }
.history li { position: relative; padding-left: 26px; font-size: 13px; color: var(--muted); display: grid; }
.history li::before { content: ""; position: absolute; left: 0; top: 2px; width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid #9aa3a2; background: var(--cream); }
.history li.on::before { background: var(--teal-ink); border-color: var(--teal-ink); }
.history li b { font-weight: 500; color: #3b4849; }

.docs { background: rgba(255, 253, 249, .7); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 12px; box-shadow: var(--shadow); }
.docs-head h2 { margin: 2px 4px 10px; font: 600 16px/1.2 var(--head); }
.docs-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 2px 12px; }
.docs-tabs button { font: 600 12px/1 "Inter", sans-serif; border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 999px; padding: 6px 9px; cursor: pointer; }
.docs-tabs button.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.thumb { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: 10px; background: #fff; border: 1px solid #e8dfcf;
         box-shadow: 0 2px 6px rgba(80, 60, 20, .1); overflow: hidden; text-decoration: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.thumb .n { position: absolute; left: 6px; bottom: 5px; font-size: 12px; font-weight: 600; color: #3a4646; background: rgba(255,255,255,.88); border-radius: 6px; padding: 1px 5px; }
.thumb.file { display: grid; place-items: center; align-content: center; gap: 4px; padding: 10px; color: var(--muted); }
.thumb.file svg { width: 34px; height: 34px; }
.thumb.file small { font-size: 10.5px; text-align: center; line-height: 1.25; }
.thumb.hl { outline: 2.5px solid var(--gold-2); box-shadow: 0 0 0 5px rgba(226, 184, 102, .22); }
.tab-photos, .tab-sent { display: grid; gap: 10px; }
.tab-photos img, .tab-sent img { border-radius: 10px; display: block; }

.main { min-width: 0; }
.hero-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: center;
             padding: 26px 24px 0 26px; border-radius: 22px; background: linear-gradient(180deg, rgba(255,253,249,.92), rgba(253,248,238,.92));
             border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.eyebrow { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #4d5a5b; font-weight: 600; }
.hero-card h1 { margin: 10px 0 12px; font-size: 42px; white-space: nowrap; line-height: 1.04; font-weight: 800; color: var(--teal-ink); }
.hero-card h1 .gold { background: linear-gradient(180deg, #e7bd62, #b5862c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-card p { margin: 0 0 22px; font-size: 17px; color: #4b5859; max-width: 470px; }
.stack { position: relative; height: 250px; perspective: 900px; }
.stack .paper { position: absolute; width: 150px; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border-radius: 6px; background: #fff;
                box-shadow: 0 18px 30px rgba(80, 60, 20, .2), 0 2px 4px rgba(80, 60, 20, .12); border: 1px solid #eee5d6; }
.stack .p1 { left: 40px; top: 30px; transform: rotateY(18deg) rotateZ(-8deg); }
.stack .p2 { left: 130px; top: 12px; transform: rotateY(14deg) rotateZ(-2deg); z-index: 2; }
.stack .p3 { left: 214px; top: 26px; transform: rotateY(10deg) rotateZ(6deg); }
.badge-3d { position: absolute; right: 22px; bottom: 26px; z-index: 3; transform: rotate(-12deg); display: grid; place-items: center; text-align: center;
            padding: 12px 18px; min-width: 150px; border-radius: 14px; color: #fff; font: 800 18px/1.1 var(--head); text-transform: uppercase; letter-spacing: .02em;
            background: linear-gradient(160deg, #f0cd7d 0%, #c9973b 55%, #a87925 100%);
            box-shadow: 0 16px 26px rgba(150, 105, 25, .35), inset 0 2px 0 rgba(255,255,255,.45), inset 0 -3px 0 rgba(0,0,0,.12); }
.badge-3d svg { width: 28px; height: 28px; margin-bottom: 2px; }
.badge-3d small { font-size: 12px; font-weight: 700; letter-spacing: .04em; opacity: .95; }
.is-example .badge-3d { font-size: 30px; }
.levels { grid-column: 1 / -1; display: flex; align-items: center; gap: 0; margin: 0 -24px 0 -26px; padding: 16px 26px; background: rgba(255,255,255,.75); border-top: 1px solid var(--line); }
.lv { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; padding: 0 18px; }
.lv:first-child { padding-left: 0; }
.lv + .lv { border-left: 1.5px solid var(--line); }
.lv i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-style: normal; font-weight: 800; font-size: 15px; }
.lv.serious { color: var(--red); } .lv.serious i { background: var(--red); }
.lv.checking { color: #b47d18; } .lv.checking i { background: var(--gold); }
.lv.ok { color: var(--ink); font-weight: 500; } .lv.ok i { background: var(--green); }

.section-title { margin: 22px 0 10px 4px; font-size: 20px; font-weight: 700; }
.rows { display: grid; gap: 10px; }
.frow { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto 160px 14px; align-items: center; gap: 14px;
        padding: 10px 16px; background: rgba(255,253,249,.92); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.ficon { width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center; }
.ficon svg { width: 24px; height: 24px; color: #fff; padding: 6px; border-radius: 50%; box-sizing: content-box; }
.serious .ficon { background: var(--red-soft); } .serious .ficon svg { background: var(--red); }
.worth-checking .ficon { background: var(--gold-soft); } .worth-checking .ficon svg { background: var(--gold); }
.ok .ficon { background: var(--green-soft); } .ok .ficon svg { background: var(--green); }
.flabel { font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.serious .flabel { color: var(--red); } .worth-checking .flabel { color: #b47d18; } .ok .flabel { color: var(--green); }
.frow h3 { margin: 1px 0 1px; font: 700 16px/1.25 var(--head); letter-spacing: -.01em; }
.fwhere { font-size: 13px; color: #3d4b4c; }
.frow p { margin: 1px 0 0; font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.frow p.explain { color: #33504d; }
.laws { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.law { font-size: 12px; font-weight: 600; color: var(--teal-ink); background: var(--teal-soft); border: 1px solid var(--teal-line); border-radius: 8px; padding: 2px 8px; }
.fmodels { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px; align-self: start; padding-top: 4px; max-width: 230px; }
.fvalue { text-align: right; display: grid; gap: 2px; }
.fvalue strong { font: 700 20px/1.15 var(--head); }
.serious .fvalue strong { color: var(--red); }
.serious .fvalue strong:not(:first-child), .fvalue strong { overflow-wrap: anywhere; }
.worth-checking .fvalue strong, .ok .fvalue strong { color: var(--ink); font-size: 15px; font-weight: 600; }
.serious .fvalue strong.words { font-size: 15px; }
.fvalue small { font-size: 12.5px; color: var(--muted); }
.chev { font-size: 26px; color: #8a9393; }
.note { margin: 12px 4px 0; font-size: 13.5px; color: var(--muted); }

.made { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.made li { display: grid; grid-template-columns: 30px 1fr; gap: 6px 10px; align-items: start; padding: 12px 14px; background: rgba(255,253,249,.85); border: 1px solid var(--line); border-radius: 14px; }
.made li .model { grid-column: 2; justify-self: start; }
.step-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px;
          background: linear-gradient(180deg, #e2b866, #b98a33); }
.made b { display: block; font-size: 14px; }
.made span { font-size: 12.5px; color: var(--muted); }

.next h2 { margin: 4px 4px 12px; font-size: 19px; font-weight: 700; }
.ncard { display: block; background: rgba(255,253,249,.94); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); margin-bottom: 12px; text-decoration: none; }
.ncard.link { display: grid; grid-template-columns: 40px 1fr 12px; gap: 12px; align-items: center; }
.ncard b { display: block; font-size: 15.5px; font-family: var(--head); }
.ncard small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.ncard i { font-style: normal; font-size: 22px; color: #8a9393; }
.nic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #f4efe4; color: var(--teal-ink); }
.nic svg { width: 21px; height: 21px; }
.nhead { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.seg { display: inline-flex; background: #f2ede3; border-radius: 10px; padding: 3px; margin: 0 0 10px; }
.seg span, .seg a { padding: 6px 16px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--muted); text-decoration: none; }
.seg .on { background: var(--teal-soft); color: var(--teal-ink); }
.letter-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.letter-list a { display: block; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--teal); color: var(--teal-ink); text-decoration: none; font-weight: 600; font-size: 13.5px; background: #fff; }
.letter-list li:first-child a { background: linear-gradient(180deg, #13786f, #0d5f59); color: #fff; border-color: transparent; }
.try { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 18px; padding: 18px; border-radius: 16px; text-decoration: none;
       background: linear-gradient(180deg, #13786f, #0b524d); color: #fff; font: 700 22px/1 var(--head); box-shadow: 0 14px 26px rgba(13, 95, 89, .3); }
.trust { display: grid; gap: 10px; margin-top: 14px; padding: 0 4px; font-size: 14px; }
.trust a { color: var(--teal-ink); font-weight: 600; }
.danger { font: 600 14px/1 "Inter", sans-serif; color: #a33a2e; background: #fff; border: 1.5px solid #e9b6ac; border-radius: 10px; padding: 10px 14px; cursor: pointer; }

.example-bar { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; padding: 8px 8px 8px 16px; border-radius: 12px;
               background: var(--gold-soft); border: 1px solid var(--gold-line); font-weight: 600; font-size: 15px; }
.example-bar .callout { margin-left: auto; }
.example-bar .warn { width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: #fff; display: grid; place-items: center; font-weight: 800; }
.callout { position: relative; z-index: 5; display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 999px;
           background: #fffdf6; border: 1.5px solid var(--gold-2); box-shadow: 0 8px 20px rgba(150, 105, 25, .18); font-weight: 600; font-size: 15px; white-space: nowrap; }
.callout b { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 17px;
             background: linear-gradient(180deg, #e7bd62, #b5862c); }
.side .callout { margin-top: 26px; }
.rows { position: relative; }
.rows .callout { position: absolute; left: 34%; top: 152px; }
.next .callout { margin: 0 0 10px; }

/* ---------- home (HOME_D) ---------- */
.home { display: grid; grid-template-columns: 47% 53%; gap: 0; align-items: start; min-height: 700px; padding: 10px 0 0 56px; }
.home .shield-big { width: 124px; filter: drop-shadow(0 18px 22px rgba(130, 95, 30, .25)); margin: 0 0 18px 4px; }
.home h1 { margin: 0; font-size: 68px; line-height: 1.06; font-weight: 800; color: var(--teal-ink); letter-spacing: -.025em; white-space: nowrap; }
.home h1 mark { background: linear-gradient(180deg, #d7a84b, #c39234); color: #fff; padding: 0 10px 4px; border-radius: 4px; }
.home .lead { margin: 14px 0 30px; font-size: 23px; line-height: 1.35; color: #5a6566; max-width: 640px; }
.cta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.home hr { border: 0; border-top: 1.5px solid #e2d8c6; margin: 40px 0 26px; max-width: 670px; }
.chips-ctx { display: flex; flex-wrap: nowrap; gap: 12px; }
.chips-ctx a { text-decoration: none; color: inherit; }
.chips-ctx span, .chips-ctx a { display: inline-flex; align-items: center; gap: 9px; padding: 11px 15px; white-space: nowrap; border-radius: 14px; background: #fffdf9; border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 500; font-size: 15px; }
.chips-ctx a:first-child { border: 1.5px solid var(--teal); color: var(--teal-ink); }
.chips-ctx svg { width: 20px; height: 20px; color: var(--teal-ink); }
.home-art { position: relative; height: 700px; perspective: 1400px; margin-top: -40px; }
.home-art .ring { position: absolute; left: 10px; top: 60px; width: 640px; height: 640px; border-radius: 50%;
                  border: 2px solid rgba(226, 184, 102, .55); box-shadow: 0 0 80px rgba(255, 200, 110, .45), inset 0 0 70px rgba(255, 215, 140, .35);
                  transform: rotateX(62deg) rotateZ(-18deg); }
.home-art .sheet { position: absolute; background: #fff; border-radius: 8px; overflow: hidden; border: 1px solid #ece2d1;
                   box-shadow: 0 30px 60px rgba(90, 65, 20, .22), 0 4px 10px rgba(90, 65, 20, .12); }
.home-art .sheet img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.home-art .s1 { left: 40px; top: 90px; width: 400px; height: 520px; transform: rotateY(-16deg) rotateZ(-6deg); z-index: 3; }
.home-art .s2 { left: 440px; top: 150px; width: 250px; height: 390px; transform: rotateY(-22deg) rotateZ(-3deg); z-index: 2; }
.home-art .s3 { left: 640px; top: 190px; width: 190px; height: 340px; transform: rotateY(-30deg) rotateZ(-2deg); z-index: 1; opacity: .95; }
.home-art .pin { position: absolute; z-index: 4; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 18px; box-shadow: 0 6px 14px rgba(0,0,0,.18); border: 3px solid #fff; }
.pin.a { left: 410px; top: 74px; background: #c89a3c; } .pin.b { left: 660px; top: 134px; background: #3b9a72; } .pin.c { left: 812px; top: 176px; background: #5384d6; }
.scan { position: absolute; z-index: 5; left: 220px; right: 20px; bottom: 30px; padding: 18px 22px; border-radius: 18px; background: rgba(255,253,249,.94);
        border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.scan b { display: block; font: 600 16px/1.2 var(--head); margin-bottom: 14px; }
.scan ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.scan ol::before { content: ""; position: absolute; left: 10%; right: 10%; top: 11px; height: 2px; background: linear-gradient(90deg, var(--gold-2) 30%, #ddd5c6 30%); }
.scan li { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; font-size: 12.5px; font-weight: 500; }
.scan li::before { content: ""; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid #c9c2b4; z-index: 1; }
.scan li.done::before { background: var(--teal-ink); border-color: var(--teal-ink); }
.scan li.now::before { background: var(--gold-soft); border-color: var(--gold-2); box-shadow: 0 0 0 4px rgba(226,184,102,.25); }
.scan .model { font-size: 11.5px; }
.powered { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: -10px 0 0; padding: 16px 38px; border-radius: 18px;
           background: rgba(255,253,249,.8); border: 1px solid var(--line); font-size: 15px; color: #3d4a4b; }
.powered .model { font-size: 13px; }

/* ---------- safe (SAFE_D) / how (HOW_D) / cases ---------- */
.safe { display: grid; grid-template-columns: minmax(0, 1fr) 620px; gap: 30px; align-items: start; padding: 4px 34px 0 76px; }
.safe h1, .how h1, .cases h1 { margin: 10px 0 0; font-size: 82px; line-height: 1; font-weight: 800; color: var(--teal-ink); letter-spacing: -.04em; }
.safe .lead { margin: 8px 0 20px; font-size: 33px; line-height: 1.2; color: #5a6566; max-width: 620px; font-weight: 400; }
.lockline { display: inline-flex; align-items: center; gap: 14px; padding: 8px 16px 8px 8px; border-radius: 16px; background: rgba(255,253,249,.92); border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 600; font-size: 17px; }
.lockline .lk { width: 42px; height: 42px; border-radius: 50%; background: var(--gold-soft); color: #b98a33; display: grid; place-items: center; }
.lockline .sep { width: 1px; height: 26px; background: var(--line); }
.safe-art { margin-top: 26px; position: relative; }
.safe-art { perspective: 1400px; }
.safe-art img { width: 108%; max-width: 860px; border-radius: 10px; transform: rotateX(22deg) rotateY(14deg) rotateZ(-7deg); transform-origin: left top; box-shadow: 0 40px 70px rgba(90, 65, 20, .25), 0 0 90px rgba(255, 205, 120, .35); border: 1px solid #ece2d1; }
.facts { display: grid; gap: 14px; }
.fact { display: grid; grid-template-columns: 80px 1fr auto; gap: 18px; align-items: center; padding: 16px 22px; border-radius: 18px; background: rgba(255,253,249,.92); border: 1px solid var(--line); box-shadow: var(--shadow); }
.fact .ic { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: #f6edda; color: var(--teal-ink); }
.fact .ic svg { width: 34px; height: 34px; }
.fact:nth-child(2) .ic { background: var(--teal-soft); }
.fact h3 { margin: 0 0 3px; font-size: 21px; font-weight: 700; color: var(--teal-ink); }
.fact .sub { font-size: 17px; color: #2f3c3d; margin-bottom: 6px; }
.fact p { margin: 0; font-size: 14.5px; color: var(--muted); }
.saw { padding: 18px 22px; border-radius: 18px; background: rgba(255,253,249,.92); border: 1px solid var(--line); box-shadow: var(--shadow); }
.saw-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.saw h3 { margin: 0; font-size: 22px; font-weight: 700; color: var(--teal-ink); }
.saw p { margin: 2px 0 12px; color: var(--muted); }
.switch { width: 58px; height: 32px; border-radius: 999px; background: var(--teal); position: relative; flex: 0 0 58px; }
.switch::after { content: ""; position: absolute; right: 4px; top: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; }
.saw img { display: block; width: 100%; max-height: 300px; object-fit: cover; object-position: top; border-radius: 10px; border: 1px solid var(--line); }

.how { text-align: center; padding-top: 6px; }
.how h1 { font-size: 70px; }
.how .lead { margin: 8px auto 6px; max-width: 900px; font-size: 24px; color: #5a6566; line-height: 1.35; }
.how-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 46px; text-align: center; padding: 0 22px; }
.how-art { position: relative; height: 210px; margin: 0 -10px -46px; perspective: 900px; z-index: 0; }
.how-art::before { content: ""; position: absolute; left: 6%; right: 6%; bottom: 10px; height: 170px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 205, 120, .5), rgba(255, 205, 120, 0)); }
.how-art img, .how-art .mini-letter { position: absolute; bottom: 30px; width: 58%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; background: #fff; border-radius: 6px; border: 1px solid #ece2d1; box-shadow: 0 16px 26px rgba(90, 65, 20, .18); }
.how-art .a { left: 8%; transform: rotateY(16deg) rotateZ(-7deg); }
.how-art .b { right: 6%; transform: rotateY(-12deg) rotateZ(5deg); }
.how-art img.wide { width: 92%; left: 4%; aspect-ratio: 4 / 3; transform: rotateX(18deg) rotateZ(-3deg); }
.how-art .badge { position: absolute; right: 12%; bottom: 36px; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(180deg, #e2b866, #b98a33); box-shadow: 0 8px 16px rgba(150,105,25,.35); z-index: 2; }
.mini-letter { padding: 14px 12px; text-align: left; font: 700 11px/1.3 var(--head); color: var(--teal-ink); }
.mini-letter i { display: block; height: 5px; margin: 7px 0; border-radius: 3px; background: #e7e1d5; }
.mini-letter em { display: inline-block; margin-top: 6px; color: #c4573c; font-style: normal; font-size: 10px; border: 1.5px solid #e9a99a; border-radius: 4px; padding: 1px 4px; transform: rotate(-8deg); }
.hstep { position: relative; z-index: 1; padding: 30px 16px 20px; border-radius: 20px; background: rgba(255,253,249,.9); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; gap: 10px; justify-items: center; align-content: start; }
.hstep .num { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 700 20px/1 var(--head); background: linear-gradient(180deg, #e2b866, #b98a33); box-shadow: 0 6px 14px rgba(150,105,25,.3); }
.hstep .big { width: 58px; height: 58px; color: var(--teal); }
.hstep h3 { margin: 0; font-size: 21px; color: var(--teal-ink); line-height: 1.2; }
.hstep p { margin: 0; color: #4f5c5d; font-size: 15.5px; }
.models-table { margin: 34px auto 0; max-width: 1100px; text-align: left; border-collapse: separate; border-spacing: 0 8px; width: 100%; }
.models-table td { padding: 12px 16px; background: rgba(255,253,249,.9); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 15px; }
.models-table td:first-child { border-left: 1px solid var(--line); border-radius: 12px 0 0 12px; white-space: nowrap; }
.models-table td:last-child { border-right: 1px solid var(--line); border-radius: 0 12px 12px 0; color: var(--muted); white-space: nowrap; }
.signbar { margin: 28px 0 0; padding: 18px; border-radius: 18px; background: rgba(255,253,249,.8); border: 1px solid var(--line); font: 600 20px/1 var(--head); color: var(--teal-ink); text-align: center; }

.cases h1 { font-size: 56px; }
.case-list { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 12px; max-width: 980px; }
.case-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 18px; align-items: center; padding: 16px 20px; border-radius: 16px; background: rgba(255,253,249,.94); border: 1px solid var(--line); box-shadow: var(--shadow); }
.case-list a { font: 700 18px/1.2 var(--head); color: var(--teal-ink); text-decoration: none; }
.case-list small { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.case-list .amt { font: 700 18px/1 var(--head); color: var(--teal-ink); }
.case-list .tag { font-size: 12px; font-weight: 700; color: #8a6a24; background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: 6px; padding: 3px 7px; }
.warn-note { background: var(--gold-soft) !important; border-color: var(--gold-line) !important; }
.notice { max-width: 980px; padding: 12px 16px; border-radius: 12px; background: var(--green-soft); border: 1px solid #bfe3d1; }

/* ---------- confidence, plain lines, ask (Я9/Я11/Я14) ---------- */
.sure { margin-left: 6px; font-size: 11px; letter-spacing: 0; text-transform: none; font-weight: 600; }
.sure.high { color: var(--green); } .sure.mid { color: #b47d18; } .sure.low { color: #d9772b; }
details.plain { margin-top: 4px; font-size: 13px; }
details.plain summary { cursor: pointer; color: var(--teal-ink); font-weight: 600; }
details.plain ul { margin: 6px 0 0; padding-left: 18px; color: #3d4b4c; }
.ncard.ask form { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 8px; }
.ncard.ask textarea { flex: 1; font: inherit; font-size: 13px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 12px; resize: vertical; background: #fff; }
.ncard.ask button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--teal); color: #fff; font-size: 18px; cursor: pointer; }
#answer p { margin: 4px 0 6px; font-size: 13.5px; }

/* ---------- laws (Я10) ---------- */
.laws-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.lawcard { padding: 12px 14px; border-radius: 14px; background: rgba(255,253,249,.94); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; gap: 4px; align-content: start; }
.lawcard.yes { border-left: 4px solid var(--green); } .lawcard.check { border-left: 4px solid var(--gold); }
.lawcard .lhead { display: flex; gap: 8px; align-items: baseline; }
.lawcard .ln { font: 700 12px/1 var(--head); color: #fff; background: var(--teal); border-radius: 6px; padding: 3px 6px; }
.lawcard h3 { margin: 0; font-size: 15px; }
.lawcard p { margin: 0; font-size: 13px; color: var(--muted); }
.lawcard .why { color: #2f3c3d; }
.lawcard .ldate { font-size: 13px; font-weight: 600; color: #8a6a24; }
.laws-more { margin-top: 10px; }
.laws-more summary { cursor: pointer; font-weight: 600; color: var(--teal-ink); }
.laws-more .laws-grid { margin-top: 10px; }
.ctx { border: 0; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ctx legend { font-weight: 600; margin-bottom: 8px; }
.ctx-chip { display: inline-flex !important; align-items: center; gap: 8px; margin: 0 !important; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 500 !important; cursor: pointer; }
.ctx-chip input { width: auto !important; }
.ctx-chip:has(input:checked) { border-color: var(--teal); background: var(--teal-soft); }

.agents-page .facts { max-width: 980px; margin: 26px auto 18px; text-align: left; }
.agents-page .fact { grid-template-columns: 80px 1fr; }
.agents-page .fact .ic b { font: 800 18px/1 var(--head); color: var(--teal-ink); }
.agents-page code { font-size: 13px; background: #f3ede2; border-radius: 6px; padding: 2px 6px; overflow-wrap: anywhere; }

/* ---------- upload ---------- */
.upload { max-width: 820px; margin: 10px auto 40px; background: rgba(255,253,249,.94); border: 1px solid var(--line); border-radius: 22px; padding: 30px 36px; box-shadow: var(--shadow); }
.upload h1 { margin: 0 0 6px; font-size: 38px; font-weight: 800; color: var(--teal-ink); }
.upload label { display: block; font-weight: 600; margin: 16px 0 6px; }
.upload input, .upload select { width: 100%; padding: 11px 13px; font: inherit; border: 1px solid #e3d9c7; border-radius: 12px; background: #fff; }
.upload .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.upload .check { display: flex; gap: 10px; align-items: center; font-weight: 500; margin-top: 16px; }
.upload .check input { width: auto; }
.upload button[type=submit] { margin-top: 24px; width: 100%; }

/* ---------- letters (LETTER_D) ---------- */
.letters-grid { display: grid; grid-template-columns: 360px minmax(0, 1fr) 360px; gap: 26px; align-items: start; padding: 0 20px; }
.letters-side h1 { margin: 6px 0 2px; font-size: 32px; font-weight: 800; color: var(--teal-ink); }
.lead-s { margin: 0 0 16px; color: var(--muted); font-size: 17px; }
.lcard { display: grid; grid-template-columns: 70px 1fr 14px; gap: 14px; align-items: center; padding: 14px; margin-bottom: 12px; border-radius: 16px; background: rgba(255,253,249,.94); border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; }
.lcard.on { border: 2px solid var(--gold-2); }
.lcard b { display: block; font: 700 16px/1.25 var(--head); color: var(--ink); }
.lcard small { display: block; font-size: 13.5px; color: #3d4b4c; margin-top: 3px; }
.lcard small.muted { color: var(--muted); }
.lcard em { font-style: normal; font-size: 22px; color: #8a9393; }
.lthumb { width: 70px; height: 86px; border-radius: 6px; background: #fff; border: 1px solid #ece2d1; box-shadow: 0 4px 10px rgba(80,60,20,.1); padding: 12px 10px; display: grid; gap: 6px; align-content: start; }
.lthumb i { display: block; height: 5px; border-radius: 3px; background: #e6dfd2; }
.lthumb.call { display: grid; place-items: center; color: var(--teal); }
.lthumb.call svg { width: 34px; height: 34px; }
.lthumb i:first-child { width: 50%; background: var(--teal-line); }
.paper-wrap { position: relative; }
.paper-wrap .lang { position: absolute; right: 26px; top: 16px; z-index: 2; }
.letter-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; max-width: 780px; margin: -6px auto 0; }
.letter-actions .btn { min-height: 50px; font-size: 16px; }
.quoted { background: linear-gradient(180deg, rgba(255,255,255,0) 8%, #f8e7bf 8%, #f8e7bf 92%, rgba(255,255,255,0) 92%); box-decoration-break: clone; -webkit-box-decoration-break: clone; padding: 0 3px; }
.letter .law { white-space: nowrap; font-size: 12px; border-color: var(--gold-line); background: #fffaf0; color: #7a5a1c; }
.letters-right { display: grid; gap: 16px; }
.side-card { padding: 22px; border-radius: 18px; background: rgba(255,253,249,.94); border: 1px solid var(--line); box-shadow: var(--shadow); }
.side-card h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font-size: 22px; font-weight: 700; color: var(--teal-ink); }
.side-card p { margin: 0 0 12px; color: #4b5859; font-size: 15px; }
.side-card .cal svg { width: 40px; height: 40px; color: var(--gold); }
.deadline { padding: 12px 0; border-top: 1px solid var(--line); margin-bottom: 12px; font-size: 15px; }
.deadline b { color: #b98a33; font-size: 17px; }

a.btn { text-decoration: none; }
.tr-note { max-width: 780px; margin: 22px auto 0; padding: 10px 16px; border-radius: 12px; background: var(--gold-soft); border: 1px solid var(--gold-line); font-size: 14.5px; }
.letter.translation { background: #fffdf6; }
.side-card .spark { color: var(--gold); font-size: 26px; }
.side-card .info { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #eaf1fb; color: #23406b; font-weight: 600; }
.pdfcard small a { color: var(--teal-ink); font-weight: 600; }

/* ---------- call cheat sheet (CALL_D) ---------- */
.call-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr) 420px; gap: 26px; align-items: start; padding: 0 18px; }
.cheat { padding: 26px 30px; border-radius: 22px; background: rgba(255,253,249,.94); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.cheat .eyebrow { margin-bottom: 4px; }
.cheat h1 { margin: 0 0 18px; font-size: 44px; line-height: 1.08; font-weight: 800; color: var(--teal-ink); }
.cstep { display: grid; grid-template-columns: 38px 1fr; gap: 14px; padding: 14px 16px; margin-bottom: 12px; border-radius: 16px; background: rgba(255,255,255,.7); border: 1px solid var(--line); }
.cstep .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 700 16px/1 var(--head); background: linear-gradient(180deg, #e2b866, #b98a33); }
.cstep h2 { margin: 4px 0 10px; font-size: 20px; font-weight: 700; }
.say { margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--teal-soft); font-size: 16px; }
.nums { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.num-card { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 12px 14px; border-radius: 12px; background: #fbf5e8; border: 1px solid var(--line); }
.num-card small { display: block; color: var(--muted); font-size: 13px; }
.num-card b { font: 700 18px/1.3 var(--head); }
.num-card button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 9px; cursor: pointer; font-weight: 600; }
.obj { display: grid; grid-template-columns: 1fr 28px 1.3fr; gap: 10px; align-items: center; margin-bottom: 8px; }
.obj .they { padding: 12px 14px; border-radius: 12px; background: var(--red-soft); color: #8a2a22; }
.obj .ans { padding: 12px 14px; border-radius: 12px; background: var(--teal-soft); }
.obj .ans small { display: block; margin-top: 6px; color: var(--muted); }
.phone { position: relative; margin: 0 auto; width: 340px; padding: 26px 22px 30px; border-radius: 48px; background: #fffdf8; border: 10px solid #e7d3a6;
         box-shadow: 0 30px 60px rgba(90,65,20,.25), inset 0 0 0 2px #fff; text-align: center; }
.phone::before { content: ""; display: block; width: 110px; height: 26px; border-radius: 14px; background: #1e2526; margin: -6px auto 18px; }
.phone h2 { margin: 0; font-size: 26px; line-height: 1.15; color: var(--teal-ink); }
.phone p { color: var(--muted); }
.mic { width: 130px; height: 130px; border-radius: 50%; margin: 22px auto 10px; display: grid; place-items: center; border: 0; cursor: pointer; color: #fff;
       background: radial-gradient(circle at 40% 35%, #1b8379, #0c5650); box-shadow: 0 0 0 12px rgba(226,184,102,.25), 0 16px 30px rgba(13,95,89,.35); }
.mic svg { width: 54px; height: 54px; }
.mic.rec { background: radial-gradient(circle at 40% 35%, #e05a4f, #a8322a); }
.vlangs { display: inline-flex; gap: 6px; margin-top: 10px; }
.note-out { text-align: left; margin-top: 14px; font-size: 14px; }

/* ---------- appeals (APPEAL_D) ---------- */
.appeals { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 30px; align-items: start; padding: 0 30px 0 60px; }
.appeals h1 { margin: 6px 0 10px; font-size: 54px; line-height: 1.06; font-weight: 800; color: var(--teal-ink); }
.appeals h1 mark { background: linear-gradient(180deg, #d7a84b, #c39234); color: #fff; padding: 0 8px 3px; border-radius: 4px; }
.appeals .lead { font-size: 19px; color: #5a6566; margin: 0 0 22px; }
.eyebrow.wide { letter-spacing: .2em; }
.track { list-style: none; padding: 16px; margin: 0 0 10px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; border-radius: 18px; background: rgba(255,253,249,.8); border: 1px solid var(--line); }
.track li { position: relative; display: grid; gap: 4px; justify-items: center; text-align: center; padding: 14px 8px; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.track li.on { border: 2px solid var(--gold-2); }
.track li.done .n { background: var(--teal); color: #fff; }
.track .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #ece6da; font-weight: 700; font-size: 13px; }
.track li.on .n { background: linear-gradient(180deg, #e2b866, #b98a33); color: #fff; }
.track small { color: var(--muted); font-size: 12.5px; }
.tcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 6px 0 14px; }
.tcard { display: grid; gap: 6px; align-content: start; padding: 18px; border-radius: 18px; background: rgba(255,253,249,.94); border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; }
.tcard.sel { border: 2px solid var(--gold-2); }
.tcard b { font: 700 17px/1.25 var(--head); }
.tcard small { color: var(--muted); }
.st { justify-self: start; padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; background: #f1ece2; }
.st.waiting, .st.sent { background: var(--gold-soft); color: #8a6a24; }
.st.reply, .st.next { background: var(--green-soft); color: #1f7a52; }
.reply-card h2 { font-size: 26px; }
.mini-form { display: grid; gap: 10px; margin: 6px 0 14px; }
.mini-form label { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }
.mini-form input { padding: 9px 11px; font: inherit; border: 1px solid #e3d9c7; border-radius: 10px; background: #fff; }
.parsed { margin-top: 14px; padding: 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); display: grid; gap: 6px; }

/* ---------- letter ---------- */
.letter { max-width: 780px; margin: 24px auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 44px 58px; font-size: 16px; line-height: 1.55; box-shadow: var(--shadow-lg); }
.letter .meta { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.letter h1 { font-size: 20px; margin: 18px 0 14px; }
.letter .sig { margin-top: 28px; }
.letter .sig .line { margin-top: 30px; border-top: 1px solid var(--ink); width: 240px; padding-top: 4px; font-size: 13px; color: var(--muted); }
.letter .sources { margin-top: 28px; border-top: 1px dashed var(--line); padding-top: 12px; font-size: 13px; color: var(--muted); }
.letter .sources q { color: var(--ink); }
.letter .stamp { color: #c4573c; font-weight: 800; letter-spacing: .5px; font-size: 13px; }
.toolbar { max-width: 780px; margin: 0 auto; display: flex; gap: 12px; align-items: center; }
.toolbar a, .toolbar button { font: inherit; font-weight: 700; color: var(--teal-dark); background: none; border: 0; cursor: pointer; padding: 0; text-decoration: underline; }

@media (max-width: 1280px) {
  .case-grid { grid-template-columns: 200px minmax(0, 1fr) 260px; }
  .docs { grid-column: 1 / -1; order: 3; }
  .callouts, .example-bar { display: none; }
  .home { grid-template-columns: 1fr; }
  .home-art { height: 560px; transform: scale(.85); transform-origin: left top; }
  .safe { grid-template-columns: 1fr; }
  .how-steps { grid-template-columns: repeat(2, 1fr); row-gap: 38px; }
}
@media (max-width: 900px) {
  .nav { flex-wrap: wrap; gap: 14px; padding: 10px 16px; }
  .links { gap: 18px; font-size: 14px; flex-wrap: wrap; }
  .case-grid { grid-template-columns: 1fr; }
  .hero-card { grid-template-columns: 1fr; }
  .stack { display: none; }
  .levels { flex-wrap: wrap; gap: 8px; }
  .frow { grid-template-columns: 48px 1fr; }
  .fmodels, .fvalue { grid-column: 2; align-items: flex-start; text-align: left; }
  .chev { display: none; }
  .home h1 { font-size: 46px; }
  .home-art { display: none; }
  .safe h1, .how h1 { font-size: 52px; }
  .how-steps { grid-template-columns: 1fr; }
  .upload .row { grid-template-columns: 1fr; }
}
@media print { .letters-side, .letters-right, .letter-actions, .paper-wrap .lang, .paper-wrap > .small, .letter .law, .nav, .glow, .toolbar, .letter .sources, .letter .small { display: none; } .letter { border: 0; margin: 0; padding: 0; box-shadow: none; } body { background: #fff; } }

details.receipt { margin: 14px 0 0; font-size: 13px; border: 1px solid #dfe7e6; border-radius: 10px; padding: 10px 12px; background: #fbfdfc; }
details.receipt summary { cursor: pointer; color: var(--teal-ink); font-weight: 600; }
details.receipt table { width: 100%; border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; }
details.receipt th, details.receipt td { text-align: left; padding: 5px 6px; border-bottom: 1px solid #e8eeed; }
details.receipt th:nth-child(n+3), details.receipt td:nth-child(n+3) { text-align: right; }
@media (max-width: 560px) { details.receipt th:nth-child(4), details.receipt td:nth-child(4), details.receipt th:nth-child(5), details.receipt td:nth-child(5) { display: none; } }

/* Longer model names (Nemotron 3.5 Super VL) and amounts: wrap instead of running under the paper stack or out of a card */
.hero-text { min-width: 0; position: relative; z-index: 3; }
.hero-card h1 { font-size: clamp(30px, 2.5vw, 42px); white-space: normal; }
.made { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.made li { min-width: 0; }
.made li .model { white-space: normal; max-width: 100%; }
.made li .model svg, .made li .model em { flex: none; }
/* Home: the title and situation chips stay in their column at laptop widths; scan chips wrap for long model names */
.home h1 { font-size: clamp(40px, 3.2vw, 68px); }
.home > :first-child { position: relative; z-index: 6; min-width: 0; }
.scan li { min-width: 0; }
.scan .model { white-space: normal; font-size: 11px; max-width: 100%; }
@media (max-width: 900px) { .home h1 { font-size: clamp(30px, 9vw, 46px); white-space: normal; } .home > :first-child { z-index: auto; } }
/* Phone width: no sideways scroll on the home chips, letters, call sheet, appeals and model table */
@media (max-width: 900px) {
  .chips-ctx { flex-wrap: wrap; }
  .letters-grid, .appeals, .call-grid { grid-template-columns: minmax(0, 1fr); }
  .call-grid > * { min-width: 0; max-width: 100%; }
  .letters-grid > *, .appeals > * { max-width: 100%; min-width: 0; }
  .cstep { grid-template-columns: 38px minmax(0, 1fr); }
  .cstep > * { min-width: 0; overflow-wrap: anywhere; }
  .track { grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); }
  .how { overflow-x: auto; }
  .models-table { display: block; overflow-x: auto; max-width: 100%; }
  .safe-art img { max-width: 100%; height: auto; }
}
.home { overflow-x: clip; }  /* the paper art may run past the window edge; it is cut there, not scrolled to */

/* Home art: one rendered stack of SAMPLE papers (style D) instead of flat thumbnails */
.home-art .papers { position: absolute; left: 0; top: 30px; width: min(100%, 900px); height: auto; z-index: 2;
  filter: drop-shadow(0 26px 34px rgba(120, 90, 40, .18)); }
.home-art .scan { left: 120px; bottom: 40px; }
@media (max-width: 900px) {
  .home-art { display: block; height: auto; margin: 26px 0 0; perspective: none; }
  .home-art .ring { display: none; }
  .home-art .papers { position: static; width: 100%; }
  .home-art .scan { position: static; margin-top: -12px; }
  .scan ol { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .scan li { font-size: 11px; }
}
/* Phone: compact header with a scrolling link row, cards with the icon above the text, no left gutter */
@media (max-width: 900px) {
  .nav { margin: 8px 10px; padding: 8px 14px; gap: 8px 14px; border-radius: 16px; }
  .brand .shield { height: 34px; } .brand .wordmark { height: 26px; }
  .links { flex-wrap: nowrap; overflow-x: auto; gap: 18px; width: 100%; white-space: nowrap; font-size: 14px; scrollbar-width: none; }
  .links::-webkit-scrollbar { display: none; }
  .home, .safe, .how { padding-left: 16px; padding-right: 16px; }
  .safe { grid-template-columns: minmax(0, 1fr); }
  .safe h1, .how h1 { font-size: 44px; }
  .safe .lead { font-size: 22px; }
  .lockline { flex-wrap: wrap; }
  .fact { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px 16px; }
  .fact .ic { width: 48px; height: 48px; }
  .fact .ic svg { width: 24px; height: 24px; }
}

/* /how: one rendered paper image per step (style D) */
.how-art img.art { position: absolute; left: 0; right: 0; bottom: 34px; width: 100%; height: 190px; aspect-ratio: auto; object-fit: contain;
  background: none; border: 0; border-radius: 0; box-shadow: none; transform: none; filter: drop-shadow(0 16px 20px rgba(120, 90, 40, .16)); }
/* /safe: the copy that left the device, flat and full width so it can be read */
.safe-art img { width: 100%; max-width: 100%; transform: none; border: 1px solid var(--line); box-shadow: 0 24px 50px rgba(90, 65, 20, .18); background: #fff; }
.saw img { max-height: none; object-fit: contain; background: #fff; }

/* Background: warm light cream like HOME_D, no yellow wash or stripes (Nadya chose it 28.10, TG 3182). */
body { background: radial-gradient(1100px 600px at 75% 10%, rgba(255, 255, 255, .75), rgba(255, 255, 255, 0) 70%),
                   linear-gradient(180deg, #faf6ef 0%, #f4eee4 100%); }
.glow { background: radial-gradient(620px 380px at 72% 34%, rgba(255, 226, 170, .16), rgba(255, 226, 170, 0) 70%); }

@media (max-width: 900px) {
  .links { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .scan ol { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .scan ol::before { display: none; }
  .scan li { grid-template-columns: 22px minmax(0, 1fr) auto; grid-auto-flow: column; justify-items: start; align-items: center; text-align: left; font-size: 13px; gap: 10px; }
  .scan li .model { justify-self: end; white-space: nowrap; }
  .models-table, .models-table tbody, .models-table tr, .models-table td { display: block; width: 100%; }
  .models-table { overflow: visible; }
  .models-table tr { padding: 12px 14px; margin-bottom: 10px; border-radius: 14px; background: rgba(255,253,249,.92); border: 1px solid var(--line); }
  .models-table td { padding: 2px 0; border: 0; }
  .models-table td:last-child { text-align: right; font-size: 12.5px; color: var(--muted); }
}
@media (max-width: 640px) {
  .nums { grid-template-columns: minmax(0, 1fr); }
  .num-card { grid-template-columns: minmax(0, 1fr) auto; }
  .cstep { grid-template-columns: minmax(0, 1fr); }
  .cstep .n { margin-bottom: 2px; }
}
@media (max-width: 640px) {
  .page { padding: 0 10px 20px; }
  .home, .safe, .how { padding-left: 4px; padding-right: 4px; }
  .call-grid { padding: 0; gap: 14px; }
  .cheat { padding: 16px 14px; }
  .cstep { padding: 12px; }
}
@media (max-width: 640px) {
  .obj { grid-template-columns: minmax(0, 1fr); gap: 4px; margin-bottom: 14px; }
  .obj > div[aria-hidden="true"] { transform: rotate(90deg); justify-self: center; line-height: 1; }
}

/* Documents column: page 1 of each PDF instead of a blank file icon */
.thumb.file.has-img { display: flex; flex-direction: column; aspect-ratio: auto; padding: 0; overflow: hidden; place-items: stretch; gap: 0; }
.thumb.file.has-img .pv { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; }
.thumb.file.has-img small { display: block; padding: 6px 8px 7px; background: #fbf7ef; border-top: 1px solid #ece2d1; color: #3a4646; text-align: left; }
/* Letters list: the real first lines of each letter instead of grey bars */
.lthumb.paper { display: block; overflow: hidden; padding: 8px 7px; font-size: 5.6px; line-height: 1.35; color: #4b5859; }
.lthumb.paper b { display: block; margin-bottom: 4px; font-size: 6.4px; color: var(--teal-ink); }
.lthumb.paper span { display: block; }

/* Narrow screens and large text (Nadya's phone, 28.10): nothing may run past the right edge */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-x: clip; }
@media (max-width: 640px) {
  h1, h2, h3, .lead, .lead-s, .fact h3, .fact .sub, .cheat h1 { overflow-wrap: anywhere; }
  .safe .lead { font-size: 20px; }
  .lockline { display: flex; flex-wrap: wrap; max-width: 100%; white-space: normal; gap: 8px 12px; }
  .lockline .sep { display: none; }
  .safe-art, .saw { max-width: 100%; }
}
@media (max-width: 640px) {
  .callout { white-space: normal; max-width: calc(100% - 8px); }
  .letter-actions { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
  .letter-actions .btn { min-width: 0; }
}

/* /safe: one sheet as photographed and as the model got it, side by side, as paper */
.safe-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 26px; max-width: 760px; }
.safe-pair figure { margin: 0; }
.safe-pair img { display: block; width: 100%; height: auto; background: #fff; border-radius: 4px; box-shadow: 0 18px 34px rgba(90, 65, 20, .16), 0 2px 6px rgba(90, 65, 20, .10); transform: none; }
.safe-pair figcaption { margin-top: 12px; font: 600 16px/1.3 var(--head); color: var(--teal-ink); }
.safe-pair figcaption small { display: block; margin-top: 2px; font: 400 13.5px/1.35 "Inter", system-ui, sans-serif; color: var(--muted); }
@media (max-width: 640px) { .safe-pair { grid-template-columns: minmax(0, 1fr); gap: 26px; } }
@media (max-width: 640px) {
  .home .shield-big { width: 92px; margin-left: 8px; filter: drop-shadow(0 8px 10px rgba(130, 95, 30, .14)); }
}

/* 'What the models saw': each covered sheet as paper, small, in a grid */
.sent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 14px; margin: 10px 0 16px; }
.sent-grid img { width: 100%; height: auto; background: #fff; border-radius: 3px; box-shadow: 0 8px 18px rgba(90, 65, 20, .14), 0 1px 3px rgba(90, 65, 20, .1); }
/* /safe pair: small, side by side even on a phone; a tap opens the full sheet */
.safe-pair { grid-template-columns: repeat(2, minmax(0, 300px)); gap: 18px; }
.safe-pair a { display: block; }
.safe-pair figcaption { font-size: 14.5px; }
@media (max-width: 640px) { .safe-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .safe-pair figcaption { font-size: 13px; } }
/* Appeals on a phone: smaller title, steps as a list, no side offset */
@media (max-width: 640px) {
  .appeals { padding: 0; }
  .appeals h1 { font-size: 34px; line-height: 1.08; }
  .track { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .track li { display: flex; align-items: center; gap: 10px; text-align: left; }
}
.try-note { margin-top: 8px; }
