/* The inner pages (order, thank you, privacy, terms, not found), in the homepage's look: a short night band at the
   top easing into the paper, Caslon headings, Figtree text. Colours are the tokens in style.css. */

/* the night band at the top of an inner page */
.page-head{position:relative;overflow:hidden;padding:38px 0 78px}
.page-head .wrap{position:relative;z-index:2}
.page-head h1{color:var(--snow);font-size:clamp(34px,4.4vw,50px)}
.page-head h1 em{color:var(--gold)}
.page-head h1:focus{outline:none}
.page-head p{margin:12px 0 0;color:var(--snow-2);font-size:19px}
.page-head .drift{height:46px}
.page-head p.page-head__date{font-size:16px;color:var(--snow-2);margin-top:14px}
@media (max-width:480px){.page-head{padding:28px 0 64px}.page-head p{font-size:18px}}

[hidden]{display:none !important}

/* a quiet outlined button for the paper */
.btn--line{background:transparent;color:var(--holly);border:2px solid var(--holly)}
.btn--line:hover{background:rgba(30,74,56,.07);text-decoration:underline;text-underline-offset:.25em}
.btn[disabled]{opacity:.6;cursor:not-allowed}
.small{font-size:16px;line-height:1.5;color:var(--ink-2)}
.notice{background:#fff7e0;border:1px solid #d9b85f;border-radius:3px;padding:14px 16px;margin:0 0 16px;color:#3f3212;font-size:17px}
.notice:focus{outline:3px solid var(--focus);outline-offset:3px}
.error{color:var(--wax);font-weight:650;margin:12px 0}
.status:empty{display:none}
.status{margin:12px 0;font-weight:650;color:var(--holly)}

/* ---------- the order page ---------- */
.back-note{margin-top:22px}
/* the form is the grid: on phones the letter comes straight after the child's details, on wide screens it stays
   beside the whole form */
.order-grid{display:grid;gap:0 28px;padding-top:26px;padding-bottom:40px;align-items:start;grid-template-columns:minmax(0,1fr)}
.order-grid > *{min-width:0}
.preview-col{margin:0 0 22px}
@media (min-width:980px){
  .order-grid{grid-template-columns:minmax(0,1fr) minmax(0,.92fr)}
  .order-grid > .panel{grid-column:1}
  .preview-col{grid-column:2;grid-row:1 / span 3;position:sticky;top:16px;margin:0}
}
.panel{background:var(--card);border:1px solid var(--rule);border-radius:3px;padding:22px clamp(16px,3vw,26px);margin-bottom:18px}
fieldset{border:0;margin:0 0 6px;padding:0;min-width:0}
legend{font:400 26px/1.2 var(--serif);color:var(--holly);padding:0;margin-bottom:12px}
.field{display:grid;gap:6px;margin-bottom:16px}
.field > span{font-size:16px;font-weight:650;line-height:1.4;color:var(--ink)}
.field .hint{display:block;font-size:15px;font-weight:400;color:var(--ink-2)}
input[type=text],input[type=email],select,textarea{width:100%;min-height:50px;padding:10px 14px;border-radius:3px;border:1.5px solid #7d6c58;background:var(--white);font:400 18px/1.4 var(--sans);color:var(--ink)}
textarea{min-height:96px;resize:vertical}
input:hover,select:hover,textarea:hover{border-color:var(--ink)}
input[aria-invalid="true"],select[aria-invalid="true"]{border-color:var(--wax);box-shadow:0 0 0 1px var(--wax)}
.field-err{margin:2px 0 0;color:var(--wax);font-weight:650;font-size:16px;line-height:1.4}
/* the optional extras: one fold, clearly optional */
.extras{margin:0 0 16px;border:1.5px solid var(--rule-ink);border-radius:6px;background:var(--white)}
.extras summary{list-style:none;cursor:pointer;display:flex;flex-direction:column;gap:2px;min-height:56px;justify-content:center;padding:10px 44px 10px 14px;position:relative}
.extras summary::-webkit-details-marker{display:none}
.extras summary::after{content:"+";position:absolute;right:14px;top:50%;transform:translateY(-50%);font:800 26px/1 var(--sans);color:var(--holly)}
.extras[open] summary::after{content:"\2212"}
.extras__title{font-weight:750;color:var(--holly);font-size:17px}.extras__hint{font-size:15px;color:var(--ink-2)}
.extras__body{padding:4px 14px 2px;border-top:1px solid var(--rule)}
/* on a phone the letter sits below the form: a jump to it */
.jump-preview{display:none}
@media (max-width:979px){.jump-preview{display:flex;align-items:center;justify-content:center;min-height:48px;margin:4px 0 16px;border-radius:4px;background:rgba(30,74,56,.08);color:var(--holly);font-weight:750;text-decoration:none}.jump-preview::after{content:"\2193";margin-left:8px}}
/* more than one child: said at the top of the form, with its own add button */
.more-kids{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px;margin:0 0 18px;padding:14px 16px;border:2px dashed var(--holly);border-radius:6px;background:rgba(30,74,56,.06)}
.more-kids p{margin:0;flex:1 1 260px;font-size:17px;line-height:1.45}
.add-child-btn::before{content:"+";display:inline-block;margin-right:8px;font-weight:800;font-size:1.25em;line-height:1}
.add-child-btn--big{width:100%;justify-content:center;min-height:52px;border-width:2px;font-size:18px;font-weight:750}
.check--permission{margin:14px 0 10px;padding:12px 14px;border:1.5px solid var(--rule-ink);border-radius:6px;background:var(--white)}
/* the own line's character count */
.field .count{display:block;font-size:14px;color:var(--ink-2);text-align:right;margin-top:2px}
/* the preview is the printed page; past one page, it says so */
.sheet-real{width:794px}
.preview-frame.is-over{outline:4px solid var(--wax);outline-offset:2px}
.preview-frame.is-over .lsheet-letter{box-shadow:inset 0 -6px 0 var(--wax)}
.preview-over{margin:12px 0 0;padding:12px 14px;border-left:5px solid var(--wax);background:#fbeceb;color:#7f170f;font-weight:700;line-height:1.45}
.grid-2{display:grid;gap:0 16px;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))}
.check{display:flex;align-items:flex-start;gap:12px;min-height:44px;font-weight:600;line-height:1.45;cursor:pointer;margin:4px 0 12px}
.check input{width:22px;height:22px;flex:none;margin-top:2px;accent-color:var(--holly)}
.check .small{font-weight:400}
.child-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.child-tabs:empty{display:none}
.child-tabs button{min-height:44px;padding:6px 16px;border-radius:3px;border:1.5px solid var(--rule-ink);background:var(--white);color:var(--ink);font:600 16px/1.3 var(--sans);cursor:pointer}
.child-tabs button[aria-pressed="true"]{background:var(--holly);border-color:var(--holly);color:var(--white)}
/* the letter style: six compact radio cards, in the form's own language */
.style-set{margin:0 0 16px}
.style-set legend{font:650 16px/1.4 var(--sans);color:var(--ink);margin-bottom:8px}
.style-set .hint{display:block;font-size:15px;font-weight:400;color:var(--ink-2)}
.style-cards{display:grid;gap:8px;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr))}
.style-card{display:flex;align-items:flex-start;gap:10px;margin:0;padding:10px 12px;border:1.5px solid var(--rule-ink);border-radius:3px;background:var(--white);cursor:pointer}
.style-card:hover{border-color:var(--ink)}
.style-card input{width:22px;height:22px;flex:none;margin-top:1px;accent-color:var(--holly)}
.style-card strong{display:block;font-size:16px;line-height:1.35;color:var(--ink)}
.style-card__blurb{display:block;font-size:15px;line-height:1.4;color:var(--ink-2)}
.style-card:has(input:checked){border-color:var(--holly);box-shadow:inset 0 0 0 1px var(--holly);background:rgba(30,74,56,.06)}
@media (max-width:560px){.style-cards{gap:6px}.style-card{padding:8px 10px}}
/* the letter design: six compact labelled swatches, each a tiny live render of the real A4 sheet (letter-designs.css) */
.design-set{margin:0 0 16px}
.design-set legend{font:650 16px/1.4 var(--sans);color:var(--ink);margin-bottom:8px}
.design-set .hint{display:block;font-size:15px;font-weight:400;color:var(--ink-2)}
.design-cards{display:grid;gap:8px;grid-template-columns:repeat(3,minmax(0,1fr))}
@media (min-width:700px){.design-cards{grid-template-columns:repeat(6,minmax(0,1fr))}}
.design-card{display:flex;flex-direction:column;gap:8px;margin:0;padding:8px 8px 10px;border:1.5px solid var(--rule-ink);border-radius:3px;background:var(--white);cursor:pointer;text-align:center}
.design-card:hover{border-color:var(--ink)}
.design-card__art{display:block;aspect-ratio:210/297;background:var(--card);border:1px solid var(--rule);overflow:hidden}
.design-card input{width:22px;height:22px;flex:none;margin:0 auto;accent-color:var(--holly)}
/* overflow-wrap:normal: never snap a design's name mid-word in the narrow card (a long word may lean into the
   card's own padding instead) */
.design-card__name{display:block;font-size:13px;line-height:1.3;font-weight:600;color:var(--ink);overflow-wrap:normal}
.design-card:has(input:checked){border-color:var(--holly);box-shadow:inset 0 0 0 1px var(--holly);background:rgba(30,74,56,.06)}
.design-note{margin:8px 0 0}
@media (forced-colors:active){.design-card__art{border:1px solid CanvasText}}
/* a child's own delivery address: revealed in their tab when "Post this letter to the same address" is unticked */
.child-addr{margin:2px 0 16px;padding:2px 0 2px 14px;border-left:4px solid var(--holly)}
.child-addr legend{font:650 17px/1.4 var(--sans);color:var(--ink);margin-bottom:6px}
.child-addr .small{margin:0 0 12px}
@media (forced-colors:active){.child-addr{border-left:4px solid CanvasText}}
.panel .btn-row{margin:8px 0 0}
.total{display:flex;justify-content:space-between;align-items:baseline;gap:12px;font-size:20px;margin:4px 0 2px;padding-top:6px;border-top:1px solid var(--rule)}
.total strong{font:400 36px/1.1 var(--serif);color:var(--holly)}
.total-note{margin:0 0 14px}
.no-cancel{font-size:17px;line-height:1.5;border-left:4px solid var(--wax);padding:4px 0 4px 14px;margin:0 0 12px}
#pay{width:100%;margin-top:6px}
.pay-after{margin:10px 0 0;text-align:center}
.preview-title{font-size:24px;margin:0 0 12px}
.preview-frame{background-color:var(--night);background-image:var(--stars);background-size:520px 520px;border-radius:3px;padding:14px;overflow:hidden}
.preview-scale{transform-origin:top left}
.preview-note{margin:10px 2px 0;font-size:16px;color:var(--ink-2)}

/* ---------- thank you ---------- */
.thanks{padding-top:30px;padding-bottom:56px}
.summary{margin:0 0 20px;padding:0;background:var(--card);border:1px solid var(--rule);border-top:4px solid var(--wax);border-radius:3px}
.summary div{display:grid;grid-template-columns:minmax(0,10em) minmax(0,1fr);gap:4px 16px;padding:12px 18px;border-bottom:1px solid var(--rule)}
.summary div:last-child{border-bottom:0}
.summary dt{color:var(--ink-2)}
.summary dd{margin:0;font-weight:650}
@media (max-width:420px){.summary div{grid-template-columns:1fr}}
.thanks h2{margin-top:28px}
.next{padding-left:22px}
.next li{margin-bottom:8px}

/* ---------- not found ---------- */
.lost{padding-top:30px;padding-bottom:60px}

@media (forced-colors:active){.panel,.summary,.notice{border:1px solid CanvasText}.btn--line{border:2px solid ButtonText}}
@media print{.site-head,.site-foot,.page-head .drift,.dock{display:none}.page-head{background:none;color:#000;padding:0}.page-head h1,.page-head p{color:#000}}

/* phones: the letter preview runs edge to edge, so the page is as large as the screen allows (mobile pass,
   16/11/2026); order.js reads the frame padding when it scales the page */
@media (max-width:560px){
  .preview-frame{margin:0 calc(-1 * var(--gutter));padding:8px;border-radius:0}
}
