/* Direction C2: “Private Register”, light and dark.
   Light: engraved private-bank stationery on cool violet-grey laid paper,
   aubergine ink, one deep-aubergine card for the letter.
   Dark: the first C, unchanged in palette.
   The theme switch is CSS only (the live CSP is script-src 'none'),
   following site/public/styles.css: Auto follows prefers-color-scheme,
   and :root:has(#theme-…:checked) overrides it. Every colour is a token
   that both themes define. */

/* ---------- Light tokens (default and Auto-light) ---------- */
:root {
  color-scheme: light dark;
  --ground: #E6E4ED;            /* cool laid paper, violet-grey */
  --ground-2: #DCD9E5;          /* the tray the letter sits on */
  --raised: #EFEDF4;            /* card stock */
  --raised-2: #F5F4F8;
  --ink: #26172E;               /* aubergine ink */
  --ink-2: #4A3B53;
  --ink-3: #5E5066;             /* engraved labels */
  --rule: #26172E2E;            /* hairline, faint aubergine */
  --rule-2: #26172E17;
  --cool: #244AA8;
  --warm: #7A5000;
  --on-ink: #EFEDF4;            /* text on a filled ink button */
  --bezel: #2B1F33;
  --bezel-rule: #26172E40;
  --mat: #EDEBF2;               /* plate mat behind the phone */
  --quiet-card: #EFEDF4;        /* programme and envelope stock; none in dark */
  --shadow: 0 1px 0 #FFFFFF99, 0 30px 60px -44px #26172E66;
  --display-weight: 300;
  --body-weight: 400;
  --ifs-weight: 300;
  --laid: repeating-linear-gradient(0deg, #26172E07 0 1px, transparent 1px 6px),
          repeating-linear-gradient(90deg, #26172E05 0 1px, transparent 1px 132px);
  /* the letter: a deep-aubergine card among the letterhead */
  --panel: #2A1A33;
  --panel-ink: #EEE8F0;
  --panel-ink-2: #C3B8CA;
  --panel-ink-3: #A99CB1;
  --panel-rule: #EEE8F029;
  --panel-laid: repeating-linear-gradient(0deg, #FFFFFF06 0 1px, transparent 1px 6px);
  --panel-shadow: 0 40px 80px -50px #26172E99;
  --seal-face: radial-gradient(circle at 35% 30%, #3E2C48, #25172D 72%);
  --seal-hi: #FFFFFF1F;
  --seal-lo: #00000073;
  --seal-ring: #EEE8F01F;
  --seal-glyph: #2E1F37;
  --seal-glyph-hi: #5C4868;
  --seal-glyph-lo: #120A16;

  --engraved: "Marcellus", "Trajan Pro", "Optima", serif;
  --serif: "Spectral", "Iowan Old Style", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --pad: clamp(16px, 6vw, 112px);
}
:root:has(#theme-light:checked) { color-scheme: light; }

/* ---------- Dark tokens (Auto-dark) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not(:has(#theme-light:checked)) {
    --ground: #1E1424;
    --ground-2: #281B30;
    --raised: #281B30;
    --raised-2: #33243D;
    --ink: #EEE8F0;
    --ink-2: #BDB2C3;
    --ink-3: #A194A8;
    --rule: #EEE8F029;
    --rule-2: #EEE8F014;
    --cool: #AFC4FF;
    --warm: #F0C36E;
    --on-ink: #1E1424;
    --bezel: #2B1F33;
    --bezel-rule: #EEE8F01F;
    --mat: #241829;
    --quiet-card: transparent;
    --shadow: 0 30px 70px -40px #000000CC;
    --display-weight: 200;
    --body-weight: 300;
    --ifs-weight: 200;
    --laid: none;
    --panel: #E9E5EC;
    --panel-ink: #22152B;
    --panel-ink-2: #5A4D61;
    --panel-ink-3: #5A4D61;
    --panel-rule: #22152B26;
    --panel-laid: repeating-linear-gradient(0deg, #22152B07 0 1px, transparent 1px 6px);
    --panel-shadow: 0 40px 90px -50px #000000;
    --seal-face: radial-gradient(circle at 35% 30%, #F4F1F6, #DCD6E0 70%);
    --seal-hi: #FFFFFF;
    --seal-lo: #22152B33;
    --seal-ring: #22152B26;
    --seal-glyph: #CFC7D5;
    --seal-glyph-hi: #FFFFFF;
    --seal-glyph-lo: #A89DB0;
  }
}
/* ---------- Dark tokens (switch set to Dark) ---------- */
:root:has(#theme-dark:checked) {
  color-scheme: dark;
  --ground: #1E1424;
  --ground-2: #281B30;
  --raised: #281B30;
  --raised-2: #33243D;
  --ink: #EEE8F0;
  --ink-2: #BDB2C3;
  --ink-3: #A194A8;
  --rule: #EEE8F029;
  --rule-2: #EEE8F014;
  --cool: #AFC4FF;
  --warm: #F0C36E;
  --on-ink: #1E1424;
  --bezel: #2B1F33;
  --bezel-rule: #EEE8F01F;
  --mat: #241829;
  --quiet-card: transparent;
  --shadow: 0 30px 70px -40px #000000CC;
  --display-weight: 200;
  --body-weight: 300;
  --ifs-weight: 200;
  --laid: none;
  --panel: #E9E5EC;
  --panel-ink: #22152B;
  --panel-ink-2: #5A4D61;
  --panel-ink-3: #5A4D61;
  --panel-rule: #22152B26;
  --panel-laid: repeating-linear-gradient(0deg, #22152B07 0 1px, transparent 1px 6px);
  --panel-shadow: 0 40px 90px -50px #000000;
  --seal-face: radial-gradient(circle at 35% 30%, #F4F1F6, #DCD6E0 70%);
  --seal-hi: #FFFFFF;
  --seal-lo: #22152B33;
  --seal-ring: #22152B26;
  --seal-glyph: #CFC7D5;
  --seal-glyph-hi: #FFFFFF;
  --seal-glyph-lo: #A89DB0;
}

/* Theme-switched imagery, as on the live site */
.theme-light { display: block; }
.theme-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not(:has(#theme-light:checked)) .theme-light { display: none; }
  :root:not(:has(#theme-light:checked)) .theme-dark { display: block; }
}
:root:has(#theme-dark:checked) .theme-light { display: none; }
:root:has(#theme-dark:checked) .theme-dark { display: block; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--ground);
  background-image: var(--laid);
  color: var(--ink);
  font: var(--body-weight) 19px/1.65 var(--serif);
  overflow-x: clip;
  overflow-wrap: break-word;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 var(--pad); }
.eng { font-family: var(--engraved); font-weight: 400; text-transform: uppercase; letter-spacing: .28em; font-size: 12px; line-height: 1.6; }
em { font-style: italic; }

/* ---------- Head ---------- */
.head .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px 28px; flex-wrap: wrap; padding-top: 30px; padding-bottom: 30px; }
.mono { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.mono .ring { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--rule); display: grid; place-items: center; }
.mono img { width: 28px; height: 28px; border-radius: 7px; }
.mono .eng { font-size: 14px; letter-spacing: .36em; }
.head-meta { display: flex; gap: 28px; align-items: center; color: var(--ink-2); flex-wrap: wrap; }

/* The switch: three engraved words, the chosen one underscored */
.theme-switch { display: inline-flex; align-items: center; gap: 0; margin: 0; padding: 0; border: 0; }
.theme-switch label {
  font-family: var(--engraved); text-transform: uppercase; letter-spacing: .24em; font-size: 11px; line-height: 1;
  color: var(--ink-3);
  padding: 8px 0 7px .24em;
  margin: 0 7px;
  border-bottom: 1px solid transparent;
  cursor: pointer; user-select: none;
  transition: color .2s ease, border-color .2s ease;
}
.theme-switch label + input + label::before { content: "·" / ""; margin: 0 14px 0 -7px; color: var(--ink-3); letter-spacing: 0; display: inline-block; pointer-events: none; }
.theme-switch label:hover { color: var(--ink); }
.theme-switch input:checked + label { color: var(--ink); border-bottom-color: var(--ink); }
.theme-switch input:focus-visible + label { outline: 1px solid var(--ink); outline-offset: 3px; }

@media (forced-colors: active) {
  .theme-switch input:checked + label { border-bottom: 2px solid CanvasText; }
  .theme-switch input:focus-visible + label { outline: 2px solid CanvasText; }
}

/* ---------- Hero ---------- */
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(40px, 6vw, 112px);
  align-items: center;
  padding-top: clamp(40px, 6vw, 96px);
  padding-bottom: clamp(72px, 9vw, 140px);
  border-bottom: 1px solid var(--rule);
}
h1 {
  font-weight: var(--display-weight);
  font-size: clamp(46px, 6.2vw, 100px);
  line-height: 1.03;
  letter-spacing: -.02em;
  margin: 0 0 44px;
  text-wrap: balance;
}
h1 em { color: var(--ink-2); }
.lede { font-size: clamp(19px, 1.5vw, 22px); color: var(--ink-2); max-width: 30em; margin: 0 0 44px; }
.cta {
  display: inline-flex; align-items: center; gap: 18px;
  border: 1px solid var(--ink);
  padding: 18px 28px 17px;
  text-decoration: none;
  font-family: var(--engraved); text-transform: uppercase; letter-spacing: .22em; font-size: 13px; line-height: 1.4;
  color: var(--ink);
  background: linear-gradient(var(--ink), var(--ink)) left / 0 100% no-repeat;
  transition: background-size .45s ease, color .45s ease;
}
.cta:hover { background-size: 100% 100%; color: var(--on-ink); }
.cta svg { width: 22px; height: 10px; flex: none; }
.cta-note { margin: 18px 0 0; color: var(--ink-3); font-style: italic; font-size: 16px; }

/* A plate: hairline frame with an inner plate mark, flat device */
.plate { margin: 0; }
.plate .mark {
  border: 1px solid var(--rule);
  padding: clamp(18px, 2.4vw, 34px);
  background: var(--mat);
  position: relative;
}
.plate .mark::before { /* the recessed plate mark */
  content: ""; position: absolute; inset: 9px;
  border: 1px solid var(--rule-2);
  pointer-events: none;
}
.device {
  max-width: 300px; margin: 0 auto;
  background: var(--bezel);
  border-radius: 44px;
  padding: 7px;
  box-shadow: 0 0 0 1px var(--bezel-rule);
}
.device img { display: block; border-radius: 37px; width: 100%; }
.device img.theme-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not(:has(#theme-light:checked)) .device img.theme-light { display: none; }
  :root:not(:has(#theme-light:checked)) .device img.theme-dark { display: block; }
}
:root:has(#theme-dark:checked) .device img.theme-light { display: none; }
:root:has(#theme-dark:checked) .device img.theme-dark { display: block; }
.plate figcaption { margin-top: 16px; display: flex; gap: 6px 14px; align-items: baseline; flex-wrap: wrap; color: var(--ink-2); font-style: italic; font-size: 16px; line-height: 1.45; }
.plate figcaption .eng { color: var(--ink); font-style: normal; }

/* ---------- Section frame ---------- */
.folio { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 48px; padding: clamp(72px, 9vw, 140px) 0; border-bottom: 1px solid var(--rule); }
.folio > .rail { color: var(--ink-2); }
.folio > .rail .num { font-family: var(--serif); font-style: italic; font-weight: var(--display-weight); font-size: 56px; line-height: 1; color: var(--ink); display: block; margin-bottom: 14px; }
h2 { font-weight: var(--display-weight); font-size: clamp(36px, 4.4vw, 64px); line-height: 1.08; letter-spacing: -.015em; margin: 0 0 32px; max-width: 18ch; text-wrap: balance; }
h3 { font-weight: 400; font-size: clamp(26px, 2.4vw, 34px); line-height: 1.2; margin: 0 0 14px; letter-spacing: -.01em; }
p { margin: 0 0 16px; }

/* ---------- If you… ---------- */
.ifs { list-style: none; padding: 0; margin: 0; }
.ifs li { font-style: italic; font-weight: var(--ifs-weight); font-size: clamp(24px, 2.4vw, 34px); line-height: 1.35; padding: 26px 0; border-top: 1px solid var(--rule); max-width: 28em; }
.ifs li:last-child { border-bottom: 1px solid var(--rule); }

/* ---------- Plate II: counters, close up ---------- */








 .s-warm { color: var(--warm); }
 .n2 { top: 52%; } .n3 { top: 76%; }
.crop { position: relative; overflow: hidden; aspect-ratio: 740 / 758; border-radius: 22px; }
.crop img { position: absolute; max-width: none; width: 108.65%; left: -4.32%; top: -30.61%; }

/* ---------- Articles ---------- */
.articles { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 64px; }
.article { padding: 36px 0 44px; border-top: 1px solid var(--rule); }
.article p { color: var(--ink-2); max-width: 26em; }
.article .eng { color: var(--ink-3); display: block; margin-bottom: 18px; }



.dayrow { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 16px; }
.dayrow i { width: 18px; height: 18px; border-radius: 50%; background: var(--ink-2); display: grid; place-items: center; }
.dayrow i.q { background: transparent; border: 1px solid var(--warm); color: var(--warm); }
.dayrow i.q svg { width: 10px; height: 10px; }
.range { font-weight: var(--display-weight); font-size: clamp(48px, 5vw, 72px); line-height: 1; letter-spacing: -.02em; }
.range small { font-size: 18px; font-style: italic; color: var(--ink-2); margin-left: 10px; letter-spacing: 0; font-weight: var(--body-weight); }
.daykey { display: flex; gap: 22px; flex-wrap: wrap; font-size: 15px; color: var(--ink-2); margin-top: 12px; }
.daykey span { display: inline-flex; align-items: center; gap: 8px; }
.daykey i { width: 12px; height: 12px; border-radius: 50%; background: var(--ink-2); }
.daykey i.q { background: transparent; border: 1px solid var(--warm); }

.cards { position: relative; height: 236px; margin-top: 30px; }
.cards div {
  position: absolute; width: 220px; height: 132px;
  border: 1px solid var(--rule); background: var(--raised);
  padding: 16px 18px;
  font-family: var(--engraved); text-transform: uppercase; letter-spacing: .22em; font-size: 11px; color: var(--ink-2);
  box-shadow: var(--shadow);
}
.cards div::after { content: ""; position: absolute; left: 18px; right: 40%; bottom: 20px; height: 1px; background: var(--rule); box-shadow: 0 -10px 0 var(--rule), 0 -20px 0 var(--rule); }
.cards .c1 { left: 0; top: 4px; transform: rotate(-3deg); }
.cards .c2 { left: 64px; top: 50px; transform: rotate(1deg); }
.cards .c3 { left: 128px; top: 96px; transform: rotate(4deg); background: var(--raised-2); }

.envelope { border: 1px solid var(--rule); max-width: 420px; position: relative; padding: 70px 24px 22px; background: var(--quiet-card); }
.envelope::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 60px; background: linear-gradient(to bottom right, transparent calc(50% - .5px), var(--rule) 50%, transparent calc(50% + .5px)) left / 50% 100% no-repeat, linear-gradient(to bottom left, transparent calc(50% - .5px), var(--rule) 50%, transparent calc(50% + .5px)) right / 50% 100% no-repeat; }
.envelope ol { margin: 0; padding: 0; list-style: none; }
.envelope li { padding: 10px 0; border-top: 1px solid var(--rule-2); font-size: 18px; display: flex; justify-content: space-between; gap: 12px; }
.envelope li span { font-family: var(--engraved); font-size: 11px; letter-spacing: .22em; color: var(--ink-3); }

/* ---------- The letter ---------- */












/* ---------- Horizon ---------- */
.hz { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }







.hz-cap { color: var(--ink-3); font-size: 15px; font-style: italic; margin-top: 22px; }
.hz p { color: var(--ink-2); max-width: 28em; }
.hz .first { color: var(--ink); font-size: 22px; }

/* ---------- Programme ---------- */









/* ---------- Terms ---------- */











/* ---------- Questions ---------- */
.qs details { border-top: 1px solid var(--rule); }
.qs details:last-child { border-bottom: 1px solid var(--rule); }
.qs summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) 20px; gap: 16px; align-items: baseline; padding: 24px 0; font-size: clamp(21px, 2vw, 26px); font-weight: 400; line-height: 1.3; }
.qs summary::-webkit-details-marker { display: none; }
.qs summary::after { content: ""; width: 11px; height: 11px; border-right: 1px solid var(--ink-2); border-bottom: 1px solid var(--ink-2); transform: rotate(45deg) translateY(-4px); transition: transform .3s ease; }
.qs details[open] summary::after { transform: rotate(225deg); }
.qs details p { margin: -6px 0 28px; color: var(--ink-2); max-width: 36em; }
.qs code { font: 400 .85em var(--mono); color: var(--ink); }

/* ---------- Closing ---------- */





footer { border-top: 1px solid var(--rule); }
footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 40px; padding-bottom: 52px; color: var(--ink-3); font-size: 15px; }
footer p { margin: 0 0 6px; max-width: 40em; }
footer ul { list-style: none; display: flex; gap: 28px; padding: 0; margin: 0; }
footer a { text-decoration: none; color: var(--ink-2); }

/* ---------- Narrower ---------- */
@media (max-width: 900px) {
  .hero .wrap, .folio, .closing .wrap { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero .plate { max-width: 420px; width: 100%; }
  .folio > .rail { display: flex; align-items: baseline; gap: 14px; }
  .folio > .rail .num { font-size: 40px; margin: 0; }





  .articles, .hz, .terms, .article.wide { grid-template-columns: minmax(0, 1fr); }



}
@media (max-width: 600px) {
  .head .wrap { padding-top: 22px; padding-bottom: 18px; }
  .head-meta { width: 100%; justify-content: space-between; border-top: 1px solid var(--rule-2); padding-top: 10px; gap: 12px; }
  .head-meta .soon { display: none; }

  .theme-switch { margin-left: -7px; }
  .mono .eng { font-size: 12px; letter-spacing: .28em; }
  .cta { width: 100%; justify-content: space-between; padding-left: 20px; padding-right: 20px; letter-spacing: .16em; }
  .device { max-width: 250px; }

  .cards div { width: 170px; height: 110px; }
  .cards .c2 { left: 44px; } .cards .c3 { left: 88px; }


}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Former inline style attributes (the CSP is style-src 'self'). */

.x-m0 { margin:0 !important; }




/* Hero plate fits a laptop screen: the phone's width follows the window height. */
@media (min-width: 901px) {
  .hero .device { max-width: min(300px, calc((100svh - 360px) * .46)); min-width: 200px; }
}
.demo-head { font-size: 16px; color: var(--ink-2); margin-top: 22px; }
.demo-head b { font-family: var(--engraved); font-weight: 400; letter-spacing: .22em; color: var(--ink); margin-right: 6px; }
