/* Legacy Letter: a study, a desk seen from above, a sheet of paper, and one question at a time. */

/* ---------- the room ---------- */
.ll-hero { position: relative; overflow: hidden; padding: clamp(14px, 3vh, 30px) 0 clamp(40px, 8vh, 90px); min-height: min(78vh, 760px); display: flex; }
.ll-hero .wrap { position: relative; width: 100%; }
.ll-hero__bg { position: absolute; inset: 0; background: radial-gradient(70% 90% at 78% 40%, var(--stock-4), transparent 62%), var(--stock); }
.ll-hero__bg::after { content: ""; position: absolute; right: 0; bottom: 0; width: min(60vw, 700px); aspect-ratio: 1; background: url(../img/ht-corner.png) 0 0 / 100% 100% no-repeat; transform: scale(-1, -1); opacity: var(--ht-op); filter: var(--ht-filter); }
/* keeps the words readable over the study: the stock colour on the reading side, clear on the far side */
.ll-hero__bg::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--stock) 0%, color-mix(in srgb, var(--stock) 80%, transparent) 30%, transparent 60%); }
@media (max-width: 1100px) { .ll-hero__bg::before { background: linear-gradient(180deg, color-mix(in srgb, var(--stock) 90%, transparent) 0%, color-mix(in srgb, var(--stock) 66%, transparent) 100%); } }
.ll-hero__copy { max-width: 35rem; margin-top: clamp(24px, 7vh, 80px); }
.ll-hero h1 { font-size: clamp(3rem, 7.4vw, 6rem); margin: .2em 0 .18em; }
.ll-hero .lede { font-size: clamp(1.25rem, 2vw, 1.7rem); }
.ll-hero__body { margin-top: 1em; color: var(--ink-2); max-width: 33em; }
.ll-hero .ll-facts { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 1.6em 0 0; color: var(--ink-2); }
.ll-facts li { border: 1.5px solid var(--line-2); border-radius: 99px; padding: .6em .9em; font-size: .64rem; }
.ll-hero .cta { display: flex; flex-wrap: wrap; gap: 14px 16px; margin-top: clamp(22px, 3.4vh, 34px); }

/* ---------- the desk ---------- */
.desk { --px: 0%; --py: 0%; position: relative; height: 100dvh; min-height: 640px; max-height: 1080px; overflow: hidden; scroll-margin-top: 0; border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
.desk__bg { position: absolute; inset: -6%; background: radial-gradient(60% 55% at 40% 26%, #232B30 0%, #11171A 52%, #080B0D 100%); transform: translate(var(--px), var(--py)); transition: transform 2.6s var(--ease-out); }
.desk__bg::after { content: ""; position: absolute; inset: 0; background: var(--grain) 0 0 / 220px; opacity: .5; }
:root[data-theme="light"] .desk__bg { background: repeating-linear-gradient(104deg, rgba(8, 11, 13, .045) 0 26px, transparent 26px 74px), radial-gradient(90% 80% at 60% 12%, #FFFFFF 0%, #E9ECEB 55%, #D7DBDA 100%); }
/* The sheet lies in the middle of the desk, where the set is kept clear. The question card sits in the calm
   area on its left, the index tabs hang off its right edge, and the props stay visible around them. */
.desk__in { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) min(640px, 44vw) minmax(0, 1fr); gap: clamp(14px, 2vw, 30px); padding: 0 var(--gut); }

/* the question card */
.guide { align-self: center; justify-self: center; width: min(100%, 340px); max-height: 86%; overflow: auto; padding: 22px 22px 18px; border-top: 10px solid #080B0D; box-shadow: 0 26px 50px -18px rgba(0, 0, 0, .6), 0 6px 14px rgba(0, 0, 0, .28); background: url(../img/grain-paper.png) 0 0 / 220px, #F2F4F3; }
.guide__where { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: space-between; color: var(--ink-3); font-size: .6rem; }
.guide__bar { height: 4px; background: var(--stock-4); margin: 10px 0 18px; }
.guide__bar i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .5s var(--ease); }
.guide__q { font: 700 clamp(1.35rem, 2vw, 1.7rem)/1.15 var(--display); }
.guide__q:focus, #changes-h:focus { outline: none; }
.guide__help { margin: .6em 0 1.1em; color: var(--ink-3); font-size: .92rem; line-height: 1.5; }
.guide__field { display: grid; gap: 12px; }
.guide textarea { resize: vertical; min-height: 6.5em; border: 2px solid var(--ink-4); padding: .7em .8em; }
.guide textarea:focus { border-color: var(--ink); box-shadow: none; }
.guide__tip { font-size: .78rem; color: var(--ink-3); }
.guide__quote { margin: 0; padding: 12px 14px; border-left: 3px solid var(--ink); background: var(--stock-2); font: 400 .9rem/1.55 Georgia, "Times New Roman", serif; }
.guide__nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; }
.guide__nav .btn--small { min-height: 44px; }
.guide__in { margin-top: 10px; }
.syncbar.ll-slip .btn--small { min-height: 48px; }   /* the slips about the account: which letter to keep, a letter found here */
.guide__in .btn--small { min-height: 48px; }
.guide__save { margin-top: 12px; font: 800 .58rem/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); min-height: 1.4em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.checks { display: grid; gap: 8px; }
.chip { position: relative; display: inline-flex; align-items: center; gap: .6em; min-height: 44px; padding: .5em .95em; border: 2px solid var(--ink-4); border-radius: 12px; font-size: .9rem; line-height: 1.3; cursor: pointer; }
.chip--wide { display: flex; align-items: flex-start; }
.chip input { appearance: none; flex: 0 0 auto; width: 18px; height: 18px; margin: .1em 0 0; border: 2px solid var(--ink); border-radius: 4px; display: grid; place-items: center; }
.chip input:checked { background: var(--ink); }
.chip input:checked::after { content: ""; width: 9px; height: 5px; border-left: 2.5px solid var(--stock); border-bottom: 2.5px solid var(--stock); transform: translateY(-1px) rotate(-45deg); }
.chip:has(input:checked) { border-color: var(--ink); background: var(--stock-2); }
.chip:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.chip input:focus-visible { outline: none; }
.rows { display: grid; gap: 14px; }
.rowcard { margin: 0; padding: 12px 14px 14px; border: 2px solid var(--ink-4); border-radius: 12px; display: grid; gap: 10px; min-width: 0; }
.rowcard legend { font: 800 .62rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; padding: 0 6px; }
.rowcard input { padding: .5em .1em; }
.rowcard__rm { justify-self: start; background: none; border: 0; padding: 6px 0; font-size: .8rem; text-decoration: underline; color: var(--ink-3); }
.rows__add { justify-self: start; }
.done { display: grid; gap: 10px; justify-items: start; }

/* the sheet */
.paperwrap { display: flex; flex-direction: column; min-height: 0; padding-top: clamp(10px, 2.4vh, 26px); }
.desk__tools { display: flex; flex-wrap: wrap; gap: 0 clamp(14px, 4.2vw - 40px, 20px); justify-content: flex-end; padding: 0 2px 6px; }
.desk__tools > * { background: none; border: 0; padding: 8px 0; min-height: 44px; min-width: 44px; font: 800 .62rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #C7CDD1; border-bottom: 2px solid transparent; }
.desk__tools a { line-height: 28px; text-underline-offset: 4px; }
:root[data-theme="light"] .desk__tools > * { color: #2A3237; }
.desk__tools button:hover { border-color: currentColor; }
.desk__tools > [data-erase] { margin-left: clamp(10px, 2.4vw, 28px); }   /* Start over, set a little apart at the end of the row */
.paper { position: relative; flex: 1 1 auto; min-height: 0; overflow: auto; background: url(../img/grain-paper.png) 0 0 / 220px, #F6F7F6; color: #080B0D; box-shadow: 0 40px 70px -24px rgba(0, 0, 0, .7), 0 10px 22px rgba(0, 0, 0, .3), 0 0 0 1px rgba(8, 11, 13, .08); scrollbar-width: thin; }
.sheet { padding: clamp(28px, 6.5%, 60px) clamp(24px, 9%, 64px) 80px; font: 400 1rem/1.62 Georgia, "Iowan Old Style", "Times New Roman", serif; overflow-wrap: anywhere; }
.sheet p { margin: 0 0 .8em; }
.sheet__kicker { font: 800 .64rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.sheet__title { font: 700 clamp(1.7rem, 3vw, 2.4rem)/1.05 var(--display); margin: .3em 0 .25em; }
.sheet__by { font: 500 .78rem/1.4 var(--sans); color: #555B60; padding-bottom: 1.1em; border-bottom: 2px solid #080B0D; }
.title__name { font: 700 1.15rem/1.3 var(--display); }
.title__for, .title__dates { font: 500 .78rem/1.5 var(--sans); color: #555B60; }
.title__dates span + span::before { content: " · "; }
.title__mark, .title__parts, .signline { display: none; }
.sheet h4 { margin: 1.2em 0 .4em; font: 800 .66rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #555B60; }
.kept__list { margin: 0 0 .9em; padding: 0; list-style: none; display: grid; gap: .6em; }
.kept__list li { padding-left: 14px; border-left: 3px solid #AEB6BC; }
.kept__list b, .kept__list em, .kept__list small { display: block; }
.kept__list em, .kept__list small { font: 500 .78rem/1.5 var(--sans); font-style: normal; color: #555B60; }
.lastword h3 { display: none; }
.guide__files { display: grid; gap: 6px; justify-items: start; }
.guide__files .btn--small { min-height: 44px; }
.guide__two { display: flex; flex-wrap: wrap; gap: 10px; }
.guide__links .btn--small { min-height: 48px; }
/* cards and photos under the part they go with */
.looks { margin: .4em 0 1em; }
.looks h4 { margin-top: .4em; }
.looks__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.look { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: start; padding: 10px 0 0; border-top: 1px solid #C7CDD1; }
.look:first-child { border-top: 0; padding-top: 0; }
.look__pics { display: flex; flex-wrap: wrap; gap: 6px; max-width: 13.2em; }
.look__pic { display: block; height: 7.4em; width: auto; max-width: 13.2em; object-fit: contain; border-radius: 3px; background: #E3E7E6; box-shadow: 0 1px 2px rgba(8, 11, 13, .18); }
.look__ph { width: auto; min-width: 3em; }
.look__txt { min-width: 0; }
.look__txt b { display: block; font: 700 1.02rem/1.3 var(--display); }
.look__facts { display: flex; flex-wrap: wrap; gap: 0 .9em; margin: .2em 0 .35em !important; font: 500 .78rem/1.5 var(--sans); color: #2A3237; }
.look__facts i { font: 800 .6rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; font-style: normal; color: #555B60; margin-right: .3em; }
.look__where, .look__note { margin: 0 0 .3em !important; }
.look__note { font-style: italic; }
@media (max-width: 520px) { .look { grid-template-columns: 1fr; } .look__pics { max-width: none; } }
.sheet__to { margin-top: 1.2em !important; font-weight: 700; }
.sec { position: relative; padding-left: 0; cursor: pointer; }
.sec::before { content: ""; position: absolute; left: clamp(-36px, -5.5vw, -14px); top: 4px; bottom: 10px; width: 3px; background: #080B0D; opacity: 0; transition: opacity .3s; }
.sec.is-on::before { opacity: 1; }
.sec__h { display: grid; grid-template-columns: 1.9em 1fr; align-items: baseline; margin: 1.5em 0 .5em; padding-top: .9em; border-top: 1px solid #AEB6BC; }
.sec__h b { font: 700 1.3rem/1 var(--display); }
.sec__h span { font: 800 .7rem/1.3 var(--sans); letter-spacing: .17em; text-transform: uppercase; }
.sec__h--plain { grid-template-columns: 1fr; }
#s-log li { overflow-wrap: anywhere; }
#s-log .small, #s-foot .small { margin-top: 1.2em; }
.sheet .lead, .defs i { font: 800 .66rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; font-style: normal; color: #555B60; }
.defs, .nevers { margin: 0 0 .9em; padding: 0; list-style: none; display: grid; gap: .8em; }
.defs li { padding-left: 14px; border-left: 3px solid #AEB6BC; }
.defs b { display: block; font: 700 1.02rem/1.3 var(--display); }
.defs span { display: block; }
.nevers li { position: relative; padding-left: 1.5em; }
.nevers li::before { content: ""; position: absolute; left: 0; top: .62em; width: .7em; height: 3px; background: #080B0D; }
.sheet .small { font: 500 .8rem/1.5 var(--sans); color: #555B60; }
.sheet__sign { font: 700 1.5rem/1.2 var(--display); margin-top: 1.4em !important; }
.sheet__legal { margin-top: 2em !important; padding-top: 1em; border-top: 1px solid #AEB6BC; font: 500 .76rem/1.5 var(--sans); color: #555B60; }
.ghost { height: .7em; margin: .55em 0 .9em !important; border-bottom: 1.5px dashed #C7CDD1; }
.ghost--short { width: 62%; }
.ghost--sign { display: inline-block; width: 9em; border-bottom: 1.5px solid #080B0D; height: 1.2em; margin: 0 !important; }
.sec.ink > *:not(.sec__h) { animation: ink .9s var(--ease-out) both; }
@keyframes ink { from { opacity: .15; filter: blur(1.5px); } to { opacity: 1; filter: none; } }

/* the index tabs */
.tabs { align-self: center; justify-self: start; }
.tabs ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.tabs button { width: 46px; height: 44px; border: 0; border-radius: 0 10px 10px 0; background: #C7CDD1; color: #080B0D; font: 800 .7rem/1 var(--sans); letter-spacing: .04em; box-shadow: 0 6px 12px -4px rgba(0, 0, 0, .5); transform: translateX(-6px); transition: transform .2s var(--ease), background .2s; }
.tabs button.is-done { background: #AEB6BC; }
.tabs button:hover { transform: translateX(-2px); }
.tabs button[aria-current] { background: #F2F4F3; transform: translateX(0); box-shadow: inset 4px 0 0 var(--teal), 0 6px 12px -4px rgba(0, 0, 0, .5); }

.confirm { position: absolute; left: 50%; top: 50%; z-index: 5; width: min(92vw, 420px); transform: translate(-50%, -50%); padding: 22px; border-top: 10px solid #080B0D; box-shadow: 0 30px 80px rgba(0, 0, 0, .7); font: 700 1.1rem/1.35 var(--display); }
.confirm div { display: flex; gap: 12px; margin-top: 16px; }

/* ---------- reading matter below the desk ---------- */
.ll-read { padding-top: clamp(50px, 8vw, 100px); }
.ll-read section + section { margin-top: clamp(46px, 7vw, 84px); }
.ll-read h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.08; margin: .3em 0 .7em; }
.ll-parts { margin: 0; padding: 0; list-style: none; counter-reset: p; display: grid; gap: 0; border-top: 1px solid var(--line-2); }
.ll-parts li { counter-increment: p; display: grid; grid-template-columns: 2.4em 1fr; padding: 14px 0; border-bottom: 1px solid var(--line-2); color: var(--ink-2); }
.ll-parts li::before { content: counter(p); font: 700 1.5rem/1.1 var(--display); color: var(--ink); grid-row: span 2; }
.ll-parts b { color: var(--ink); font: 700 1.1rem/1.3 var(--display); display: block; }

/* ---------- phone ---------- */
@media (max-width: 1100px) {
  .ll-hero { min-height: 0; }
  .ll-hero .cta .btn { flex: 1 1 100%; }
  .desk { height: auto; max-height: none; min-height: 0; overflow: visible; }
  .desk__bg { inset: 0; transform: none; }
  .desk__in { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 12px 12px 18px; }
  .paperwrap { order: 1; padding-top: 0; }
  .paper { flex: 0 0 auto; height: 40dvh; min-height: 250px; }
  .sheet { font-size: .92rem; padding: 22px 22px 40px; }
  .tabs { order: 2; align-self: stretch; }
  .tabs ol { grid-template-columns: repeat(9, 1fr); gap: 4px; }
  .tabs button { width: 100%; border-radius: 0 0 8px 8px; transform: none !important; font-size: .62rem; }
  .tabs button[aria-current] { box-shadow: inset 0 4px 0 var(--teal); }
  .guide { order: 3; max-height: none; align-self: stretch; justify-self: stretch; width: auto; }
  .desk__tools { justify-content: flex-start; gap: 0 16px; padding-bottom: 6px; }
}

/* ---------- print: the letter and nothing else ---------- */
@media print {
  @page { margin: .8in; }
  :root { color-scheme: light !important; }   /* the dark theme's colour scheme would print a carbon ground round every page */
  html, body { background: #fff !important; }
  main > *:not(.desk), .desk__bg, .guide, .tabs, .desk__tools, .confirm { display: none !important; }
  .desk, .desk__in, .paperwrap, .paper { display: block !important; position: static !important; height: auto !important; max-height: none !important; overflow: visible !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; background: none !important; }
  .sheet { padding: 0; font-size: 11.5pt; }
  .sec.is-empty, .ghost { display: none !important; }
  .sec::before { display: none; }
  .defs li, .nevers li, .sec__h { break-inside: avoid; }
  .sec__h { break-after: avoid; }
}
