/* ————————————————————————————————————————————————
   Future Me — “stationery from the future”
   Editorial serif + clean grotesk, atmosphere derived
   from the admin brand palette (--primary/--accent/--bg/--text).
   ———————————————————————————————————————————————— */

*{box-sizing:border-box}

:root{
  --radius:10px;   /* friendly rounded boxes everywhere */
  /* quaquebeke.de design tokens, derived from the theme vars so
     per-event branding still works (defaults resolve to the site's values) */
  --ink-70:color-mix(in srgb,var(--text) 70%,transparent);
  --ink-55:color-mix(in srgb,var(--text) 55%,transparent);
  --ink-12:color-mix(in srgb,var(--text) 12%,transparent);
  --ink-08:color-mix(in srgb,var(--text) 8%,transparent);
  --text-2:color-mix(in srgb,var(--text) 74%,var(--bg));          /* ≈ #5A5A52 */
  --border:color-mix(in srgb,var(--text) 9%,var(--bg));           /* ≈ #E6E5E0 */
  --border-strong:color-mix(in srgb,var(--text) 18%,var(--bg));   /* ≈ #D0CFC8 */
  --elevated:color-mix(in srgb,var(--text) 4%,var(--bg));         /* ≈ #F3F2EE */
  --paper:color-mix(in srgb,#ffffff 92%,var(--bg));
  --serif:"Cormorant Garamond",Georgia,"Times New Roman",serif;
  --sans:"Inter",-apple-system,"Segoe UI",sans-serif;
  --mono:"JetBrains Mono",ui-monospace,"SF Mono",Menlo,monospace;
}

/* mono-label — the site's editorial micro-type */
.mono-label{font-family:var(--mono);font-size:12px;letter-spacing:.18em;text-transform:uppercase;color:var(--text-2)}
/* inline text that matches the form-label voice exactly */
.lbl-inline{font-family:var(--mono);font-weight:500;font-size:11px;letter-spacing:.16em;text-transform:uppercase;color:var(--text-2);margin:0}

html{scroll-behavior:smooth;scrollbar-color:color-mix(in srgb,var(--text) 28%,transparent) transparent;scrollbar-width:thin}
body{
  margin:0;min-height:100svh;
  background:var(--bg);color:var(--text);
  font:16.5px/1.6 var(--sans);
  -webkit-text-size-adjust:100%;
  -webkit-font-smoothing:antialiased;
}

/* flat paper + fine grain */
body::after{
  content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;opacity:.3;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection{background:var(--primary);color:var(--bg)}
a{color:var(--primary);text-underline-offset:3px}

/* ————— header: centered typographic masthead, like the site ————— */
.top{
  position:relative;z-index:20;
  width:100%;margin:0;
  background:var(--bg);
  color:var(--text);
  padding:clamp(30px,6vh,52px) clamp(18px,4vw,40px) clamp(18px,3vh,26px);
  display:flex;align-items:center;justify-content:center;
  border:0;border-bottom:1px solid var(--border);border-radius:0;
  box-shadow:none;
}
body:has(main.wide) .top{width:100%}
.top .brand{display:flex;align-items:center;justify-content:center;min-width:0;color:inherit;text-align:center}
.top .brand span{
  font-family:var(--serif);font-weight:500;
  font-size:clamp(30px,5.5vw,48px);line-height:1.08;letter-spacing:-.02em;
  text-wrap:balance;
}
.top .brand .brand-accent{color:var(--primary);font-weight:inherit}
/* uploaded logos may be white — give them the brand color as a small plate */
.top .brand:has(img){background:transparent;padding:0}  /* logos always stand bare */
.top img{max-height:40px;max-width:min(240px,60vw);object-fit:contain;display:block}
/* controls sit quietly in the top corner */
.top>.lang,.top>.row{position:absolute;top:14px;right:clamp(14px,3vw,28px)}
.lang{
  background:transparent;
  color:var(--text-2);border:1px solid var(--border-strong);
  border-radius:var(--radius);padding:5px 13px;font-family:var(--mono);font-size:11px;
  letter-spacing:.14em;text-transform:uppercase;font-weight:500;
  cursor:pointer;transition:color .3s,border-color .3s;
}
.lang:hover{color:var(--primary);border-color:var(--primary)}

main{max-width:720px;margin:0 auto;padding:clamp(26px,5vw,44px) 18px 110px}
main.wide{max-width:1040px}

/* staggered entrance */
@media (prefers-reduced-motion:no-preference){
  main>*{animation:rise .45s ease-out both}
  main>*:nth-child(2){animation-delay:.05s}
  main>*:nth-child(3){animation-delay:.1s}
  main>*:nth-child(4){animation-delay:.15s}
  @keyframes rise{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
}

/* ————— type: light serif display, like the site ————— */
h1{
  font-family:var(--serif);font-weight:400;
  font-size:clamp(36px,6.4vw,54px);line-height:1.05;letter-spacing:-.02em;
  margin:10px 0 8px;text-wrap:balance;
}
h2{
  font-family:var(--serif);font-weight:500;
  font-size:26px;line-height:1.15;letter-spacing:-.01em;margin:0 0 14px;
}
.sub{color:var(--text-2);margin:0 0 26px;font-size:17px;max-width:56ch;text-wrap:pretty}

/* ————— surfaces ————— */
.card{
  background:var(--bg);
  border:1px solid var(--border);
  border-radius:var(--radius);padding:clamp(20px,3.6vw,30px);margin-bottom:20px;
  box-shadow:none;
  transition:border-color .4s cubic-bezier(.16,1,.3,1);
}

label{
  display:block;font-family:var(--mono);font-weight:500;font-size:11px;
  text-transform:uppercase;letter-spacing:.16em;color:var(--text-2);
  margin:22px 0 8px;
}
label small{font-family:var(--sans);font-weight:450;color:var(--text-2);text-transform:none;letter-spacing:.01em;font-size:12.5px}
input,textarea,select{
  width:100%;font:inherit;color:var(--text);
  background:#fff;border:1px solid var(--border-strong);
  border-radius:var(--radius);padding:12px 15px;
  transition:border-color .3s,box-shadow .3s;
}
input:hover,textarea:hover,select:hover{border-color:color-mix(in srgb,var(--text) 34%,var(--bg))}
::placeholder{color:color-mix(in srgb,var(--text) 38%,transparent)}
input[type=color]{display:block;margin-top:6px;padding:3px;height:44px;width:72px;cursor:pointer;border-radius:var(--radius)}
input[type=checkbox]{width:auto;accent-color:var(--primary)}
textarea{min-height:220px;resize:vertical}
#body{ /* the letter itself is written in serif — it should feel like a letter */
  font-family:var(--serif);font-size:20px;line-height:1.6;font-weight:500;
  min-height:320px;
}
#email,.cc-in{font-family:var(--serif);font-size:18px;font-weight:500}   /* same voice as the letter */
input:focus,textarea:focus,select:focus{border-color:var(--primary);box-shadow:0 0 0 2.5px color-mix(in srgb,var(--primary) 10%,transparent);outline:none}
button:focus-visible{outline:2px solid var(--primary);outline-offset:2px}

/* ————— buttons: no boxes — editorial text actions with the site's
   animated red underline (link-underline pattern) ————— */
.btn{
  display:inline-flex;align-items:center;gap:7px;position:relative;
  background:transparent;
  color:var(--text);border:0;border-radius:0;
  padding:7px 2px;font-family:var(--mono);font-size:12px;font-weight:500;
  letter-spacing:.12em;text-transform:uppercase;
  cursor:pointer;text-decoration:none;
  box-shadow:none;
  transition:color .3s;
}
.btn::after{
  content:"";position:absolute;left:0;right:0;bottom:0;height:2px;
  background:var(--primary);transform-origin:left;
  transition:transform .3s ease,background .3s;
}
.btn:hover{color:var(--primary)}
.btn:active{opacity:.8}
.btn:disabled{opacity:.4;cursor:wait}
/* primary carries its red underline; quieter actions grow theirs on hover */
.btn.ghost,.btn.danger{color:var(--text-2);font-weight:500}
.btn.ghost::after,.btn.danger::after{transform:scaleX(0)}
.btn.ghost:hover,.btn.danger:hover{color:var(--primary)}
.btn.ghost:hover::after,.btn.danger:hover::after{transform:scaleX(1)}
.btn.sm{padding:5px 1px;font-size:10.5px;letter-spacing:.12em}
/* boxed variant: white plate with hairline, no underline (e.g. Upload logo) */
.btn.boxed{background:#fff;border:1px solid var(--border-strong);border-radius:var(--radius);padding:9px 16px;color:var(--text)}
.btn.boxed.sm{padding:7px 13px}
.btn.boxed::after{display:none}
.btn.boxed:hover{border-color:var(--primary);color:var(--primary)}
.btn.boxed.danger{color:var(--primary)}
.btn.boxed.danger:hover{border-color:var(--primary);background:color-mix(in srgb,var(--primary) 5%,#fff)}

/* stats strip in collapsed rows: number + label, hairline separated */
.stats{display:inline-flex;align-items:baseline}
.stat-i{
  display:inline-flex;align-items:baseline;gap:5px;padding:0 13px;
  border-left:1px solid var(--border);
  font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--text-2);
  white-space:nowrap;
}
.stat-i:first-child{border-left:0;padding-left:0}
.stat-i b{font-family:var(--sans);font-size:14.5px;font-weight:600;letter-spacing:0;color:var(--text)}
.stat-i.failed,.stat-i.failed b{color:var(--primary)}
.btn.big{
  width:100%;justify-content:center;font-size:14px;letter-spacing:.16em;
  padding:16px 2px;margin-top:26px;
  border-top:1px solid var(--border);
}
.btn.big::after{height:2px}

/* ————— chips (delivery presets) ————— */
.chips{display:flex;flex-wrap:wrap;gap:9px}
/* the site's media-tab pattern: hairline, red only on the active edge */
.chip{
  border:1px solid var(--border);
  background:transparent;border-radius:var(--radius);padding:8px 16px;font:inherit;font-size:14.5px;font-weight:500;
  cursor:pointer;color:var(--text-2);
  transition:background .3s,border-color .3s,color .3s;
}
.chip:hover{border-color:var(--primary);color:var(--primary)}
.chip[aria-pressed=true]{
  background:transparent;color:var(--primary);border-color:var(--primary);
  box-shadow:none;
}

.hint{font-size:14px;color:var(--text-2);margin-top:7px}
/* the optional calendar entry: same mono label + hint pattern as the
   fields above, with the checkbox inline before the label */
.cal-opt{margin-top:22px}
.cal-opt .check{
  display:flex;align-items:center;gap:10px;margin:0;cursor:pointer;
}
.cal-opt input[type=checkbox]{width:19px;height:19px;flex:none;margin:0;cursor:pointer}
.cal-opt .hint{margin:7px 0 0}
/* its own schedule picker — aligned with the letter's date picker above */
#calPick{margin:4px 0 0}
#calPick label{margin-top:16px}
#calArrival{font-family:var(--serif);font-style:italic;font-size:16px;color:var(--ink-70);margin-top:10px}
.notice{
  background:var(--elevated);
  border:1px solid var(--border);
  border-left:2px solid var(--primary);
  padding:12px 16px;border-radius:var(--radius);margin:16px 0;
}
.err{color:#c8102e;font-weight:600;margin-top:12px}

/* ————— uploads ————— */
.drop{
  border:1px dashed color-mix(in srgb,var(--text) 28%,transparent);
  border-radius:var(--radius);padding:13px 16px;text-align:center;cursor:pointer;
  background:#fff;
  font-family:var(--serif);font-size:18px;font-weight:500;   /* same voice as the letter text */
  transition:border-color .2s,background .2s;
}
.drop:hover{border-color:var(--ink-70);background:color-mix(in srgb,var(--primary) 3%,#fff)}
.email-row{display:flex;gap:10px;align-items:center}
.email-row input{flex:1}
.cc-row{display:flex;gap:10px;align-items:center;margin-top:10px}
.cc-row input{flex:1}
.round-btn{
  width:32px;height:32px;border-radius:50%;flex:none;padding:0;
  border:1px solid var(--border-strong);background:#fff;color:var(--text-2);
  font-size:17px;line-height:1;cursor:pointer;transition:color .3s,border-color .3s;
}
.round-btn:hover{color:var(--primary);border-color:var(--primary)}
.cc-toggle{
  display:inline-block;background:none;border:0;cursor:pointer;padding:4px 0;margin-top:14px;
  font-family:var(--mono);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--text-2);
}
.cc-toggle:hover{color:var(--primary)}
.private-note{display:flex;align-items:center;gap:7px}
.private-note svg{flex:none;color:var(--text-2)}
.drop.over{border-color:var(--primary);background:color-mix(in srgb,var(--primary) 6%,#fff)}
.thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:10px;margin-top:14px}
.thumb{
  position:relative;aspect-ratio:1;border-radius:var(--radius);overflow:hidden;
  background:var(--ink-08);display:grid;place-items:center;
  font-size:13px;text-align:center;padding:4px;word-break:break-all;
  box-shadow:none;border:1px solid var(--ink-08);
}
.thumb img,.thumb video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.thumb button{
  position:absolute;top:6px;right:6px;z-index:2;border:0;border-radius:50%;
  width:28px;height:28px;background:#000c;color:#fff;cursor:pointer;font-size:16px;line-height:1;
  backdrop-filter:blur(4px);transition:transform .15s;
}
.thumb button:hover{transform:scale(1.12)}

.bar{height:4px;background:var(--elevated);border-radius:0;overflow:hidden;margin-top:14px}
.bar>i{display:block;height:100%;background:var(--primary);width:0;transition:width .2s}

/* ————— success ————— */
.success{text-align:center;padding:38px 14px}
.success .big{
  font-size:54px;line-height:1;position:relative;
}
@media (prefers-reduced-motion:no-preference){
  .success .big{display:inline-block;animation:float 3.2s ease-in-out infinite}
  @keyframes float{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(-9px) rotate(3deg)}}
}

.hidden{display:none!important}

/* ————— admin: tabs as quiet underline ————— */
.tabs{
  display:flex;gap:26px;flex-wrap:wrap;margin-bottom:28px;
  background:transparent;border:0;border-bottom:1px solid var(--ink-12);
  border-radius:0;padding:0;box-shadow:none;
}
.tab{
  border:0;background:transparent;font-family:var(--mono);font-weight:500;font-size:12px;
  letter-spacing:.16em;text-transform:uppercase;
  padding:8px 2px 13px;border-radius:0;cursor:pointer;color:var(--text-2);
  transition:color .3s,box-shadow .3s;
}
.tab:hover{color:var(--text)}
.tab[aria-selected=true]{background:transparent;color:var(--text);box-shadow:inset 0 -2px 0 var(--primary)}

/* ————— admin: stats ————— */
/* the four color pickers share one row in a desktop browser */
/* the three color pickers share one row; every cell is a column whose
   picker sits on the bottom edge, so wrapping labels never push the
   swatches out of line */
.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:20px;align-items:stretch}
.grid>div{margin:0 !important;display:flex}
.grid label{display:flex;flex-direction:column;justify-content:flex-end;gap:8px;margin:0;width:100%}
.grid label>span{white-space:pre-line}   /* \n in a label forces its two-line break */
.grid input[type=color]{margin:0;width:100%;max-width:96px}
@media (max-width:640px){.grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* color pickers line up even when a label wraps to two lines */
.stat{
  background:var(--bg);border:1px solid var(--border);border-radius:var(--radius);padding:16px 18px;
}
.stat b{
  display:block;font-family:var(--serif);font-weight:700;
  font-size:34px;letter-spacing:-.01em;overflow-wrap:anywhere;line-height:1.05;color:var(--primary);
}
.stat span{font-size:11.5px;color:var(--ink-55);text-transform:uppercase;letter-spacing:.08em;font-weight:550}

table{width:100%;border-collapse:collapse;font-size:15px}
th,td{text-align:left;padding:9px 8px;border-bottom:1px solid var(--ink-08);vertical-align:top}

/* ————— admin: charts ————— */
.cols{display:flex;gap:4px;align-items:flex-end;height:120px;margin-top:24px}
.cols div{
  flex:1;max-width:56px;min-height:3px;position:relative;border-radius:6px 6px 2px 2px;
  background:var(--primary);
  transition:filter .2s,transform .2s;transform-origin:bottom;
}
.cols div:hover{filter:brightness(1.12);transform:scaleY(1.03)}
.cols div span{position:absolute;top:-19px;left:0;right:0;text-align:center;font-size:11px;font-weight:600;color:var(--ink-70)}
.axis{display:flex;gap:4px;justify-content:flex-start;font-size:10px;color:var(--ink-55)}
.axis span{flex:1;max-width:56px;text-align:center;overflow:hidden}

.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}

/* ————— admin: branding ————— */
.swatches{display:flex;gap:9px;flex-wrap:wrap}
.swatch{
  width:80px;height:40px;border-radius:var(--radius);border:1px solid var(--border-strong);
  cursor:pointer;display:flex;overflow:hidden;padding:0;
  transition:border-color .2s;
}
.swatch:hover{border-color:var(--ink-70)}
.swatch i{flex:1}
.preview{border-radius:var(--radius);overflow:hidden;border:1px solid var(--border);box-shadow:none}

/* live preview in a phone-shaped frame — grows with its content so the
   whole participant page stays visible */
.phone{
  width:min(300px,100%);margin:0 auto;
  border:1px solid var(--border-strong);border-radius:34px;
  padding:10px;background:#fff;overflow:hidden;
}
.phone .preview{border:0;border-radius:26px;overflow:hidden;min-height:560px;display:block}
/* the preview is the REAL participant page in an iframe, scaled to fit */
.phone .preview>iframe{display:block;border:0;transform-origin:0 0}

/* one aligned system: equal heights, same type, same padding */
.pill{display:inline-flex;align-items:center;font-family:var(--mono);font-size:10.5px;font-weight:500;letter-spacing:.12em;text-transform:uppercase;line-height:1;padding:5px 9px;border:1px solid transparent;border-radius:var(--radius);background:var(--elevated)}
/* CI only, quiet tints of ink and crimson (quaquebeke.de palette) */
.pill.sent{background:#f3f2ee;color:#1a1a18}
.pill.scheduled{background:transparent;border-color:#e6e5e0;color:#5a5a52}
.pill.failed{background:transparent;border-color:#c8102e40;color:#c8102e}
/* the counts and date in a collapsed row speak the same mono language */
details.ws>summary .hint{font-family:var(--mono);font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--text-2);margin:0;line-height:1}
details.ws>summary .row{align-items:center}

/* ————— delivered letter ————— */
.letter-body{
  font-family:var(--serif);font-size:21px;line-height:1.65;font-weight:500;
  white-space:pre-wrap;text-wrap:pretty;
  background:var(--paper);
  border:1px solid var(--border);border-left:2px solid var(--primary);
  padding:clamp(20px,4vw,34px);border-radius:var(--radius);
  box-shadow:none;
}
.letter-body::first-letter{
  font-size:2.7em;line-height:.85;font-weight:600;color:var(--primary);
}
.media-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:18px;margin-top:24px}
.media-grid img,.media-grid video{
  width:100%;border-radius:var(--radius);background:#000;display:block;
  box-shadow:0 4px 14px -8px color-mix(in srgb,var(--text) 35%,transparent);
}
/* photographs as paper prints, slightly askew */
.media-grid img{
  padding:10px 10px 26px;background:#fff;border:1px solid var(--ink-12);
  transition:transform .25s cubic-bezier(.22,.9,.3,1);
}
.media-grid img:nth-child(odd){transform:rotate(-1.4deg)}
.media-grid img:nth-child(even){transform:rotate(1.2deg)}
.media-grid img:hover{transform:rotate(0) scale(1.015)}

/* arrival line reads like a note in the margin */
#arrival{font-family:var(--serif);font-style:italic;font-size:17.5px;color:var(--ink-70);margin-top:12px}

/* landing page hero */
main.hero{text-align:center;padding-top:max(8vh,48px)}
main.hero h1{font-size:clamp(38px,6.6vw,62px);font-style:italic;font-weight:500;max-width:18ch;margin-inline:auto}
main.hero .sub{margin-inline:auto}

@media(max-width:520px){
  .card{padding:18px 16px}
  .tabs{display:flex}
  .tab{padding:9px 13px;font-size:14px;flex:1;text-align:center}
}

/* ————— per-workshop look (admin) ————— */
details.look>summary{
  cursor:pointer;list-style:none;display:flex;align-items:center;gap:8px;
  font-family:var(--mono);font-size:11.5px;font-weight:500;letter-spacing:.16em;
  text-transform:uppercase;color:var(--text-2);user-select:none;
}
details.look>summary::before{content:"";width:18px;height:2px;background:var(--primary);flex:none}
details.look>summary::-webkit-details-marker{display:none}
details.look[open]>summary{margin-bottom:12px}
/* section headings inside the look block speak the same mono language
   as the form labels above them (Title, Description, …) */
.card h3{
  font-family:var(--mono);font-weight:500;font-size:11px;
  letter-spacing:.16em;text-transform:uppercase;color:var(--text-2);
  margin:24px 0 8px;
}

/* ————— QR full screen (admin) ————— */
.qr-overlay{
  position:fixed;inset:0;z-index:1000;background:#fff;cursor:zoom-out;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;
}
.qr-overlay img{width:min(76vmin,560px);height:auto}
.qr-overlay .qr-cap{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;padding:0 18px;color:#1A1A18}
.qr-overlay .qr-cap b{font-family:var(--serif);font-weight:600;font-size:28px}
.qr-overlay .qr-cap span{font-family:var(--mono);font-size:13px;font-weight:500;letter-spacing:.14em;text-transform:uppercase;color:#1a1a18a0;word-break:break-all}

/* ————— landing: #code entry ————— */
.code-hint{margin-top:34px}
.code-form{display:flex;gap:10px;justify-content:center;align-items:center;margin-top:14px}
.code-form input{
  width:170px;text-align:center;
  font-family:var(--mono);font-size:15px;letter-spacing:.14em;text-transform:uppercase;
}
.hero .err{text-align:center}

/* ————— landing footer ————— */
.foot{
  position:fixed;left:0;right:0;bottom:14px;text-align:center;
  font-family:var(--mono);font-size:11px;letter-spacing:.18em;text-transform:uppercase;
}
.foot a{color:var(--text-2);text-decoration:none;padding:8px 14px}
.foot a:hover{color:var(--primary)}

/* ————— logo chip (hero + admin cards) ————— */
.page-logo{
  display:inline-flex;align-items:center;
  background:transparent;padding:0;border-radius:0;
  margin:6px 0 20px;box-shadow:none;
}
.page-logo img{max-height:56px;max-width:min(260px,62vw);object-fit:contain;display:block}
.page-logo.sm{padding:0;margin:10px 0 0;box-shadow:none}
.page-logo.sm img{max-height:30px;max-width:180px}

/* ————— polish: symmetry & calm ————— */
/* hints that sit inside a label keep sentence case, not the label's caps */
label .hint{font-family:var(--sans);text-transform:none;letter-spacing:.01em;font-weight:450}
/* text actions need air between them */
.ws-body .row,.card .row{column-gap:20px}

/* participant pages: centered page head — the title row locks the logo
   to the LEFT of the title, whatever the title length */
.pagehead{display:flex;flex-direction:column;align-items:center;text-align:center;margin-top:12px}
/* the logo sits vertically centered on the title TEXT; the h1 box also
   holds the accent bar (20px gap + 3px bar), so the logo's margin-bottom
   compensates to keep its middle on the text's middle */
.title-row{display:flex;align-items:center;justify-content:center;gap:18px;max-width:100%}
.pagehead .title-row .page-logo,.pagehead .title-row .bare-logo{margin-bottom:23px}
.title-row h1{margin:0;min-width:0}
/* one heading level below the masthead wordmark */
.pagehead h1{font-size:clamp(22px,3.4vw,30px);font-weight:500}
/* flipped masthead (write page): positions swapped, sizes kept — the event
   logo + title sit in the top bar at their usual size, the app wordmark
   follows below in its old masthead size, the accent bar closes the group */
.top .title-row{display:flex;align-items:center;justify-content:center;gap:14px;min-width:0}
.top .title-row h1{
  margin:0;font-family:var(--serif);font-weight:500;
  font-size:clamp(22px,3.4vw,30px);letter-spacing:-.01em;line-height:1.15;text-wrap:balance;
}
.top .title-row .page-logo{margin:0;flex:none;background:transparent;padding:0}
.flip .app-line{
  margin-top:14px;font-family:var(--serif);font-weight:500;
  font-size:clamp(30px,5.5vw,48px);letter-spacing:-.02em;line-height:1.1;color:var(--text);
}
.flip .app-line b{color:var(--primary);font-weight:inherit}
.flip::after{content:"";width:40px;height:3px;background:var(--primary);margin:18px auto 0}
/* logo and title sit together, centered above the form */
.pagehead .page-logo{margin:0;flex:none}
.pagehead .page-logo img{max-height:40px;max-width:160px}
.pagehead .bare-logo{margin:0;flex:none}
.pagehead h1::after{content:"";display:block;width:40px;height:3px;background:var(--primary);margin:20px auto 0}
.pagehead .sub{margin-left:auto;margin-right:auto;margin-bottom:30px;text-wrap:balance}

/* QR block: the two actions stacked to the LEFT of the code */
.ws-side{display:flex;flex-direction:row;align-items:flex-start;gap:16px;flex:none;margin-left:20px}
.qr-actions{display:flex;flex-direction:column;align-items:flex-end;gap:10px}
/* link block: two lines in the same mono rhythm as the QR actions beside it */
.link-lines{display:flex;flex-direction:column;gap:10px}
/* same voice as the QR actions beside it: mono, uppercase, quiet */
.ws-link{
  font-family:var(--mono);font-size:10.5px;font-weight:500;letter-spacing:.12em;
  text-transform:uppercase;color:var(--text-2);text-decoration:none;
  padding:5px 0;line-height:1.5;overflow-wrap:anywhere;align-self:flex-start;
  transition:color .3s;
}
.ws-link:hover{color:var(--primary)}
.ws-side .page-logo{margin:0;justify-content:center;min-width:120px}
.ws-side .page-logo img{max-height:26px;max-width:110px}

/* ————— collapsible workshop cards (admin) ————— */
details.ws{background:var(--bg)}  /* event rows share the page background; the white info box pops inside */
/* the site's editorial-card hover: lift, stronger hairline, soft shadow */
details.ws{transition:border-color .4s cubic-bezier(.16,1,.3,1),box-shadow .4s cubic-bezier(.16,1,.3,1),transform .4s cubic-bezier(.16,1,.3,1)}
details.ws:not([open]):hover{
  border-color:var(--border-strong);
  box-shadow:0 8px 40px rgba(26,26,24,.06);
  transform:translateY(-2px);
}
details.ws:not([open])>summary{cursor:pointer}
details.ws>summary{
  cursor:pointer;list-style:none;user-select:none;
  display:flex;align-items:center;gap:14px;min-width:0;
}
details.ws>summary::-webkit-details-marker{display:none}
details.ws>summary h2{margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
details.ws>summary .page-logo{flex:none}
details.ws>summary{position:relative;padding-right:56px}  /* clear gap so the chevron reads apart from Delete */
details.ws>summary::after{
  content:"";position:absolute;right:10px;top:50%;width:9px;height:9px;margin-top:-7px;
  border-right:2px solid var(--ink-55);border-bottom:2px solid var(--ink-55);
  transform:rotate(45deg);transition:transform .25s;
}
details.ws[open]>summary::after{transform:rotate(-135deg);margin-top:-3px}
details.ws .ws-body{margin-top:18px}
/* operational info (link, QR, exports) as a white box at the top */
.ws-info{background:#fff;border:1px solid var(--border-strong);border-radius:var(--radius);padding:16px 18px;margin-bottom:22px}
details.ws>summary h2{flex:1}
/* fixed-width mark slot so every title starts at the same x */
.ws-mark{width:96px;flex:none;display:flex;align-items:center;justify-content:flex-start}
.ws-logo{max-height:30px;max-width:96px;object-fit:contain;object-position:left center;display:block}
.ws-ico{color:var(--text-2);display:block}
/* colors extracted from the logo */
.logo-swatches{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 4px}
.logo-swatches button{width:26px;height:26px;border-radius:var(--radius);border:1px solid var(--border-strong);cursor:pointer;padding:0}
.logo-swatches button:hover{border-color:var(--text)}
/* bare logo on the delivered letter page */
.bare-logo{max-height:48px;max-width:200px;object-fit:contain;display:block;margin:0 auto 18px}
/* non-media attachments on the letter page */
.file-link{
  display:flex;align-items:center;justify-content:center;min-height:70px;
  border:1px solid var(--border);border-radius:var(--radius);background:#fff;
  font-family:var(--mono);font-size:11px;letter-spacing:.06em;color:var(--text);
  text-decoration:none;padding:12px;word-break:break-all;
}
.file-link:hover{border-color:var(--primary);color:var(--primary)}

/* ————— default settings: form left, live preview right ————— */
.split{display:grid;grid-template-columns:1fr;gap:0 28px;align-items:start}
@media(min-width:900px){
  .split{grid-template-columns:minmax(0,1fr) minmax(320px,420px)}
  .split-side{position:sticky;top:24px}
}
/* collapsed row: title line with the action buttons, stats underneath */
.sum-body{flex:1;min-width:0}
.sum-top{display:flex;align-items:center;gap:14px}
.sum-top h2{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sum-stats{display:flex;align-items:baseline;gap:16px;margin-top:9px;flex-wrap:wrap}
details.ws>summary .hint{white-space:nowrap}
details.ws>summary{flex-wrap:wrap;row-gap:8px}
details.ws>summary h2{min-width:min(100%,24ch)}
/* legal footer on app pages */
.legalfoot{text-align:center;padding:24px 0 34px;font-size:12.5px}
.legalfoot a{color:var(--text-2);text-decoration:none;margin:0 9px}
.legalfoot a:hover{text-decoration:underline}

/* platform: alternating account rows */
.acct{padding:12px 16px;margin:0 -16px;border-radius:var(--radius);transition:background .25s}
.acct.alt{background:var(--elevated)}
.acct:hover{background:color-mix(in srgb,var(--text) 7%,var(--bg))}
.acct select,.acct input[type=number]{width:auto;padding:8px 12px;font-size:13.5px}
.acct .stats{display:flex;flex-wrap:wrap;row-gap:5px}
