/* pv.css — /prepare (Vera's spec, Sep 28 2026): "The Window Envelope".
   Only what shows through the window is sent. home.css supplies the base;
   every class here is pv- (plus the ones prepare.mjs writes itself: choice,
   choice__amount, choice__source, choice__typed, num, is-over, is-busy, and
   btn / link-quiet toggled on #email and #copy). Steps are revealed by the
   script with the hidden attribute, so nothing here may override it. */
[hidden] { display: none !important; }
.pv { --rule: #E7E4DC; --mono: "IBM Plex Mono", ui-monospace, monospace; }
.pv section { position: relative; }

/* hero */
.pv-hero { padding: clamp(150px, 16vw, 200px) 0 130px; min-height: 74vh; display: flex; align-items: center; }
.pv-hero > .wrap { width: 100%; }
.pv-hero__grid { display: grid; grid-template-columns: 1fr auto; gap: 48px 80px; align-items: end; }
.pv-hero h1 { font-size: clamp(42px, 5.6vw, 72px); line-height: 1.05; letter-spacing: -0.025em; max-width: 11em; }
.pv-hero__p { color: var(--snow-2); font-size: 19px; margin-top: 22px; max-width: 30em; }
.pv-zero { display: grid; justify-items: start; }
.pv-zero b { font: 600 clamp(120px, 13vw, 180px)/.85 var(--head); color: var(--red); letter-spacing: -.05em; }
.pv-zero span { font-size: 15px; color: var(--snow-2); margin-top: 14px; max-width: 12em; }

/* steps */
.pv-step { padding: 120px 0; }
.pv-step + .pv-step > .wrap { border-top: 1px solid var(--line-l); padding-top: 110px; }
.pv-step + .pv-step { padding-top: 0; }
.pv-step:first-of-type { padding-top: 140px; }
.pv-step__h { display: flex; align-items: baseline; gap: 28px; margin-bottom: 30px; }
.pv-n { font: 500 clamp(56px, 7vw, 96px)/1 var(--mono); color: var(--ink-2); letter-spacing: -.04em; opacity: .55; }
.pv-step h2 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.2; color: var(--ink); max-width: 20em; }
.pv-p { font-size: 18px; color: var(--ink-2); max-width: 36em; }
.pv-h { font: 600 17px var(--head); color: var(--ink); margin-bottom: 12px; }
.pv-micro { font-size: 14px; color: var(--ink-2); margin-top: 12px; max-width: 44em; }
.pv-micro:empty { display: none; }
.link-quiet { color: inherit; border: 0; border-bottom: 1px solid currentColor; background: none; padding: 0; font: inherit; cursor: pointer; }
.pv code { font: 500 .9em var(--mono); background: var(--light-2, #F1F0EC); padding: 1px 6px; border-radius: 4px; }
.pv-split { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.pv-aside { display: grid; gap: 14px; font-size: 16px; color: var(--ink-2); max-width: 34em; padding-top: 4px; }

/* 01: the sheet to drop */
.pv-drop { position: relative; display: grid; place-items: center; width: 100%; max-width: 520px; aspect-ratio: 4 / 3; margin-top: 30px; border: 2px dashed var(--ink-2); border-radius: 4px; cursor: pointer; background: #FFF; text-align: center; padding: 24px; transition: border-color 200ms, opacity 200ms; }
.pv-drop::before { content: ""; position: absolute; top: 18%; left: 22%; right: 22%; height: 2px; background: var(--rule); box-shadow: 0 18px 0 var(--rule), 0 36px 0 var(--rule), 0 54px 0 var(--rule); }
.pv-drop:hover, .pv-drop:focus-within { border-color: var(--ink); }
.pv-drop.is-over { border: 2px solid var(--red); }
.pv-drop.is-busy { opacity: .6; }
.pv-drop__label { font: 500 20px var(--head); color: var(--ink); position: relative; margin-top: 60px; }
.pv-drop__label--touch { display: none; }
@media (hover: none) { .pv-drop__label--pointer { display: none; } .pv-drop__label--touch { display: block; } }
.pv-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pv-error { color: var(--red); font-weight: 500; margin-top: 12px; }

/* 02: the two figures */
.pv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 48px; margin-top: 44px; }
.pv-grid--3 { grid-template-columns: repeat(3, 1fr); margin-top: 10px; }
.pv-span { grid-column: 1 / -1; }
.pv-choices { border: 0; padding: 0; margin: 0; min-width: 0; }
.pv-choices legend { font: 600 17px var(--head); color: var(--ink); margin-bottom: 14px; }
.pv-choices ul { list-style: none; display: grid; gap: 10px; }
.choice { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; min-height: 64px; padding: 12px 18px; border: 1px solid var(--line-l); border-radius: 10px; background: #FFF; cursor: pointer; transition: border-color 150ms; }
.choice:has(input:checked) { border: 2px solid var(--dark); padding: 11px 17px; }
.choice input[type=radio] { grid-row: span 2; width: 18px; height: 18px; accent-color: var(--dark); }
.choice__amount { font: 500 28px var(--mono); color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.choice__source { font-size: 13px; color: var(--ink-2); }
.choice:has(.choice__typed) .choice__amount { font: 500 17px var(--head); letter-spacing: 0; }
.choice__typed { grid-column: 2; margin-top: 8px; height: 44px; font: 500 18px var(--mono); padding: 0 12px; border: 1px solid var(--line-l); border-radius: 8px; width: 100%; max-width: 240px; }
.pv-found { margin-top: 8px; }
.pv-table { margin-top: 14px; overflow-x: auto; background: #FFF; border: 1px solid var(--line-l); border-radius: 10px; }
.pv-ledger { width: 100%; border-collapse: collapse; font: 400 14px var(--mono); }
.pv-ledger th, .pv-ledger td { text-align: left; padding: 11px 18px; border-bottom: 1px solid var(--rule); font-weight: 400; }
.pv-ledger thead th { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.pv-ledger .num { text-align: right; font-variant-numeric: tabular-nums; }
.pv-ledger tr:last-child th, .pv-ledger tr:last-child td { border-bottom: 0; }
.pv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 12px; }

/* 03: three details */
.pv-field { display: grid; gap: 8px; align-content: start; }
.pv-field label { font: 600 15px var(--head); color: var(--ink); }
.pv-field label .pv-micro { display: inline; font-weight: 400; }
.pv-field select, .pv-field input { height: 56px; font: 400 16px var(--body); color: var(--ink); padding: 0 16px; border: 1px solid var(--line-l); border-radius: 10px; background: #FFF; width: 100%; }
.pv-field select { appearance: none; background: #FFF url("chevron.svg") no-repeat right 16px center; padding-right: 40px; }
.pv-field select:focus, .pv-field input:focus, .choice__typed:focus { outline: 2px solid var(--dark); outline-offset: 1px; }

/* 04: the envelope */
.pv-envelope { max-width: 760px; margin-top: 36px; background: var(--dark); padding: 40px; border-radius: 4px; position: relative; }
.pv-envelope::before { content: "DEKALOS · contact@dekalos.com"; display: block; font: 500 12px var(--mono); letter-spacing: .14em; color: var(--snow-2); margin-bottom: 22px; }
.pv-window { background: #FFF; border-radius: 6px; overflow: hidden; }
.pv-letter { animation: pvrise 600ms cubic-bezier(.2,.7,.2,1) both; }
@keyframes pvrise { from { transform: translateY(48px); opacity: 0; } }
.pv-prepared { display: block; width: 100%; min-height: 0; field-sizing: content; border: 0; resize: vertical; padding: 26px 28px; font: 400 14px/1.6 var(--mono); color: var(--ink); background: #FFF; white-space: pre; overflow-x: auto; overflow-wrap: normal; }
.pv-prepared:focus { outline: 2px solid var(--red); outline-offset: -2px; }
#warnings-block { margin-top: 34px; }
.pv-ticks { list-style: none; display: grid; gap: 10px; }
.pv-ticks li { position: relative; padding-left: 24px; color: var(--ink-2); }
.pv-ticks li::before { content: ""; position: absolute; left: 0; top: .7em; width: 12px; border-top: 2px solid var(--red); }
.pv-send .pv-actions { margin-top: 30px; }
.pv-send .btn { background: var(--dark); color: var(--snow); }
.pv-send .link-quiet { color: var(--ink); }

@media (max-width: 860px) {
  .pv-hero__grid, .pv-split, .pv-grid, .pv-grid--3 { grid-template-columns: 1fr; }
  /* Phone (Sep 28): the statement is 64 fixed columns, so it scrolls sideways
     in its window rather than wrapping; the hero sizes to its content; step
     numbers sit above their headings. */
  .pv-hero { min-height: 0; padding-bottom: 72px; }
  .pv-zero b { font-size: 112px; }
  .pv-step__h { flex-direction: column; align-items: flex-start; gap: 6px; }
  .pv-n { font-size: 48px; }
  .pv-step h2 { font-size: 26px; }
  .pv-step { padding: 80px 0; }
  .pv-step + .pv-step > .wrap { padding-top: 72px; }
  .pv-step:first-of-type { padding-top: 88px; }
  /* The envelope runs edge to edge and the type is sized so all 64 columns
     fit the screen: IBM Plex Mono is 0.6em a character, so 64 columns are
     38.4em; 40px is the window's own padding. Pinch to zoom still works. */
  .pv-envelope { margin-left: -24px; margin-right: -24px; border-radius: 0; padding: 14px 10px; }
  .pv-envelope::before { font-size: 10px; letter-spacing: .08em; margin: 0 4px 12px; }
  .pv-window { border-radius: 4px; }
  .pv-prepared { padding: 14px 10px; font-size: calc((100vw - 40px) / 38.6); line-height: 1.6; }
  .choice__amount { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { .pv-letter { animation: none; } }
