/* Pepper's portal (2026-11-19). One dark theme that matches the link preview. Phone first: he is about seventy, so big type (20 px
   base, 23 and 26 on his word), tap targets of at least 52 px, contrast measured (see the lane report). Tokens first; no inline styles
   (the CSP forbids them). The accent is one of a fixed palette chosen by the page spec (html.a-<name>). */
:root {
  /* primitives */
  --ink-0: #f2f3f5; --ink-1: #c9cfd8; --ink-2: #9aa4b2;
  --ground-0: #111418; --ground-1: #181c22; --ground-2: #20262e; --line: #2e3640;
  --amber: #e9b872; --blue: #8fb8f0; --green: #8fd1a6; --rose: #f0a3b5; --violet: #c3a9f0;
  --danger: #f2a39a;
  /* semantic */
  --bg: var(--ground-0); --surface: var(--ground-1); --surface-2: var(--ground-2);
  --text: var(--ink-0); --text-2: var(--ink-1); --text-3: var(--ink-2);
  --accent: var(--amber); --on-accent: #15181c;
  --radius: 14px; --radius-sm: 10px; --gap: 16px; --gutter: 16px;
  --tap: 52px; --fs: 20px;
  --ease-out: cubic-bezier(.2,.7,.2,1); --dur: 160ms;
  color-scheme: dark;
}
html.a-blue { --accent: var(--blue); } html.a-green { --accent: var(--green); } html.a-rose { --accent: var(--rose); } html.a-violet { --accent: var(--violet); }
html.t1 { --fs: 23px; } html.t2 { --fs: 26px; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100svh; background: var(--bg); color: var(--text);
  font: 400 var(--fs)/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: clip; overflow-wrap: anywhere;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.5em; line-height: 1.25; font-weight: 600; }
h2 { font-size: 1.15em; line-height: 1.3; font-weight: 650; letter-spacing: .005em; }
h3 { font-size: 1em; font-weight: 600; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* buttons */
button, .button { font: inherit; min-height: var(--tap); padding: 10px 22px; border-radius: 999px; border: 2px solid transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; touch-action: manipulation;
  transition: transform var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out); }
button:active, .button:active { transform: scale(.96); }
.primary { background: var(--accent); color: var(--on-accent); font-weight: 650; }
.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.ghost:hover { background: var(--surface-2); }
.wide { width: 100%; }
.linkish { background: none; border: 0; color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; padding: 10px 4px; min-height: var(--tap); }
form.inline { display: inline; margin: 0; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* inputs: >= 16px always (iOS zoom), here 1em of a 20 px base */
input[type=password], input[type=text] { font: inherit; width: 100%; min-height: var(--tap); padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text); border: 2px solid var(--line); }
input:focus { border-color: var(--accent); outline: none; }
label { display: block; font-weight: 600; margin: 0 0 8px; }

/* the corner mark */
.corner { position: absolute; top: calc(14px + env(safe-area-inset-top)); left: calc(var(--gutter) + env(safe-area-inset-left)); }
.mark { width: 28px; height: 28px; opacity: .8; display: block; }

/* sign-in: plain, one box */
.signin-main { min-height: 100svh; display: grid; place-items: center; padding: 72px var(--gutter); }
.signin-box { width: min(100%, 22rem); display: grid; gap: 14px; }
.signin-box label { margin: 0; }
.msg { color: var(--danger); }

/* plain pages (messages, password) */
.msg-main { max-width: 34rem; margin: 0 auto; padding: 88px var(--gutter) 48px; display: grid; gap: 18px; }
.stack { display: grid; gap: 10px; }
.stack button { margin-top: 10px; }
.quiet { color: var(--text-2); }

/* the page */
.top { max-width: 40rem; margin: 0 auto; padding: 18px var(--gutter) 6px; display: flex; align-items: center; gap: 14px; }
.top .me { width: 48px; height: 48px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent); }
.who { flex: 1; min-width: 0; }
.name { font-size: 1.1em; font-weight: 650; }
.greet { color: var(--text-2); }
.top .mark { margin-left: auto; align-self: flex-start; }
.page { max-width: 40rem; margin: 0 auto; padding: 8px var(--gutter) 24px; display: grid; gap: 28px; min-width: 0; }
.sec { display: grid; gap: 12px; min-width: 0; }
.sec > h2, .sec > summary > h2 { color: var(--text); }
.fold > summary { list-style: none; cursor: pointer; min-height: var(--tap); display: flex; align-items: center; gap: 10px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: "+"; color: var(--accent); font-size: 1.2em; margin-left: auto; }
.fold[open] > summary::after { content: "\2212"; }
.fold[open] { display: grid; gap: 12px; }
.empty { color: var(--text-2); padding: 24px 0; }
.hint { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; justify-items: start; }

/* connect card */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 14px; min-width: 0; }
.connect-top { display: flex; gap: 14px; align-items: center; }
.connect-top .play { color: var(--accent); flex: none; }
.guide-note { color: var(--text-2); font-size: .9em; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.steps li { display: grid; gap: 6px; align-content: start; min-width: 0; }
.shot { display: grid; place-items: center; aspect-ratio: 4 / 3; background: #fff; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); }
.steps li:last-child .shot { background: #131314; }
.shot img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cap { font-size: .8em; line-height: 1.3; color: var(--text-2); }
.cap b { color: var(--accent); margin-right: 2px; }
.quiet-line .quiet { font-size: .95em; }

/* drafts */
.draft { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; min-width: 0; }
.draft .to { font-weight: 600; }
.draft .kind { color: var(--text-3); font-weight: 400; font-size: .85em; margin-left: 6px; }
.msg-text { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 1.05em; line-height: 1.55; white-space: pre-wrap;
  -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
.draft .row { display: flex; flex-wrap: wrap; gap: 10px; }
.draft .row > * { min-width: 0; }
.draft .copy { flex: 1 1 10rem; }
.draft.sent { opacity: .85; }
.more > summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; color: var(--accent); font-weight: 600; }
.more[open] { display: grid; gap: 12px; }

/* calls */
.call { border-left: 3px solid var(--accent); padding: 2px 0 2px 14px; display: grid; gap: 4px; }
.call h3 { color: var(--text-2); font-weight: 600; font-size: .9em; }

/* ideas and his list */
.ideas, .plain-list, .asked, .links, .checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ideas li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; display: grid; gap: 2px; }
.ideas .t { font-weight: 600; }
.ideas .st { color: var(--accent); font-size: .85em; }
.ideas .next { color: var(--text-2); font-size: .95em; }
.sub { margin-top: 6px; color: var(--text-2); }
.plain-list li { padding-left: 18px; position: relative; }
.plain-list li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.asked li { color: var(--text-2); font-size: .95em; }
.asked .st { color: var(--text-3); font-size: .85em; white-space: nowrap; }
.notes { white-space: pre-wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.checks li { display: flex; align-items: center; gap: 12px; min-width: 0; }
.checks li > span { min-width: 0; }
.checks li.done > span { color: var(--text-3); text-decoration: line-through; }
.tick { width: var(--tap); min-width: var(--tap); padding: 0; border-radius: 12px; background: var(--surface-2); border-color: var(--line); color: var(--accent); font-weight: 700; }
.links li { display: grid; }
.links .host { color: var(--text-3); font-size: .8em; }

/* the call button and the footer */
.call-wrap { display: grid; }
.call-btn { display: flex; align-items: center; justify-content: center; min-height: 60px; border-radius: 999px; background: var(--surface-2); border: 2px solid var(--accent);
  color: var(--text); font-weight: 650; text-decoration: none; }
.foot { max-width: 40rem; margin: 0 auto; padding: 8px var(--gutter) calc(28px + env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center;
  color: var(--text-2); font-size: .85em; border-top: 1px solid var(--line); }
.foot a { color: var(--text-2); min-height: var(--tap); display: inline-flex; align-items: center; }

/* the bigger picture */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100dvh; width: 100vw; height: 100dvh; margin: 0; }
.lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox form { position: fixed; top: calc(12px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right)); margin: 0; z-index: 1; }
.lightbox .close { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.lightbox img { max-width: 100vw; max-height: 100dvh; object-fit: contain; display: block; }

@media (min-width: 700px) {
  :root { --gutter: 24px; }
  .top { padding-top: 28px; }
  .page { gap: 34px; }
}
.offscreen { position: fixed; left: -9999px; top: 0; opacity: 0; }

/* his planner (2026-11-19): today first, big tick boxes, the month one tap away */
.day { display: grid; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); min-width: 0; }
.day:first-of-type { border-top: 0; padding-top: 0; }
.day h3 { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.day h3 .date { color: var(--text-2); font-weight: 400; font-size: .85em; }
.day.today h3 { color: var(--accent); }
.timed, .todos, .open-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pl-item { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: center; min-width: 0; }
.pl-item > .what { min-width: 0; display: grid; gap: 2px; }
.pl-item .tm { color: var(--accent); font-weight: 650; font-size: .9em; }
.pl-item.done .txt { color: var(--text-3); text-decoration: line-through; }
.pl-item .from { color: var(--text-3); font-size: .8em; }
.pl-item details.edit { grid-column: 2; }
.pl-item details.edit > summary { color: var(--text-2); font-size: .85em; cursor: pointer; min-height: 40px; display: inline-flex; align-items: center; }
.pl-form { display: grid; gap: 10px; padding: 12px 0 4px; }
.pl-form .two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.pl-form input[type=date], .pl-form input[type=time] { font: inherit; min-height: var(--tap); padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); border: 2px solid var(--line); width: 100%; min-width: 0; }
.pl-form .check { display: flex; gap: 10px; align-items: center; font-weight: 400; }
.pl-form .check input { width: 26px; height: 26px; accent-color: var(--accent); }
.pl-form .row { display: flex; flex-wrap: wrap; gap: 10px; }
.still { color: var(--text-2); font-size: .9em; margin-top: 4px; }
.pl-add > summary, .month > summary { color: var(--accent); font-weight: 650; cursor: pointer; min-height: var(--tap); display: flex; align-items: center; }
.pl-missed { color: var(--danger); font-size: .9em; }
.month-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 6px 0 10px; }
.month-nav a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 6px; }
.grid7 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.grid7 .wd { text-align: center; color: var(--text-3); font-size: .7em; padding-bottom: 2px; }
.grid7 a, .grid7 span.blank { aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; text-decoration: none; color: var(--text); font-size: .85em; position: relative; min-width: 0; }
.grid7 a { background: var(--surface); border: 1px solid var(--line); }
.grid7 a.c1 { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.grid7 a.c2 { background: color-mix(in srgb, var(--accent) 30%, var(--surface)); }
.grid7 a.c3 { background: color-mix(in srgb, var(--accent) 46%, var(--surface)); }
.grid7 a.alldone::after { content: ""; position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); }
.grid7 a.is-today { border: 2px solid var(--accent); font-weight: 700; }
.grid7 a.is-focus { outline: 3px solid var(--text); outline-offset: 1px; }
.push-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 12px; }
.push-card[hidden] { display: none; }
.howto { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.howto li { display: flex; gap: 12px; align-items: center; }
.howto svg { flex: none; color: var(--accent); }
.shape-line { color: var(--text-3); font-size: .85em; text-align: center; padding: 4px 0 0; }

/* custom sections (block trees) */
.b-h { margin: 0 0 8px; font-size: 1.1em; }
.b-p { margin: 0 0 10px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.b-p-strong { font-weight: 700; }
.b-p-quiet { color: var(--text-2); font-size: .9em; }
.b-list { margin: 0 0 10px; padding-left: 1.3em; line-height: 1.45; overflow-wrap: anywhere; }
.b-list li { margin-bottom: 4px; }
.b-rows { margin: 0 0 10px; display: grid; gap: 0; }
.b-rows > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.b-rows dt { color: var(--text-2); overflow-wrap: anywhere; }
.b-rows dd { margin: 0; overflow-wrap: anywhere; }
.b-table-wrap { overflow-x: auto; margin: 0 0 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.b-table { width: 100%; border-collapse: collapse; }
.b-table th, .b-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.b-table th { color: var(--text-2); font-weight: 600; background: var(--surface); }
.b-table tr:last-child td { border-bottom: 0; }
.b-tile { display: inline-flex; flex-direction: column; gap: 2px; min-width: 120px; margin: 0 8px 10px 0; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); vertical-align: top; }
.b-tile-label { color: var(--text-2); font-size: .85em; }
.b-tile-value { color: var(--accent); font-size: 1.8em; font-weight: 700; line-height: 1.1; }
.b-note { margin: 0; color: var(--text-2); font-size: .85em; }
.b-bar { margin: 0 0 12px; }
.b-bar-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 4px; color: var(--text-2); }
.b-bar-track { height: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.b-bar-fill { height: 100%; background: var(--accent); }
.b-bar-fill.w0 { width: 0; } .b-bar-fill.w10 { width: 10%; } .b-bar-fill.w20 { width: 20%; } .b-bar-fill.w30 { width: 30%; }
.b-bar-fill.w40 { width: 40%; } .b-bar-fill.w50 { width: 50%; } .b-bar-fill.w60 { width: 60%; } .b-bar-fill.w70 { width: 70%; }
.b-bar-fill.w80 { width: 80%; } .b-bar-fill.w90 { width: 90%; } .b-bar-fill.w100 { width: 100%; }
.b-link { margin: 0 0 10px; }
.b-link a { color: var(--accent); overflow-wrap: anywhere; }
.b-hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
