/* RuleSize home page: direction D, chosen by Dudu on 2.12.2026. The green cutting mat of direction A, with the
   before-and-after picture of direction B in the first screen. Ported from _review/home-v2/d/ (style.css, and the
   parts of its base.css the site does not already have).
   Loaded on the home page only (pages.mjs, homePage), after rulesize.css. Every rule is scoped to main.home-d, so
   nothing here reaches another page. The class names that rulesize.css already uses for something else got their
   own names here (hero-text, stays-line, ba-tag, step-list, step-no, gets-sec, once-line, refund-sec, refund-rules);
   the shared ones (wrap, mat, btn, h1, h2, h3, lead, small, ico, num) are adjusted below. */

/* The home column. On phones and tablets it is the prototype's (full width, 16 / 40 px edges). From 900 px it is the
   site's own column: 1240 px, and from 1024 px the prototype's 1320 px (1360 px from 1760 px), which rulesize.css now
   gives every page, so the logo and the menu stay in the same place on every page and line up with the headline.
   The edges are declared again here because rulesize.css works them out once, on :root. */
body[data-page="home"] {
  --gutter: 16px; /* the site's phone edge, so the logo does not move between pages */
  --page-max: 100%;
  --edge-l: max(var(--gutter), env(safe-area-inset-left));
  --edge-r: max(var(--gutter), env(safe-area-inset-right));
  --bar-l: max(var(--edge-l), calc((100% - var(--page-max)) / 2 + var(--gutter)));
  --bar-r: max(var(--edge-r), calc((100% - var(--page-max)) / 2 + var(--gutter)));
}
@media (min-width: 640px) { body[data-page="home"] { --gutter: 40px; } }
@media (min-width: 900px) { body[data-page="home"] { --gutter: 40px; --page-max: 1240px; } }
@media (min-width: 1024px) { body[data-page="home"] { --gutter: 56px; --page-max: 1432px; } }
@media (min-width: 1760px) { body[data-page="home"] { --page-max: 1472px; } }

.home-d {
  --paper-2: #E9EEEA;
  --on-mat: #FFFFFF;
  --tick-deep: #D9A30B;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --gut: var(--gutter);
  --hdr: 56px; /* the site's top bar */
  --shadow-print: 0 1px 1px rgba(8, 30, 24, .14), 0 6px 14px -6px rgba(8, 30, 24, .30), 0 26px 44px -22px rgba(8, 30, 24, .45);
  --shadow-phone: 0 2px 3px rgba(0, 0, 0, .18), 0 18px 36px -12px rgba(0, 0, 0, .38), 0 44px 70px -30px rgba(0, 0, 0, .45);
  display: block;
  overflow-x: clip;
  font-size: 17px;
  line-height: 1.5;
}
@media (min-width: 900px) { .home-d { --hdr: 76px; } }

/* ---------- Base (what the prototype's base.css adds to the site's) ---------- */
.home-d :is(ul, ol, dl, dd) { margin: 0; padding: 0; list-style: none; }
.home-d img, .home-d svg { max-width: 100%; }
.home-d img { height: auto; }
.home-d .wrap { width: 100%; } /* the site's .wrap (edges from the variables above); full width also as a grid item of the hero */
.home-d li { text-wrap: pretty; }
.home-d a { text-underline-offset: 4px; text-decoration-thickness: 1.5px; }

/* Type scale */
.home-d .h1 { font-size: clamp(36px, 8.6vw, 46px); line-height: 1.04; font-weight: 800; letter-spacing: -0.022em; }
.home-d .h2 { font-size: clamp(30px, 6.4vw, 36px); line-height: 1.08; font-weight: 800; letter-spacing: -0.018em; }
.home-d .h3 { font-size: 19px; line-height: 1.25; font-weight: 700; letter-spacing: -0.004em; }
.home-d .lead { font-size: 18px; line-height: 1.5; color: var(--ink-2); max-width: none; }
.home-d .small { font-size: 14.5px; color: var(--ink-2); }
@media (min-width: 1024px) {
  .home-d .h1 { font-size: clamp(52px, 4.5vw, 72px); }
  .home-d .h2 { font-size: clamp(38px, 3.1vw, 48px); }
  .home-d .h3 { font-size: 20px; }
  .home-d .lead { font-size: 20px; }
}

/* Buttons: the yellow button on the mat, and one text link */
.home-d .btn { display: inline-flex; width: auto; white-space: normal; gap: 10px; min-height: 56px; padding: 12px 26px; font-size: 18px; line-height: 1.2; text-align: center;
  transition: transform 180ms var(--ease), background-color 180ms ease, box-shadow 180ms ease; }
.home-d .btn-tick { background: var(--tick); color: var(--ink); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .7); }
.home-d .btn-tick:hover { background: #F6CA45; }
.home-d .link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; font-size: 17px; color: var(--mat); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1.5px; transition: text-decoration-color 180ms ease, gap 220ms var(--ease); }
.home-d .link:hover { gap: 12px; }
.home-d .on-dark .link { color: #FFFFFF; text-decoration-color: rgba(255, 255, 255, .55); }
.home-d .on-dark .link:hover { text-decoration-color: var(--tick); }
/* The second document's button: an outline on the mat */
.home-d .btn-line { background: transparent; color: #FFFFFF; border: 1.5px solid rgba(255, 255, 255, .7); }
.home-d .btn-line:hover { border-color: var(--tick); }
.home-d .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }

/* "Ready now: …" above the buttons: the documents on sale today */
.home-d .ready { flex-basis: 100%; margin: 0 0 2px; font-size: 16px; line-height: 1.4; color: var(--on-mat-2); }
.home-d .ready b { color: #FFFFFF; font-weight: 800; }
@media (max-width: 639px) {
  .home-d .actions { flex-direction: column; align-items: stretch; gap: 8px; }
  .home-d .ready { flex-basis: auto; } /* in a column, 100% would be a height */
  .home-d .actions .btn { width: 100%; }
  .home-d .actions .link { justify-content: center; }
}
@media (prefers-reduced-motion: no-preference) {
  .home-d .btn:hover { transform: translateY(-1px); }
  .home-d .btn:active { transform: scale(0.97); }
}

/* "Your photo stays on your device" */
.home-d .stays-line { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.home-d .stays-line .ico { color: var(--mat); }
.home-d .on-dark .stays-line .ico { color: var(--mint); }

/* A phone, drawn: black frame, the real screen inside. Width comes from the place that uses it. */
/* R3-DES-3: no fixed aspect ratio; the frame is as tall as the screenshot in it, so object-fit no longer cuts its sides */
.home-d .phone { position: relative; padding: 3.4%; border-radius: 15.5% / 7.2%; background: #0B0F0E; box-shadow: inset 0 0 0 1.5px #2C3431, inset 0 0 0 3px #0B0F0E, var(--shadow-phone); }
.home-d .phone::before { content: ""; position: absolute; right: -1.2%; top: 22%; width: 1.4%; height: 9%; border-radius: 0 3px 3px 0; background: #1B2220; }
.home-d .phone img { display: block; width: 100%; height: auto; border-radius: 12.6% / 5.9%; background: #000; }

/* A print or sheet on a surface */
.home-d .print { display: block; background: #FFFFFF; box-shadow: var(--shadow-print); }
.home-d .print img { width: 100%; height: auto; }

/* ---------- The mat: grid lines every inch, finer every quarter inch ---------- */
.home-d .mat {
  --in: 56px;
  border-radius: 0;
  background-color: var(--mat);
  background-image:
    linear-gradient(rgba(255, 255, 255, .105) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .105) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: var(--in) var(--in), var(--in) var(--in), calc(var(--in) / 4) calc(var(--in) / 4), calc(var(--in) / 4) calc(var(--in) / 4);
  background-position: 0 var(--mat-y, 0);
  color: var(--on-mat);
}
.home-d .mat .lead { color: var(--on-mat-2); }

/* ---------- Hero ---------- */
.home-d .hero {
  --hero-h: min(100svh - var(--hdr), 1000px);
  /* one inch on the mat: as large as the right half of the page allows, and small enough to leave room for the words */
  --in: clamp(32px, (100vw - 2 * var(--gut)) / 7.9, 64px);
  --mat-y: 34px;
  position: relative; overflow: hidden;
  display: grid; grid-template-rows: auto 1fr auto;
  min-height: var(--hero-h);
}
.home-d .mat-scale {
  position: relative; height: 34px; display: flex; overflow: hidden; white-space: nowrap;
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .55) 0 1px, transparent 1px var(--in)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .45) 0 1px, transparent 1px calc(var(--in) / 2)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .35) 0 1px, transparent 1px calc(var(--in) / 8));
  background-size: 100% 14px, 100% 9px, 100% 5px; background-repeat: no-repeat;
  border-bottom: 1px solid rgba(255, 255, 255, .16);
}
.home-d .mat-scale li { flex: 0 0 var(--in); text-align: center; transform: translateX(calc(var(--in) / 2)); padding-top: 13px; font-size: 11.5px; font-weight: 700; line-height: 1; color: rgba(255, 255, 255, .62); font-variant-numeric: tabular-nums; }
/* .wrap gives the page edges (left and right padding), so the grid only adds space above and below */
.home-d .hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; align-content: center; padding-top: 36px; padding-bottom: 32px; }
.home-d .hero-text { display: grid; gap: 22px; align-content: center; max-width: 720px; }
.home-d .hero .h1 { font-size: clamp(36px, 8.6vw, 46px); }
@media (min-width: 1024px) { .home-d .hero .h1 { font-size: clamp(48px, 3.9vw, 64px); } }
.home-d .hero .h1 { color: #FFFFFF; }
.home-d .hero .stays-line { color: #FFFFFF; }

/* Before and after, on the mat. In units of the figure (100 wide, 77 tall), so it scales as one piece:
   the photo 78 wide; the cut square at x 20.4-55.6, y 3.9-39.2; the result at x 58-92, y 34-68.
   The crop box (x 313, y 60, 542 px of the 1200 x 800 photo) and the 30 mm head are the tool's own numbers for this file. */
/* R3-A11Y-3a, R3-DES-7: .ba is a grid of one cell. The picture (.ba-pic, 100 x 77) and the caption under the result
   share it: the caption is in the flow, pushed down by its margin (68% of the width + 12 px, the foot of the result),
   so with larger text it makes the cell taller and moves the buttons down. The space under the picture is the
   picture's margin, the same numbers as before, so at the normal text size nothing moves. */
.home-d .ba { position: relative; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); }
.home-d .ba-pic { grid-area: 1 / 1; align-self: start; position: relative; aspect-ratio: 100 / 77; margin-bottom: 44px; }
.home-d .ba-before { position: absolute; left: 0; top: 0; width: 78%; overflow: hidden; border-radius: 10px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 30px 60px -28px rgba(0, 0, 0, .7); }
.home-d .ba-before img { width: 100%; }
.home-d .crop { position: absolute; left: 26.1%; top: 7.5%; width: 45.2%; aspect-ratio: 1; box-shadow: 0 0 0 2px var(--tick), 0 0 0 999px rgba(8, 30, 24, .5); }
.home-d .crop-c { position: absolute; width: 16px; height: 16px; border: 4px solid var(--tick); }
.home-d .crop-tl { left: -5px; top: -5px; border-right: 0; border-bottom: 0; }
.home-d .crop-tr { right: -5px; top: -5px; border-left: 0; border-bottom: 0; }
.home-d .crop-bl { left: -5px; bottom: -5px; border-right: 0; border-top: 0; }
.home-d .crop-br { right: -5px; bottom: -5px; border-left: 0; border-top: 0; }
.home-d .ba-tag { position: absolute; left: 12px; top: 12px; display: inline-block; padding: 5px 11px; border-radius: 999px; font-size: 13.5px; font-weight: 800; line-height: 1.2; white-space: nowrap; background: rgba(255, 255, 255, .94); color: var(--ink); }
.home-d .ba-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke: var(--tick); stroke-width: 2; stroke-dasharray: 6 5; }
.home-d .ba-after { position: absolute; left: 58%; top: 44.16%; width: 34%; }
.home-d .ba-print img { width: 100%; }
/* A white millimetre ruler laid on the mat, as tall as the 51 mm photo; the yellow span is the head, 6.45% to 65.38% of the photo */
.home-d .mm { position: absolute; left: calc(100% + 8px); top: 0; height: 100%; width: clamp(18px, 2.4vw, 30px); border-radius: 0 3px 3px 0; background-color: #FFFFFF; box-shadow: 0 12px 24px -14px rgba(0, 0, 0, .6); }
.home-d .mm::after { content: ""; position: absolute; inset: 0; border-left: 1.5px solid var(--ink);
  background-image:
    repeating-linear-gradient(to bottom, var(--ink) 0 1.5px, transparent 1.5px calc(100% / 5.1)),
    repeating-linear-gradient(to bottom, var(--ink) 0 1px, transparent 1px calc(100% / 10.2)),
    repeating-linear-gradient(to bottom, rgba(19, 33, 29, .55) 0 1px, transparent 1px calc(100% / 51));
  background-size: 80% 100%, 55% 100%, 32% 100%; background-repeat: no-repeat; }
.home-d .mm-head { position: absolute; left: 0; right: 0; top: 6.45%; height: 58.93%; background: rgba(242, 190, 34, .6); border-top: 2px solid var(--tick-deep); border-bottom: 2px solid var(--tick-deep); }
.home-d .ba-cap { grid-area: 1 / 1; align-self: start; margin: calc(68% + 12px) 0 0 58%; width: 41.82%; /* under the result (x 58-92), to the edge of the picture */ display: grid; gap: 2px; font-size: 14.5px; line-height: 1.35; color: var(--on-mat-2); }
.home-d .ba-cap b { color: #FFFFFF; font-weight: 800; }
.home-d .swatch { display: inline-block; width: 10px; height: 10px; margin-right: 7px; border-radius: 2px; background: var(--tick); vertical-align: 0; }
/* Phones and tablets: title, then the picture, then the words and the buttons */
@media (max-width: 1023px) {
  .home-d .hero-grid { gap: 22px; }
  .home-d .hero-text { display: contents; }
  .home-d .hero-text > .h1 { order: 1; }
  .home-d .hero-grid > .ba { order: 2; margin-top: 6px; }
  .home-d .hero-text > .actions { order: 3; } /* DES-2, CX-16: the buttons in the first screen */
  .home-d .hero-text > .lead { order: 4; }
  .home-d .hero-text > .stays-line { order: 5; }
  .home-d .actions .ready { order: 2; margin: 4px 0 0; }
  .home-d .hero-grid { padding-top: 20px; }
  .home-d .ba { max-width: 620px; }
  .home-d .ba-pic { margin-bottom: 64px; }
}
@media (max-width: 639px) {
  /* R2-DES-1: the first button fits the first screen of a phone (390 x 664 and 320 x 568). The space under the
     picture is in em, so it grows with the caption's text (R2-DES-10). */
  .home-d .ba-pic { margin-bottom: 3.3em; }
  .home-d .hero-grid { gap: 16px; padding-top: 16px; }
  .home-d .ba-cap { margin-left: 47.8%; width: 51%; font-size: 13.5px; } /* ends inside the picture's column (47.8% + 51% of it), so the words never reach the screen edge */
  .home-d .crop-c { width: 11px; height: 11px; border-width: 3px; }
  .home-d .crop-tl { left: -4px; top: -4px; } .home-d .crop-tr { right: -4px; top: -4px; } .home-d .crop-bl { left: -4px; bottom: -4px; } .home-d .crop-br { right: -4px; bottom: -4px; }
  .home-d .mm { left: calc(100% + 5px); }
  .home-d .ba-tag { font-size: 12.5px; padding: 4px 9px; left: 8px; top: 8px; }
}
/* The smallest phones (320 wide): the title in three lines instead of four, and a little less space around the
   picture, so the first button fits the 568 px screen (R2-DES-1). The caption under the picture still has 1em of
   space before the button. */
@media (max-width: 359px) {
  .home-d .hero .h1 { font-size: 31px; }
  .home-d .hero-grid { gap: 14px; padding-top: 12px; }
  .home-d .hero-grid > .ba { margin-top: 0; }
  .home-d .ba-pic { margin-bottom: 3em; }
}

.home-d .cut { position: relative; }
.home-d .cut img { width: 100%; height: auto; }
/* The head, measured: on after.webp it runs from 6.45% to 65.38% of the photo (the tool's own numbers for this file) */
.home-d .gauge { position: absolute; left: calc(100% + 7px); top: 6.45%; height: 58.93%; width: 9px; border: 2px solid var(--tick); border-left: 0; }
.home-d .gauge-n { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); white-space: nowrap; background: var(--tick); color: var(--ink); font-size: 13px; font-weight: 800; padding: 3px 8px; border-radius: 6px; }

/* Facts on a ruler line, at the foot of the mat */
.home-d .mat-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(max(7em, calc(50% - 10px)), 1fr)); gap: 18px 20px; margin: 0; padding: 16px 0 30px; border-top: 2px solid rgba(255, 255, 255, .7);
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .7) 0 1.5px, transparent 1.5px 25%), repeating-linear-gradient(90deg, rgba(255, 255, 255, .45) 0 1px, transparent 1px 5%);
  background-size: 100% 10px, 100% 5px; background-repeat: no-repeat; }
/* Says the numbers below belong to the example, a US passport photo: other documents have their own */
.home-d .facts-h { margin: 0 0 12px; font-size: 15px; line-height: 1.4; color: var(--on-mat-2); }
.home-d .mat-facts dt { font-size: 21px; font-weight: 800; line-height: 1.15; color: #FFFFFF; margin-top: 4px; text-wrap: balance; overflow-wrap: anywhere; }
/* R3-DES-7, R3-A11Y-3b: two columns at the normal size (the 1024 px rule below makes four); with larger text, one
   column, so "600 × 600 px" no longer runs over the next fact. R3-DES-5: "4 × 6 in · Letter · A4" breaks after a dot. */
.home-d .mat-facts dd { margin: 3px 0 0; font-size: 14.5px; color: var(--on-mat-2); }

@media (min-width: 1024px) {
  .home-d .hero { --in: clamp(48px, min((min(100vw - 2 * var(--gut), 1320px) - 72px) / 2.15 / 7.6, (var(--hero-h) - 34px - 170px) / 8.1), 92px); }
  .home-d .hero-grid { grid-template-columns: minmax(0, 5.2fr) minmax(0, 6.8fr); column-gap: clamp(48px, 4.5vw, 96px); align-items: center; padding-top: 24px; padding-bottom: 24px; }
  .home-d .hero-text { gap: 26px; }
  .home-d .ba { max-width: 860px; justify-self: end; }
  .home-d .ba-pic { margin-bottom: 52px; }
  .home-d .mat-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-bottom: 34px; }
  .home-d .mat-facts dt { font-size: clamp(20px, 1.7vw, 25px); }
}
@media (min-width: 1760px) { .home-d .hero { --in: clamp(48px, min((min(100vw - 2 * var(--gut), 1360px) - 88px) / 2.15 / 7.6, (var(--hero-h) - 34px - 170px) / 8.1), 96px); } }

/* One entrance: the cut is marked, then the finished photo arrives. Transform and opacity only; with reduced
   motion the page shows its final frame at once. */
@media (prefers-reduced-motion: no-preference) {
  .home-d .ba .crop { animation: hd-mark 900ms var(--ease) 200ms both; }
  .home-d .ba-after { animation: hd-arrive 900ms var(--ease) 520ms both; }
  .home-d .ba-cap { animation: hd-arrive 900ms var(--ease) 520ms both; } /* arrives with the result, as when it sat inside it */
  .home-d .ba-lines { animation: hd-fade 500ms ease 700ms both; }
  .home-d .hero-text > * { animation: hd-rise 700ms var(--ease) both; }
  .home-d .hero-text > :nth-child(2) { animation-delay: 60ms; }
  .home-d .hero-text > :nth-child(3) { animation-delay: 120ms; }
  .home-d .hero-text > :nth-child(4) { animation-delay: 180ms; }
}
@keyframes hd-mark { from { opacity: 0; transform: scale(1.18); } }
@keyframes hd-arrive { from { opacity: 0; transform: translate(-14px, 18px); } }
@keyframes hd-fade { from { opacity: 0; } }
@keyframes hd-rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Section frame ---------- */
.home-d :is(.docs, .how, .gets-sec, .refund-sec) { padding: clamp(72px, 9vw, 128px) 0; }
/* R4-DES-5: one column no wider than the page (minmax(0, 1fr)), so with larger text (200% at 320 px) the heading and
   its lead wrap instead of being cut at the right edge; a word longer than the column breaks. The 1024 px rule
   below still makes two columns. */
.home-d .sec-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-bottom: clamp(32px, 4vw, 56px); }
.home-d .sec-head .h2, .home-d .step-txt p { overflow-wrap: break-word; }
.home-d .sec-head .lead { max-width: 52ch; }
/* R5-DES-7: "Docu&shy;ments and prices" (pages.mjs) may break at its soft hyphen only when the heading's column is
   narrow next to its text (under 12em: text at 200% on a phone), so it reads "Docu-" / "ments", not "Document" / "s".
   Anywhere else hyphens are off, so the heading balances its lines as before (WebKit balanced it differently once it
   could break there). At the normal size the column is 16.9em or more. */
.home-d .docs .sec-head { container: sec-head / inline-size; }
.home-d .docs .sec-head .h2 { -webkit-hyphens: none; hyphens: none; }
@container sec-head (max-width: 12em) { .home-d .docs .sec-head .h2 { -webkit-hyphens: manual; hyphens: manual; } }
@media (min-width: 1024px) {
  .home-d .sec-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 72px; align-items: end; }
}

/* ---------- Documents ---------- */
.home-d .doc-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .home-d .doc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1100px) { .home-d .doc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; } }
.home-d .doc { display: grid; grid-template-rows: auto 1fr; height: 100%; border-radius: 18px; overflow: hidden; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: transform 260ms var(--ease), box-shadow 260ms var(--ease), border-color 200ms ease; }
.home-d .doc:hover { border-color: #B9C8C0; box-shadow: 0 22px 40px -26px rgba(14, 74, 61, .55); }
@media (prefers-reduced-motion: no-preference) { .home-d .doc:hover { transform: translateY(-2px); } .home-d .doc:hover .doc-pic > * { transform: scale(1.03); } }
.home-d .doc-pic { position: relative; aspect-ratio: 5 / 4; display: grid; place-items: center; overflow: hidden; }
.home-d .doc-pic > * { transition: transform 420ms var(--ease); }
.home-d .pic-pass { background: var(--paper-2); }
.home-d .pic-pass .print { width: 44%; transform: rotate(-3deg); }
.home-d .pic-pass .dim { position: absolute; left: 28%; right: 28%; bottom: 9%; text-align: center; font-size: 13px; font-weight: 800; color: var(--ink-2); border-top: 1.5px solid var(--ink-2); padding-top: 4px; }
.home-d .pic-pass .dim::before, .home-d .pic-pass .dim::after { content: ""; position: absolute; top: -6px; width: 1.5px; height: 10px; background: var(--ink-2); }
.home-d .pic-pass .dim::before { left: 0; } .home-d .pic-pass .dim::after { right: 0; }
.home-d .pic-visa { background: var(--mat); }
.home-d .file { display: grid; justify-items: center; gap: 12px; width: 52%; }
.home-d .file img { width: 100%; height: auto; border-radius: 4px; box-shadow: 0 0 0 4px rgba(255, 255, 255, .14); }
.home-d .file-tag { display: inline-block; background: rgba(8, 30, 24, .82); color: #FFFFFF; font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.home-d .pic-visa .file-tag { background: var(--tick); color: var(--ink); }
.home-d .pic-orig img { width: 100%; height: 100%; object-fit: cover; }
.home-d .pic-orig .file-tag { position: absolute; left: 12px; bottom: 12px; }
.home-d .pic-check { background: var(--paper-2); align-items: start; }
.home-d .pic-check img { width: 72%; margin-top: 18px; border-radius: 14px 14px 0 0; box-shadow: 0 0 0 6px #0B0F0E, 0 14px 30px -12px rgba(0, 0, 0, .4); }
/* R4-DES-5: the card text keeps to the card's width (minmax(0, 1fr)). A range ("600–1200 px", "25–35 mm") stays whole
   (span.nowrap) while it fits; only when the card is narrower than the range (6em: it is about 5.5em of the card's
   text, so with larger text, e.g. 200% at 320 px) may it wrap after its dash. At the normal size the card is at
   least 8.3em wide, so the lines break where they did. */
.home-d .doc-body { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; gap: 8px; padding: 20px 22px 22px; container: doc-body / inline-size; }
@container doc-body (max-width: 6em) { .home-d .doc-text .nowrap { white-space: normal; } }
/* R5-DES-7: likewise, a word wider than the card's text (R2-A11Y-8 breaks it anywhere: "passpor" / "t") gets a hyphen
   when the browser knows where. Only under 7em (text at 200% on a phone); at the normal size the card text is 8.3em
   or more, and hyphens stay manual. */
@container doc-body (max-width: 7em) { .home-d .doc .h3, .home-d .doc-text { -webkit-hyphens: auto; hyphens: auto; } }
.home-d .doc .h3 { color: var(--mat); }
.home-d .doc-text { font-size: 15.5px; color: var(--ink-2); }
/* R2-A11Y-8: with wider letter and word spacing (WCAG 1.4.12), a long word breaks instead of cutting the card. */
.home-d .doc .h3, .home-d .doc-text { overflow-wrap: anywhere; }
.home-d .doc-price { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.home-d .go { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--paper); color: var(--mat); transition: background-color 200ms ease, transform 260ms var(--ease); }
.home-d .go .ico { width: 19px; height: 19px; stroke-width: 2.2; }
.home-d .doc:hover .go { background: var(--tick); transform: translateX(3px); }
/* R3-DES-7 (what was left of it, round 5): with larger text, the tags on the card pictures stay inside the picture.
   Only when a card is narrow next to its text: under 12.5em, as with text at 200% from 640 px. At the normal size
   the narrowest card (1100 px) is 13.3em, so nothing changes; under 640 px the tags are hidden.
   - The visa file keeps its width (52% of the picture) and its tag wraps under it, centred on the picture with 12 px
     on each side (the negative margins reach from the file's edges to the picture's). The picture grows taller when
     the file and its tag need it, instead of cutting the tag off.
   - The original photo's tag wraps inside the picture, 12 px from its edges. */
@media (min-width: 640px) {
  .home-d .doc { container: doc / inline-size; }
  @container doc (max-width: 12.5em) {
    .home-d .pic-visa { aspect-ratio: auto; min-height: 80cqw; }
    .home-d .pic-visa .file { grid-template-columns: minmax(0, 1fr); padding-block: 12px; }
    .home-d .pic-visa .file-tag { white-space: normal; text-align: center; margin-inline: calc(12px - 24cqw); }
    .home-d .pic-orig .file-tag { white-space: normal; max-width: calc(100% - 24px); }
  }
}

/* ---------- How it works: four real screens on one ruler ---------- */
.home-d .how { background: #FFFFFF; }
.home-d .step-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 16px; }
.home-d .step-list .phone { width: min(100%, 236px); margin: 0 auto 26px; --shadow-phone: 0 2px 3px rgba(0, 0, 0, .14), 0 22px 40px -22px rgba(0, 0, 0, .45); }
.home-d .step-txt { position: relative; padding-top: 1.3em; /* R3-DES-7: 22 px at 17 px, grows with the text */ border-top: 2px solid var(--ink);
  background-image: repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 10%); background-size: 100% 6px; background-repeat: no-repeat; }
.home-d .step-txt::before { content: ""; position: absolute; left: 0; top: -2px; width: 2px; height: 16px; background: var(--ink); }
.home-d .step-no { position: absolute; left: 8px; top: 8px; font-size: 13px; font-weight: 800; }
.home-d .step-txt .h3 { margin: 10px 0 6px; }
.home-d .step-txt p { font-size: 15.5px; color: var(--ink-2); }
@media (min-width: 1024px) {
  .home-d .step-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 28px; } /* DES-15: the same gap between all four */
  .home-d .step-list .phone { margin-left: 0; }
}
@media (max-width: 639px) { .home-d .step-list .phone { width: 100%; } .home-d .step-txt p { font-size: 15px; } .home-d .step-txt .h3 { font-size: 17px; } }
/* R5-DES-7: a word wider than its step column (R4-DES-5's break-word gave "backgrou" / "nd") breaks with a hyphen
   instead. Only when the column is narrow next to its text (under 7em: text at 200% on a phone); at the normal size
   the columns are 8em or more and hyphens stay manual. */
.home-d .step-list li { container: step / inline-size; }
@container step (max-width: 7em) { .home-d .step-txt p, .home-d .step-txt .h3 { -webkit-hyphens: auto; hyphens: auto; } }

/* ---------- Privacy ---------- */
.home-d .privacy { padding: clamp(72px, 9vw, 120px) 0; overflow: hidden; }
.home-d .privacy-grid { display: grid; gap: 48px; align-items: center; }
.home-d .privacy-copy { display: grid; gap: 22px; max-width: 600px; }
.home-d .privacy .h2 { color: #FFFFFF; }
.home-d .ticks { display: grid; gap: 14px; }
.home-d .ticks li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; font-size: 18px; }
.home-d .ticks .ico { width: 24px; height: 24px; color: var(--pass); }
.home-d .on-dark .ticks .ico { color: var(--mint); }
.home-d .privacy-pic { position: relative; width: min(78%, 330px); justify-self: center; }
/* Around the last line of scr-checks-end.webp ("Your photo was checked on this device. Nothing was uploaded."): in the
   new shot (R3-DES-4) it is at 87.6% of the screen, 4.8% tall, in a frame with no fixed ratio (R3-DES-3), which is
   86.4% to 91.0% of .privacy-pic; the box adds a little room around it. tools/make-images.mjs --screens prints it. */
.home-d .marker { position: absolute; left: -10px; right: -10px; top: 85.5%; height: 6.4%; border: 3px solid var(--tick); border-radius: 12px; }
@media (min-width: 1024px) {
  .home-d .privacy-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); column-gap: 72px; }
}

/* ---------- What you get ---------- */
.home-d .gets-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; align-items: center; }
.home-d .gets-copy { display: grid; gap: 26px; }
.home-d .once-line { display: grid; gap: 4px; font-weight: 700; font-size: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.home-d .flatlay { --mm: clamp(.6px, (100vw - 2 * var(--gut)) / 392, 1.75px); position: relative; width: calc(386 * var(--mm)); height: calc(318 * var(--mm)); justify-self: center; }
.home-d .flatlay .print { position: absolute; }
.home-d .fl-a4 { left: 0; top: 0; width: calc(210 * var(--mm)); transform: rotate(-1.5deg); }
.home-d .fl-46 { left: calc(226 * var(--mm)); top: calc(10 * var(--mm)); width: calc(152.4 * var(--mm)); transform: rotate(2deg); }
.home-d .fl-15 { left: calc(232 * var(--mm)); top: calc(150 * var(--mm)); width: calc(150 * var(--mm)); transform: rotate(-2deg); }
.home-d .flatlay img { width: 100%; height: auto; }
.home-d .fl-tag { position: absolute; font-size: 13px; font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.home-d .fl-tag-a4 { left: 2px; top: calc(302 * var(--mm)); }
.home-d .fl-tag-46 { left: calc(232 * var(--mm)); top: calc(120 * var(--mm)); }
/* R5-DES-7: the tag moves left only when it has no room on the right of the sheet (text at 200% at 320 px: it was
   cut to "10 × 15 c"); 5.2em is its own width. At the normal size it is where it was: 150 mm of room, at least 90 px. */
.home-d .fl-tag-15 { left: min(calc(236 * var(--mm)), calc(100% - 5.2em)); top: calc(258 * var(--mm)); }
@media (min-width: 1024px) {
  .home-d .gets-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 72px; }
  .home-d .flatlay { --mm: clamp(1.2px, (min(100vw - 2 * var(--gut), 1320px) * .55) / 390, 1.9px); justify-self: end; }
}

/* ---------- Refund ---------- */
.home-d .refund-sec { background: #FFFFFF; }
.home-d .refund-grid { display: grid; gap: 44px; align-items: center; }
.home-d .refund-copy { display: grid; gap: 22px; }
.home-d .refund-rules { display: grid; margin-top: 6px; }
/* R3-DES-7: the day count (6.3em = 104 px at 16.5 px) and its line side by side; with larger text, the line goes
   under the count instead of running over it */
.home-d .refund-rules li { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 16px 0; border-top: 1px solid var(--line); font-size: 16.5px; }
.home-d .refund-rules li > b { flex: 0 0 6.3em; }
.home-d .refund-rules li > span { flex: 1 1 8em; min-width: 0; }
.home-d .refund-rules li:last-child { border-bottom: 1px solid var(--line); }
.home-d .refund-rules b { font-weight: 800; }
/* The conditions sit right under the promise (FTC: a condition of a money-back offer is shown next to it) */
.home-d .refund-terms { margin: 0; font-size: 16px; color: var(--ink-2); }
.home-d .refund-terms a { color: var(--mat); font-weight: 700; display: inline-flex; align-items: center; min-height: 44px; } /* alone on its line: a 44 px tap area */
.home-d .code-example { position: relative; max-width: 420px; margin-inline: auto; padding: 26px 24px 22px; border-radius: 20px; background: var(--mat); color: #FFFFFF; box-shadow: 0 30px 60px -34px rgba(14, 74, 61, .7); display: grid; gap: 6px; }
.home-d .code-example .ex-tag { position: absolute; top: -12px; left: 20px; background: var(--tick); color: var(--ink); font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: 6px; }
.home-d .code-example .code-label { font-size: 14px; font-weight: 700; color: var(--on-mat-2); }
.home-d .code-example .code { font-size: 30px; font-weight: 800; letter-spacing: .04em; line-height: 1.15; }
.home-d .code-example .code-note { font-size: 14.5px; color: #E4EEE9; }
/* R6-DES-7: the space for the "Example" tag grows with the text, so with text at 200% the tag no longer covers
   "Your order code". At the normal size it is 26 px, as before (0.5 px + 1.5em of 17 px). */
.home-d .code-example { padding-top: calc(0.5px + 1.5em); }
.home-d .sample-line { margin-top: 14px; font-size: 15.5px; }
@media (min-width: 1024px) { .home-d .refund-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 80px; } }

/* ---------- Close ---------- */
.home-d .close { padding: clamp(80px, 10vw, 136px) 0; }
.home-d .close-in { display: grid; gap: 22px; justify-items: start; }
.home-d .close { --in: clamp(64px, 9vw, 104px); }
.home-d .close-grid { display: grid; gap: 40px; align-items: center; }
.home-d .close .h2 { color: #FFFFFF; max-width: 16ch; font-size: clamp(34px, 4.4vw, 60px); }
.home-d .close-pic { justify-self: center; padding-right: 72px; }
.home-d .close-pic .cut { width: calc(2 * var(--in)); transform: rotate(4deg); }
.home-d .close-pic .gauge-n { font-size: 15px; }
@media (min-width: 1024px) { .home-d .close-grid { grid-template-columns: minmax(0, 1fr) auto; } .home-d .close-pic { justify-self: end; margin-right: 6%; } }

/* DES-19: on phones each document card is a row, with a small picture on the left */
@media (max-width: 639px) {
  .home-d .doc { grid-template-rows: none; grid-template-columns: 112px minmax(0, 1fr); }
  .home-d .doc-pic { aspect-ratio: auto; min-height: 100%; }
  .home-d .doc-body { padding: 14px 16px; gap: 4px; }
  .home-d .doc-price { font-size: 21px; margin-top: 4px; }
  /* The size tags do not fit a 112 px picture at a readable size (12 px or more); the card text says the same. */
  .home-d .doc-pic .dim, .home-d .doc-pic .file-tag { display: none; }
}

/* A11Y-13: Windows high contrast. The yellow swatch and the head range on the ruler keep their colour (the same
   content is in the aria-label). The buttons' edges are in rulesize.css. */
@media (forced-colors: active) {
  .home-d .swatch, .home-d .mm-head { forced-color-adjust: none; }
}
