/* Skraplet — soft & happy. The app has a dark theme too (end of file); the landing and sign-in pages stay light. The brand blue comes from the logo, pastels colour-code identities. */
:root {
  color-scheme: light;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #f6f7fc;
  --surface: #ffffff;
  --surface-2: #f3f5fb;
  --on-ink: #ffffff;
  --material: rgba(255, 255, 255, .78);
  --glass: rgba(246, 247, 252, .86);
  --ink: #0e1438;
  --ink-2: #5a6285;
  --ink-3: #8a90aa;
  --line: rgba(14, 20, 56, .08);
  --line-2: rgba(14, 20, 56, .14);
  --fill: rgba(14, 20, 56, .06);
  --fill-2: rgba(14, 20, 56, .035);
  --fill-hover: rgba(14, 20, 56, .09);

  --brand: #3347e6;
  --brand-ink: #2a3bd1;
  --brand-soft: rgba(51, 71, 230, .1);
  --brand-grad: linear-gradient(var(--brand), var(--brand)); /* solid: the brand blue, no gradient */
  --focus: rgba(51, 71, 230, .28);

  --green: #16864a; --green-soft: #e1f6ea;
  --orange: #b85e00; --orange-soft: #fff0da;
  --red: #d42a38; --red-soft: #ffe4e6;
  --blue: #1f5fd6; --blue-soft: #e3ecff;
  --gray: #646b8a; --gray-soft: #eef0f6;

  --shadow-sm: 0 1px 2px rgba(14, 20, 56, .04), 0 2px 8px rgba(14, 20, 56, .04);
  --shadow: 0 2px 6px rgba(14, 20, 56, .05), 0 12px 32px rgba(14, 20, 56, .07);
  --shadow-lg: 0 12px 30px rgba(14, 20, 56, .1), 0 30px 80px rgba(14, 20, 56, .14);
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;
  --radius-xl: 30px;
  --ease: cubic-bezier(.25, .1, .25, 1);
  --spring: cubic-bezier(.32, .72, 0, 1);
}

/* Pastel tones: identities, avatars, tiles and icon chips pick one of these. */
.pastel-sky    { --p-bg: #ddeeff; --p-ink: #1d5fb8; --p-deep: #8cc2ff; }
.pastel-lilac  { --p-bg: #ebe4ff; --p-ink: #5b3fc4; --p-deep: #b9a4ff; }
.pastel-pink   { --p-bg: #ffe3ef; --p-ink: #b3306a; --p-deep: #ffa6ca; }
.pastel-butter { --p-bg: #fff1c2; --p-ink: #876000; --p-deep: #ffd75e; }
.pastel-mint   { --p-bg: #d9f6e7; --p-ink: #16784a; --p-deep: #86e0b3; }
.pastel-peach  { --p-bg: #ffe6d4; --p-ink: #b4541c; --p-deep: #ffb68a; }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 var(--font); letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; opacity: .45; }
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--focus); border-radius: 10px; }
[hidden] { display: none !important; }
::selection { background: rgba(51, 71, 230, .16); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: -.02em; }
.muted { color: var(--ink-2); }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -.035em; }
.brand:hover { text-decoration: none; }
.logo { height: 30px; width: auto; flex: none; display: block; }
.brand-sm { font-size: 16px; } .brand-sm .logo { height: 22px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 18px; border-radius: 999px; white-space: nowrap;
  font-size: 14px; font-weight: 600; letter-spacing: -.01em;
  transition: transform .25s var(--spring), box-shadow .25s var(--ease), background-color .2s, filter .2s, opacity .2s;
}
.btn:hover { text-decoration: none; }
.btn:active:not(:disabled) { transform: scale(.97); }
/* Primary actions use the same deep ink as selected chips and tabs: calm on pastel, clearly the main choice.
   The brand blue is one solid colour; only the logo keeps its shading. */
.btn-primary {
  background: var(--ink); color: var(--on-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 6px 14px -6px rgba(14, 20, 56, .45);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); background: #1d2552; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 10px 20px -8px rgba(14, 20, 56, .5); }
.btn-secondary { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-sm); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); }
.btn-plain { color: var(--brand-ink); padding: 0 12px; }
.btn-plain:hover:not(:disabled) { background: var(--brand-soft); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-danger:hover:not(:disabled) { background: var(--red); color: #fff; }
.btn-danger-solid { background: var(--red); color: #fff; box-shadow: 0 6px 16px rgba(212, 42, 56, .25); }
.btn-sm { height: 30px; padding: 0 13px; font-size: 13px; }
.btn-lg { height: 50px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn.is-busy { color: transparent !important; position: relative; pointer-events: none; }
.btn.is-busy::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid #fff; border-color: #fff #fff transparent transparent; animation: spin .7s linear infinite;
}
.btn-secondary.is-busy::after, .btn-plain.is-busy::after, .btn-danger.is-busy::after { border-color: var(--ink-2) var(--ink-2) transparent transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--ink-2); transition: background-color .2s, color .2s; }
.icon-btn:hover { background: var(--fill); color: var(--ink); }
.icon-btn .icon { width: 18px; height: 18px; }
.link { color: var(--brand-ink); font-size: 14px; font-weight: 500; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Pills & avatars */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 23px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--gray-soft); color: var(--gray); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tone-green { background: var(--green-soft); color: var(--green); }
.tone-orange { background: var(--orange-soft); color: var(--orange); }
.tone-red { background: var(--red-soft); color: var(--red); }
.tone-blue { background: var(--blue-soft); color: var(--blue); }
.tone-accent { background: var(--brand-soft); color: var(--brand-ink); }
.avatar {
  display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%;
  font-family: var(--display); font-size: 14px; font-weight: 700; letter-spacing: 0;
  background: var(--p-bg, var(--gray-soft)); color: var(--p-ink, var(--gray));
}
.avatar .icon { width: 52%; height: 52%; }
.avatar-lg { width: 42px; height: 42px; border-radius: 14px; font-size: 18px; }
.avatar-xl { width: 58px; height: 58px; border-radius: 18px; font-size: 25px; }

/* Forms */
.form { display: grid; gap: 15px; }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field-wrap { position: relative; display: block; }
.field input, .field select, .input, .select {
  width: 100%; height: 46px; padding: 0 15px; border-radius: 14px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font-size: 16px; font-weight: 400;
  transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none;
}
.field input::placeholder, .input::placeholder { color: var(--ink-3); }
.field input:hover, .input:hover, .select:hover, .field select:hover { border-color: rgba(14, 20, 56, .24); }
.field input:focus, .field select:focus, .input:focus, .select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--focus); }
.select, .field select {
  padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a90aa' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.field-wrap input { padding-right: 48px; }
.reveal-btn { position: absolute; right: 7px; top: 7px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: var(--ink-3); }
.reveal-btn:hover { color: var(--ink); background: var(--fill); }
.reveal-btn.is-on { color: var(--brand-ink); }
.form-error { color: var(--red); font-size: 13px; font-weight: 500; }
.form-error:empty { display: none; }
.form-aside { display: flex; justify-content: flex-end; margin-top: -6px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--ink-2); cursor: pointer; }
.consent input { margin: 2px 0 0; width: 18px; height: 18px; accent-color: var(--brand); flex: none; }

/* Switch */
.switch { position: relative; display: inline-block; flex: none; width: 51px; height: 31px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: rgba(14, 20, 56, .14); transition: background-color .25s var(--ease); }
.switch span::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: var(--surface); box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .12); transition: transform .3s var(--spring);
}
.switch input:checked + span { background: #34c759; }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 4px var(--focus); }
.switch input:disabled + span { opacity: .5; }

/* Segmented control */
.segmented { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); gap: 2px; }
.segmented button { height: 30px; padding: 0 15px; white-space: nowrap; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-2); transition: background-color .2s, color .2s; }
.segmented button:hover:not(.is-active) { color: var(--ink); background: var(--fill-2); }
.segmented button.is-active { background: var(--ink); color: var(--on-ink); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: max(28px, env(safe-area-inset-bottom)); z-index: 100;
  display: flex; align-items: center; gap: 9px; max-width: calc(100vw - 32px); padding: 12px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--ink); background: var(--surface); box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line);
  transform: translateX(-50%); animation: toast-in .45s var(--spring);
}
.toast .icon { color: var(--green); }
.toast.is-error .icon { color: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 16px) scale(.96); } }

/* Motion */
.reveal { animation: rise .9s var(--spring) both; }
.reveal:nth-child(2) { animation-delay: .06s; } .reveal:nth-child(3) { animation-delay: .12s; }
.reveal:nth-child(4) { animation-delay: .18s; } .reveal:nth-child(5) { animation-delay: .26s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-10px) rotate(var(--r, 0deg)); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* Landing and sign-in pages: a plain background */
.page-landing, .page-signin, .page-signup, .page-verify, .page-reset, .page-destination-verify { background: var(--bg); }

/* Folder illustration: three pastel folders, used on the landing page and in empty states */
.folders { position: relative; width: 120px; height: 90px; margin: 0 auto 18px; }
.folder { position: absolute; width: 78px; height: 56px; border-radius: 6px 14px 14px 14px; background: var(--p-bg); box-shadow: inset 0 0 0 1.5px var(--p-deep), 0 8px 18px rgba(14, 20, 56, .08); }
.folder::before { content: ""; position: absolute; left: 0; top: -9px; width: 34px; height: 12px; border-radius: 7px 9px 0 0; background: var(--p-bg); box-shadow: inset 1.5px 1.5px 0 var(--p-deep), inset -1.5px 0 0 var(--p-deep); }
.folders .folder:nth-child(1) { left: 0; top: 26px; --r: -8deg; transform: rotate(-8deg); }
.folders .folder:nth-child(2) { left: 40px; top: 30px; --r: 7deg; transform: rotate(7deg); }
.folders .folder:nth-child(3) { left: 20px; top: 14px; --r: -1deg; transform: rotate(-1deg); }

/* ————— Landing ————— */
.nav { position: sticky; top: 0; z-index: 20; background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: 0 1px 0 var(--line); }
.nav-inner { max-width: 1120px; height: 64px; margin: auto; padding: 0 22px; display: flex; align-items: center; justify-content: space-between; }
.nav nav { display: flex; align-items: center; gap: 26px; }
.nav-link { color: var(--ink-2); font-size: 14px; font-weight: 500; }
.nav-link:hover { color: var(--ink); text-decoration: none; }
.landing { overflow: hidden; }
.hero { max-width: 1120px; margin: auto; padding: 84px 22px 40px; text-align: center; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 999px; margin-bottom: 22px;
  font-size: 14px; font-weight: 600; color: var(--brand-ink); background: var(--material); box-shadow: inset 0 0 0 1.5px rgba(51, 71, 230, .25);
}
.kicker .icon { width: 16px; height: 16px; }
.hero h1 { font-size: clamp(46px, 7.6vw, 86px); line-height: 1.02; font-weight: 800; letter-spacing: -.045em; }
.tint { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hello { font-family: var(--serif); font-style: italic; font-weight: 500; letter-spacing: -.02em; }
.lead { max-width: 680px; margin: 22px auto 0; text-wrap: pretty; font-size: clamp(18px, 2.1vw, 22px); line-height: 1.45; color: var(--ink-2); letter-spacing: -.015em; }
.lead > span { display: block; }
@media (max-width: 640px) { .lead > span { display: inline; } }
.cta-row { display: flex; justify-content: center; align-items: center; gap: 24px; margin-top: 34px; flex-wrap: wrap; }
.link-more { display: inline-flex; align-items: center; gap: 2px; font-size: 16px; font-weight: 600; }
.link-more .icon { stroke-width: 2.4; }

.stage { position: relative; max-width: 820px; margin: 76px auto 0; padding: 0 20px; animation-delay: .34s !important; }
.window { position: relative; z-index: 1; background: var(--surface); border-radius: 24px; box-shadow: var(--shadow-lg); overflow: hidden; text-align: left; border: 1px solid var(--line); }
.window-bar { position: relative; display: flex; gap: 8px; align-items: center; height: 46px; padding: 0 18px; border-bottom: 1px solid var(--line); background: #fbfbfe; }
.window-bar > span { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.window-bar > span:nth-child(2) { background: #febc2e; } .window-bar > span:nth-child(3) { background: #28c840; }
.window-title { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--ink-2); pointer-events: none; font-family: var(--display); }
.window-body { padding: 10px; display: grid; gap: 8px; }
.inbox-demo { padding: 14px; gap: 12px; }
.mail-demo { border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.verdict { display: flex; align-items: center; gap: 8px; padding: 9px 14px; font-size: 13.5px; }
.verdict strong { font-weight: 700; }
.verdict em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.verdict.is-good { background: var(--green-soft); color: var(--green); }
.verdict.is-danger { background: var(--red-soft); color: var(--red); }
.mail-demo-body { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center; padding: 12px 14px 14px; }
.mail-demo-body > div { display: grid; min-width: 0; }
.mail-demo-body > div strong { font-family: var(--display); font-size: 15px; font-weight: 800; }
.mail-demo-body > div span { font-size: 13.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checks { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.checks li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.checks li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.checks .is-good { background: var(--green-soft); color: var(--green); }
.checks .is-caution { background: var(--orange-soft); color: var(--orange); }
.checks .is-danger { background: var(--red-soft); color: var(--red); }
.float-card {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-radius: 18px;
  background: rgba(255, 255, 255, .92); box-shadow: var(--shadow-lg); text-align: left; animation: float-in 1s var(--spring) both;
}
.float-card div { display: grid; }
.float-card strong { font-size: 14px; font-weight: 700; }
.float-card span:not(.float-icon) { font-size: 12.5px; color: var(--ink-2); }
.float-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; }
.float-a { right: -34px; top: 232px; animation-delay: .9s; }
.float-b { left: -36px; bottom: -58px; animation-delay: 1.1s; }
@keyframes float-in { from { opacity: 0; transform: translateY(14px) scale(.94); } }

.features { max-width: 1120px; margin: auto; padding: 150px 22px 40px; }
.section-head { text-align: center; margin-bottom: 46px; }
.section-head h2, .closing h2 { font-size: clamp(34px, 5vw, 54px); line-height: 1.06; font-weight: 800; letter-spacing: -.04em; }
.section-head p { margin-top: 14px; font-size: 20px; color: var(--ink-2); }
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile {
  display: flex; flex-direction: column; gap: 8px; padding: 30px; min-height: 230px; border-radius: var(--radius-lg);
  background: var(--p-bg, var(--surface)); transition: transform .5s var(--spring), box-shadow .5s var(--spring);
}
.tile:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: var(--shadow); }
.tile h3 { margin-top: auto; font-size: 23px; line-height: 1.2; font-weight: 800; letter-spacing: -.03em; }
.tile p { color: var(--ink-2); font-size: 16px; line-height: 1.45; }
.tile-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: var(--material); color: var(--p-ink, var(--brand-ink)); margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.tile-icon .icon { width: 23px; height: 23px; }
.tile-wide { grid-column: span 2; flex-direction: row; align-items: stretch; gap: 30px; }
.tile-copy { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tile-full { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 22px; min-height: 0; }
.tile-full .tile-icon { margin: 0; width: 60px; height: 60px; border-radius: 18px; }
.tile-full .tile-icon .icon { width: 28px; height: 28px; }
.tile-full h3 { margin: 0; }
.chip-stack { display: flex; flex-direction: column; justify-content: center; gap: 10px; flex: 1; }
.chip { align-self: flex-start; max-width: calc(100% - 52px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 10px 14px; border-radius: 12px; background: var(--material); font-size: 13px; color: var(--ink); box-shadow: var(--shadow-sm); }
.chip:nth-child(2) { margin-left: 26px; } .chip:nth-child(3) { margin-left: 52px; }
.chip.is-retired { color: var(--ink-3); text-decoration: line-through; }
.closing { max-width: 1076px; margin: 110px auto 130px; padding: 72px 22px; text-align: center; border-radius: var(--radius-xl); background: #e9eefc; }
.closing p { margin-top: 12px; color: var(--ink-2); font-size: 18px; }
.closing .btn { margin-top: 28px; }
.footer { border-top: 1px solid var(--line); background: var(--material); }
.footer-inner { max-width: 1120px; margin: auto; padding: 22px; display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--ink-2); }
.footer-inner a:last-child { margin-left: auto; font-weight: 600; }

/* How it works, sensor, questions */
.section-head .kicker, .sensor-copy .kicker { margin: 0 0 16px; font-size: 14px; }
.steps-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { display: flex; flex-direction: column; gap: 10px; padding: 28px; border-radius: var(--radius-lg); background: var(--p-bg); }
.step-num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: var(--surface); color: var(--p-ink); font-family: var(--display); font-weight: 800; font-size: 18px; box-shadow: var(--shadow-sm); margin-bottom: 8px; }
.step h3 { font-size: 21px; line-height: 1.2; font-weight: 800; letter-spacing: -.03em; }
.step p { color: var(--ink-2); font-size: 15.5px; line-height: 1.45; }
.step .chip { margin-top: auto; }
.questions { padding-top: 110px; }
.questions .tile { min-height: 250px; }
.sensor { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding-top: 130px; }
.sensor h2 { font-size: clamp(32px, 4.4vw, 48px); line-height: 1.07; font-weight: 800; letter-spacing: -.04em; margin-bottom: 16px; }
.sensor-copy p:not(.kicker) { font-size: 18px; line-height: 1.5; color: var(--ink-2); margin-top: 12px; }
.sensor-demo { display: grid; gap: 14px; padding: 26px; border-radius: var(--radius-xl); background: #fff4d6; }
.alert-demo { display: flex; gap: 12px; padding: 16px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.alert-demo > div { display: grid; gap: 3px; }
.alert-demo strong { font-size: 15px; font-weight: 700; }
.alert-demo > div > span { font-size: 13.5px; color: var(--ink-2); }
.alert-demo-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.alert-demo-actions .btn { cursor: default; }
.timeline { display: grid; grid-template-columns: auto 1fr; gap: 8px 10px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--material); font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.t-dot { width: 10px; height: 10px; border-radius: 50%; }
.t-dot.is-good { background: var(--green); } .t-dot.is-caution { background: var(--orange); }
.faq-list { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq-list details { border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; cursor: pointer; list-style: none; font-family: var(--display); font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); font-size: 18px; font-weight: 600; transition: transform .3s var(--spring); }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { padding: 0 22px 20px; color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }

/* Comparison and Library/Briefing sections */
.compare { padding-top: 130px; }
.compare-table { max-width: 820px; margin: 0 auto; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.compare-row { display: grid; grid-template-columns: 1fr 150px 150px; align-items: center; }
.compare-row + .compare-row { border-top: 1px solid var(--line); }
.compare-row span { padding: 14px 20px; font-size: 15px; }
.compare-row span:not(:first-child) { text-align: center; font-weight: 700; }
.compare-top span { font-size: 13px; font-weight: 700; color: var(--ink-2); padding-top: 16px; padding-bottom: 16px; }
.compare-row .is-us { background: var(--brand-soft); color: var(--brand-ink); }
.compare-top .is-us { font-family: var(--display); font-size: 15px; font-weight: 800; }
.compare-row .yes { color: var(--green); font-size: 17px; }
.compare-row .yes.is-us { color: var(--brand-ink); }
.compare-row .no { color: var(--ink-3); }
.compare-row .part { color: var(--ink-3); font-size: 13px; font-weight: 600; }
@media (max-width: 820px) {
  .compare-row { grid-template-columns: 1fr 88px 88px; }
  .compare-row span { padding: 12px 12px; font-size: 14px; }
}

/* ————— Auth ————— */
.auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 16px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -.035em; margin-bottom: 24px; animation: rise .8s var(--spring) both; }
.auth-brand:hover { text-decoration: none; }
.auth-brand .logo-tile { width: 68px; height: 68px; filter: drop-shadow(0 10px 20px rgba(51, 71, 230, .28)); }
.auth-card { width: 100%; max-width: 410px; padding: 36px 32px 32px; background: var(--surface); border-radius: var(--radius-xl); box-shadow: var(--shadow); animation: rise .8s .06s var(--spring) both; }
.auth-card h1 { font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -.035em; text-align: center; }
.auth-sub { margin: 8px 0 26px; text-align: center; color: var(--ink-2); font-size: 15px; }
.auth-sub:empty { display: none; }
.auth-sub:empty + .form { margin-top: 26px; }
.auth-switch { margin-top: 22px; font-size: 14px; color: var(--ink-2); animation: rise .8s .12s var(--spring) both; }
.auth-switch a { font-weight: 600; }
.result { text-align: center; animation: fade .4s var(--ease); }
.result-icon { display: grid; place-items: center; width: 66px; height: 66px; margin: 0 auto 18px; border-radius: 22px; }
.result-icon .icon { width: 30px; height: 30px; stroke-width: 2.2; }
.result h1 { margin-bottom: 8px; }
.result p { color: var(--ink-2); margin-bottom: 24px; }

/* ————— App shell ————— */
.page-app { background: var(--bg); }
.app { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; padding: 20px 14px 14px; background: var(--material); border-right: 1px solid var(--line); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px); }
.sidebar > .brand { padding: 2px 10px 24px; }
.side-nav { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 11px; height: 42px; padding: 0 10px 0 7px; border-radius: 14px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); text-align: left; transition: background-color .15s, color .15s; }
/* Menu icons are plain line icons; the page you're on is marked in blue. */
.nav-item > .icon { width: 19px; height: 19px; margin: 0 6px; color: var(--ink-3); stroke-width: 1.8; }
.nav-item:hover > .icon { color: var(--ink-2); }
.nav-sep { height: 1px; margin: 8px 10px; background: var(--line); }
.nav-item.is-quiet { font-weight: 550; }
.nav-item:hover { background: var(--fill-2); color: var(--ink); }
.nav-item.is-active { background: var(--brand-soft); color: var(--brand-ink); }
.nav-item.is-active > .icon { color: var(--brand); stroke-width: 2.1; }
.nav-item span:nth-of-type(1) { flex: 1; }
.nav-badge { font-size: 12px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.nav-badge.is-accent:not(:empty) { min-width: 21px; height: 21px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-size: 11.5px; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 6px 4px 8px; border-top: 1px solid var(--line); }
.side-account { display: grid; min-width: 0; flex: 1; line-height: 1.3; }
.side-account strong { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-account small { font-size: 12px; color: var(--ink-3); }
.main { min-width: 0; padding: 36px clamp(20px, 4vw, 52px) 80px; max-width: 1200px; width: 100%; }
.mobile-bar { display: none; }
.local-banner { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; padding: 6px 13px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--orange); background: var(--orange-soft); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.greeting { font-family: var(--serif); font-style: italic; font-size: 20px; font-weight: 500; color: var(--brand-ink); margin-bottom: 2px; letter-spacing: -.01em; }
.page-head h1 { font-size: 36px; line-height: 1.1; font-weight: 800; letter-spacing: -.04em; }
.page-head p { margin-top: 5px; color: var(--ink-2); font-size: 15px; }
#content { animation: fade .35s var(--ease); }
/* A background refresh swaps the page in place: nothing animates in again. */
#content.is-refreshing, #content.is-refreshing * { animation: none !important; transition: none !important; }
.tabbar { display: none; }

/* Summary */
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 28px; }
.stat { padding: 18px 20px; border-radius: var(--radius); background: var(--p-bg); }
.stat:nth-child(1) { --p-bg: #ddeeff; --p-ink: #1d5fb8; } .stat:nth-child(2) { --p-bg: #d9f6e7; --p-ink: #16784a; } .stat:nth-child(3) { --p-bg: #ebe4ff; --p-ink: #5b3fc4; }
.stat span { display: block; font-size: 13px; color: var(--p-ink); font-weight: 700; }
.stat strong { display: block; margin-top: 4px; font-family: var(--display); font-size: 32px; font-weight: 800; letter-spacing: -.035em; font-variant-numeric: tabular-nums; color: var(--ink); }
.stat small { color: var(--p-ink); font-size: 15px; font-weight: 600; margin-left: 5px; letter-spacing: -.01em; opacity: .8; }

.callout { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.callout-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; flex: none; }
.callout div { flex: 1; display: grid; }
.callout strong { font-size: 14px; font-weight: 700; }
.callout span { font-size: 13px; color: var(--ink-2); }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 26px; flex-wrap: wrap; }
.search { position: relative; width: min(280px, 100%); }
.search .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-3); width: 16px; height: 16px; }
.search input { width: 100%; height: 36px; padding: 0 14px 0 36px; border: 0; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; }
.search input::placeholder { color: var(--ink-3); }
.search input:focus { box-shadow: inset 0 0 0 1px var(--brand), 0 0 0 4px var(--focus); }

/* Identity cards: a pastel folder per identity */
.id-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 30px 16px; padding-top: 12px; }
.id-card {
  position: relative; display: flex; flex-direction: column; gap: 14px; padding: 18px; cursor: pointer; text-align: left;
  background: var(--p-bg); border-radius: 8px 22px 22px 22px;
  transition: transform .45s var(--spring), box-shadow .45s var(--spring); animation: rise .5s var(--spring) both;
}
.id-card::before { content: ""; position: absolute; left: 0; top: -11px; width: 44%; height: 16px; border-radius: 10px 14px 0 0; background: var(--p-bg); }
.id-card:hover { transform: translateY(-3px) rotate(-.35deg); box-shadow: 0 14px 30px rgba(14, 20, 56, .1); }
.id-card:focus-visible { border-radius: 8px 22px 22px 22px; }
.id-card.is-muted { filter: saturate(.35); }
.id-card.is-muted:hover { filter: saturate(.6); }
.id-top { display: flex; align-items: center; gap: 12px; }
.id-top .avatar { background: var(--material); box-shadow: var(--shadow-sm); }
.id-name { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.id-name strong { font-family: var(--display); font-size: 17px; font-weight: 800; letter-spacing: -.025em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.id-name span { font-size: 13px; color: var(--p-ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.address { display: flex; align-items: center; gap: 8px; width: 100%; height: 40px; padding: 0 9px 0 13px; border-radius: 12px; background: var(--material); color: var(--ink); transition: background-color .2s; }
.address:hover { background: var(--surface); }
.address .mono { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; text-align: left; }
.address .icon { width: 16px; height: 16px; color: var(--ink-2); }
.address.is-copied .icon { color: var(--green); }
.id-meta { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.id-meta .sep { color: var(--ink-3); }

/* Grouped lists */
.group { margin-bottom: 28px; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 6px 9px; }
.group-head h2 { font-family: var(--font); font-size: 13px; font-weight: 700; color: var(--ink-2); letter-spacing: .01em; }
.group-head h2.is-large { font-family: var(--display); font-size: 21px; font-weight: 800; color: var(--ink); letter-spacing: -.03em; }
.group-foot { padding: 8px 6px 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
.list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); overflow: hidden; }
.row { position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 11px 16px; width: 100%; text-align: left; }
.row + .row::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; height: 1px; background: var(--line); }
.row.has-icon + .row.has-icon::before, .row.has-avatar + .row::before { left: 62px; }
button.row { cursor: pointer; transition: background-color .15s; }
button.row:hover { background: var(--fill-2); }
button.row:active { background: var(--fill); }
.row-main { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; }
.row-title { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-title.is-strong { font-weight: 700; }
.row > .row-title { flex: 1; }
.row-sub { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub.wrap { white-space: normal; }
.row-value { margin-left: auto; font-size: 15px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.row-icon { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 10px; }
.row-icon .icon { width: 17px; height: 17px; stroke-width: 2.1; }
.bg-accent { background: #ddeeff; color: #1d5fb8; }
.bg-blue { background: #ddeeff; color: #1d5fb8; }
.bg-indigo { background: #ebe4ff; color: #5b3fc4; }
.bg-green { background: #d9f6e7; color: #16784a; }
.bg-orange { background: #fff1c2; color: #876000; }
.bg-red { background: #ffe3e6; color: #c42534; }
.bg-gray { background: #eef0f6; color: #646b8a; }
.row-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.row.is-danger .row-title { color: var(--red); font-weight: 600; }
.row.is-accent .row-title { color: var(--brand-ink); font-weight: 600; }

/* Messages */
.day { margin-bottom: 24px; }
.day h3 { padding: 0 6px 9px; font-family: var(--font); font-size: 13px; font-weight: 700; color: var(--ink-2); }
.msg { align-items: flex-start; padding: 14px 16px; }
.msg .avatar { margin-top: 2px; width: 38px; height: 38px; font-size: 15px; }
.msg + .msg::before { left: 66px; }
.msg-head { display: flex; align-items: baseline; gap: 10px; }
.msg-from { flex: 1; min-width: 0; font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-time { font-size: 13px; color: var(--ink-3); flex: none; font-variant-numeric: tabular-nums; }
.msg-subject { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; min-width: 0; }
.msg-foot .tag { font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.load-more { display: flex; justify-content: center; margin-top: 10px; }

/* Empty & loading */
.empty { display: grid; justify-items: center; text-align: center; padding: 64px 24px 68px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.empty-icon { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 20px; margin-bottom: 16px; background: var(--brand-soft); color: var(--brand-ink); }
.empty-icon .icon { width: 28px; height: 28px; }
.empty .folders { margin-bottom: 20px; }
.empty .folders .folder { animation: bob 5s ease-in-out infinite; }
.empty .folders .folder:nth-child(2) { animation-delay: -1.5s; } .empty .folders .folder:nth-child(3) { animation-delay: -3s; }
.empty h2 { font-size: 21px; font-weight: 800; letter-spacing: -.03em; }
.empty p { margin-top: 6px; color: var(--ink-2); max-width: 340px; }
.empty .btn { margin-top: 22px; }
.skeleton { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.skeleton div { height: 156px; border-radius: var(--radius-lg); background: linear-gradient(90deg, rgba(14, 20, 56, .04) 0%, rgba(14, 20, 56, .08) 50%, rgba(14, 20, 56, .04) 100%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
.skeleton.is-rows { grid-template-columns: 1fr; gap: 8px; }
.skeleton.is-rows div { height: 64px; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Smart categories */
.filter-bar { display: flex; gap: 8px; overflow-x: auto; margin: -2px -4px 22px; padding: 2px 4px 4px; scrollbar-width: none; }
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; font-weight: 600; color: var(--ink-2); transition: background-color .2s, color .2s; }
.filter-chip .icon { width: 15px; height: 15px; }
.filter-chip:hover { color: var(--ink); background: var(--surface-2); }
.filter-chip.is-active { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.filter-count { min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: var(--fill); font-size: 11.5px; }
.filter-chip.is-active .filter-count { background: rgba(255, 255, 255, .2); }
.cat-tag { display: inline-flex; align-items: center; gap: 4px; height: 23px; padding: 0 9px 0 7px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--p-bg, var(--gray-soft)); color: var(--p-ink, var(--gray)); }
.cat-tag .icon { width: 13px; height: 13px; stroke-width: 2.2; }
.pastel-gray { --p-bg: #eef0f6; --p-ink: #646b8a; --p-deep: #c6cad8; }
.row.is-link { cursor: pointer; transition: background-color .15s; }
.row.is-link:hover { background: var(--fill-2); }
.done-btn { align-self: center; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.done-btn:hover { background: var(--green-soft); color: var(--green); box-shadow: none; }
.key-points { margin-bottom: 16px; padding: 14px 18px 14px 16px; border-radius: var(--radius); background: #fff8dc; box-shadow: inset 3px 0 0 #ffd75e; }
.key-points strong { display: block; margin: 0 0 6px 2px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #876000; }
.key-points ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14.5px; line-height: 1.5; }

/* Library */
.library-search { position: relative; display: block; margin-bottom: 16px; }
.library-search .icon { position: absolute; left: 18px; top: 17px; width: 20px; height: 20px; color: var(--ink-3); }
.library-search input { width: 100%; height: 54px; padding: 0 20px 0 50px; border: 0; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); font-size: 16px; }
.library-search input::placeholder { color: var(--ink-3); }
.library-search input:focus { box-shadow: inset 0 0 0 1.5px var(--brand), 0 0 0 4px var(--focus); }
.result-count { margin: 0 6px 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
mark { background: #fff1c2; color: inherit; border-radius: 4px; padding: 0 2px; }
.lib-snippet { font-size: 13.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.row.is-unread .msg-subject { font-weight: 700; }
.star-btn { align-self: center; color: var(--ink-3); }
.star-btn.is-on { color: #d99a00; background: #fff1c2; }
.sheet.sheet-wide { width: min(980px, calc(100vw - 48px)); max-height: 92vh; }
.reader-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.reader-meta .status-line { margin-bottom: 0; }
.reader-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.reader-bar .btn.is-on .icon { fill: currentColor; }
.reader-images { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; margin-bottom: 10px; border-radius: 12px; background: var(--surface-2); font-size: 13px; color: var(--ink-2); }
.reader-images span { flex: 1; min-width: 0; }
.reader-images .icon { flex: none; }
.reader { display: block; width: 100%; height: min(70vh, 720px); border: 0; border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); margin-bottom: 18px; }
.reader.is-fitted { min-height: 160px; }
.attachment-row { color: var(--ink); text-decoration: none; }
.attachment-row:hover { text-decoration: none; }

/* Briefing */
.briefing-actions { display: flex; justify-content: flex-end; margin: -8px 0 14px; }
.briefing-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; margin-bottom: 30px; }
.brief-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); border-top: 5px solid var(--p-deep, var(--line)); transition: opacity .3s; animation: rise .5s var(--spring) both; }
.brief-card.is-read { opacity: .62; }
.brief-head { display: flex; align-items: center; gap: 12px; }
.brief-head > div { flex: 1; min-width: 0; display: grid; }
.brief-head strong { font-family: var(--display); font-size: 15px; font-weight: 800; }
.brief-head span { font-size: 12.5px; color: var(--ink-3); }
.brief-card h3 { font-size: 18px; line-height: 1.3; font-weight: 800; letter-spacing: -.02em; }
.brief-card ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14.5px; line-height: 1.45; color: var(--ink); }
.brief-card li::marker { color: var(--p-ink, var(--brand)); }
.brief-snippet { font-size: 14px; color: var(--ink-2); }
.brief-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; font-size: 12.5px; }

/* Stories */
.briefing-bar { margin-bottom: 22px; }
.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; margin-bottom: 30px; }
.story-card { display: flex; flex-direction: column; gap: 9px; padding: 20px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); transition: opacity .3s; animation: rise .5s var(--spring) both; }
.story-card.discovery { background: #fffaea; box-shadow: var(--shadow-sm), inset 0 0 0 1px #ffe39a; }
.story-card.is-muted > :not(.story-actions):not(.story-learned) { opacity: .5; }
.story-card h3 { font-size: 17.5px; line-height: 1.3; font-weight: 800; letter-spacing: -.02em; }
.story-card > p { font-size: 14.5px; line-height: 1.5; color: var(--ink); }
.story-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: 12.5px; color: var(--ink-3); }
.area-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--p-bg, var(--brand-soft, #eef0ff)); color: var(--p-ink, var(--brand-ink)); }
.story-card > .story-why { display: flex; align-items: flex-start; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--brand-ink); line-height: 1.4; }
.story-why .icon { flex: none; margin-top: 1px; }
.discovery > .story-why { color: #876000; }
.story-card > .story-also { font-size: 12.5px; color: var(--ink-3); }
.story-learned { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0; padding: 8px 10px; border-radius: 10px; background: var(--fill-2); font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.story-learned[hidden] { display: none; }
.story-learned > span { flex: 1 1 180px; }
.story-learned .btn { padding-block: 2px; color: var(--brand-ink); }
.story-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); }
.story-actions .btn-plain { color: var(--ink-2); }
.story-actions .btn-plain.is-on { color: var(--brand-ink); background: var(--fill-2); }
.story-actions .story-save.is-on .icon { fill: currentColor; }
.story-single .story-card { box-shadow: none; padding: 0; animation: none; }
.issue-stories { list-style: disc; }
.link-button { font: inherit; color: inherit; text-align: left; cursor: pointer; }
.link-button:hover { color: var(--brand-ink); text-decoration: underline; }
.issue-more { font-size: 13px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--fill); border-top-color: var(--brand); animation: spin .8s linear infinite; }

.interest-list { display: grid; gap: 10px; }
.interest-area { padding: 14px; border-radius: var(--radius); background: var(--surface-2); display: grid; gap: 10px; }
.interest-head { display: flex; align-items: center; gap: 12px; }
.interest-head strong { flex: none; min-width: 120px; font-size: 14.5px; }
.interest-bar { flex: 1; height: 6px; border-radius: 999px; background: var(--fill); overflow: hidden; }
.interest-bar i { display: block; height: 100%; border-radius: 999px; background: #8f78f0; }
.interest-bar.is-negative i { background: var(--gray); }
.interest-topics { display: flex; flex-wrap: wrap; gap: 6px; }
.interest-pill { display: inline-flex; align-items: center; gap: 2px; height: 28px; padding: 0 2px 0 11px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; font-weight: 600; }
.interest-pill.is-negative { color: var(--ink-3); background: var(--surface-2); }
.interest-pill.is-told { padding-left: 9px; gap: 5px; box-shadow: inset 0 0 0 1.5px #c9bdf7; }
.interest-pill.is-told .icon { width: 13px; height: 13px; color: var(--brand-ink); }
.interest-pill.is-told.is-negative .icon { color: var(--ink-3); }
.interest-pill .icon-btn, .interest-head .icon-btn { width: 24px; height: 24px; }
.interest-pill .icon-btn .icon, .interest-head .icon-btn .icon { width: 12px; height: 12px; }
@media (max-width: 640px) {
  .story-grid { grid-template-columns: 1fr; }
  .interest-head strong { min-width: 0; }
}

/* Identity relationship */
.relationship { margin-bottom: 20px; padding: 16px; border-radius: var(--radius); background: var(--surface-2); display: grid; gap: 12px; }
.relationship.is-empty { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.rel-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rel-stats div { display: grid; padding: 10px 12px; border-radius: 12px; background: var(--surface); }
.rel-stats strong { font-family: var(--display); font-size: 20px; font-weight: 800; letter-spacing: -.03em; }
.rel-stats span { font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.rel-mix { display: flex; height: 10px; border-radius: 999px; overflow: hidden; gap: 2px; }
.rel-mix span { background: var(--p-deep); min-width: 6px; }
.rel-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.rel-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rel-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--p-deep); }
.rel-note { font-size: 13px; color: var(--orange); font-weight: 600; }
.rel-recent { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--orange); padding: 8px 10px; border-radius: 10px; background: var(--orange-soft); }
.storage { gap: 10px; }
.storage-bar { width: 90px; height: 6px; border-radius: 999px; background: var(--fill); overflow: hidden; }
.storage-bar i { display: block; height: 100%; background: #8f78f0; border-radius: 999px; }
@media (max-width: 640px) {
  .rel-stats { grid-template-columns: repeat(2, 1fr); }
  .briefing-list { grid-template-columns: 1fr; }
  .storage-bar { display: none; }
  .sheet.sheet-wide { width: 100vw; }
  .reader-images { font-size: 12.5px; }
}

/* Trust report */
.trust { border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; background: var(--surface-2); --t-bg: var(--brand-soft); --t-ink: var(--brand-ink); }
.trust.is-good { --t-bg: var(--green-soft); --t-ink: var(--green); }
.trust.is-caution { --t-bg: var(--orange-soft); --t-ink: var(--orange); }
.trust.is-danger { --t-bg: var(--red-soft); --t-ink: var(--red); }
.trust-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; background: var(--t-bg); color: var(--t-ink); font-family: var(--display); font-size: 16px; letter-spacing: -.02em; }
.trust-head .icon { stroke-width: 2.2; }
.trust-list { display: grid; gap: 2px; padding: 8px 8px 10px; }
.trust-item { display: flex; gap: 10px; align-items: flex-start; padding: 7px 8px; border-radius: 10px; }
.trust-item div { display: grid; min-width: 0; }
.trust-item strong { font-size: 14px; font-weight: 700; }
.trust-item span:not(.trust-dot) { font-size: 13px; color: var(--ink-2); }
.trust-dot { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 8px; background: var(--gray-soft); color: var(--gray); }
.trust-item.is-good .trust-dot { background: var(--green-soft); color: var(--green); }
.trust-item.is-info .trust-dot { background: var(--brand-soft); color: var(--brand-ink); }
.trust-item.is-caution .trust-dot { background: var(--orange-soft); color: var(--orange); }
.trust-item.is-danger .trust-dot { background: var(--red-soft); color: var(--red); }
.trust-dot .icon { width: 14px; height: 14px; stroke-width: 2.4; }
.row:has(.drift-actions) { flex-wrap: wrap; }
.drift-actions { order: 5; width: 100%; padding-left: 44px; margin-top: 4px; }

/* Rule composer */
.composer { display: grid; grid-template-columns: 170px 1fr 130px auto; gap: 10px; padding: 12px; }
.composer .input, .composer .select { height: 40px; font-size: 14px; border-radius: 12px; }
.composer .btn { height: 40px; }

/* ————— Sheets ————— */
.sheet { width: min(560px, calc(100vw - 32px)); max-height: min(86vh, 860px); padding: 0; border: 0; border-radius: 28px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); overflow: hidden; }
.sheet[open] { display: flex; flex-direction: column; animation: sheet-in .45s var(--spring); }
.sheet::backdrop { background: rgba(14, 20, 56, .22); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .3s var(--ease); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px) scale(.97); } }
.sheet-body { overflow-y: auto; padding: 24px 26px 28px; overscroll-behavior: contain; }
.sheet-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.sheet-head > div { flex: 1; min-width: 0; display: grid; }
.sheet-head h2 { font-size: 22px; line-height: 1.2; font-weight: 800; letter-spacing: -.035em; overflow-wrap: anywhere; }
.sheet-head p { font-size: 14px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-close { align-self: flex-start; background: var(--fill); width: 32px; height: 32px; }
.sheet-close .icon { width: 15px; height: 15px; stroke-width: 2.5; }
.sheet .group { margin-bottom: 20px; }
.sheet .list { background: var(--surface-2); box-shadow: none; }
.sheet .address { background: var(--p-bg, var(--surface-2)); height: 48px; margin-bottom: 20px; }
.sheet .address .mono { font-size: 13.5px; }
.sheet-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }
.sheet-actions .btn { height: 42px; padding: 0 20px; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
.fact { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.fact:nth-child(1) { background: #ddeeff; } .fact:nth-child(2) { background: #fff1c2; } .fact:nth-child(3) { background: #d9f6e7; } .fact:nth-child(4) { background: #ebe4ff; }
.fact span { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.fact strong { font-size: 15px; font-weight: 700; }
.analysis-note { display: flex; gap: 10px; padding: 14px; border-radius: var(--radius); background: var(--brand-soft); color: var(--ink); font-size: 14px; line-height: 1.45; margin-bottom: 20px; }
.analysis-note .icon { color: var(--brand-ink); margin-top: 1px; }
.status-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; font-size: 14px; color: var(--ink-2); }
.preview { width: 100%; height: 340px; border: 0; border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); margin-bottom: 18px; }
.footnote { margin-top: 16px; font-size: 12.5px; color: var(--ink-3); text-align: center; }
.code-block { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); margin-bottom: 14px; }
.code-block .mono { flex: 1; font-size: 15px; letter-spacing: .04em; overflow-wrap: anywhere; }
.code-block.is-large { background: #ebe4ff; }
.code-block.is-large .mono { font-size: 24px; font-weight: 700; letter-spacing: .08em; text-align: center; color: #3e2a9e; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 14px; border-radius: var(--radius); background: #fff1c2; margin-bottom: 14px; }
.codes span { font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }
.steps { counter-reset: step; display: grid; gap: 14px; margin-bottom: 18px; }
.steps p { position: relative; padding-left: 36px; font-size: 14.5px; color: var(--ink); }
.steps p::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: -1px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--on-ink); font-size: 12px; font-weight: 700; }
.success { text-align: center; padding: 8px 0 4px; }
.success .result-icon { background: var(--green-soft); color: var(--green); }
.success h2 { font-size: 23px; font-weight: 800; letter-spacing: -.035em; }
.success > p { margin: 6px 0 22px; color: var(--ink-2); }

/* Alert-style sheet */
.sheet-alert { width: min(390px, calc(100vw - 32px)); }
.alert-form { display: grid; gap: 14px; padding: 28px 24px 22px; }
.alert-form h2 { font-size: 20px; font-weight: 800; letter-spacing: -.03em; text-align: center; }
.alert-form > p { font-size: 14px; color: var(--ink-2); text-align: center; margin-top: -6px; }
.alert-form .field input, .alert-form .field select { height: 44px; font-size: 15px; }
.alert-form .switch-field, .switch-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 15px; color: var(--ink); font-weight: 500; }
.alert-form .switch-field small, .switch-field small { display: block; color: var(--ink-2); font-size: 12.5px; font-weight: 400; }
.alert-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.alert-actions .btn { height: 44px; }

/* ————— Responsive ————— */
@media (max-width: 960px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .tile-wide { grid-column: span 2; }
  .steps-row { grid-template-columns: 1fr; }
  .sensor { grid-template-columns: 1fr; gap: 28px; }
  .float-a { right: -8px; } .float-b { left: -6px; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: 0 16px calc(100px + env(safe-area-inset-bottom)); }
  .mobile-bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; margin: 0 -16px 18px; padding: 10px 16px; background: var(--material); box-shadow: 0 1px 0 var(--line); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
  .mobile-bar .logo { height: 26px; }
  .page-head h1 { font-size: 30px; }
  .page-head .btn { padding: 0 14px; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--material); box-shadow: 0 -1px 0 var(--line); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
  .tabbar button { position: relative; display: grid; justify-items: center; gap: 2px; padding: 4px 0; font-size: 10.5px; font-weight: 600; color: var(--ink-3); }
  .tabbar button .icon { width: 24px; height: 24px; }
  .tabbar button.is-active { color: var(--brand-ink); }
  .tabbar i:not(:empty) { position: absolute; top: 0; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; background: #ff3b30; color: #fff; font: 700 11px/17px var(--font); font-style: normal; }
  .composer { grid-template-columns: 1fr 1fr; }
  .composer .input { grid-column: span 2; order: -1; }
  .composer .btn { grid-column: span 2; }
}
@media (max-width: 640px) {
  .nav nav { gap: 16px; } .nav-link[href^="#"] { display: none; }
  .hero { padding-top: 56px; }
  .stage { margin-top: 52px; padding: 0; }
  .checks { grid-column: 1 / -1; }
  .verdict em { display: none; }
  .questions, .sensor { padding-top: 90px; }
  .float-card { position: relative; inset: auto; margin: 12px 8px 0; }
  .float-b { display: none; }
  .features { padding-top: 100px; }
  .bento { grid-template-columns: 1fr; }
  .tile-wide { grid-column: auto; flex-direction: column; }
  .tile-full { flex-direction: column; align-items: flex-start; }
  .tile { min-height: 0; padding: 24px; }
  .tile h3 { margin-top: 0; }
  .closing { margin: 70px 12px 90px; padding: 52px 20px; }
  .summary { gap: 8px; }
  .stat { padding: 13px 14px; }
  .stat strong { font-size: 24px; }
  .stat small { display: none; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .segmented { display: flex; overflow-x: auto; scrollbar-width: none; } .toolbar .segmented::-webkit-scrollbar { display: none; }
  .toolbar .segmented button { flex: 1 1 auto; padding: 0 10px; white-space: nowrap; }
  .search { width: 100%; }
  .id-grid { grid-template-columns: 1fr; }
  .sheet { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 26px 26px 0 0; }
  .sheet[open] { animation: sheet-up .5s var(--spring); }
  .sheet-body { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  .sheet-alert { width: min(390px, calc(100vw - 32px)); margin: auto; border-radius: 26px; }
  .sheet-alert[open] { animation: sheet-in .45s var(--spring); }
  .auth-card { padding: 30px 22px 24px; border-radius: 26px; }
  .footer-inner span { display: none; }
}
@keyframes sheet-up { from { transform: translateY(100%); } }


/* Mail */
.filter-chip.is-warn:not(.is-active) { color: #876000; background: #fff8dc; box-shadow: inset 0 0 0 1px #ffe39a; }
.filter-chip.is-warn:not(.is-active) .filter-count { background: #ffe39a; }
.row.msg.is-held { background: #fffaf0; }
.alerts .list { margin-bottom: 0; }
.link-more-btn { display: block; margin: 8px auto 0; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--brand-ink); }
.link-more-btn:hover { background: var(--brand-soft); }
.cat-tag.is-button { cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; transition: filter .2s; }
.cat-tag.is-button:hover { filter: brightness(.96); }
.cat-chevron { width: 11px !important; height: 11px !important; transform: rotate(90deg); opacity: .7; }
.star-toggle.is-on { color: #876000; background: #fff1c2; box-shadow: none; }
.star-toggle.is-on .icon { fill: currentColor; }
.star-btn.is-on .icon { fill: currentColor; }
.trust-head strong { flex: 1; min-width: 0; }
.held-box { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; padding: 14px 16px; border-radius: var(--radius); background: #fff8dc; box-shadow: inset 0 0 0 1px #ffe39a; }
.held-text { flex: 1; min-width: 220px; display: grid; gap: 2px; }
.held-text strong { font-size: 15px; color: #6b4d00; }
.held-text span { font-size: 13px; color: var(--ink-2); }
.held-actions { display: flex; gap: 8px; }
.not-kept { margin: 4px 0 18px; padding: 16px; border-radius: var(--radius); background: var(--surface-2); font-size: 14px; color: var(--ink-2); text-align: center; }
.mail-details { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin-top: 8px; font-size: 12.5px; color: var(--ink-3); }
.facts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
@media (max-width: 640px) {
  .held-actions { width: 100%; } .held-actions .btn { flex: 1; }
  .alerts .row > .msg-time { display: none; }
  .alerts .row-title { white-space: normal; }
  .reader-meta { align-items: flex-start; }
}
.fact { min-width: 0; }
.fact strong { display: block; overflow-wrap: anywhere; }

/* ————— Scrapbook ————— */
.small { font-size: 12.5px; }
@keyframes sb-hue { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* Shelf of folder covers */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 26px 18px; }
.cover { position: relative; isolation: isolate; margin-top: 14px; min-height: 236px; border-radius: 6px 22px 22px 22px; cursor: pointer; text-align: left;
  background: color-mix(in srgb, var(--p-deep) 55%, var(--p-bg)); box-shadow: 0 14px 26px -18px rgba(14, 20, 56, .45);
  animation: rise .55s var(--spring) both; animation-delay: calc(var(--i, 0) * 55ms); transition: transform .45s var(--spring), box-shadow .45s var(--spring); }
.cover-tab { position: absolute; left: 0; top: -13px; width: 46%; height: 22px; border-radius: 12px 16px 0 0; background: inherit; }
.cover-paper { position: absolute; z-index: 0; left: 16px; right: 18px; top: 12px; height: 62%; border-radius: 10px; background: var(--surface);
  background-image: repeating-linear-gradient(transparent 0 13px, #eef0f7 13px 14px); background-position: 0 18px;
  box-shadow: 0 2px 6px rgba(14, 20, 56, .1); transform: rotate(-2.5deg); transition: transform .5s var(--spring); }
.cover-paper.is-back { left: 24px; right: 10px; top: 7px; background-color: #fbfaff; transform: rotate(3deg); }
.cover-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 3px; min-height: 186px; margin-top: 50px; padding: 18px 18px 16px;
  border-radius: 16px 16px 22px 22px; background: var(--p-bg); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 -6px 14px -10px rgba(14, 20, 56, .25); }
/* Page icons: drawn outline in the page's ink, soft parts in its deeper pastel, on a white tile. */
.pg { width: 24px; height: 24px; flex: none; color: var(--p-ink, var(--ink-2)); fill: var(--p-deep, #dfe3ee); stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.page-mark { display: grid; place-items: center; flex: none; width: 50px; height: 50px; border-radius: 15px; background: var(--surface); color: var(--p-ink);
  box-shadow: 0 10px 18px -12px rgba(14, 20, 56, .5), 0 1px 2px rgba(14, 20, 56, .06), inset 0 0 0 1px rgba(14, 20, 56, .04); }
.page-mark .pg { width: 31px; height: 31px; }
.page-mark.is-site .icon { width: 48%; height: 48%; }
.tab-mark.page-mark.is-site .icon { width: 15px; height: 15px; }
.page-mark.is-logo img { width: 64%; height: 64%; object-fit: contain; border-radius: 6px; }
.cover-mark { margin: -42px 0 12px; transform: rotate(-5deg); transition: transform .45s var(--spring); }
.cover:hover .cover-mark { transform: rotate(-1deg) translateY(-3px) scale(1.04); }
.cover h3 { font-family: var(--display); font-size: 19px; font-weight: 800; letter-spacing: -.025em; line-height: 1.2; color: var(--ink); overflow-wrap: anywhere; }
.cover-meta { font-size: 12.5px; font-weight: 700; color: var(--p-ink); }
.cover-peek { margin: auto 0 0; padding: 10px 0 0; list-style: none; display: grid; gap: 3px; font-size: 12.5px; color: var(--ink-2); }
.cover-peek li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cover-peek li::before { content: "·"; margin-right: 6px; color: var(--p-ink); font-weight: 800; }
.cover-peek.is-empty { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cover:hover, .cover:focus-visible { transform: translateY(-5px) rotate(-.5deg); box-shadow: 0 22px 34px -20px rgba(14, 20, 56, .5); }
.cover:hover .cover-paper, .cover:focus-visible .cover-paper { transform: translateY(-12px) rotate(-4deg); }
.cover:hover .cover-paper.is-back, .cover:focus-visible .cover-paper.is-back { transform: translateY(-8px) rotate(5deg); }
.cover:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--focus), 0 22px 34px -20px rgba(14, 20, 56, .5); }
.cover-new { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 236px; margin-top: 14px; border-radius: 22px;
  border: 2px dashed var(--line-2); background: transparent; box-shadow: none; color: var(--ink-2); font-size: 13px; text-align: center; animation-delay: .3s; }
.cover-new strong { font-family: var(--display); font-size: 17px; color: var(--ink); }
.cover-new-icon { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 6px; border-radius: 18px; background: var(--ink); color: var(--on-ink); box-shadow: 0 10px 20px -10px rgba(14, 20, 56, .6); transition: transform .4s var(--spring); }
.cover-new:hover { border-color: var(--ink-3); background: var(--surface); transform: none; }
.cover-new:hover .cover-new-icon { transform: rotate(90deg) scale(1.05); }
.shelf-foot { text-align: center; margin-top: 30px; }

/* Worth keeping? */
.suggest { margin-bottom: 30px; }
.suggest .group-head { align-items: baseline; }
.suggest-strip { display: flex; gap: 16px; overflow-x: auto; margin: 0 -6px; padding: 10px 6px 18px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.suggest-strip::-webkit-scrollbar { display: none; }
.suggest-card { flex: 0 0 262px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 18px; background: #fffbe9;
  box-shadow: 0 12px 22px -16px rgba(135, 96, 0, .55), inset 0 0 0 1px #f6e7b0; transform: rotate(-.8deg); animation: rise .5s var(--spring) both; animation-delay: calc(var(--i, 0) * 60ms); transition: opacity .25s, transform .25s; }
.suggest-card:nth-child(even) { transform: rotate(.8deg); background: #f4f9ff; box-shadow: 0 12px 22px -16px rgba(29, 95, 184, .5), inset 0 0 0 1px #d6e6fb; }
.suggest-card h3 { font-size: 15px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.suggest-card .area-chip { align-self: flex-start; }
.suggest-actions { display: flex; gap: 6px; margin-top: auto; padding-top: 4px; }
.is-gone { opacity: 0 !important; transform: scale(.94) !important; transition: opacity .24s, transform .24s; }

/* A page */
.scrap-page { animation: fade .3s var(--ease); }
.page-hero { position: relative; overflow: hidden; margin-bottom: 24px; padding: 18px 24px 20px; border-radius: 30px;
  background: var(--p-bg); }
.page-hero::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .35); pointer-events: none; }
.hero-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; margin-left: -4px; padding: 4px 8px; border-radius: 999px; font-size: 13.5px; font-weight: 700; color: var(--p-ink); }
.back-link:hover { background: var(--material); }
.back-link .icon { transform: rotate(180deg); }
.hero-main { position: relative; z-index: 1; display: flex; align-items: center; gap: 18px; }
.hero-mark { width: 86px; height: 86px; border-radius: 28px; transform: rotate(-4deg); box-shadow: 0 16px 28px -18px rgba(14, 20, 56, .55), inset 0 0 0 1px rgba(14, 20, 56, .04); }
.hero-mark .pg { width: 50px; height: 50px; stroke-width: 1.6; }
.hero-text { min-width: 0; }
.hero-text h1 { font-family: var(--display); font-size: 36px; font-weight: 800; line-height: 1.05; letter-spacing: -.045em; overflow-wrap: anywhere; }
.hero-text p { margin-top: 6px; font-size: 15px; color: var(--ink-2); }
.hero-meta { display: block; margin-top: 8px; font-size: 12.5px; font-weight: 700; color: var(--p-ink); }
.hero-tools { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.hero-tools .layout-switch { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.layout-switch { background: var(--material); box-shadow: none; }
.layout-switch button { display: inline-flex; align-items: center; gap: 6px; }
.hero-top .btn-secondary { background: var(--material); }
.hero-actions { display: flex; align-items: center; gap: 8px; }
.hero-top .tour-again { width: 36px; height: 36px; background: var(--material); color: var(--p-ink, var(--ink-2)); }
.hero-top .tour-again:hover { background: var(--surface); color: var(--ink); }

/* The story so far */
.so-far { position: relative; margin: 8px 0 26px; padding: 24px 26px 18px; border-radius: 22px; background: #fffdf6; box-shadow: var(--shadow-sm), inset 0 0 0 1px #f3e8c6; }
.so-far::before { content: ""; position: absolute; top: -10px; left: 50%; width: 96px; height: 22px; border-radius: 3px; background: rgba(255, 215, 94, .55); transform: translateX(-50%) rotate(-2deg); }
.so-far-label { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #b4541c; }
.so-far h2 { margin: 6px 0 8px; font-family: var(--display); font-size: 23px; font-weight: 800; line-height: 1.25; letter-spacing: -.03em; }
.so-far p { font-size: 15.5px; line-height: 1.65; color: var(--ink); max-width: 72ch; }
.so-far ul { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14.5px; line-height: 1.5; }
.so-far li::marker { color: #d99a00; }
.so-far-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px dashed #efe2bb; font-size: 12.5px; color: var(--ink-3); }
.so-far-lines { display: grid; gap: 10px; margin-top: 12px; }
.so-far-lines i, .designing-lines i { display: block; height: 13px; border-radius: 7px; background: linear-gradient(90deg, #f3ecd6 0%, #fdf8ea 50%, #f3ecd6 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.so-far-lines i:nth-child(1) { width: 62%; height: 20px; } .so-far-lines i:nth-child(2) { width: 94%; } .so-far-lines i:nth-child(3) { width: 78%; }

/* Spending */
.spend { display: grid; gap: 12px; margin-bottom: 28px; }
.spend-tiles { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 12px; }
.spend-tile { display: grid; align-content: start; gap: 2px; padding: 16px 18px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.spend-tile span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.spend-tile strong { font-family: var(--display); font-size: clamp(17px, 2vw, 22px); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.spend-tile.is-main { background: #ebe4ff; box-shadow: none; }
.spend-tile.is-main span { color: #5b3fc4; }
.spend-tile.is-main strong { font-size: clamp(22px, 2.6vw, 28px); }
.spend-tile em { margin-top: 2px; font-style: normal; font-size: 12px; font-weight: 700; color: #5b3fc4; }
.spend-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 12px; }
.spend-chart { display: flex; align-items: flex-end; gap: 10px; height: 210px; padding: 18px 18px 12px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.bar { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; }
.bar-track { flex: 1; min-height: 0; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.bar i { display: block; width: 100%; max-width: 40px; border-radius: 10px 10px 6px 6px; background: #e4ddfb; transition: height .7s var(--spring); }
.bar.is-now i { background: #8f78f0; }
.bar-value { font-size: 10.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; opacity: 0; transition: opacity .2s; }
.bar.is-now .bar-value, .bar:hover .bar-value { opacity: 1; }
.bar-label { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.bar.is-now .bar-label { color: #5b3fc4; font-weight: 800; }
.spend-shops { display: grid; align-content: start; gap: 12px; padding: 16px 18px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.spend-caption { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.shop-head { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.shop-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-head span { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.shop-bar { height: 6px; margin: 6px 0 3px; border-radius: 999px; background: var(--fill); overflow: hidden; }
.shop-bar i { display: block; height: 100%; border-radius: 999px; background: #b9a4ff; }
.shop-sub { font-size: 11.5px; color: var(--ink-3); }

/* Collage */
.collage { display: flex; align-items: flex-start; gap: 16px; }
.collage-col { flex: 1; min-width: 0; display: grid; gap: 16px; }
.clip { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 20px; cursor: pointer;
  background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); animation: rise .5s var(--spring) both; animation-delay: calc(min(var(--i, 0), 12) * 40ms);
  transition: transform .35s var(--spring), box-shadow .35s var(--spring), opacity .24s; }
.clip:hover, .clip:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); outline: none; }
.clip h3 { font-size: 16.5px; font-weight: 800; line-height: 1.3; letter-spacing: -.015em; padding-right: 22px; }
.clip p { font-size: 14px; line-height: 1.5; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.clip-top { display: flex; gap: 6px; }
.clip-meta { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.clip.is-hero { padding: 24px; background: var(--p-bg); box-shadow: 0 16px 30px -22px rgba(14, 20, 56, .55); }
.clip.is-hero h3 { font-family: var(--display); font-size: 25px; line-height: 1.15; letter-spacing: -.035em; }
.clip.is-hero p { -webkit-line-clamp: 7; font-size: 15px; color: var(--ink); }
.clip.is-hero .area-chip { background: var(--material); color: var(--p-ink); }
.clip.is-quote { background: #f6f3ff; box-shadow: none; }
.quote-mark { height: 24px; font-family: Georgia, 'Times New Roman', serif; font-size: 64px; line-height: .8; color: #b9a4ff; }
.clip .quote-text { font-size: 16.5px; font-weight: 600; line-height: 1.45; color: var(--ink); -webkit-line-clamp: 7; }
.quote-by { font-size: 13px; font-weight: 700; color: #5b3fc4; }
.clip.is-note { padding-top: 34px; background: #fff3bf; box-shadow: 0 12px 20px -14px rgba(135, 96, 0, .55); transform: rotate(-1.2deg); }
.clip.is-note:nth-child(4n) { transform: rotate(1deg); background: #e3f7ec; box-shadow: 0 12px 20px -14px rgba(22, 120, 74, .5); }
.clip.is-note:hover { transform: rotate(0) translateY(-3px); }
.clip.is-note h3 { font-family: var(--display); font-size: 18px; letter-spacing: -.025em; }
/* Inside the card: in a multi-column collage anything above a card's top edge can land in the previous column. */
.tape { position: absolute; top: 5px; left: 50%; width: 86px; height: 20px; border-radius: 2px; background: var(--material); box-shadow: 0 1px 3px rgba(14, 20, 56, .1); transform: translateX(-50%) rotate(-3deg); }
.clip.is-receipt { gap: 6px; padding: 18px 20px; background: var(--surface); }
.receipt-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--ink-3); padding-right: 22px; }
.receipt-head strong { color: var(--ink); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.receipt-amount { margin: 4px 0; padding: 10px 0; border-block: 1.5px dashed var(--line-2); font-family: var(--display); font-size: 27px; font-weight: 800; letter-spacing: -.035em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.clip .receipt-title { font-size: 13.5px; -webkit-line-clamp: 2; }
.receipt-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); }
.receipt-foot .mono { overflow-wrap: anywhere; }
.clip-remove { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; background: var(--material); opacity: 0; transition: opacity .2s; }
.clip-remove .icon { width: 13px; height: 13px; }
.clip:hover .clip-remove, .clip:focus-within .clip-remove, .tl-card:hover .clip-remove, .row:hover > .clip-remove { opacity: 1; }
@media (hover: none) { .clip-remove { opacity: .75; } }

/* Timeline */
.sb-timeline { display: grid; gap: 28px; }
.tl-month h3 { margin: 0 0 12px 4px; padding: 0; font-family: var(--display); font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.tl-list { position: relative; display: grid; gap: 12px; }
.tl-list::before { content: ""; position: absolute; left: 70px; top: 10px; bottom: 10px; width: 2px; border-radius: 2px; background: var(--line); }
.tl-item { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 30px; align-items: start; cursor: pointer; animation: rise .5s var(--spring) both; animation-delay: calc(min(var(--i, 0), 12) * 40ms); }
.tl-dot { position: absolute; left: 64px; top: 17px; width: 14px; height: 14px; border-radius: 50%; background: var(--p-deep); box-shadow: 0 0 0 4px var(--bg); }
.tl-date { padding-top: 13px; text-align: right; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.tl-card { position: relative; padding: 14px 16px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); transition: transform .3s var(--spring); }
.tl-item:hover .tl-card { transform: translateX(3px); }
.tl-card h4 { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.35; padding-right: 26px; }
.tl-card p { margin: 4px 0 6px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tl-card .tl-amount { font-family: var(--display); font-size: 18px; font-weight: 800; color: var(--ink); }

/* List */
.scrap-list .row-icon { flex: none; }
.row-amount { flex: none; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.scrap-row .tag { display: block; margin-top: 3px; font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row > .clip-remove { position: static; align-self: center; flex: none; }

/* Composer and editor */
.composer-box { margin-bottom: 20px; }
.composer-prompt { display: block; width: 100%; min-height: 112px; padding: 18px 20px; border: 0; border-radius: 20px; resize: none; font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -.02em; line-height: 1.35; color: var(--ink);
  background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--line); transition: box-shadow .2s; }
.composer-prompt::placeholder { color: var(--ink-3); }
.composer-prompt:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--brand), 0 0 0 4px var(--focus); }
.composer-prompt.is-small { min-height: 72px; padding: 12px 14px; font-family: var(--font); font-size: 15px; font-weight: 500; letter-spacing: 0; border-radius: 14px; }
.composer-label { margin: 0 2px 10px; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.idea-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.idea-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 9px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 600; color: var(--ink); transition: background-color .2s, transform .3s var(--spring); }
.idea-chip:hover { background: var(--brand-soft); transform: translateY(-1px); }
.designing { display: grid; grid-template-columns: 170px 1fr; gap: 22px; align-items: center; padding: 6px 0 22px; }
.designing-cover { height: 196px; border-radius: 6px 22px 22px 22px; background: linear-gradient(120deg, #ddeeff, #ebe4ff, #ffe3ef, #fff1c2, #d9f6e7); background-size: 400% 400%; animation: sb-hue 2.6s ease infinite; }
.designing-lines { display: grid; gap: 12px; }
.designing-lines i:nth-child(1) { width: 70%; height: 22px; } .designing-lines i:nth-child(2) { width: 92%; } .designing-lines i:nth-child(3) { width: 60%; }
.preview-layout { display: grid; grid-template-columns: 210px 1fr; gap: 22px; align-items: start; margin-bottom: 20px; }
.preview-cover .cover { cursor: default; margin-top: 14px; animation: none; }
.preview-cover .cover:hover { transform: none; }
.collects { padding: 16px 18px; border-radius: 18px; background: var(--surface-2); }
.collects > strong { display: block; margin-bottom: 4px; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.collects p { font-size: 15px; line-height: 1.5; }
.collect-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.collect-chips span { padding: 4px 10px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.page-controls { display: grid; gap: 16px; }
.icon-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; padding: 10px; border-radius: 18px; background: var(--p-bg); }
.icon-option { display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; background: var(--material); transition: background-color .2s, transform .3s var(--spring), box-shadow .2s; }
.icon-option:hover { background: var(--surface); transform: scale(1.08); }
.icon-option.is-active { background: var(--surface); box-shadow: 0 0 0 2px var(--p-ink), 0 6px 12px -8px rgba(14, 20, 56, .5); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 50%; background: var(--p-bg); box-shadow: inset 0 0 0 2px var(--p-deep); transition: transform .3s var(--spring), box-shadow .2s; }
.swatch:hover { transform: scale(1.08); }
.swatch.is-active { box-shadow: inset 0 0 0 2px var(--p-deep), 0 0 0 3px var(--surface), 0 0 0 5px var(--p-ink); }
.layout-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.layout-option { display: grid; justify-items: start; gap: 2px; padding: 12px; border-radius: 16px; background: var(--surface-2); text-align: left; box-shadow: inset 0 0 0 1.5px transparent; transition: background-color .2s, box-shadow .2s; }
.layout-option .icon { margin-bottom: 6px; color: var(--ink-2); }
.layout-option strong { font-size: 14px; color: var(--ink); }
.layout-option span { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.layout-option.is-active { background: var(--brand-soft); box-shadow: inset 0 0 0 1.5px var(--brand); }
.layout-option.is-active .icon { color: var(--brand-ink); }
.editor-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.is-danger-text { color: var(--red) !important; }
.hint { font-size: 12px; font-weight: 500; color: var(--ink-3); }

/* Add to a page */
.chooser { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.chooser-item { display: grid; justify-items: start; gap: 2px; padding: 14px; border-radius: 18px; background: var(--p-bg, var(--surface-2)); text-align: left; transition: transform .3s var(--spring); }
.chooser-item:hover { transform: translateY(-2px); }
.chooser-item strong { font-size: 14.5px; color: var(--ink); }
.chooser-item span:last-child { font-size: 12px; color: var(--ink-2); }
.chooser-mark { width: 36px; height: 36px; border-radius: 11px; margin-bottom: 8px; }
.chooser-mark .pg { width: 21px; height: 21px; }
.chooser-item.is-new { background: transparent; box-shadow: inset 0 0 0 2px var(--line-2); }
.chooser-mark.is-new { display: grid; place-items: center; background: var(--ink); color: var(--on-ink); }

@media (max-width: 640px) {
  .shelf { grid-template-columns: repeat(2, 1fr); gap: 22px 12px; }
  .cover, .cover-new { min-height: 208px; }
  .cover-body { min-height: 160px; margin-top: 44px; padding: 16px 14px 14px; }
  .cover h3 { font-size: 17px; }
  .cover-peek { display: none; }
  .page-hero { padding: 16px 18px 18px; border-radius: 26px; }
  .hero-mark { width: 64px; height: 64px; border-radius: 21px; }
  .hero-mark .pg { width: 38px; height: 38px; }
  .cover-mark { width: 42px; height: 42px; border-radius: 13px; margin-top: -38px; }
  .cover-mark .pg { width: 25px; height: 25px; }
  .hero-text h1 { font-size: 27px; }
  .hero-text p { font-size: 14px; }
  .layout-switch button span { display: none; }
  .layout-switch button { padding: 0 12px; }
  .spend-tiles { grid-template-columns: 1fr; }
  .spend-grid { grid-template-columns: 1fr; }
  .designing { grid-template-columns: 1fr; } .designing-cover { height: 140px; }
  .preview-layout { grid-template-columns: 1fr; }
  .preview-cover { max-width: 220px; }
  .layout-pick { grid-template-columns: 1fr 1fr; }
  .tl-item { grid-template-columns: 44px 1fr; gap: 26px; }
  .tl-list::before { left: 56px; } .tl-dot { left: 50px; }
}

.row-chevron { flex: none; color: var(--ink-3); }

/* Today page */
.cover.is-today .cover-body { background: var(--p-bg); }
.cover-date { position: absolute; top: 14px; right: 14px; padding: 3px 9px; border-radius: 999px; background: var(--material); font-size: 11.5px; font-weight: 800; color: var(--p-ink); letter-spacing: .01em; }
.day-block { margin-bottom: 10px; }
.day-empty { margin: -4px 0 24px; padding: 16px 18px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; color: var(--ink-2); }
.day-heading { margin: 6px 4px 14px; font-family: var(--display); font-size: 21px; font-weight: 800; letter-spacing: -.03em; }
.clip-top { flex-wrap: wrap; align-items: center; }
.clip-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--fill); font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.clip-badge.is-worth { background: #fff1c2; color: #876000; }
.clip-badge.is-clipped { background: var(--ink); color: var(--on-ink); }
.clip .clip-why { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; font-weight: 600; line-height: 1.4; color: var(--brand-ink); }
.clip .clip-why .icon { flex: none; margin-top: 1px; }
.clip.is-hero .clip-why { color: var(--p-ink); }

/* ————— Landing: private email + Scrapbook ————— */
.stage-duo { display: grid; grid-template-columns: minmax(0, 1.12fr) auto minmax(0, 1fr); align-items: center; gap: 0; max-width: 1080px; }
.duo-side { position: relative; display: grid; gap: 12px; justify-items: center; }
.duo-side .window { width: 100%; }
.duo-label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--material); box-shadow: var(--shadow-sm); font-size: 13px; font-weight: 700; color: var(--ink-2); }
.duo-link { position: relative; width: 128px; height: 2px; margin: 0 6px; background-image: linear-gradient(90deg, var(--ink-3) 50%, transparent 50%); background-size: 10px 2px; }
.duo-link::after { content: ""; position: absolute; right: -2px; top: -5px; width: 10px; height: 10px; border-top: 2px solid var(--ink-3); border-right: 2px solid var(--ink-3); transform: rotate(45deg); }
.duo-link span { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); white-space: nowrap; padding: 4px 10px; border-radius: 999px; background: #fff1c2; font-size: 12px; font-weight: 700; color: #876000; box-shadow: var(--shadow-sm); }
.duo-shelf { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 14px; text-align: left; }
.duo-shelf .cover, .demo-make .cover { cursor: default; min-height: 168px; animation: none; }
.duo-shelf .cover-body, .demo-make .cover-body { min-height: 122px; margin-top: 38px; padding: 14px; }
.duo-shelf .cover h3, .demo-make .cover h3 { font-size: 16px; }
.duo-shelf .cover-mark, .demo-make .cover-mark { width: 40px; height: 40px; border-radius: 12px; margin-top: -36px; }
.duo-shelf .cover-mark .pg, .demo-make .cover-mark .pg { width: 24px; height: 24px; }
.duo-shelf .cover-meta, .demo-make .cover-meta { font-size: 12px; }
.duo-shelf .cover:nth-child(2) { transform: rotate(1.5deg); }
.duo-shelf .cover:nth-child(3) { transform: rotate(-1.2deg); }
.duo-shelf .cover-new { min-height: 168px; margin-top: 14px; gap: 2px; font-size: 12px; }
.duo-shelf .cover-new-icon { width: 40px; height: 40px; border-radius: 14px; margin-bottom: 4px; }
.duo-shelf .cover-new strong { font-size: 15px; }
.stage-duo .float-b { left: -30px; bottom: -40px; }

.showcase { padding-top: 130px; }
.show-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.show-card { display: grid; gap: 22px; align-content: start; padding: 30px; border-radius: var(--radius-xl); background: var(--p-bg); transition: transform .5s var(--spring); }
.show-card:hover { transform: translateY(-4px) rotate(-.3deg); }
.show-wide { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; }
.show-copy { display: grid; gap: 10px; }
.show-copy h3 { font-size: 26px; line-height: 1.15; font-weight: 800; letter-spacing: -.035em; }
.show-copy p { font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.demo-make { display: grid; grid-template-columns: minmax(0, 1fr) auto 190px; align-items: center; gap: 14px; }
.demo-prompt { display: flex; align-items: center; gap: 8px; padding: 16px 18px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); font-family: var(--display); font-size: 17px; font-weight: 700; letter-spacing: -.015em; }
.demo-prompt .icon { flex: none; color: #876000; }
.demo-arrow { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--on-ink); }
.demo-arrow .icon { width: 16px; height: 16px; }
.demo-make .cover { margin-top: 14px; }
.demo-note { position: relative; display: grid; gap: 6px; padding: 22px 20px 18px; border-radius: 18px; background: #fffdf6; box-shadow: var(--shadow-sm), inset 0 0 0 1px #f3e8c6; font-size: 14px; color: var(--ink-2); }
.demo-note::before { content: ""; position: absolute; top: -9px; left: 50%; width: 80px; height: 20px; border-radius: 3px; background: rgba(255, 215, 94, .6); transform: translateX(-50%) rotate(-2deg); }
.demo-note-label { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #b4541c; }
.demo-note strong { font-family: var(--display); font-size: 18px; line-height: 1.25; letter-spacing: -.02em; color: var(--ink); margin-bottom: 4px; }
.demo-spend { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: end; padding: 18px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); }
.demo-spend-top { display: grid; gap: 2px; }
.demo-spend-top span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.demo-spend-top strong { font-family: var(--display); font-size: 30px; font-weight: 800; letter-spacing: -.04em; }
.demo-spend-top em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--green); }
.demo-bars { display: flex; align-items: flex-end; gap: 7px; height: 84px; }
.demo-bars i { flex: 1; border-radius: 7px 7px 4px 4px; background: #c9ecd9; }
.demo-bars i:nth-child(1) { height: 46%; } .demo-bars i:nth-child(2) { height: 70%; } .demo-bars i:nth-child(3) { height: 38%; }
.demo-bars i:nth-child(4) { height: 88%; } .demo-bars i:nth-child(5) { height: 60%; } .demo-bars i:nth-child(6) { height: 52%; }
.demo-bars i.is-now { background: #16784a; }
.demo-line { position: relative; display: grid; gap: 10px; padding-left: 22px; }
.demo-line::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: rgba(91, 63, 196, .25); }
.demo-line div { position: relative; display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.demo-line div::before { content: ""; position: absolute; left: -22px; top: 16px; width: 12px; height: 12px; border-radius: 50%; background: #8f78f0; box-shadow: 0 0 0 3px var(--p-bg); }
.demo-line span { font-size: 12px; font-weight: 700; color: #5b3fc4; }
.demo-line strong { font-size: 14.5px; line-height: 1.35; }

@media (max-width: 900px) {
  .stage-duo { grid-template-columns: 1fr; gap: 0; max-width: 560px; }
  .duo-link { width: 2px; height: 70px; margin: 14px 0 22px; justify-self: center; background-image: linear-gradient(180deg, var(--ink-3) 50%, transparent 50%); background-size: 2px 10px; }
  .duo-link::after { right: -4px; top: auto; bottom: -2px; transform: rotate(135deg); }
  .duo-link span { left: 16px; bottom: 50%; transform: translateY(50%); }
  .show-grid { grid-template-columns: 1fr; }
  .show-wide { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .demo-make { grid-template-columns: 1fr; justify-items: center; }
  .demo-make .demo-prompt { width: 100%; }
  .demo-arrow { transform: rotate(90deg); }
  .demo-make .cover { width: 190px; }
  .show-card { padding: 24px; }
  .demo-spend { grid-template-columns: 1fr; }
  .duo-shelf { gap: 16px 10px; }
}

/* Sender rows: forward switch and block */
.sender-row { flex-wrap: wrap; }
.quiet-actions { flex-wrap: wrap; justify-content: flex-end; }

/* Mail: search + filter, Important, identity chips */
.mail-search { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.mail-search .mail-tabs { flex: none; }
.mail-search .library-search { flex: 1; margin: 0; }
.mail-filter-btn { height: 54px; padding: 0 18px; border-radius: 18px; gap: 8px; }
.mail-filter-btn.is-on { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.mail-filter-btn .filter-count { background: rgba(255, 255, 255, .22); color: inherit; }
.filter-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.filter-tag { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px 0 12px; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-size: 13px; font-weight: 600; }
.filter-tag .icon { width: 13px; height: 13px; opacity: .8; }
.filter-section { margin-bottom: 18px; }
.filter-section h3 { margin: 0 2px 8px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.filter-options { display: flex; flex-wrap: wrap; gap: 8px; }
.important { margin: 18px 0 26px; }
.important .group-head { justify-content: flex-start; gap: 10px; }
.imp-count { min-width: 24px; height: 24px; padding: 0 8px; display: grid; place-items: center; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-size: 12.5px; font-weight: 700; }
.imp-row { align-items: center; }
.imp-actions { flex: none; gap: 6px; }
.imp-row .drift-actions { margin-top: 8px; padding-left: 0; flex-wrap: wrap; } /* inside the text column: no indent, and the buttons wrap on a phone */
.tag.is-warn { color: #876000; font-weight: 600; }
.caught-up { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 600; color: var(--ink-2); }
.caught-up .icon { color: var(--green); }
.page-link { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 8px 14px; border-radius: 999px; background: #fff1c2; color: #6b4d00; font-size: 13.5px; font-weight: 700; }
.page-link .icon:last-child { width: 13px; height: 13px; }
.mail-all-head { margin-bottom: 6px; }
.id-chip { display: inline-flex; align-items: center; gap: 3px; flex: none; height: 22px; padding: 0 8px 0 6px; border-radius: 999px; background: var(--fill); font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.id-chip .icon { width: 12px; height: 12px; }
.status-line .where { font-size: 13px; color: var(--ink-3); }
@media (max-width: 640px) {
  .mail-filter-btn { padding: 0 14px; }
  .imp-row { flex-wrap: wrap; }
  .imp-actions { width: 100%; justify-content: flex-end; padding-left: 50px; }
}

/* The four checks */
.trust-checks { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 12px 12px; }
.trust-check { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 3px 11px 3px 8px; border-radius: 999px; background: var(--surface); font-size: 12.5px; color: var(--ink-2); }
.trust-check b { font-weight: 700; color: var(--ink); }
.trust-check .icon { width: 13px; height: 13px; flex: none; stroke-width: 2.4; }
.trust-check.is-good .icon { color: var(--green); }
.trust-check.is-info .icon { color: var(--brand-ink); }
.trust-check.is-caution { background: var(--orange-soft); } .trust-check.is-caution .icon, .trust-check.is-caution b { color: var(--orange); }
.trust-check.is-danger { background: var(--red-soft); } .trust-check.is-danger .icon, .trust-check.is-danger b { color: var(--red); }
.trust-check.is-extra { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.trust-checks + .trust-list { padding-top: 0; }

/* Link check page */
body.link-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.lp-card { width: min(520px, 100%); padding: 30px 30px 26px; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow-lg); text-align: center; }
.lp-card .brand { justify-content: center; margin-bottom: 26px; }
.lp-icon { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 20px; font-family: var(--display); font-size: 30px; font-weight: 800; }
.lp-icon.is-caution { background: var(--orange-soft); color: var(--orange); }
.lp-icon.is-danger { background: var(--red-soft); color: var(--red); }
.lp-card h1 { font-family: var(--display); font-size: 26px; font-weight: 800; letter-spacing: -.035em; line-height: 1.15; }
.lp-lead { margin-top: 8px; font-size: 16px; color: var(--ink-2); }
.lp-lead strong { color: var(--ink); }
.lp-reasons { margin: 18px 0 0; padding: 14px 16px 14px 34px; border-radius: 16px; background: var(--surface-2); text-align: left; display: grid; gap: 6px; font-size: 14.5px; line-height: 1.45; }
.lp-url { margin-top: 14px; font-family: var(--mono); font-size: 12px; color: var(--ink-3); overflow-wrap: anywhere; }
.lp-actions { display: grid; gap: 8px; margin-top: 22px; }
.lp-foot { margin-top: 16px; font-size: 12.5px; color: var(--ink-3); }

.sender-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.sender-blocked { margin: 0 0 18px; padding: 14px 16px; border-radius: var(--radius); background: var(--red-soft); color: var(--red); font-size: 14px; font-weight: 600; }
.hidden-reveal { margin: -8px 0 16px; }
.hidden-reveal > .btn { padding-left: 4px; }
.hidden-reveal p { margin-top: 6px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); font-family: var(--mono); font-size: 12.5px; line-height: 1.55; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 240px; overflow: auto; }
.hidden-label { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }

/* Explanations under switches in panels wrap instead of being cut off */
.sheet .row-sub { white-space: normal; overflow: visible; text-overflow: clip; }

/* Numbers: key figures */
.figures { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); grid-auto-flow: dense; gap: 14px; }
.figure { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 176px; padding: 18px 18px 16px; border-radius: 22px; background: var(--p-bg); text-align: left;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--p-deep) 45%, transparent); animation: rise .5s var(--spring) both; animation-delay: calc(var(--i, 0) * 40ms); transition: transform .3s var(--spring), box-shadow .3s; }
.figure::after { content: attr(data-glyph); position: absolute; z-index: -1; right: -4px; bottom: -34px; font-family: var(--display); font-size: 130px; font-weight: 800; line-height: 1; color: var(--p-ink); opacity: .07; }
.figure:hover { transform: translateY(-4px) rotate(-.6deg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--p-deep) 60%, transparent), 0 18px 30px -18px rgba(14, 20, 56, .45); }
.figure-value { font-family: var(--display); font-size: 34px; font-weight: 800; letter-spacing: -.04em; line-height: 1.05; color: var(--p-ink); overflow-wrap: anywhere; }
.figure-label { font-size: 14.5px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.figure-context { font-family: var(--serif); font-style: italic; font-size: 16px; line-height: 1.4; color: var(--ink-2); }
.figure-meta { margin-top: auto; padding-top: 8px; font-size: 12px; font-weight: 700; color: color-mix(in srgb, var(--p-ink) 75%, var(--ink-3)); }
.figure-ring { width: 46px; height: 46px; margin-bottom: 4px; border-radius: 50%; background: conic-gradient(var(--p-ink) calc(var(--p) * 1%), color-mix(in srgb, var(--p-deep) 40%, #fff) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px)); mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px)); }
.figure.is-hero { grid-column: span 2; grid-row: span 2; min-height: 366px; justify-content: flex-end; padding: 26px; background: var(--p-bg); }
.figure.is-hero .figure-value { font-size: clamp(54px, 7vw, 84px); }
.figure.is-hero .figure-label { font-size: 18px; max-width: 30ch; }
.figure.is-hero .figure-ring { width: 72px; height: 72px; margin-bottom: auto; }
.figure.is-hero::after { font-size: 260px; bottom: -70px; }
.group-note { margin-left: auto; font-size: 13px; color: var(--ink-3); }
@media (max-width: 640px) {
  .figures { grid-template-columns: 1fr 1fr; gap: 10px; }
  .figure { min-height: 150px; padding: 14px; border-radius: 18px; }
  .figure-value { font-size: 26px; }
  .figure-label { font-size: 13px; }
  .figure.is-hero { min-height: 250px; padding: 20px; }
}
/* Links: reading list */
.link-row { align-items: center; gap: 14px; color: var(--ink); text-decoration: none; animation: rise .45s var(--spring) both; animation-delay: calc(min(var(--i, 0), 12) * 30ms); }
.link-row:hover { text-decoration: none; background: var(--surface-2); }
.link-site { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; background: var(--p-bg); color: var(--p-ink); font-family: var(--display); font-weight: 800; }
.link-title { display: block; font-size: 15px; font-weight: 700; line-height: 1.35; }
.link-text { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; font-size: 13.5px; color: var(--ink-2); }
.link-row .clip-meta { display: block; margin-top: 4px; }
.link-go { flex: none; color: var(--ink-3); }

/* ————— Landing: the explainer video (hero) —————
   Plays muted with burned-in subtitles; "Watch with sound" restarts it with sound and controls. */
.explainer { position: relative; max-width: 1080px; margin: 64px auto 0; animation-delay: .34s !important; }
.explainer-frame { position: relative; z-index: 1; border-radius: 26px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-lg); }
.explainer-frame video { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--surface-2); }
.explainer-sound { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 13px; border-radius: 999px; background: rgba(14, 20, 56, .82); color: #fff; font-size: 14px; font-weight: 700; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: transform .2s var(--spring), background .2s; }
.explainer-sound:hover { background: var(--ink); transform: scale(1.04); }
.explainer-sound .icon { width: 18px; height: 18px; }
.explainer-sound[hidden] { display: none; }
@media (max-width: 640px) {
  .explainer { margin-top: 44px; }
  .explainer-frame { border-radius: 18px; }
  .explainer-sound { top: 8px; right: 8px; height: 34px; font-size: 13px; }
}

/* ————— Moving accounts to private addresses ————— */
.callout.has-close { padding-right: 10px; }
.tip-close { flex: none; width: 30px; height: 30px; }
.move-steps { display: grid; gap: 4px; margin: 4px 0 6px; padding: 0; list-style: none; }
.move-step { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.move-step:first-child { border-top: 0; }
.move-num { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--fill); font-size: 14px; font-weight: 800; color: var(--ink-2); }
.move-step.is-done .move-num { background: var(--green-soft); color: var(--green); }
.move-body { display: grid; gap: 8px; justify-items: start; min-width: 0; }
.move-body > strong { font-size: 15.5px; font-weight: 700; line-height: 1.35; }
.move-sub { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.move-body .address { max-width: 100%; }
.move-link { text-decoration: none; }
.move-link:hover { text-decoration: none; }
.move-banner { display: flex; align-items: center; gap: 10px; width: 100%; margin: 4px 0 14px; padding: 11px 14px; border-radius: 14px; background: var(--blue-soft); color: var(--blue); font-size: 13.5px; font-weight: 600; text-align: left; }
.move-banner span { flex: 1; }
.moves .group-head .btn { margin-left: auto; }
.site-picker { display: grid; gap: 16px; margin: 14px 0 6px; max-height: min(46vh, 420px); overflow-y: auto; padding: 2px; }
.sheet-move .sheet-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.sheet-move .sheet-body > * { flex: none; }
.sheet-move .site-picker { flex: 1 1 auto; min-height: 120px; max-height: none; align-content: start; }
.sheet-move .sheet-body > .search { width: 100%; }
.site-group h3 { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.site-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.site-chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 5px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 14px; font-weight: 600; transition: box-shadow .15s, background .15s; }
.site-chip .avatar { width: 30px; height: 30px; font-size: 13px; }
.site-chip:hover { background: var(--surface-2); }
.site-chip.is-on { background: var(--ink); box-shadow: none; color: var(--on-ink); }
.site-chip.is-on::after { content: "✓"; margin-left: 2px; font-weight: 800; }
.move-intro { margin: 0 0 12px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.move-note { margin: 0 0 4px; }
.other-site { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.other-site input { height: 40px; padding: 0 12px; border: 0; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); font: inherit; font-size: 14px; }
.other-site input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--brand), 0 0 0 4px var(--focus); }
@media (max-width: 640px) { .other-site { grid-template-columns: 1fr; } }

/* ————— Subscriptions and what's coming up ————— */
.payments { display: grid; gap: 4px; margin-bottom: 8px; }
.coming-up .row-value { font-weight: 700; color: var(--ink); }
.sub-totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 10px; }
.sub-totals div { display: grid; gap: 2px; padding: 14px 16px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.sub-totals strong { font-family: var(--display); font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.sub-totals span { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.sub-row { align-items: flex-start; }
.sub-main { display: grid; gap: 3px; flex: 1; min-width: 0; text-align: left; }
.sub-notes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.sub-row.is-stale { opacity: .6; }
.sub-hide { flex: none; width: 30px; height: 30px; opacity: .55; }
.sub-hide:hover { opacity: 1; }
@media (max-width: 640px) { .sub-totals strong { font-size: 18px; } }

/* ————— Discover ————— */
.nl-topics { margin-bottom: 18px; overflow-x: auto; max-width: 100%; }
.nl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.nl-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); animation: rise .45s var(--spring) both; animation-delay: calc(var(--i, 0) * 30ms); transition: transform .3s var(--spring), box-shadow .3s; }
.nl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.nl-card.is-subscribed { background: var(--surface); }
.nl-card.is-link { cursor: pointer; }
.nl-top { display: flex; align-items: center; gap: 12px; }
.nl-logo { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); }
.nl-logo img { width: 100%; height: 100%; object-fit: contain; }
.nl-logo.is-mark { background: var(--p-bg); color: var(--p-ink); font-family: var(--display); font-size: 16px; font-weight: 800; letter-spacing: -.02em; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--p-deep) 50%, transparent); }
.nl-logo.is-large { width: 54px; height: 54px; border-radius: 16px; }
.nl-name { display: grid; flex: 1; min-width: 0; }
.nl-name strong { font-family: var(--display); font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.nl-name span { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.nl-hide { flex: none; width: 28px; height: 28px; opacity: .4; }
.nl-card:hover .nl-hide { opacity: .8; }
.nl-about { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.nl-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.nl-tag { padding: 3px 10px; border-radius: 999px; background: var(--p-bg); color: var(--p-ink); font-size: 12px; font-weight: 700; }
.nl-tag.is-for-you { background: var(--brand-soft); color: var(--brand-ink); }
.nl-subscribe { align-self: flex-start; margin-top: auto; }
.nl-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.nl-where { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.nl-question { margin: 6px 0 8px; font-size: 14px; font-weight: 700; }
.nl-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 6px; }
.nl-option { display: grid; gap: 4px; padding: 14px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-2); text-align: left; transition: box-shadow .15s, background .15s; }
.nl-option strong { font-size: 14.5px; }
.nl-option span { font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.nl-option.is-on { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand); }
@media (max-width: 640px) { .nl-options { grid-template-columns: 1fr; } .nl-grid { grid-template-columns: 1fr; } }
.nl-copy { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--fill); font-size: 13px; font-weight: 600; color: var(--ink); }
.nl-copy:hover { background: var(--fill-hover); }
.nl-disclaimer { max-width: 640px; margin: 26px auto 0; text-align: center; line-height: 1.5; }
.confirm-box { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: var(--blue-soft); color: var(--blue); font-size: 13.5px; font-weight: 600; }
.confirm-box.is-done { background: var(--green-soft); color: var(--green); }
.confirm-box.is-action { align-items: center; background: var(--blue-soft); color: var(--ink); }
.confirm-box.is-action > div { flex: 1; display: grid; gap: 2px; }
.confirm-box.is-action strong { font-size: 14.5px; color: var(--blue); }
.confirm-box.is-action span { font-weight: 500; line-height: 1.45; color: var(--ink-2); }
.nl-status-wrap { display: grid; gap: 8px; margin-top: auto; justify-items: start; }
.nl-status-wrap .nl-status { margin-top: 0; }
.nl-failure { margin: 0; font-size: 13px; line-height: 1.4; color: var(--orange); }
.nl-auto { margin: 4px 0 6px; }

/* ————— Mail as an inbox: one line per email ————— */
.mail-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 8px; margin: 18px 0 8px; }
.mail-tabs { overflow-x: auto; max-width: 100%; }
.mail-tabs .tab-count { display: inline-grid; place-items: center; min-width: 19px; height: 19px; margin-left: 6px; padding: 0 5px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; }
.mail-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.sel-count { font-size: 13.5px; font-weight: 700; margin-right: 6px; }
.inbox { border-radius: 18px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.mrow { position: relative; display: grid; grid-template-columns: 28px 28px minmax(130px, 190px) minmax(0, 1fr) 132px 142px 22px 58px; align-items: center; gap: 0 8px; min-height: 46px; padding: 0 14px 0 8px; border-top: 1px solid var(--line); cursor: pointer; font-size: 14px; color: var(--ink-2); }
.mrow:first-child { border-top: 0; }
.mrow:hover { background: var(--surface-2); box-shadow: inset 0 1px 0 var(--line), inset 0 -1px 0 var(--line); }
.mrow.is-selected { background: var(--brand-soft); }
.mrow.is-unread { color: var(--ink); }
.mrow.is-unread .mrow-from, .mrow.is-unread .mrow-subject, .mrow.is-unread .mrow-time { font-weight: 750; color: var(--ink); }
.mrow.is-unread::before { content: ""; position: absolute; left: 3px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--brand); }
.mrow.is-held { background: color-mix(in srgb, var(--orange-soft) 45%, var(--surface)); }
.mrow-pick { display: grid; place-items: center; height: 100%; cursor: pointer; }
.mrow-pick input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
.mrow-star { width: 28px; height: 28px; }
.mrow .mrow-star .icon { width: 16px; height: 16px; }
.mrow-from { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow-text > .pill, .mrow-text > .tag { margin-right: 6px; vertical-align: 1px; }
.mrow-subject { color: var(--ink); }
.mrow-preview { color: var(--ink-3); }
.mrow-cat, .mrow-id { display: flex; min-width: 0; overflow: hidden; }
.mrow-cat > *, .mrow-id > * { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow .pill, .mrow .tag, .mrow .cat-tag, .mrow .id-chip { height: 21px; padding: 0 8px; font-size: 11.5px; }
.mrow .cat-tag .icon, .mrow .id-chip .icon { width: 13px; height: 13px; flex: none; }
.mrow-sent { display: grid; place-items: center; width: 22px; height: 22px; color: var(--ink-3); }
.mrow-time { text-align: right; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
@media (max-width: 1100px) { .mrow { grid-template-columns: 28px 28px minmax(120px, 170px) minmax(0, 1fr) 132px 22px 58px; } .mrow-id { display: none; } }
@media (max-width: 900px) { .mrow { grid-template-columns: 28px 28px minmax(110px, 150px) minmax(0, 1fr) 22px 58px; } .mrow-cat { display: none; } }
@media (max-width: 760px) {
  .mrow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "from time" "text text"; gap: 2px 10px; padding: 10px 14px 10px 16px; }
  .mrow-pick, .mrow-star, .mrow-cat, .mrow-id, .mrow-sent { display: none; }
  .mrow-from { grid-area: from; } .mrow-time { grid-area: time; } .mrow-text { grid-area: text; }
  .mail-actions { margin-left: 0; }
}

.confirm-box.is-failed { background: var(--orange-soft); }
.confirm-box.is-failed strong { color: var(--orange); }

/* ————— Phone app sign-in (mobile/src/native.js) ————— */
.native-auth { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom)); overflow-y: auto; }
.native-card { width: min(420px, 100%); display: grid; gap: 12px; }
.native-card h1 { margin: 0 0 6px; font-size: 26px; font-weight: 800; letter-spacing: -.03em; text-align: center; }
.native-logo { justify-self: center; height: 44px; margin-bottom: 4px; }
.native-links { margin: 6px 0 0; text-align: center; font-size: 13.5px; color: var(--ink-3); }
/* In the phone app there is no browser bar: keep clear of the status bar and notch. */
.is-native .mobile-bar { padding-top: calc(10px + env(safe-area-inset-top)); }
.is-native .sheet { padding-bottom: env(safe-area-inset-bottom); }
.mail-checking { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--blue); }
.mail-checking[hidden] { display: none; }
.mail-checking .spinner { width: 14px; height: 14px; border-width: 2px; }
.site-logo { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.site-logo img { width: 100%; height: 100%; object-fit: contain; }
.site-logo.avatar-lg { width: 48px; height: 48px; border-radius: 14px; }
.site-chip .site-logo { width: 30px; height: 30px; border-radius: 9px; }

/* ————— Front page (Scrapbook news pages, one day at a time) ————— */
.day-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; margin: 2px 0 22px; }
.day-step, .day-step-gap { width: 36px; height: 36px; }
.day-step { background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.day-step:not(.is-next) .icon { transform: rotate(180deg); }
.day-strip { display: flex; gap: 8px; overflow-x: auto; padding: 3px; scrollbar-width: none; scroll-snap-type: x proximity; }
.day-strip::-webkit-scrollbar { display: none; }
.day-chip { flex: none; display: grid; gap: 1px; min-width: 92px; padding: 8px 14px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); text-align: center; scroll-snap-align: center; transition: background .2s, color .2s; }
.day-chip strong { font-size: 13.5px; font-weight: 750; }
.day-chip span { font-size: 11.5px; color: var(--ink-3); }
.day-chip:hover { background: var(--surface-2); }
.day-chip.is-active { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.day-chip.is-active span { color: var(--on-ink); opacity: .7; }
.day-chip.is-empty:not(.is-active) { opacity: .55; }
.front { display: grid; gap: 30px; }
.fp-card { display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 16px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); cursor: pointer; transition: transform .25s var(--spring), box-shadow .25s, opacity .3s; }
.fp-card:hover { transform: translateY(-2px); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.fp-card:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--focus); }
.fp-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fp-card h3 { margin: 0; font-family: var(--display); font-size: 18px; font-weight: 800; line-height: 1.3; letter-spacing: -.015em; text-wrap: pretty; }
/* Summaries are short, so they show in full: never cut mid-sentence. */
.fp-summary { margin: 0; max-width: 72ch; font-size: 15px; line-height: 1.58; color: var(--ink-2); text-wrap: pretty; }
.fp-meta { padding-top: 2px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.fp-card.is-lead { padding: 28px 30px 24px; background: var(--surface); }
.fp-card.is-lead .fp-text { gap: 12px; }
.fp-card.is-lead h3 { font-size: clamp(24px, 3vw, 32px); line-height: 1.15; letter-spacing: -.03em; }
.fp-card.is-lead .fp-summary { font-size: 16.5px; line-height: 1.6; max-width: 68ch; }
.fp-kicker { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--p-ink); }
.fp-why { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 600; color: var(--brand-ink); }
.fp-why .icon { width: 14px; height: 14px; flex: none; }
/* One long card per row: text on the left, a key figure (when there is one) on the right. */
.fp-list { display: grid; gap: 12px; }
.fp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 24px; padding: 20px 24px 18px; }
.fp-row:hover { transform: translateY(-1px); }
.fp-figure { display: grid; gap: 4px; align-content: start; width: 168px; padding: 12px 14px; border-radius: 14px; background: var(--brand-soft, #eef1ff); }
.fp-figure strong { font-family: var(--display); font-size: 24px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; color: var(--brand-ink); overflow-wrap: anywhere; }
.fp-figure span { font-size: 12.5px; font-weight: 600; line-height: 1.35; color: var(--ink-2); }
.fp-thumb { display: block; overflow: hidden; border-radius: 14px; background: var(--fill); aspect-ratio: 8 / 5; }
.fp-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fp-row.has-thumb { grid-template-columns: 172px minmax(0, 1fr) auto; }
.fp-card.is-lead.has-thumb { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 38%); align-items: center; gap: 28px; }
.fp-card.is-lead .fp-thumb { order: 2; border-radius: 18px; }
.fp-card.is-note { background: #fff8d9; box-shadow: var(--shadow-sm), inset 0 0 0 1px #f3e2a3; }
.fp-card.is-opened { opacity: .62; }
.fp-card.is-opened:hover { opacity: .9; }
.fp-section { display: grid; gap: 12px; }
.fp-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fp-head h2 { margin: 0; font-family: var(--display); font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.fp-sub { font-size: 13px; color: var(--ink-3); }
.fp-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--p-deep); flex: none; }
.fp-more { justify-self: start; }
.fp-section.is-worth .fp-card { background: #fffaf0; }
.reader-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.reader-count { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.reader-nav .is-back .icon { transform: rotate(180deg); }
.reader-nav .btn:disabled { visibility: hidden; }
@media (max-width: 640px) {
  .fp-row, .fp-row.has-thumb { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "head thumb" "body body" "fig fig" "meta meta"; gap: 8px 14px; padding: 18px 18px 16px; }
  .fp-row .fp-text { display: contents; }
  .fp-row h3 { grid-area: head; align-self: center; }
  .fp-row .fp-summary { grid-area: body; }
  .fp-row .fp-meta { grid-area: meta; }
  .fp-row .fp-thumb { grid-area: thumb; width: 92px; border-radius: 12px; }
  .fp-card.is-lead.has-thumb { display: flex; gap: 14px; }
  .fp-card.is-lead .fp-thumb { order: -1; }
  .fp-row .fp-figure { grid-area: fig; width: auto; display: flex; align-items: baseline; gap: 8px; margin: 4px 0 2px; padding: 8px 12px; }
  .fp-row .fp-figure strong { font-size: 20px; flex: none; }
  .fp-card.is-lead { padding: 22px 20px 18px; }
  .day-chip { min-width: 80px; padding: 7px 10px; }
}
.so-far.is-updating .so-far-label::after { content: " · updating…"; font-weight: 600; text-transform: none; letter-spacing: 0; opacity: .7; }

/* ————— Records: home sections ————— */
.shelf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.shelf-head:first-child { margin-top: 0; }
.shelf-head h2 { margin: 0; font-family: var(--display); font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.shelf-head p { margin: 2px 0 0; font-size: 13.5px; color: var(--ink-3); }

/* Attachments on records */
.attach-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.attach { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; height: 28px; padding: 0 10px 0 4px; border-radius: 9px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font-size: 12.5px; font-weight: 600; text-decoration: none; }
.attach:hover { background: var(--fill-hover); text-decoration: none; }
.attach-ext { display: grid; place-items: center; min-width: 30px; height: 20px; padding: 0 4px; border-radius: 6px; background: #ffe4e6; color: #d42a38; font-size: 9.5px; font-weight: 800; letter-spacing: .03em; }
.attach-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Wallet: subscriptions as membership cards */
.wallet-view { display: grid; gap: 14px; }
.wallet { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.wcard { position: relative; display: flex; flex-direction: column; gap: 14px; min-height: 178px; padding: 18px; border-radius: 22px; cursor: pointer; overflow: hidden;
  background: var(--p-bg); box-shadow: var(--shadow-sm), inset 0 0 0 1px color-mix(in srgb, var(--p-deep) 50%, transparent);
  animation: rise .45s var(--spring) both; animation-delay: calc(var(--i, 0) * 40ms); transition: transform .3s var(--spring), box-shadow .3s; }
.wcard::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .35); }
.wcard:hover { transform: translateY(-3px) rotate(-.4deg); box-shadow: var(--shadow); }
.wcard-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; }
.wcard-top strong { flex: 1; font-family: var(--display); font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.wcard-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--surface); color: var(--p-ink); font-family: var(--display); font-weight: 800; box-shadow: var(--shadow-sm); }
.wcard-hide { position: relative; z-index: 1; width: 28px; height: 28px; opacity: .5; }
.wcard-hide:hover { opacity: 1; }
.wcard-price { position: relative; z-index: 1; display: flex; align-items: baseline; gap: 6px; }
.wcard-price strong { font-family: var(--display); font-size: 28px; font-weight: 800; letter-spacing: -.04em; color: var(--ink); }
.wcard-price span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.wcard-foot { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; margin-top: auto; }
.wring { position: relative; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: conic-gradient(var(--p-ink) calc(var(--p) * 1%), rgba(255, 255, 255, .7) 0); }
.wring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); }
.wring b, .wring small { position: relative; line-height: 1; }
.wring b { font-size: 14px; font-weight: 800; margin-top: 4px; }
.wring small { font-size: 9px; color: var(--ink-3); margin-top: -10px; }
.wcard-when { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.stickers { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.sticker { padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 750; transform: rotate(-1.5deg); box-shadow: 0 2px 6px rgba(14, 20, 56, .08); }
.sticker.is-up { background: #fff0da; color: #b85e00; }
.sticker.is-down { background: var(--green-soft); color: var(--green); }
.sticker.is-trial { background: #ffe4e6; color: #d42a38; transform: rotate(1.5deg); }
.wcard.is-stale { filter: saturate(.3); opacity: .75; }

/* Calendar: bills by due date */
.calendar-view { display: grid; gap: 18px; }
.cal-card { padding: 18px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head strong { font-family: var(--display); font-size: 18px; font-weight: 800; }
.cal-prev .icon { transform: rotate(180deg); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--ink-3); padding-bottom: 4px; }
.cal-day { display: grid; justify-items: center; align-content: start; gap: 3px; min-height: 52px; padding: 6px 2px; border-radius: 12px; }
.cal-day.has-marks { background: var(--surface-2); }
.cal-day.is-today .cal-num { background: var(--ink); color: var(--on-ink); }
.cal-num { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 13px; font-weight: 650; }
.cal-dots { display: flex; gap: 3px; }
.cal-dots i, .cal-legend i { width: 7px; height: 7px; border-radius: 50%; }
.is-overdue { --dot: var(--red); } .is-due { --dot: #f29d0b; } .is-paid { --dot: var(--green); } .is-renewal { --dot: var(--blue); }
.cal-dots i, .cal-legend i { background: var(--dot); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--ink-3); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bill-group h2 { margin: 0 0 8px; font-family: var(--display); font-size: 17px; font-weight: 800; }
.bill-list { border-radius: 18px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.bill-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); cursor: pointer; }
.bill-row:first-child { border-top: 0; }
.bill-row:hover { background: var(--surface-2); }
.bill-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--surface-2); font-weight: 800; color: var(--ink-2); box-shadow: inset 3px 0 0 var(--dot); }
.bill-main { display: grid; min-width: 0; }
.bill-main strong { font-size: 14.5px; }
.bill-main > span { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bill-side { display: grid; justify-items: end; }
.bill-amount { font-family: var(--display); font-size: 16px; font-weight: 800; }
.bill-when { font-size: 12.5px; font-weight: 650; color: var(--dot); }
.bill-row.is-paid .bill-amount, .bill-row.is-paid .bill-main { opacity: .6; }

/* Order shelf */
.shelf-view { display: grid; gap: 22px; }
.order-month h2 { margin: 0 0 10px; font-family: var(--display); font-size: 17px; font-weight: 800; }
.order-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.order-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); cursor: pointer; transition: transform .25s var(--spring); }
.order-card:hover { transform: translateY(-2px); }
.order-top { display: flex; align-items: center; gap: 10px; }
.order-top > div { flex: 1; display: grid; min-width: 0; }
.order-top strong { font-size: 14.5px; }
.order-top span { font-size: 12.5px; color: var(--ink-3); }
.order-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--p-bg); color: var(--p-ink); font-weight: 800; }
.order-amount { font-family: var(--display); font-size: 17px; font-weight: 800; }
.order-title { margin: 0; font-size: 14px; color: var(--ink-2); }
.order-progress { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); margin: 2px 0 0; padding: 0; list-style: none; }
.order-progress li { position: relative; display: grid; justify-items: center; gap: 4px; font-size: 11.5px; font-weight: 650; color: var(--ink-3); }
.order-progress li::before { content: ""; position: absolute; top: 6px; left: -50%; width: 100%; height: 2px; background: var(--line-2); }
.order-progress li:first-child::before { display: none; }
.order-progress i { position: relative; z-index: 1; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--line-2); }
.order-progress li.is-done { color: var(--green); }
.order-progress li.is-done i { background: var(--green); box-shadow: none; }
.order-progress li.is-done::before { background: var(--green); }

/* First-visit tour */
.tour { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgba(14, 20, 56, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade .25s both; }
.tour-card { position: relative; width: min(980px, 100%); max-height: 88vh; overflow-y: auto; padding: 22px 22px 120px; border-radius: 26px; background: var(--bg); box-shadow: var(--shadow-lg); }
.tour-head { margin-bottom: 16px; }
.tour-head h2 { margin: 6px 0 2px; font-family: var(--display); font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.tour-head p { margin: 0; font-size: 13.5px; color: var(--ink-3); }
.tour-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--ink); color: var(--on-ink); font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.tour-demo { pointer-events: none; }
.tour-spot { position: relative; z-index: 2; border-radius: 14px; box-shadow: 0 0 0 3px var(--brand), 0 0 0 9px var(--focus) !important; }
.tour-bubble { position: absolute; z-index: 3; width: 320px; padding: 14px 16px; border-radius: 16px; background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow-lg); }
.tour-bubble p { margin: 4px 0 10px; font-size: 14px; line-height: 1.45; }
.tour-num { font-size: 11.5px; font-weight: 800; opacity: .7; }
.tour-actions { display: flex; justify-content: flex-end; gap: 8px; }
.tour-actions .btn-plain { color: var(--on-ink); opacity: .8; }
.tour-actions .btn-plain:hover:not(:disabled) { opacity: 1; background: color-mix(in srgb, var(--on-ink) 14%, transparent); }
.tour-actions .btn-primary { background: var(--surface); color: var(--ink); }
@media (max-width: 640px) { .tour-bubble { width: calc(100% - 32px); } .bill-row { grid-template-columns: 38px minmax(0, 1fr) auto; } .bill-row .mark-paid { grid-column: 2 / -1; justify-self: start; } }
.collect-suggest .row-actions { flex: none; display: flex; }
.bill-row.is-undated .bill-when { color: var(--ink-3); }
.bill-row.is-undated .bill-mark { box-shadow: inset 3px 0 0 var(--line-2); }
@media (max-width: 640px) { .collect-suggest { flex-wrap: wrap; } .collect-suggest .row-actions { width: 100%; justify-content: flex-end; } }

/* An identity's newsletters in the Scrapbook: a three-way choice under the row text */
.choice-row { flex-wrap: wrap; }
.choice-row .mode-pick { flex: 1 1 100%; margin: 4px 0 2px 46px; width: auto; }
.choice-row .mode-pick button { flex: 1; }
.link-btn { justify-self: start; margin-top: 4px; padding: 0; border: 0; background: none; color: var(--brand); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
@media (max-width: 640px) { .choice-row .mode-pick { margin-left: 0; } }

.idea-chip .pg { width: 22px; height: 22px; padding: 3px; box-sizing: content-box; border-radius: 9px; background: var(--p-bg); }
/* Records pages and suggestions carry the page's own icon */
.page-row-mark { background: var(--p-bg); }
.page-row-mark .pg { width: 21px; height: 21px; }
.row.is-soon .row-icon { filter: saturate(.35); opacity: .75; }
.callout-mark { width: 40px; height: 40px; border-radius: 13px; background: var(--p-bg); box-shadow: none; }
.callout-mark .pg { width: 24px; height: 24px; }
.callout .page-mark { color: var(--p-ink); }

/* ————— Landing: everything you subscribe to, sorted ————— */
/* Hero: mail arriving on the left, sorted onto pages on the right. */
.sort-demo { display: grid; grid-template-columns: minmax(0, 1.05fr) auto minmax(0, 1fr); align-items: center; gap: 22px; max-width: 1040px; margin: 64px auto 0; padding: 30px; border-radius: var(--radius-xl);
  background: var(--surface); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); text-align: left; animation-delay: .3s !important; }
.sort-in { display: grid; gap: 9px; }
.sort-label { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 2px 4px; }
.sort-mail { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line);
  animation: sort-in .7s var(--spring) both; }
.sort-mail:nth-child(2) { animation-delay: .5s; } .sort-mail:nth-child(3) { animation-delay: .75s; } .sort-mail:nth-child(4) { animation-delay: 1s; }
.sort-mail:nth-child(5) { animation-delay: 1.25s; } .sort-mail:nth-child(6) { animation-delay: 1.5s; }
@keyframes sort-in { from { opacity: 0; transform: translateX(-18px); } }
.sort-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--p-bg); color: var(--p-ink); font-family: var(--display); font-weight: 800; }
.sort-text { display: grid; min-width: 0; }
.sort-text strong { font-size: 14px; }
.sort-text span { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sort-to { padding: 5px 10px; border-radius: 999px; background: var(--p-bg); color: var(--p-ink); font-size: 12px; font-weight: 750; white-space: nowrap; }
.sort-arrow { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow); }
.sort-arrow .icon { width: 20px; height: 20px; }
.sort-out { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.sort-out .cover, .demo-covers .cover { min-height: 150px; cursor: default; }
.sort-out .cover-body, .demo-covers .cover-body { min-height: 104px; margin-top: 36px; padding: 13px 13px 12px; }
.sort-out .cover h3, .demo-covers .cover h3 { font-size: 15.5px; }
.sort-out .cover-meta, .demo-covers .cover-meta { font-size: 11.5px; }
.sort-out .cover-mark, .demo-covers .cover-mark { width: 38px; height: 38px; border-radius: 12px; margin-top: -32px; margin-bottom: 8px; }
.sort-out .cover-mark .pg, .demo-covers .cover-mark .pg { width: 23px; height: 23px; }
.sort-out .cover { animation: rise .8s var(--spring) both; }
.sort-out .cover:nth-child(1) { animation-delay: .9s; } .sort-out .cover:nth-child(2) { animation-delay: 1.15s; }
.sort-out .cover:nth-child(3) { animation-delay: 1.4s; } .sort-out .cover:nth-child(4) { animation-delay: 1.65s; }
.demo-covers { display: grid; grid-template-columns: minmax(0, 220px); justify-content: center; }

/* Sound familiar? */
.familiar { padding-top: 120px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat-card { display: grid; align-content: start; gap: 10px; padding: 30px; border-radius: var(--radius-lg); background: var(--p-bg); }
.stat-card strong { font-family: var(--display); font-size: clamp(44px, 6vw, 64px); font-weight: 800; line-height: 1; letter-spacing: -.05em; color: var(--p-ink); }
.stat-card p { font-size: 17px; line-height: 1.45; color: var(--ink); }
.stat-card small { font-size: 12.5px; color: var(--ink-3); }

/* Records demos */
.demo-wallet { display: grid; justify-content: center; }
.demo-wallet .wcard { width: min(300px, 100%); cursor: default; animation: none; }
.demo-ring { --p: 90; }
.demo-bills { background: var(--surface); }
.demo-bills .bill-row { grid-template-columns: 38px minmax(0, 1fr) auto; cursor: default; }
.demo-bills .attach { margin-top: 4px; width: max-content; max-width: 100%; }
.demo-order { cursor: default; background: var(--surface); }
.demo-order:hover { transform: none; }
.demo-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-topics span { padding: 8px 14px; border-radius: 999px; background: var(--material); font-size: 14px; font-weight: 650; color: var(--p-ink); box-shadow: var(--shadow-sm); }
.demo-quiet { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); }
.demo-quiet > div { display: grid; }
.demo-quiet strong { font-size: 14.5px; }
.demo-quiet > div > span { font-size: 13px; color: var(--ink-2); }
.demo-quiet .btn { cursor: default; }
#how .explainer { margin-top: 40px; }

/* Compare: four columns */
.compare-4 { max-width: 980px; }
.compare-4 .compare-row { grid-template-columns: minmax(0, 1fr) repeat(4, 130px); }
.compare-4 .compare-top span { line-height: 1.25; }

@media (max-width: 900px) {
  .sort-demo { grid-template-columns: 1fr; padding: 18px; gap: 16px; }
  .sort-arrow { transform: rotate(90deg); justify-self: center; }
  .stat-row { grid-template-columns: 1fr; }
  .compare-4 .compare-row { grid-template-columns: minmax(0, 1fr) repeat(4, 64px); }
  .compare-4 .compare-row span { padding: 12px 8px; font-size: 13px; }
  .compare-4 .compare-top span { font-size: 10.5px; }
}
@media (max-width: 520px) {
  .sort-mail { grid-template-columns: 30px minmax(0, 1fr); }
  .sort-to { grid-column: 2; justify-self: start; margin-top: -4px; }
  .compare-4 .compare-row { grid-template-columns: minmax(0, 1fr) repeat(4, 52px); }
  .compare-4 .compare-row span:first-child { padding-left: 12px; }
}
@media (prefers-reduced-motion: reduce) { .sort-mail, .sort-out .cover { animation: none; } }
.compare-4 .label-short { display: none; }
.compare-4 .compare-top span span { padding: 0; }
@media (max-width: 900px) { .compare-4 .label-full { display: none; } .compare-4 .label-short { display: inline; } .compare-4 .compare-top span { font-size: 11.5px; } }
@media (max-width: 520px) {
  .compare-4 .compare-row { grid-template-columns: minmax(0, 1fr) repeat(3, 50px) 66px; }
  .compare-4 .compare-top .is-us { font-size: 12.5px; }
  .demo-bills .attach { max-width: 130px; }
}
@media (max-width: 400px) {
  .compare-4 .compare-top span { font-size: 10.5px; }
  .compare-4 .compare-row span { padding-left: 4px; padding-right: 4px; }
  .compare-4 .compare-row span:first-child { padding-left: 12px; }
  .demo-bills .attach { max-width: 104px; }
  .demo-bills .bill-row { gap: 10px; }
}

/* Hero: what you get, and what you don't give up */
.hero h1 .h1-second { display: inline-block; margin-top: 6px; font-size: .62em; }
.hero .lead { max-width: 760px; }
.hero-checks { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin: 26px auto 0; padding: 0; list-style: none; }
.hero-checks li { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 650; color: var(--ink-2); }
.hero-checks .icon { width: 17px; height: 17px; padding: 3px; box-sizing: content-box; border-radius: 50%; background: var(--green-soft); color: var(--green); stroke-width: 2.6; }

/* Hero: one lane per email — the site, the address it was given, and where the mail ends up */
.flow-demo { display: grid; gap: 10px; max-width: 1040px; margin: 56px auto 0; padding: 26px 28px 22px; border-radius: var(--radius-xl); text-align: left;
  background: var(--surface); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); animation-delay: .3s !important; }
.flow-head, .flow-lane { display: grid; grid-template-columns: 230px minmax(30px, 1fr) auto minmax(30px, 1fr) 250px; align-items: center; }
.flow-head { padding: 0 4px 4px; }
.flow-head span { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.flow-head span:nth-child(1) { grid-column: 1; } .flow-head span:nth-child(2) { grid-column: 3; text-align: center; } .flow-head span:nth-child(3) { grid-column: 5; }
.flow-lane { animation: sort-in .7s var(--spring) both; }
.flow-lane:nth-of-type(2) { animation-delay: .45s; } .flow-lane:nth-of-type(3) { animation-delay: .65s; } .flow-lane:nth-of-type(4) { animation-delay: .85s; } .flow-lane:nth-of-type(5) { animation-delay: 1.1s; }
.flow-from { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 11px; padding: 10px 16px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.flow-from .sort-text strong { font-size: 14px; }
.flow-from .sort-text span { font-size: 12.5px; }
.flow-line { position: relative; height: 2px; margin: 0 8px; background: repeating-linear-gradient(90deg, var(--line-2) 0 6px, transparent 6px 11px); }
.flow-line i { position: absolute; top: 50%; left: 0; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); animation: flow-dot 2.8s ease-in-out infinite; }
.flow-lane:nth-of-type(3) .flow-line i { animation-delay: .5s; } .flow-lane:nth-of-type(4) .flow-line i { animation-delay: 1s; } .flow-lane:nth-of-type(5) .flow-line i { animation-delay: 1.5s; }
.flow-line + .flow-addr + .flow-line i { animation-name: flow-dot-late; }
@keyframes flow-dot { 0% { left: 0; opacity: 0; } 10% { opacity: 1; } 45%, 100% { left: calc(100% - 8px); opacity: 0; } }
@keyframes flow-dot-late { 0%, 45% { left: 0; opacity: 0; } 55% { opacity: 1; } 90%, 100% { left: calc(100% - 8px); opacity: 0; } }
.flow-addr { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); box-shadow: inset 0 0 0 1px rgba(51, 71, 230, .15); }
.flow-addr .mono { font-size: 12.5px; font-weight: 600; }
.flow-addr .icon { width: 15px; height: 15px; }
.flow-to { display: flex; flex-wrap: wrap; gap: 6px; }
.flow-page, .flow-inbox, .flow-held { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px 6px 7px; border-radius: 999px; font-size: 13px; font-weight: 750; white-space: nowrap; }
.flow-page { background: var(--p-bg); color: var(--p-ink); }
.flow-page .pg { width: 19px; height: 19px; }
.flow-inbox { padding-left: 9px; background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.flow-inbox .icon, .flow-held .icon { width: 15px; height: 15px; }
.flow-held { padding-left: 9px; background: #ffe4e6; color: #c42032; }
.is-scam .flow-from { box-shadow: var(--shadow-sm), inset 0 0 0 1.5px #ffc2c8; }
.is-scam .flow-line:first-of-type i { background: #e5484d; box-shadow: 0 0 0 4px #ffe4e6; }
.flow-line.is-stop { display: grid; place-items: center; background: repeating-linear-gradient(90deg, #ffc2c8 0 6px, transparent 6px 11px); }
.flow-line.is-stop b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #e5484d; color: #fff; }
.flow-line.is-stop b .icon { width: 13px; height: 13px; stroke-width: 3; }
.flow-foot { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 8px; padding: 12px 16px; border-radius: 16px; background: var(--green-soft); color: #14613c; font-size: 14px; font-weight: 600; text-align: center; }
.flow-foot .mono { font-size: 13px; }
.flow-lock { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 9px; background: var(--surface); color: var(--green); }
.flow-lock .icon { width: 15px; height: 15px; }
@media (max-width: 900px) {
  .flow-demo { padding: 18px 14px; }
  .flow-head { display: none; }
  .flow-lane { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px; border-radius: 18px; background: var(--material); box-shadow: inset 0 0 0 1px var(--line); }
  .flow-line { display: none; }
  .flow-addr { justify-self: start; }
  .flow-addr::before { content: "→ to"; font-size: 12px; font-weight: 700; color: var(--ink-3); }
  .flow-to::before { content: "→"; align-self: center; font-weight: 800; color: var(--ink-3); }
  .flow-foot { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .flow-lane { animation: none; } .flow-line i { display: none; } }
.flow-line.is-stop b { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
@media (max-width: 900px) { .flow-line.is-stop { display: none; } }

/* ————— Our line-break rule —————
   Display text (headlines, subheadings, captions, short notes) breaks between sentences, never inside one when
   it can be helped: each sentence in a .sentences block is its own unit, so lines break between units, and a
   sentence wider than the screen wraps evenly instead of leaving one word alone. Longer body text flows, but never
   ends a paragraph on a single word. The video's subtitles follow the same rule (videos/explainer-source). */
.landing h1, .landing h2, .landing h3, .landing .lead, .landing .section-head p, .landing .closing p { text-wrap: balance; }
.landing p, .landing li, .landing summary, .landing .tile p, .landing .show-copy p { text-wrap: pretty; }
.landing .section-head p, .landing .lead, .landing .closing p { text-wrap: balance; }
.sentences > span { display: inline-block; text-wrap: balance; }
.lead.sentences > span { display: inline-block; }
.hero .lead.sentences { max-width: 900px; }
.flow-foot .sentences { display: block; }
/* Gradient text is painted only inside its box; give italic descenders (f, y, p) and overhangs room to show. */
.tint.hello { padding: 0 .12em .18em; margin: 0 -.12em -.18em; }

/* ————— Trips, Tickets & events, Bookings, Warranties, Accounts ————— */
.record-sub { margin: 26px 0 10px; font-family: var(--display); font-size: 17px; font-weight: 800; color: var(--ink-2); }
.ref-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 9px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 12.5px; }
.ref-chip small { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.ref-chip b { font-size: 13px; font-weight: 700; color: var(--ink); }
.leg-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.leg-extra:empty { display: none; }
.leg-extra .attach-row { margin: 0; }
.leg-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 13px; background: var(--surface); color: var(--p-ink); box-shadow: var(--shadow-sm); }
.leg-icon .pg { width: 24px; height: 24px; }
.leg-main { display: grid; gap: 2px; min-width: 0; }
.leg-main strong { font-size: 15.5px; }
.leg-main > span { font-size: 13px; color: var(--ink-2); }

/* Trips: a card per trip with a passport stamp, legs in order */
.itinerary { display: grid; gap: 16px; }
.trip-card { padding: 20px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); animation: rise .5s var(--spring) both; animation-delay: calc(var(--i, 0) * 50ms); }
.trip-card.is-past { opacity: .72; }
.trip-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.stamp { display: grid; place-items: center; align-content: center; flex: none; width: 84px; height: 84px; border-radius: 50%; color: #3347e6; text-align: center; transform: rotate(-9deg);
  box-shadow: inset 0 0 0 2.5px currentColor, inset 0 0 0 6px #fff, inset 0 0 0 7.5px currentColor; background: #f3f5ff; }
.stamp b { max-width: 70px; font-family: var(--display); font-size: 13px; font-weight: 800; line-height: 1.05; text-transform: uppercase; letter-spacing: .02em; overflow-wrap: anywhere; }
.stamp small { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.trip-card.is-past .stamp { color: var(--ink-3); background: var(--surface-2); }
.trip-title { flex: 1; min-width: 0; }
.trip-title h2 { margin: 0; font-family: var(--display); font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.trip-title span { font-size: 13.5px; color: var(--ink-3); }
.trip-when { padding: 6px 12px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 750; color: var(--ink-3); white-space: nowrap; }
.trip-when.is-soon { background: var(--brand-soft); color: var(--brand-ink); }
.trip-legs { position: relative; display: grid; gap: 8px; margin: 0; padding: 0 0 0 4px; list-style: none; }
.trip-legs::before { content: ""; position: absolute; left: 24px; top: 20px; bottom: 20px; border-left: 2px dashed var(--line-2); }
.leg { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 16px; background: var(--p-bg); cursor: pointer; }
.leg-time { display: grid; justify-items: end; font-size: 13px; }
.leg-time b { font-weight: 750; }
.leg-time span { color: var(--ink-3); }

/* Tickets: stubs with a tear line */
.tickets-view { display: grid; gap: 14px; }
.stub { position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; align-items: stretch; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); cursor: pointer; overflow: hidden; animation: rise .5s var(--spring) both; animation-delay: calc(var(--i, 0) * 50ms); }
.stub-date { display: grid; place-items: center; align-content: center; gap: 2px; padding: 14px 0; background: #ffe1ef; color: #8b2a5a; text-align: center; border-right: 2px dashed rgba(14, 20, 56, .14); }
.stub-date b { font-family: var(--display); font-size: 34px; font-weight: 800; line-height: 1; color: var(--ink); }
.stub-date small { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.stub-main { display: grid; align-content: center; gap: 3px; padding: 14px 18px; min-width: 0; }
.stub-main strong { font-size: 16px; }
.stub-main > span { font-size: 13.5px; color: var(--ink-2); }
.stub-side { display: grid; align-content: center; justify-items: end; gap: 4px; padding: 14px 18px 14px 22px; border-left: 2px dashed var(--line-2); }
.stub-when { font-family: var(--display); font-size: 15px; font-weight: 800; color: #b8396f; white-space: nowrap; }
.stub-from { font-size: 12px; color: var(--ink-3); }
.stub::before, .stub::after { content: ""; position: absolute; left: 83px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); }
.stub::before { top: -9px; } .stub::after { bottom: -9px; }
.stub.is-past { filter: saturate(.3); opacity: .7; }

/* Bookings & appointments: an agenda by day */
.agenda { display: grid; gap: 18px; }
.agenda-day h2 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px; font-family: var(--display); font-size: 17px; }
.agenda-day h2 b { font-weight: 800; }
.agenda-day h2 span { font-size: 13px; font-weight: 700; color: var(--brand-ink); }
.agenda-day.is-past { opacity: .7; }
.agenda-list { display: grid; gap: 8px; }
.agenda-row { display: grid; grid-template-columns: 86px 40px minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--p-bg); cursor: pointer; }
.agenda-time { font-family: var(--display); font-size: 16px; font-weight: 800; color: var(--p-ink); }

/* Warranties: cover left */
.warranty-view .order-grid { margin-bottom: 4px; }
.warranty-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); cursor: pointer; animation: rise .5s var(--spring) both; animation-delay: calc(var(--i, 0) * 40ms); }
.warranty-card.is-expired { opacity: .65; }
.cover-left { display: grid; gap: 6px; }
.cover-left span { font-size: 13.5px; font-weight: 700; }
.cover-left small, .cover-unknown span { font-size: 12.5px; color: var(--ink-3); }
.cover-bar { height: 10px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.cover-bar i { display: block; width: calc(var(--p) * 1%); height: 100%; border-radius: inherit; background: #34c759; }
.is-expired .cover-bar i { background: var(--line-2); }
.cover-unknown { display: grid; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.warranty-pick { justify-self: start; }
.warranty-pick button { height: 28px; padding: 0 12px; font-size: 12.5px; }

/* Where I have accounts */
.accounts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.account-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); cursor: pointer; animation: rise .5s var(--spring) both; animation-delay: calc(min(var(--i, 0), 12) * 30ms); transition: transform .25s var(--spring); }
.account-card:hover { transform: translateY(-2px); }
.account-card.is-retired { opacity: .6; }
.account-top { display: flex; align-items: center; gap: 12px; }
.account-top > div { flex: 1; display: grid; min-width: 0; }
.account-top strong { font-size: 15.5px; }
.account-top div span { font-size: 12.5px; color: var(--ink-3); }
.account-mark { width: 44px; height: 44px; border-radius: 14px; background: var(--p-bg); box-shadow: none; }
.account-address { align-self: flex-start; max-width: 100%; padding: 6px 10px; border-radius: 9px; background: var(--brand-soft); color: var(--brand-ink); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-3); }
.account-latest { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 12px; background: var(--surface-2); text-align: left; font-size: 13px; }
.account-latest span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-latest small { color: var(--ink-3); }
.account-latest.is-security { background: #fff4e5; color: #8a4b00; }
.account-latest .icon { width: 15px; height: 15px; }
@media (max-width: 640px) {
  .leg { grid-template-columns: 40px minmax(0, 1fr); } .leg-time { grid-column: 2; justify-items: start; grid-auto-flow: column; gap: 6px; }
  .stub { grid-template-columns: 76px minmax(0, 1fr); } .stub-side { grid-column: 1 / -1; border-left: 0; border-top: 2px dashed var(--line-2); justify-items: start; grid-auto-flow: column; padding: 10px 14px; }
  .stub::before, .stub::after { left: 67px; }
  .agenda-row { grid-template-columns: 56px 36px minmax(0, 1fr); }
  .trip-head { flex-wrap: wrap; } .stamp { width: 70px; height: 70px; }
}

/* ————— Newsletters: every issue as it was sent ————— */
.issues-top { display: grid; gap: 10px; margin-bottom: 14px; }
.issues-top .back-link { justify-self: start; }
.issues-title { display: flex; align-items: center; gap: 12px; }
.issues-title h1 { margin: 0; font-family: var(--display); font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.issues-count { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.issues-mark { width: 40px; height: 40px; border-radius: 12px; }
.issue-chips { margin-bottom: 14px; }
.issues { border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); overflow: hidden; }
.issues.is-wide { display: grid; grid-template-columns: minmax(280px, 322px) minmax(0, 1fr); }
.issues.is-wide .issue-list { overflow-y: auto; overscroll-behavior: contain; border-right: 1px solid var(--line); }
/* Wide: the filters sit at the top of the list column, and the list scrolls under them. */
.issues.is-wide .issue-col { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.issues.is-wide .issue-col > .issue-chips { flex: none; gap: 4px; margin: 0; padding: 10px; border-bottom: 1px solid var(--line); }
.issues.is-wide .issue-col .filter-chip { height: 30px; padding: 0 9px; gap: 4px; font-size: 12.5px; }
.issues.is-wide .issue-row { gap: 10px; padding: 12px 14px; }
.issues.is-wide .issue-thumb { width: 54px; height: 54px; }
.issues.is-wide .issue-col .nl-pick > span { max-width: 104px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.issues.is-wide .issue-col > .issue-list { flex: 1; min-height: 0; border-right: 0; }
/* Full view: the issue takes the whole window; the list and menus wait behind it. */
.issues.is-full { position: fixed; inset: 0; z-index: 60; height: auto !important; border-radius: 0; grid-template-columns: minmax(0, 1fr); box-shadow: none; }
.issues.is-full .issue-col { display: none; }
html.reading-full { overflow: hidden; }
.issue-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 13px 16px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background-color .15s; }
.issue-row:hover { background: var(--surface-2); }
.issue-row:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--focus); }
.issue-row.is-active { background: var(--brand-soft); }
.issue-avatar { width: 34px; height: 34px; border-radius: 11px; font-size: 14px; }
.issue-text { display: grid; gap: 3px; min-width: 0; }
.issue-line { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.issue-sender { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.issue-when { flex: none; font-size: 12px; color: var(--ink-3); }
.issue-row.is-unread .issue-sender { font-weight: 800; color: var(--ink); }
.issue-row.is-unread .issue-sender::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 6px 1px 0; border-radius: 50%; background: var(--brand); }
.issue-row h3 { margin: 0; font-size: 14.5px; font-weight: 700; line-height: 1.35; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.issue-row.is-unread h3 { color: var(--ink); font-weight: 800; }
.issue-preview { margin: 0; font-size: 13px; line-height: 1.45; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.issue-meta { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.issue-thumb { display: block; width: 60px; height: 60px; overflow: hidden; border-radius: 12px; background: var(--fill); }
.issue-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.issue-older { justify-self: center; margin: 10px auto; display: flex; }
.issue-list .empty { padding: 40px 20px; }
.issue-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); }
.issue-pane-empty { flex: 1; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; color: var(--ink-3); font-size: 14px; }
.issue-pane-empty .icon { width: 30px; height: 30px; }
/* The reading pane: header, optional summary, then the issue filling the rest and scrolling on its own. */
.issue-reader { flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--surface); }
.issue-head { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 18px; border-bottom: 1px solid var(--line); }
/* One line: the subject, then who sent it and when. The full subject is in its tooltip. */
.issue-title { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.issue-title h2 { flex: 0 1 auto; min-width: 0; margin: 0; font-family: var(--display); font-size: 16px; font-weight: 800; line-height: 1.3; letter-spacing: -.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.issue-title p { flex: 0 10 auto; min-width: 60px; margin: 0; font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.issue-tools { display: flex; gap: 4px; }
.issue-images.is-off { color: var(--ink-3); opacity: .55; }
.issue-back { display: none; }
.issue-back .icon { transform: rotate(180deg); }
.issue-reader .reader-nav { margin: 0; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.issue-frame.reader { flex: 1; height: auto; min-height: 0; margin: 0; border-radius: 0; box-shadow: none; }
.story-note-wrap { display: grid; gap: 5px; padding: 12px 18px 8px; background: var(--brand-soft); border-bottom: 1px solid var(--line); }
.story-note-label { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-ink); }
.story-note-label .icon { width: 13px; height: 13px; }
.story-card.story-note { padding: 0; gap: 4px; background: none; box-shadow: none; border-radius: 0; animation: none; }
.story-card.story-note > .story-meta, .story-card.story-note > h3 { display: none; }
.story-card.story-note > p { font-size: 14.5px; line-height: 1.5; color: var(--ink); cursor: pointer; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.story-note-wrap:not(.is-open) .story-card.story-note > :is(.story-why, .story-also) { display: none; }
.story-note-wrap.is-open .story-card.story-note > p { display: block; }
.story-card.story-note .story-actions { margin-top: 0; padding-top: 4px; border-top: 0; }
/* Opened from a story or on a phone: the issue gets nearly the whole screen. */
.sheet:focus { outline: none; }
.sheet.sheet-reader { width: min(1000px, calc(100vw - 48px)); height: 92vh; max-height: 92vh; }
.sheet-reader .sheet-body { display: flex; flex-direction: column; height: 100%; padding: 0; overflow: hidden; }
@media (max-width: 640px) {
  .issues-title h1 { font-size: 26px; }
  .issues { border-radius: 20px; }
  .issue-row { grid-template-columns: 34px minmax(0, 1fr) auto; padding: 12px 14px; }
  .issue-thumb { width: 56px; height: 56px; }
  .sheet.sheet-reader { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .issue-head { padding: 10px 12px calc(10px); padding-top: calc(10px + env(safe-area-inset-top)); gap: 10px; }
  .issue-back { display: inline-grid; }
  .issue-close, .issue-head .issue-avatar { display: none; }
  .issue-title { display: grid; gap: 1px; }
  .issue-title h2 { font-size: 15.5px; }
  .story-note-wrap { padding: 10px 14px 6px; }
  .story-card.story-note .story-rate { font-size: 0; gap: 0; padding: 0 10px; }
}

/* ————— Home ————— */
.home { display: grid; gap: 22px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); gap: 22px; align-items: start; }
.home-main, .home-side { display: grid; gap: 22px; min-width: 0; }
.home-main > .group { margin: 0; }
.group-link { margin: 0 0 0 auto; align-self: center; }
.home-card { padding: 18px 18px 10px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); animation: rise .5s var(--spring) both; }
.home-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 4px 10px; }
.home-card-head h2 { margin: 0; font-family: var(--display); font-size: 21px; font-weight: 800; letter-spacing: -.03em; }
.home-card-head > span { font-size: 13px; color: var(--ink-3); }
.home-card-head .link-btn { margin: 0; }
.coming-group { display: grid; gap: 2px; padding-bottom: 8px; }
.coming-group h3 { margin: 6px 4px 4px; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.coming-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 16px; align-items: center; gap: 12px; width: 100%; padding: 9px 6px; border-radius: 14px; text-align: left; transition: background-color .15s; }
.coming-row:hover { background: var(--surface-2); }
.coming-row:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); }
.coming-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: var(--p-bg); }
.coming-icon .pg { width: 23px; height: 23px; }
.coming-text { display: grid; gap: 2px; min-width: 0; }
.coming-text strong { font-size: 15px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coming-text span { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coming-amount { font-size: 14px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.coming-go { color: var(--ink-3); }
.home-clear { display: flex; align-items: center; gap: 16px; padding: 22px; }
.home-clear h2 { margin: 0 0 4px; font-family: var(--display); font-size: 21px; font-weight: 800; letter-spacing: -.03em; }
.home-clear p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.clear-mark { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: #d9f6e7; color: #16784a; }
.clear-mark .icon { width: 24px; height: 24px; stroke-width: 2.4; }
.home-stories { display: grid; gap: 2px; }
.home-story { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 12px; width: 100%; padding: 9px 6px; border-radius: 14px; text-align: left; transition: background-color .15s; }
.home-story.has-thumb { grid-template-columns: 76px minmax(0, 1fr); }
.home-story:hover { background: var(--surface-2); }
.home-thumb { display: block; width: 76px; aspect-ratio: 8 / 5; overflow: hidden; border-radius: 10px; background: var(--fill); }
.home-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-story-text { display: grid; gap: 3px; min-width: 0; }
.home-story-text strong { font-size: 14.5px; font-weight: 700; line-height: 1.35; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.home-story-text span { font-size: 12.5px; color: var(--ink-3); }
.home-empty { margin: 0 4px 12px; font-size: 14px; color: var(--ink-3); }
.home-issues { display: grid; grid-template-columns: 34px minmax(0, 1fr) 16px; align-items: center; gap: 12px; width: 100%; margin: 8px 0 8px; padding: 12px; border-radius: 16px; background: #fff7dc; text-align: left; --p-ink: #876000; --p-deep: #ffd75e; transition: background-color .15s; }
.home-issues:hover { background: #fff1c2; }
.home-issues .pg { width: 30px; height: 30px; }
.home-issues > span { display: grid; gap: 1px; min-width: 0; }
.home-issues strong { font-size: 14.5px; color: var(--ink); }
.home-issues small { font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-glance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.glance { display: grid; justify-items: start; align-content: start; gap: 1px; min-width: 0; padding: 13px 13px 12px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); text-align: left; transition: transform .25s var(--spring), box-shadow .2s; }
.glance:hover { transform: translateY(-2px); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.glance-icon { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 6px; border-radius: 11px; background: var(--p-bg); }
.glance-icon .pg { width: 21px; height: 21px; }
.glance-label { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.glance strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--display); font-size: 21px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.glance small { font-size: 12px; color: var(--ink-3); }
.home-welcome { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 30px; border-radius: 30px; background: var(--p-bg); }
.home-welcome h2 { margin: 0 0 8px; font-family: var(--display); font-size: 28px; font-weight: 800; letter-spacing: -.035em; }
.home-welcome p { margin: 0 0 18px; max-width: 52ch; font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
.home-welcome .folders { flex: none; transform: scale(.8); }

/* ————— Read: tabs, then the page, issues or newsletters to find ————— */
.page-head.is-compact { margin-bottom: 14px; }
@media (min-width: 821px) { .main.is-read { padding-top: 18px; } .main.is-read.is-fit { padding-bottom: 16px; } }
.read-tabs { position: sticky; top: 0; z-index: 8; display: flex; align-items: center; gap: 6px; margin: 0 -8px 18px; padding: 8px; overflow-x: auto; scrollbar-width: none; transition: background-color .2s; }
/* Clear at rest so it sits on the page itself; frosted only once content scrolls under it. */
.read-tabs.is-stuck { background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px); }
@media (min-width: 821px) {
  .read-tabs { margin: 0 -24px 18px; padding: 8px 24px; }
  .read-tabs.is-stuck { -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
}
.read-tabs::-webkit-scrollbar { display: none; }
.read-tab { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 15px 0 10px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 650; color: var(--ink-2); white-space: nowrap; transition: background-color .15s, color .15s, box-shadow .15s; }
.read-tab:hover:not(.is-active) { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2, var(--line)), var(--shadow-sm); }
.read-tab.is-active { background: var(--ink); color: var(--on-ink); box-shadow: 0 6px 14px -8px rgba(14, 20, 56, .6); }
.read-tab:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); }
.tab-mark { display: grid; place-items: center; width: 24px; height: 28px; color: var(--p-ink, var(--ink-3)); } /* the icon alone, no coloured circle */
.tab-mark .pg { width: 18px; height: 18px; }
.tab-mark .icon { width: 15px; height: 15px; }
.read-tab.is-active .tab-mark { color: inherit; }
.tab-mark.page-mark { width: 24px; height: 28px; border-radius: 999px; box-shadow: none; background: none; }
.read-count { min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 700; }
.read-sep { flex: none; width: 1px; height: 22px; margin: 0 4px; background: var(--line); }
.read-tab.is-add { width: 40px; padding: 0; justify-content: center; color: var(--ink-3); background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); border: 0; }
.read-tab.is-add:hover { color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand); }
.read-lead { margin: -4px 4px 16px; font-size: 14.5px; color: var(--ink-2); }
/* A page inside Read: a slim bar instead of the big cover. */
.page-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 12px 14px 12px 12px; border-radius: 22px; background: var(--p-bg); }
.bar-mark { width: 44px; height: 44px; border-radius: 14px; }
.bar-mark .pg { width: 27px; height: 27px; }
.bar-text { flex: 1; min-width: 0; }
.bar-text h2 { margin: 0; font-family: var(--display); font-size: 20px; font-weight: 800; letter-spacing: -.025em; line-height: 1.2; }
.bar-text p { margin: 2px 0 0; font-size: 13px; color: var(--p-ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.bar-tools .btn-secondary { background: var(--material); }
.bar-tools .tour-again { width: 34px; height: 34px; background: var(--material); }
.records-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -10px 4px 18px; }
.records-bar p { margin: 0; font-size: 14px; color: var(--ink-3); }

@media (max-width: 900px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .home { gap: 16px; }
  .home-grid, .home-main, .home-side { gap: 16px; }
  .home-card { padding: 14px 12px 6px; }
  .home-glance { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .glance { padding: 12px; border-radius: 18px; }
  .glance strong { font-size: 20px; }
  .home-welcome { padding: 22px 20px; border-radius: 24px; }
  .home-welcome .folders { display: none; }
  .home-welcome h2 { font-size: 24px; }
  .read-tabs { top: 57px; margin: 0 -16px 14px; padding: 8px 16px; }
  .read-tab { height: 38px; font-size: 13.5px; }
  .page-bar { flex-wrap: wrap; padding: 12px; }
  .bar-tools { width: 100%; justify-content: flex-start; }
  .bar-tools .layout-switch { flex: 1; overflow-x: auto; }
  .records-bar { margin-top: -6px; }
}
.home-needs { padding: 16px 12px 6px; }
.home-needs .group-head { padding: 0 8px 6px; align-items: center; }
.home-needs .list { background: none; box-shadow: none; border-radius: 0; }
.home-needs .imp-row { border-radius: 14px; }
.home-welcome .row-actions { flex-wrap: wrap; gap: 10px; }
.welcome-list { display: grid; gap: 10px; margin: 0 0 20px; padding: 0; list-style: none; }
.welcome-list li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.issue-chips .filter-chip { height: 30px; padding: 0 12px; font-size: 12.5px; }
/* Held mail in Skraplet's words: a shield, the real sending address, and the sender's own words muted. */
.held-row { align-items: flex-start; }
.held-shield { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: #fff1d6; color: #a15c00; }
.held-row.is-risky .held-shield { background: #ffe4e4; color: #c62b2b; }
.held-shield .icon { width: 21px; height: 21px; stroke-width: 2.2; }
.held-row.is-risky .msg-from { color: #b42323; }
.held-claim { font-size: 13.5px; color: var(--ink); overflow-wrap: anywhere; }
.held-quote { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.held-quote q { font-style: italic; }

/* ————— Home, made to come back to: a sky that follows the time of day ————— */
.home-hero { position: relative; overflow: hidden; display: flex; align-items: center; min-height: 212px; padding: 28px 32px; border-radius: 32px; color: var(--ink);
  --sky-a: #dff0ff; --sky-b: #f4f0ff; --orb: #ffd75e; --orb-glow: rgba(255, 215, 94, .55); --cloud: rgba(255, 255, 255, .75);
  background: radial-gradient(120% 140% at 85% 0%, var(--sky-b), transparent 60%), linear-gradient(160deg, var(--sky-a), var(--sky-b));
  box-shadow: 0 24px 48px -36px rgba(14, 20, 56, .45), inset 0 0 0 1px rgba(255, 255, 255, .6); animation: rise .5s var(--spring) both; }
.home-hero.is-morning { --sky-a: #fff3cf; --sky-b: #ffe2d4; --orb: #ffc94d; --orb-glow: rgba(255, 190, 80, .6); }
.home-hero.is-day { --sky-a: #d8ecff; --sky-b: #eef6ff; --orb: #ffd75e; --orb-glow: rgba(255, 215, 94, .55); }
.home-hero.is-evening { --sky-a: #ffd8c4; --sky-b: #e6dcff; --orb: #ff9a6a; --orb-glow: rgba(255, 140, 100, .55); --cloud: rgba(255, 255, 255, .55); }
.home-hero.is-night { --sky-a: #1c2353; --sky-b: #3a2f6e; --orb: #f6edc9; --orb-glow: rgba(246, 237, 201, .35); --cloud: rgba(255, 255, 255, .14); color: #fff; }
.hero-sky { position: absolute; inset: 0; pointer-events: none; }
/* The sky sits in the right part of the banner, centred top to bottom. */
.sky-orb { position: absolute; right: 140px; top: calc(50% - 56px); width: 112px; height: 112px; border-radius: 50%; background: var(--orb); box-shadow: 0 0 0 16px color-mix(in srgb, var(--orb) 22%, transparent), 0 0 80px 26px var(--orb-glow); }
.is-evening .sky-orb { top: calc(50% - 22px); right: 160px; }
.is-night .sky-orb { top: calc(50% - 46px); width: 92px; height: 92px; box-shadow: inset -22px -9px 0 0 #e6dbb0, 0 0 60px 18px var(--orb-glow); }
.sky-cloud { position: absolute; border-radius: 999px; background: var(--cloud); filter: blur(1px); }
.sky-cloud.is-one { right: 82px; top: calc(50% + 20px); width: 156px; height: 40px; }
.sky-cloud.is-two { right: 292px; top: calc(50% - 44px); width: 100px; height: 26px; opacity: .8; }
.sky-star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: var(--surface); opacity: .8; }
.sky-star.is-1 { right: 72px; top: 36px; } .sky-star.is-2 { right: 300px; top: 42px; } .sky-star.is-3 { right: 340px; top: 146px; }
.sky-star.is-4 { right: 52px; top: 164px; } .sky-star.is-5 { right: 236px; top: 24px; }
.hero-copy { position: relative; z-index: 1; display: grid; align-content: center; gap: 8px; max-width: min(560px, 68%); }
.hero-date { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .65; }
.home-hero h1 { margin: 0; font-family: var(--display); font-size: clamp(30px, 3.6vw, 40px); font-weight: 800; line-height: 1.08; letter-spacing: -.04em; }
.hero-summary { margin: 2px 0 0; font-size: 17px; line-height: 1.5; font-weight: 500; opacity: .85; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hero-quick { height: 38px; padding: 0 15px; border-radius: 999px; background: var(--material); color: var(--ink); font-size: 13.5px; font-weight: 650; box-shadow: 0 1px 2px rgba(14, 20, 56, .06), inset 0 0 0 1px rgba(255, 255, 255, .8); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: transform .2s var(--spring), background-color .2s; }
.hero-quick:hover { background: var(--surface); transform: translateY(-1px); }
.is-night .hero-quick { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.is-night .hero-quick:hover { background: rgba(255, 255, 255, .2); }
/* Cards come in one after another. */
.home-main > *, .home-side > * { animation: rise .55s var(--spring) both; }
.home-main > :nth-child(2), .home-side > :nth-child(1) { animation-delay: .06s; }
.home-side > :nth-child(2) { animation-delay: .12s; } .home-side > :nth-child(3) { animation-delay: .18s; }
/* The week at a glance. */
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 0 0 12px; }
.week-day { display: grid; justify-items: center; gap: 2px; padding: 9px 0 8px; border-radius: 16px; background: var(--surface-2); color: var(--ink-2); transition: background-color .15s, transform .2s var(--spring); }
.week-day:disabled { cursor: default; opacity: .7; }
.week-day.has-items:hover { background: var(--brand-soft); transform: translateY(-1px); }
.week-day .wd { font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.week-day strong { font-family: var(--display); font-size: 19px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.week-day.is-today { background: var(--ink); }
.week-day.is-today .wd, .week-day.is-today strong { color: var(--on-ink); }
.week-dots { display: flex; gap: 3px; height: 6px; }
.week-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--p-deep); }
.week-day.is-today .week-dots i { box-shadow: 0 0 0 1.5px var(--ink); }
.coming-group.is-flash { animation: group-flash 1.6s ease-out; border-radius: 16px; }
@keyframes group-flash { 0%, 30% { background: var(--brand-soft); } 100% { background: transparent; } }
.coming-clear { display: flex; align-items: center; gap: 14px; padding: 6px 4px 14px; }
.coming-clear p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
/* Today's read, like a magazine: the top story large. */
.read-lead-story { display: grid; gap: 6px; width: 100%; padding: 4px 4px 12px; border-radius: 18px; text-align: left; }
.read-lead-story:hover strong { color: var(--brand-ink); }
.lead-thumb { display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; margin-bottom: 6px; border-radius: 16px; background: var(--fill); }
.lead-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.read-lead-story:hover .lead-thumb img { transform: scale(1.03); }
.lead-thumb.is-blank { display: grid; place-items: center; background: var(--p-bg); }
.lead-thumb.is-blank .pg { width: 48px; height: 48px; }
.lead-kicker { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-ink); }
.read-lead-story strong { font-family: var(--display); font-size: 20px; font-weight: 800; line-height: 1.22; letter-spacing: -.02em; color: var(--ink); transition: color .15s; }
.lead-lede { font-size: 14px; line-height: 1.5; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lead-src { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.home-read .home-stories { border-top: 1px solid var(--line); padding-top: 6px; }
/* Kept private: what Skraplet did this month. */
.privacy-head { display: flex; align-items: center; gap: 12px; padding: 2px 4px 12px; }
.privacy-head h2 { margin: 0; font-family: var(--display); font-size: 21px; font-weight: 800; letter-spacing: -.03em; }
.privacy-head span:not(.privacy-shield) { font-size: 13px; color: var(--ink-3); }
.privacy-shield { position: relative; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: #d9f6e7; color: #16784a; }
.privacy-shield .icon { width: 24px; height: 24px; stroke-width: 2.2; }
.private-fact { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 12px; width: 100%; padding: 8px 6px; border-radius: 14px; text-align: left; font-size: 14px; line-height: 1.4; color: var(--ink-2); transition: background-color .15s; }
.private-fact:hover { background: var(--material); }
.private-fact .icon { width: 19px; height: 19px; color: var(--p-ink); }
.private-fact strong { font-family: var(--display); font-size: 18px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.private-fact + .private-fact { margin-top: 2px; }
.home-card.privacy-card { padding-bottom: 12px; }
/* Money: one line that matters. */
.money-card { display: grid; grid-template-columns: 40px minmax(0, 1fr) 16px; align-items: center; gap: 14px; width: 100%; padding: 16px 18px; text-align: left; transition: transform .25s var(--spring), box-shadow .2s; }
.money-card:hover { transform: translateY(-2px); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.money-text { display: grid; gap: 1px; min-width: 0; }
.money-label { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.money-text strong { font-family: var(--display); font-size: 24px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.money-text strong small { font-family: var(--font); font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--ink-3); }
.money-next { font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.home-welcome { background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
@media (prefers-reduced-motion: reduce) {
}
@media (max-width: 640px) {
  .home-hero { min-height: 0; padding: 22px 20px 20px; border-radius: 26px; }
  .hero-copy { max-width: 100%; }
  .home-hero h1 { font-size: 28px; padding-right: 64px; }
  .hero-summary { font-size: 15.5px; }
  .sky-orb { right: 18px; top: 22px; width: 48px; height: 48px; box-shadow: 0 0 0 10px color-mix(in srgb, var(--orb) 22%, transparent), 0 0 50px 16px var(--orb-glow); }
  .is-evening .sky-orb { top: 40px; right: 26px; }
  .is-night .sky-orb { top: 22px; width: 40px; height: 40px; box-shadow: inset -10px -4px 0 0 #e6dbb0, 0 0 40px 12px var(--orb-glow); }
  .sky-cloud.is-one { right: -20px; top: 66px; width: 96px; height: 26px; }
  .sky-cloud.is-two, .sky-star.is-2, .sky-star.is-3, .sky-star.is-5 { display: none; }
  .sky-star.is-1 { right: 84px; top: 18px; } .sky-star.is-4 { right: 14px; top: 92px; }
  .hero-actions { margin-top: 8px; }
  .hero-quick { height: 36px; padding: 0 13px; font-size: 13px; }
  .week-strip { gap: 4px; }
  .week-day { padding: 8px 0 7px; border-radius: 13px; }
  .week-day strong { font-size: 17px; }
  .read-lead-story strong { font-size: 18px; }
}
/* Read: your newsletters two ways. */
.read-switch { flex: none; display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.read-switch button { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--ink-2); white-space: nowrap; transition: background-color .2s, color .2s, box-shadow .2s; }
.read-switch button:hover:not(.is-active) { color: var(--ink); background: var(--fill-2, var(--fill)); }
.read-switch button.is-active { background: var(--ink); color: var(--on-ink); box-shadow: 0 6px 14px -8px rgba(14, 20, 56, .6); }
.read-switch button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); }
.read-switch.is-idle button { color: var(--ink-2); }
.read-switch .read-count { min-width: 19px; height: 19px; font-size: 11px; }
.read-switch button.is-active .read-count { background: var(--surface); color: var(--ink); }
@media (max-width: 640px) { .read-switch button { height: 32px; padding: 0 13px; font-size: 13.5px; } }
.list.own-page { margin-top: 12px; }

/* ————— Dark theme (the app only; chosen in Settings, or following the device) ————— */
[data-theme="dark"] body.page-app {
  color-scheme: dark;
  --bg: #0e1223; --surface: #171c31; --surface-2: #1e2440; --material: rgba(23, 28, 49, .82); --glass: rgba(14, 18, 35, .86); --on-ink: #0e1223;
  --ink: #eceffa; --ink-2: #b2b8d2; --ink-3: #7f86a5;
  --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .14); --fill: rgba(255, 255, 255, .07); --fill-2: rgba(255, 255, 255, .04); --fill-hover: rgba(255, 255, 255, .1);
  --brand: #7183ff; --brand-ink: #a2adff; --brand-soft: rgba(113, 131, 255, .18); --focus: rgba(113, 131, 255, .45);
  --green: #55d696; --green-soft: rgba(85, 214, 150, .14); --orange: #ffb661; --orange-soft: rgba(255, 182, 97, .14);
  --red: #ff6f7c; --red-soft: rgba(255, 111, 124, .15); --blue: #7eabff; --blue-soft: rgba(126, 171, 255, .15); --gray: #a3a9c4; --gray-soft: rgba(255, 255, 255, .08);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35), 0 2px 8px rgba(0, 0, 0, .2);
  --shadow: 0 2px 6px rgba(0, 0, 0, .35), 0 12px 32px rgba(0, 0, 0, .35);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, .45), 0 30px 80px rgba(0, 0, 0, .5);
}
[data-theme="dark"] .page-app .pastel-sky    { --p-bg: #1b2c48; --p-ink: #9cc8ff; --p-deep: #3b67a3; }
[data-theme="dark"] .page-app .pastel-lilac  { --p-bg: #29224e; --p-ink: #c4b5ff; --p-deep: #6853c4; }
[data-theme="dark"] .page-app .pastel-pink   { --p-bg: #3b1f33; --p-ink: #ff9fc8; --p-deep: #a3416c; }
[data-theme="dark"] .page-app .pastel-butter { --p-bg: #372e17; --p-ink: #ffd86c; --p-deep: #9c771b; }
[data-theme="dark"] .page-app .pastel-mint   { --p-bg: #163528; --p-ink: #80e1b1; --p-deep: #2d855b; }
[data-theme="dark"] .page-app .pastel-peach  { --p-bg: #3b2519; --p-ink: #ffb78c; --p-deep: #a35629; }
[data-theme="dark"] .page-app .pastel-gray   { --p-bg: #232838; --p-ink: #a3a9c4; --p-deep: #4a5068; }
[data-theme="dark"] .page-app .stat:nth-child(2) { --p-bg: #163528; --p-ink: #80e1b1; }
[data-theme="dark"] .page-app .stat:nth-child(3) { --p-bg: #29224e; --p-ink: #c4b5ff; }
/* Switches in dark: a light track edge and a light knob, so "off" is still visible. */
[data-theme="dark"] .page-app .switch input:not(:checked) + span { background: rgba(255, 255, 255, .16); }
[data-theme="dark"] .page-app .switch span::after { background: #f4f5fb; }
[data-theme="dark"] .page-app .stat:nth-child(1) { --p-bg: #1b2c48; --p-ink: #9cc8ff; }
[data-theme="dark"] .page-app .bg-accent, [data-theme="dark"] .page-app .bg-blue { background: #1b2c48; color: #9cc8ff; }
[data-theme="dark"] .page-app .bg-indigo { background: #29224e; color: #c4b5ff; }
[data-theme="dark"] .page-app .bg-green { background: #163528; color: #80e1b1; }
[data-theme="dark"] .page-app .bg-orange { background: #372e17; color: #ffd86c; }
[data-theme="dark"] .page-app .bg-red { background: #3d1c22; color: #ff8f99; }
[data-theme="dark"] .page-app .bg-gray { background: #232838; color: #a3a9c4; }
[data-theme="dark"] .page-app .fact:nth-child(1) { background: #1b2c48; } [data-theme="dark"] .page-app .fact:nth-child(2) { background: #372e17; } [data-theme="dark"] .page-app .fact:nth-child(3) { background: #163528; } [data-theme="dark"] .page-app .fact:nth-child(4) { background: #29224e; }
[data-theme="dark"] .page-app .btn-primary:hover:not(:disabled) { background: #ffffff; }
[data-theme="dark"] .page-app .sheet::backdrop { background: rgba(0, 0, 0, .55); }
[data-theme="dark"] .page-app .skeleton div { background: linear-gradient(90deg, rgba(255, 255, 255, .04) 0%, rgba(255, 255, 255, .08) 50%, rgba(255, 255, 255, .04) 100%); background-size: 200% 100%; }
[data-theme="dark"] .page-app mark, [data-theme="dark"] .page-app .star-btn.is-on, [data-theme="dark"] .page-app .star-toggle.is-on, [data-theme="dark"] .page-app .clip-badge.is-worth, [data-theme="dark"] .page-app .page-link, [data-theme="dark"] .page-app .codes { background: #372e17; color: #ffd86c; }
[data-theme="dark"] .page-app .tag.is-warn { color: #ffd86c; }
[data-theme="dark"] .page-app .filter-chip.is-warn:not(.is-active) { color: #ffd86c; background: #2c2514; box-shadow: inset 0 0 0 1px #5b4a1c; }
[data-theme="dark"] .page-app .filter-chip.is-warn:not(.is-active) .filter-count { background: #5b4a1c; }
[data-theme="dark"] .page-app .row.msg.is-held { background: #2a2316; }
[data-theme="dark"] .page-app .story-card.discovery { background: #2a2316; box-shadow: var(--shadow-sm), inset 0 0 0 1px #4d4020; }
[data-theme="dark"] .page-app .so-far { background: #211e17; box-shadow: var(--shadow-sm), inset 0 0 0 1px #3e3622; }
[data-theme="dark"] .page-app .so-far::before { background: rgba(255, 215, 94, .3); }
[data-theme="dark"] .page-app .so-far-label { color: #ffb78c; }
[data-theme="dark"] .page-app .so-far-foot { border-top-color: #3e3622; }
[data-theme="dark"] .page-app .so-far-lines i, [data-theme="dark"] .page-app .designing-lines i { background: linear-gradient(90deg, #2a2619 0%, #3a3422 50%, #2a2619 100%); background-size: 200% 100%; }
[data-theme="dark"] .page-app .designing-cover { background: linear-gradient(120deg, #1b2c48, #29224e, #3b1f33, #372e17, #163528); }
[data-theme="dark"] .page-app .fp-card.is-note { background: #2a2316; box-shadow: var(--shadow-sm), inset 0 0 0 1px #4d4020; }
[data-theme="dark"] .page-app .fp-section.is-worth .fp-card { background: #2a2316; }
[data-theme="dark"] .page-app .sticker.is-up { background: rgba(255, 182, 97, .16); color: #ffb661; }
[data-theme="dark"] .page-app .clear-mark, [data-theme="dark"] .page-app .privacy-shield { background: #163528; color: #80e1b1; }
[data-theme="dark"] .page-app .home-issues { background: #2c2514; --p-ink: #ffd86c; --p-deep: #9c771b; }
[data-theme="dark"] .page-app .home-issues:hover { background: #372e17; }
[data-theme="dark"] .page-app .held-shield { background: #33281a; color: #ffb661; }
[data-theme="dark"] .page-app .held-row.is-risky .held-shield { background: #3d1c22; color: #ff8f99; }
[data-theme="dark"] .page-app .held-row.is-risky .msg-from { color: #ff8f99; }
[data-theme="dark"] .page-app .story-note-wrap { background: rgba(113, 131, 255, .14); }
[data-theme="dark"] .page-app .story-card.story-note { background: none; }
[data-theme="dark"] .page-app .page-bar { background: var(--p-bg); }
[data-theme="dark"] .page-app .home-welcome { background: var(--surface); }
[data-theme="dark"] .page-app .reader, [data-theme="dark"] .page-app .issue-pane, [data-theme="dark"] .page-app .issue-reader { background: var(--surface); }
/* The day banner keeps its time of day, in deeper colours. */
[data-theme="dark"] .page-app .home-hero { color: #fff; box-shadow: 0 24px 48px -36px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(255, 255, 255, .06); --cloud: rgba(255, 255, 255, .2); }
[data-theme="dark"] .page-app .home-hero.is-night { --cloud: rgba(255, 255, 255, .14); }
[data-theme="dark"] .page-app .home-hero.is-morning { --sky-a: #3a2a1d; --sky-b: #3b2433; --orb: #ffc24d; --orb-glow: rgba(255, 180, 70, .35); }
[data-theme="dark"] .page-app .home-hero.is-day { --sky-a: #142c4c; --sky-b: #1d2552; --orb: #ffd75e; --orb-glow: rgba(255, 215, 94, .3); }
[data-theme="dark"] .page-app .home-hero.is-evening { --sky-a: #3b2131; --sky-b: #272554; --orb: #ff9068; --orb-glow: rgba(255, 140, 100, .35); }
[data-theme="dark"] .page-app .home-hero .hero-quick { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
[data-theme="dark"] .page-app .home-hero .hero-quick:hover { background: rgba(255, 255, 255, .2); }
/* Text on the brand gradient and other always-dark surfaces stays white. */
[data-theme="dark"] .page-app .week-day.is-today .week-dots i { box-shadow: 0 0 0 1.5px var(--ink); }
[data-theme="dark"] body.page-app { background: var(--bg); }
[data-theme="dark"] .page-app .cover-paper { background-color: #2a3150; background-image: repeating-linear-gradient(transparent 0 13px, rgba(255, 255, 255, .06) 13px 14px); }
[data-theme="dark"] .page-app .cover-paper.is-back { background-color: #232a45; }
[data-theme="dark"] .page-app .page-hero::after { background: rgba(255, 255, 255, .05); }
/* Home: reading gets the wide column. The top story sits beside its picture; on phones, Coming up comes first. */
.read-lead-story.has-thumb { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 18px; }
.read-lead-story.has-thumb .lead-thumb { margin: 0; }
.lead-text { display: grid; gap: 6px; min-width: 0; }
.home-main .home-stories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
.home-side .coming-row { grid-template-columns: 36px minmax(0, 1fr) auto 14px; gap: 10px; }
.home-side .coming-icon { width: 36px; height: 36px; border-radius: 12px; }
.home-side .week-strip { gap: 4px; }
.home-side .week-day { padding: 8px 0 7px; border-radius: 13px; }
.home-side .week-day strong { font-size: 17px; }
@media (max-width: 900px) {
  .home-grid { display: flex; flex-direction: column; }
  .home-main, .home-side { display: contents; }
  .home-coming { order: 1; } .home-news { order: 2; } .privacy-card { order: 3; } .money-card { order: 4; }
}
@media (max-width: 640px) {
  .read-lead-story.has-thumb { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .read-lead-story.has-thumb .lead-thumb { margin-bottom: 6px; }
  .home-main .home-stories { grid-template-columns: minmax(0, 1fr); }
}
.week-day.is-today:disabled { opacity: 1; }
/* Home's stories: the day's news in the wide column, like a front page. */
.home-news { display: grid; gap: 0; min-width: 0; animation: rise .55s var(--spring) both; }
.news-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 2px 4px 12px; }
.news-head h2 { margin: 0; font-family: var(--display); font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.news-head p { margin: 2px 0 0; font-size: 13px; color: var(--ink-3); }
.news-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.news-issues { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px 0 8px; border-radius: 999px; background: #fff7dc; color: #6b4d00; font-size: 13px; font-weight: 700; --p-ink: #876000; --p-deep: #ffd75e; transition: background-color .15s; }
.news-issues:hover { background: #fff1c2; }
.news-issues .pg { width: 20px; height: 20px; }
[data-theme="dark"] .page-app .news-issues { background: #2c2514; color: #ffd86c; --p-ink: #ffd86c; --p-deep: #9c771b; }
.home-news .day-bar { margin-bottom: 16px; }
.home-news .so-far { margin-top: 10px; }
.home-news .front { gap: 24px; }
/* The column is narrower than Read's was: smaller pictures, and figures under the text. */
@media (min-width: 641px) {
  .home-main .fp-row { grid-template-columns: minmax(0, 1fr); gap: 6px 16px; padding: 16px 18px 14px; }
  .home-main .fp-row.has-thumb { grid-template-columns: 128px minmax(0, 1fr); }
  .home-main .fp-row .fp-figure { grid-column: -2 / -1; justify-self: start; width: auto; display: flex; align-items: baseline; gap: 8px; padding: 8px 12px; }
  .home-main .fp-row .fp-figure strong { font-size: 19px; flex: none; }
  .home-main .fp-card.is-lead.has-thumb { grid-template-columns: minmax(0, 1fr) minmax(200px, 40%); gap: 20px; padding: 22px 22px 20px; }
  .home-main .fp-card.is-lead h3 { font-size: clamp(22px, 2.4vw, 28px); }
}
.coming-more { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; margin: 2px 0 8px; padding: 9px; border-radius: 12px; font-size: 13.5px; font-weight: 700; color: var(--brand-ink); transition: background-color .15s; }
.coming-more:hover { background: var(--brand-soft); }
@media (max-width: 640px) {
  .news-head h2 { font-size: 22px; }
  .home-main .fp-card.is-lead.has-thumb { grid-template-columns: minmax(0, 1fr); }
}
/* Home: today's newsletters, each issue as sent: its picture, its subject, its own headlines. */
.nl-issues { display: grid; gap: 12px; }
.nl-issue { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 16px 18px 15px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); cursor: pointer; text-align: left;
  transition: transform .25s var(--spring), box-shadow .2s; animation: rise .5s var(--spring) both; animation-delay: calc(var(--i, 0) * 45ms); }
.nl-issue:hover { transform: translateY(-1px); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.nl-issue:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--focus); }
.nl-issue.has-thumb { grid-template-columns: minmax(0, 1fr) 132px; grid-template-areas: "top thumb" "subject thumb" "preview thumb"; column-gap: 18px; align-items: start; }
.nl-issue-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nl-issue.has-thumb .nl-issue-top { grid-area: top; } .nl-issue.has-thumb .nl-issue-subject { grid-area: subject; }
.nl-issue.has-thumb .nl-issue-preview { grid-area: preview; }
.nl-issue-thumb { grid-area: thumb; display: block; width: 132px; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 14px; background: var(--fill); }
.nl-issue-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nl-issue-logo { flex: none; width: 30px; height: 30px; border-radius: 9px; font-size: 13px; }
.nl-issue-logo.is-image { display: grid; place-items: center; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.nl-issue-logo.is-image img { width: 80%; height: 80%; object-fit: contain; }
.nl-issue-who { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex: 1; }
.nl-issue-who strong { font-size: 14px; font-weight: 750; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nl-issue-who span { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.nl-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.nl-issue-subject { margin: 2px 0 0; font-family: var(--display); font-size: 19px; font-weight: 800; line-height: 1.25; letter-spacing: -.02em; color: var(--ink); text-wrap: pretty; }
.nl-issue:not(.is-unread) .nl-issue-subject { font-weight: 700; color: var(--ink-2); }
.nl-heads { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; }
.nl-heads button { display: flex; gap: 10px; width: 100%; padding: 5px 0; text-align: left; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); border-radius: 8px; transition: color .15s; }
.nl-heads button::before { content: ""; flex: none; width: 5px; height: 5px; margin-top: .62em; border-radius: 50%; background: var(--p-deep, #c6cad8); }
.nl-heads button:hover { color: var(--brand-ink); }
.nl-heads button:hover span { text-decoration: underline; text-decoration-color: var(--brand-soft); text-underline-offset: 3px; }
.nl-heads button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus); }
.nl-more { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.nl-earlier { display: grid; grid-template-columns: 30px minmax(0, 1fr) 16px; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: #fff7dc; text-align: left; font-size: 14px; font-weight: 700; color: var(--ink); --p-ink: #876000; --p-deep: #ffd75e; transition: background-color .15s; }
.nl-earlier:hover { background: #fff1c2; }
.nl-earlier .pg { width: 26px; height: 26px; }
.nl-none { display: flex; align-items: center; gap: 14px; padding: 18px; flex-wrap: wrap; }
.nl-none > div { flex: 1; min-width: 200px; }
.nl-none strong { font-size: 15px; }
.nl-none p { margin: 2px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
[data-theme="dark"] .page-app .nl-earlier { background: #2c2514; --p-ink: #ffd86c; --p-deep: #9c771b; }
[data-theme="dark"] .page-app .nl-earlier:hover { background: #372e17; }
[data-theme="dark"] .page-app .nl-issue-logo.is-image { background: #f4f5fa; }
@media (max-width: 640px) {
  .nl-issue { padding: 14px 14px 13px; border-radius: 20px; }
  .nl-issue.has-thumb { grid-template-columns: minmax(0, 1fr) 84px; grid-template-areas: "top top" "subject thumb" "heads heads" "more more"; column-gap: 12px; }
  .nl-issue-thumb { width: 84px; border-radius: 12px; }
  .nl-issue-subject { font-size: 17px; }
  .nl-heads button { font-size: 14px; }
}
.nl-issue { gap: 5px; }
.nl-issue-from { font-size: 14px; font-weight: 750; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nl-issue-when { flex: none; margin-left: auto; font-size: 12.5px; color: var(--ink-3); }
.nl-issue:not(.is-unread) .nl-issue-from { font-weight: 600; color: var(--ink-2); }
.nl-issue-subject { font-size: 18px; }
.nl-issue-preview { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nl-day { margin: 8px 6px 2px; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.nl-day:first-child { margin-top: 0; }
.nl-show-more { margin-top: 2px; }
.issue-row { grid-template-columns: minmax(0, 1fr) auto; }
@media (max-width: 640px) {
  .nl-issue.has-thumb { grid-template-columns: minmax(0, 1fr) 84px; grid-template-areas: "top top" "subject thumb" "preview thumb"; }
  .nl-issue-subject { font-size: 16.5px; }
}
/* Read → Issues: one button picks the newsletter. */
.nl-pick { gap: 6px; padding-right: 10px; max-width: 260px; }
.nl-pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nl-pick-chevron { width: 14px !important; height: 14px !important; transform: rotate(90deg); opacity: .7; }
.nl-pick-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; }
.nl-pick-row .row-main { flex: 1; min-width: 0; }
.nl-pick-row.is-on .row-title { color: var(--brand-ink); font-weight: 700; }
.nl-pick-row > .icon { color: var(--brand-ink); }
.nl-pick-row .filter-count { width: auto; min-width: 0; padding: 0 8px; font-weight: 700; color: var(--brand-ink); background: var(--brand-soft); }
.nl-pick-find { margin: 14px 0 10px; }
/* The side menu, folded to icons. */
/* The fold button sits beside the logo, icon only. Collapsed, it stacks under the mark. */
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px 24px 10px; }
.side-head > .brand { min-width: 0; }
.side-toggle { flex: none; }
.side-toggle:hover { background: var(--fill); color: var(--ink); }
.side-toggle .icon { width: 20px; height: 20px; }
[data-sidebar="collapsed"] .app { grid-template-columns: 76px minmax(0, 1fr); }
[data-sidebar="collapsed"] .sidebar { padding: 20px 10px 14px; align-items: center; }
[data-sidebar="collapsed"] .side-head { flex-direction: column; gap: 10px; padding: 2px 0 18px; }
[data-sidebar="collapsed"] .side-head > .brand { gap: 0; }
[data-sidebar="collapsed"] .side-head > .brand span { display: none; }
[data-sidebar="collapsed"] .side-nav { justify-items: center; }
[data-sidebar="collapsed"] .nav-item { position: relative; width: 48px; padding: 0; justify-content: center; }
[data-sidebar="collapsed"] .nav-item > span:not(.nav-badge) { display: none; }
[data-sidebar="collapsed"] .nav-item .nav-badge { position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; font-size: 10px; }
[data-sidebar="collapsed"] .nav-sep { width: 32px; margin: 8px auto; }
[data-sidebar="collapsed"] .side-toggle .icon { transform: scaleX(-1); }
[data-sidebar="collapsed"] .side-foot { flex-direction: column; gap: 8px; padding: 12px 0 4px; }
[data-sidebar="collapsed"] .side-account { display: none; }
/* Saving while reading: a highlight, or the whole issue. */
.issue-reader { position: relative; }
.snip-bar { position: absolute; left: 50%; bottom: 18px; z-index: 5; transform: translateX(-50%); animation: rise .3s var(--spring) both; }
.snip-bar .btn { box-shadow: var(--shadow-lg); }
.snip-bar[hidden] { display: none; }
.issue-save.is-on { color: #d99a00; }
.issue-save.is-on .icon { fill: currentColor; }
[data-theme="dark"] .page-app .issue-save.is-on { color: #ffd86c; }
@media (max-width: 640px) { .snip-bar { bottom: calc(14px + env(safe-area-inset-bottom)); } }
/* Dark versions of the parts that have their own light colours. */
[data-theme="dark"] .page-app .clip.is-quote { background: #241e44; }
[data-theme="dark"] .page-app .quote-mark { color: #8c78e8; }
[data-theme="dark"] .page-app .quote-by { color: #c4b5ff; }
[data-theme="dark"] .page-app .clip.is-note { background: #322a16; box-shadow: 0 12px 20px -14px rgba(0, 0, 0, .6); }
[data-theme="dark"] .page-app .clip.is-note:nth-child(4n) { background: #16322a; box-shadow: 0 12px 20px -14px rgba(0, 0, 0, .6); }
[data-theme="dark"] .page-app .key-points { background: #2a2416; box-shadow: inset 3px 0 0 #9c771b; }
[data-theme="dark"] .page-app .code-block.is-large, [data-theme="dark"] .page-app .spend-tile.is-main { background: #29224e; }
[data-theme="dark"] .page-app .held-box { background: #2a2416; box-shadow: inset 0 0 0 1px #5b4a1c; }
[data-theme="dark"] .page-app .suggest-card { background: #2a2416; box-shadow: 0 12px 22px -16px rgba(0, 0, 0, .6), inset 0 0 0 1px #4d4020; }
[data-theme="dark"] .page-app .suggest-card:nth-child(even) { background: #182844; box-shadow: 0 12px 22px -16px rgba(0, 0, 0, .6), inset 0 0 0 1px #2a4470; }
[data-theme="dark"] .page-app .bar i { background: #4a3f8a; }
[data-theme="dark"] .page-app .cover.is-today .cover-body { background: var(--p-bg); }
[data-theme="dark"] .page-app .duo-link span { background: #372e17; color: #ffd86c; }
[data-theme="dark"] .page-app .figure.is-hero { background: var(--p-bg); }
[data-theme="dark"] .page-app .attach-ext, [data-theme="dark"] .page-app .sticker.is-trial { background: #3d1c22; color: #ff8f99; }
[data-theme="dark"] .page-app .wcard { background: var(--p-bg); }
[data-theme="dark"] .page-app .wcard::after { background: rgba(255, 255, 255, .05); }
[data-theme="dark"] .page-app .stamp { color: #a2adff; background: #1e2550; box-shadow: inset 0 0 0 2.5px currentColor, inset 0 0 0 6px #1e2550, inset 0 0 0 7.5px currentColor; }
[data-theme="dark"] .page-app .stub-date { background: #3b1f33; color: #ff9fc8; border-right-color: rgba(255, 255, 255, .14); }
[data-theme="dark"] .page-app .account-latest.is-security { background: #33281a; color: #ffb661; }
[data-theme="dark"] .page-app .news-issues:hover { background: #372e17; }
/* With the menu folded, the page may use the room it frees (reading most of all). */
[data-sidebar="collapsed"] .main { max-width: 1480px; }
/* A highlight's links, on its quote card. */
.quote-links { display: flex; flex-wrap: wrap; gap: 6px; }
.quote-link { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; height: 28px; padding: 0 10px; border-radius: 999px; background: var(--material); color: var(--brand-ink); font-size: 12.5px; font-weight: 700; text-decoration: none; box-shadow: inset 0 0 0 1px var(--line); }
.quote-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote-link:hover { background: var(--surface); }
.quote-link .icon { flex: none; width: 13px; height: 13px; }

/* Clipped pictures: on the Clippings board, and the picker over an issue. */
.clip.is-quote .quote-pics { display: grid; gap: 6px; margin: -4px -4px 12px; }
.clip.is-quote .quote-pics.is-many { grid-template-columns: 1fr 1fr; }
.clip.is-quote .quote-pics img { display: block; width: 100%; max-height: 320px; object-fit: cover; border-radius: 12px; background: var(--fill); }
.clip.is-quote .quote-pics.is-many img { aspect-ratio: 1; max-height: none; }
.clip.is-quote .quote-text.is-small { font-size: 15px; }
.clip.is-quote .quote-caption { margin: 0 0 8px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.issue-reader .pic-pick { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; background: var(--surface); animation: fade .2s var(--ease); }
.pic-pick-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.pic-pick-head > div { display: grid; gap: 2px; }
.pic-pick-head strong { font-size: 15px; }
.pic-pick-head span { font-size: 13px; color: var(--ink-3); }
.pic-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); align-content: start; gap: 10px; padding: 16px 18px 24px; }
.pic-tile { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: 14px; background: var(--fill); box-shadow: inset 0 0 0 1px var(--line); transition: transform .15s var(--ease), box-shadow .15s; }
.pic-tile:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 2px var(--brand); }
.pic-tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pic-saved { position: absolute; left: 8px; bottom: 8px; display: none; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(14, 20, 56, .78); }
.pic-tile.is-saved .pic-saved { display: inline-flex; }
.pic-tile.is-saved { box-shadow: inset 0 0 0 3px var(--brand); }
.pic-none { margin: 0; padding: 40px 20px; text-align: center; color: var(--ink-3); font-size: 14px; }
@media (max-width: 640px) { .pic-grid { grid-template-columns: repeat(2, 1fr); padding: 12px; } }

/* ————— Welcome tour (first run, and from Settings) ————— */
html.welcome-open { overflow: hidden; }
.welcome { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 20px; background: rgba(14, 20, 56, .42); -webkit-backdrop-filter: blur(10px) saturate(140%); backdrop-filter: blur(10px) saturate(140%); animation: fade .25s var(--ease); }
.welcome.is-leaving { opacity: 0; transition: opacity .2s var(--ease); }
.welcome-card { position: relative; display: flex; flex-direction: column; width: min(1040px, 100%); height: min(660px, calc(100dvh - 40px)); overflow: hidden; border-radius: 30px; background: var(--bg); box-shadow: var(--shadow-lg); outline: none; animation: welcome-in .45s var(--spring); }
@keyframes welcome-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.welcome-card.is-intro { background: var(--bg); }
.welcome-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 0; min-height: 52px; }
.welcome-dots { display: flex; gap: 6px; }
.welcome-dots i { width: 7px; height: 7px; border-radius: 999px; background: var(--line-2); transition: width .3s var(--spring), background-color .3s; }
.welcome-dots i.is-done { background: color-mix(in srgb, var(--brand) 45%, transparent); }
.welcome-dots i.is-on { width: 22px; background: var(--brand); }
.welcome-skip { padding: 6px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--ink-3); transition: background-color .2s, color .2s; }
.welcome-skip:hover { background: var(--fill); color: var(--ink); }
.welcome-body { flex: 1; min-height: 0; overflow-y: auto; display: grid; gap: 34px; align-items: center; padding: 8px 44px 20px; }
.welcome-body.has-demo { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); grid-template-rows: 1fr auto 1fr; grid-template-areas: "lead demo" "more demo" "rest demo"; row-gap: 14px; }
.welcome-body.has-demo > .is-lead { grid-area: lead; align-self: end; }
.welcome-body.has-demo > .is-more { grid-area: more; align-self: start; }
.welcome-body.has-demo > .welcome-demo { grid-area: demo; }
.welcome-body.is-solo { justify-items: center; text-align: center; }
.welcome-body.is-solo .welcome-copy { max-width: 600px; }
.welcome-copy { display: grid; gap: 14px; align-content: center; animation: welcome-step .45s var(--spring) both; }
@keyframes welcome-step { from { opacity: 0; transform: translateX(12px); } }
.welcome-copy h2 { margin: 0; font-family: var(--display); font-size: clamp(28px, 3.4vw, 38px); line-height: 1.08; font-weight: 800; letter-spacing: -.04em; text-wrap: balance; }
.welcome-copy > p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.welcome-kicker { justify-self: start; display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 6px; border-radius: 999px; background: var(--p-bg); color: var(--p-ink); font-size: 12.5px; font-weight: 800; letter-spacing: .02em; }
.welcome-kicker .pg { width: 18px; height: 18px; }
.welcome-try { display: inline-flex; justify-self: start; padding: 7px 12px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink) !important; font-size: 13.5px !important; font-weight: 600; }
.welcome-ask { display: grid; gap: 2px; margin-top: 10px; }
.welcome-ask strong { font-size: 17px; }
.welcome-ask span { font-size: 14px; color: var(--ink-3); }
.welcome-uses { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 4px; }
.welcome-use { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); font-size: 14.5px; font-weight: 650; color: var(--ink); transition: transform .2s var(--spring), box-shadow .2s, background-color .2s; }
.welcome-use:hover { transform: translateY(-2px); }
.welcome-use-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--p-bg); color: var(--p-ink); }
.welcome-use-icon .pg { width: 19px; height: 19px; }
.welcome-use-tick { display: grid; place-items: center; width: 0; overflow: hidden; height: 20px; border-radius: 50%; background: var(--p-ink); color: var(--surface); transition: width .25s var(--spring), margin .25s; }
.welcome-use.is-on { background: var(--p-bg); box-shadow: inset 0 0 0 2px var(--p-ink); }
.welcome-use.is-on .welcome-use-tick { width: 20px; margin-left: 2px; }
.welcome-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px 20px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); }
.welcome-card.is-intro .welcome-foot { border-top: 0; justify-content: center; background: none; }
.welcome-card.is-intro .welcome-foot > span:first-child { display: none; }
.welcome-foot .btn-primary .icon { order: 2; }
.welcome-demo { position: relative; display: grid; align-content: center; min-height: 100%; padding: 30px 26px; border-radius: 26px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); animation: welcome-step .5s .05s var(--spring) both; }
.welcome-example { position: absolute; top: 12px; right: 14px; padding: 2px 9px; border-radius: 999px; background: var(--fill); font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.welcome-again { font-size: 13.5px !important; color: var(--ink-3) !important; }
.welcome-note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 14px; border-radius: 14px; background: var(--orange-soft); color: var(--orange) !important; font-size: 14px !important; }

/* Private address example: a made-up sign-up page */
.w-site { overflow: hidden; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.w-site-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.w-site-bar > span { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.w-site-bar em { margin-left: 10px; padding: 2px 10px; border-radius: 8px; background: var(--fill); font-style: normal; font-size: 11.5px; color: var(--ink-3); }
.w-site-body { display: grid; gap: 10px; justify-items: start; padding: 22px 22px 20px; }
.w-site-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--p-bg); color: var(--p-ink); }
.w-site-mark .pg { width: 22px; height: 22px; }
.w-site-name { font-family: var(--display); font-size: 20px; letter-spacing: -.02em; }
.w-site-ask { margin: -6px 0 4px; font-size: 14px; color: var(--ink-2); }
.w-field { position: relative; display: grid; gap: 2px; width: 100%; padding: 9px 14px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow .25s; }
.w-field-label { font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.w-field-value { min-height: 21px; font-family: var(--mono); font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
.w-field-value:empty::before { content: "you@example.com"; color: var(--ink-3); opacity: .6; }
.w-field.is-typing .w-field-value:empty::before { content: ""; }
.w-caret { display: none; position: absolute; right: 14px; bottom: 11px; width: 2px; height: 16px; background: var(--brand); animation: blink 1s steps(1) infinite; }
.w-field.is-typing .w-caret { display: block; }
@keyframes blink { 50% { opacity: 0; } }
.w-field.is-filled { box-shadow: inset 0 0 0 2px var(--green); }
.w-site-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.w-site-cta { padding: 9px 16px; border-radius: 999px; background: var(--fill); font-size: 13.5px; font-weight: 700; color: var(--ink-3); }
.w-use { animation: w-nudge 2.4s 1.2s var(--ease) infinite; }
.w-use:disabled { animation: none; opacity: 1; background: var(--green-soft); color: var(--green); }
@keyframes w-nudge { 0%, 70%, 100% { box-shadow: 0 0 0 0 var(--focus); } 85% { box-shadow: 0 0 0 8px transparent; } }
.w-facts { display: grid; gap: 8px; width: 100%; margin: 6px 0 0; padding: 0; list-style: none; }
.w-facts li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); opacity: .35; filter: grayscale(1); transition: opacity .4s calc(var(--i) * .15s), filter .4s calc(var(--i) * .15s); }
.w-site.is-done .w-facts li { opacity: 1; filter: none; }
.w-fact-icon { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 9px; background: var(--green-soft); color: var(--green); }

/* Mail example: three emails sorted as they arrive */
.w-mailbox { display: grid; gap: 12px; }
.w-mail-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.w-mail-head strong { font-size: 13.5px; color: var(--ink-2); }
.w-mail { display: grid; gap: 10px; }
.w-mail-row { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 66px; padding: 12px 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); opacity: 0; transform: translateX(-24px); transition: opacity .45s var(--spring), transform .45s var(--spring), background-color .4s; }
.w-mail-row.is-in { opacity: 1; transform: none; }
.w-mail-icon, .w-mail-badge { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--fill); color: var(--ink-2); }
.w-mail-text { display: grid; min-width: 0; line-height: 1.3; }
.w-mail-text strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-mail-text span { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-mail-after { position: absolute; inset: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--p-bg); opacity: 0; transition: opacity .35s var(--ease); }
.w-mail-after .w-mail-badge { background: var(--surface); color: var(--p-ink); }
.w-mail-after strong { color: var(--p-ink); }
.w-mail-after span { color: var(--ink-2); }
.w-mail-row.is-sorted .w-mail-after { opacity: 1; }

/* Records example: tap a page to see what it keeps */
.w-shelves { display: grid; gap: 14px; }
.w-shelf-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.w-shelf { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); font-size: 14px; font-weight: 700; color: var(--ink); text-align: left; transition: transform .2s var(--spring), box-shadow .2s, background-color .2s; }
.w-shelf:hover { transform: translateY(-2px); }
.w-shelf.is-on { background: var(--p-bg); box-shadow: inset 0 0 0 2px var(--p-ink); color: var(--p-ink); }
.w-shelf-icon { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 10px; background: var(--p-bg); color: var(--p-ink); }
.w-shelf.is-on .w-shelf-icon { background: var(--surface); }
.w-shelf-icon .pg { width: 18px; height: 18px; }
.w-shelf-preview { display: grid; gap: 8px; min-height: 166px; padding: 16px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.w-shelf-title { display: flex; align-items: center; gap: 8px; color: var(--p-ink); }
.w-shelf-title .pg { width: 18px; height: 18px; }
.w-shelf-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border-radius: 14px; background: var(--surface-2); animation: welcome-step .4s calc(var(--i) * .08s) var(--spring) both; }
.w-shelf-item > span { display: grid; min-width: 0; line-height: 1.3; }
.w-shelf-item strong { font-size: 14px; }
.w-shelf-item > span > span { font-size: 12.5px; color: var(--ink-3); }
.w-shelf-item em { flex: none; font-style: normal; font-size: 13px; font-weight: 700; color: var(--ink-2); }

/* Reading example: an issue, and a line saved from it */
.w-reader { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); overflow: hidden; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.w-reader-list { border-right: 1px solid var(--line); }
.w-reader-row { display: grid; gap: 1px; padding: 12px 14px; border-bottom: 1px solid var(--line); line-height: 1.3; }
.w-reader-row strong { font-size: 12.5px; color: var(--ink-2); }
.w-reader-row span { font-size: 13px; font-weight: 700; }
.w-reader-row.is-on { background: var(--brand-soft); }
.w-reader-issue { display: grid; align-content: start; gap: 8px; padding: 16px 18px 18px; font-family: var(--serif); }
.w-reader-title { font-family: var(--display); font-size: 17px; letter-spacing: -.02em; }
.w-reader-issue p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.w-snip { display: inline; padding: 1px 2px; border-radius: 4px; font: inherit; color: var(--ink); text-align: left; background: color-mix(in srgb, var(--brand) 14%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 30%, transparent); -webkit-box-decoration-break: clone; box-decoration-break: clone; cursor: pointer; animation: w-nudge 2.4s 1s var(--ease) infinite; }
.w-snip.is-saved { animation: none; background: rgba(255, 200, 60, .38); box-shadow: none; }
.w-clip { display: grid; gap: 6px; margin-top: 6px; padding: 12px 14px; border-radius: 16px; background: #f6f3ff; font-family: var(--font); animation: welcome-step .45s var(--spring) both; }
.w-clip[hidden] { display: none; }
.w-clip-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: #5b3fc4; }
.w-clip-label .pg { width: 15px; height: 15px; }
.w-clip p { font-size: 14px !important; color: var(--ink) !important; }
.w-clip-by { font-size: 12px; font-weight: 700; color: var(--ink-3); }
[data-theme="dark"] .page-app .w-clip { background: #241e44; }
[data-theme="dark"] .page-app .w-clip-label { color: #c4b5ff; }

/* The first step */
.w-starts { display: grid; gap: 10px; width: 100%; margin-top: 6px; }
.w-start { text-align: left; }
.w-start { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); color: var(--ink); transition: transform .2s var(--spring), box-shadow .2s; }
.w-start:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.w-start.is-primary { box-shadow: var(--shadow), inset 0 0 0 2px var(--brand); }
.w-start-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--p-bg); color: var(--p-ink); }
.w-start-icon .pg { width: 23px; height: 23px; }
.w-start-text { flex: 1; display: grid; min-width: 0; line-height: 1.35; }
.w-start-text strong { font-size: 15.5px; }
.w-start-text span { font-size: 13.5px; color: var(--ink-3); }
.w-start > .icon { color: var(--ink-3); }

@media (max-width: 820px) {
  .welcome { padding: 0; }
  .welcome-card { width: 100%; height: 100dvh; border-radius: 0; }
  .welcome-head { padding-top: calc(14px + env(safe-area-inset-top)); }
  .welcome-body { align-items: start; gap: 22px; padding: 10px 20px 20px; }
  .welcome-body, .welcome-body.has-demo { display: flex; flex-direction: column; align-items: stretch; gap: 18px; }
  .welcome-body.is-solo { align-items: center; }
  .welcome-body > * { flex: none; }
  .welcome-demo { min-height: 0; padding: 30px 14px 16px; }
  .welcome-copy h2 { font-size: 28px; }
  .welcome-copy > p { font-size: 15px; }
  .welcome-foot { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .w-reader { grid-template-columns: minmax(0, 1fr); }
  .w-reader-list { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .welcome, .welcome-card, .welcome-copy, .welcome-demo, .w-shelf-item, .w-clip { animation: none; }
  .w-use, .w-snip { animation: none; }
  .w-mail-row, .w-mail-after, .w-facts li { transition: none; }
}

/* ————— Help ————— */
.mobile-tools { display: flex; gap: 2px; }
.help { display: grid; gap: 22px; max-width: 860px; }
.help-tour { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-radius: 22px; background: var(--brand-soft); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.help-tour > div { display: grid; gap: 2px; }
.help-tour strong { font-size: 16px; }
.help-tour span { font-size: 14px; color: var(--ink-2); }
.help-tour .btn .icon { order: 2; }
.help-search { width: 100%; }
.help-none { margin: 0; padding: 30px 10px; text-align: center; color: var(--ink-3); font-size: 15px; }
.help-group { display: grid; gap: 10px; }
.help-group[hidden] { display: none; }
.help-group-head { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; font-family: var(--display); font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.help-group-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--p-bg); color: var(--p-ink); }
.help-group-icon .pg { width: 18px; height: 18px; }
.help-list { overflow: hidden; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.help-guide + .help-guide { border-top: 1px solid var(--line); }
.help-guide[hidden] { display: none; }
.help-guide summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; font-size: 15px; font-weight: 650; cursor: pointer; list-style: none; transition: background-color .15s; }
.help-guide summary::-webkit-details-marker { display: none; }
.help-guide summary:hover { background: var(--fill-2); }
.help-guide summary:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--focus); }
.help-chevron { flex: none; color: var(--ink-3); transform: rotate(90deg); transition: transform .2s var(--ease); }
.help-guide[open] .help-chevron { transform: rotate(-90deg); }
.help-body { display: grid; gap: 12px; justify-items: start; padding: 0 18px 18px; animation: fade .25s var(--ease); }
.help-steps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.help-steps li { position: relative; padding-left: 34px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); counter-increment: step; }
.help-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); font-size: 12px; font-weight: 800; }
.help-note { margin: 0; font-size: 13.5px; color: var(--orange); }
.help-go .icon { order: 2; }
@media (max-width: 640px) {
  .help-tour { flex-direction: column; align-items: stretch; text-align: left; }
  .help-guide summary { padding: 14px 16px; }
  .help-body { padding: 0 16px 16px; }
}

/* Mail controls on one row; on narrower screens the tabs take their own line under the search. */
@media (max-width: 900px) {
  .mail-search { flex-wrap: wrap; }
  .mail-search .mail-tabs { order: 2; flex: 1 1 100%; }
}
/* Mail's control row: tabs, search and Filter share one height and shape. */
.mail-search .mail-tabs { padding: 4px; }
.mail-search .mail-tabs button { height: 36px; }
.mail-search .library-search input { height: 44px; border-radius: 999px; font-size: 15px; padding-left: 44px; }
.mail-search .library-search .icon { left: 16px; top: 50%; transform: translateY(-50%); }
.mail-search .mail-filter-btn { height: 44px; border-radius: 999px; }
/* Move your accounts: the site list fades at the bottom, showing there's more to scroll. */
.sheet-move .site-picker { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 28px), transparent); padding-bottom: 22px; }

/* ————— Reading a link inside Skraplet ————— */
.sheet.link-sheet { width: min(920px, calc(100vw - 48px)); height: min(90vh, 1000px); max-height: 90vh; }
.sheet.link-sheet::backdrop { background: rgba(14, 20, 56, .38); }
.link-view { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--surface); }
.link-view-bar { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 22px; border-bottom: 1px solid var(--line); }
.link-view-close { margin-left: 4px; }
.sheet.link-sheet:focus { outline: none; }
@media (max-width: 420px) { .link-view-host { visibility: hidden; } }
.link-view-host { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.link-view-tools { display: flex; gap: 8px; flex: none; }
.link-view-tools .btn[hidden] { display: none; }
.link-view-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.link-view-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 80px 20px; color: var(--ink-3); font-size: 14px; }
.link-view-page { max-width: 680px; margin: 0 auto; padding: 28px 24px 56px; }
.link-view-hero { display: block; width: 100%; max-height: 360px; object-fit: cover; margin-bottom: 22px; border-radius: 16px; background: var(--fill); }
.link-view-page h1 { margin: 0 0 8px; font-family: var(--serif); font-size: clamp(26px, 3vw, 34px); line-height: 1.18; font-weight: 700; letter-spacing: -.02em; text-wrap: balance; }
.link-view-meta { margin: 0 0 24px; font-size: 13.5px; font-weight: 600; color: var(--ink-3); }
.link-view-article { font-family: var(--serif); font-size: 18px; line-height: 1.7; color: var(--ink); overflow-wrap: break-word; }
.link-view-article p, .link-view-article ul, .link-view-article ol, .link-view-article blockquote, .link-view-article pre { margin: 0 0 1.05em; }
.link-view-article h2, .link-view-article h3, .link-view-article h4 { margin: 1.5em 0 .5em; font-family: var(--display); line-height: 1.25; letter-spacing: -.02em; }
.link-view-article h2 { font-size: 23px; } .link-view-article h3 { font-size: 20px; } .link-view-article h4 { font-size: 17px; }
.link-view-article img { display: block; max-width: 100%; height: auto; margin: 1.2em auto .4em; border-radius: 12px; }
.link-view-article small { display: block; font-family: var(--font); font-size: 13px; color: var(--ink-3); text-align: center; }
.link-view-article blockquote { padding-left: 16px; border-left: 3px solid var(--line-2); color: var(--ink-2); }
.link-view-article pre { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 14px; overflow-x: auto; white-space: pre-wrap; }
.link-view-article a { color: var(--brand-ink); text-underline-offset: 2px; }
.link-view-article hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.link-view-end { margin: 36px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-3); }
.link-view-end a { color: var(--brand-ink); font-weight: 600; }
.link-view-desc { margin: 0 0 20px; font-family: var(--serif); font-size: 18px; line-height: 1.6; color: var(--ink-2); }
.link-view-note { display: grid; justify-items: start; gap: 8px; max-width: 560px; margin: 0 auto; padding: 18px 20px; border-radius: 18px; background: var(--surface-2); }
.link-view-body > .link-view-note { margin: 40px auto; }
.link-view-note h2 { margin: 0; font-size: 18px; }
.link-view-note p { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.link-view-note .link-view-sub { font-size: 13.5px; color: var(--ink-3); }
.link-view-note ul { margin: 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); }
.link-view-note .btn { margin-top: 6px; }
.link-view-note.is-danger { background: var(--red-soft); } .link-view-note.is-caution { background: var(--orange-soft); }
.link-view-warn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface); color: var(--orange); }
.is-danger .link-view-warn { color: var(--red); }
/* A saved link on the Clippings board */
.clip-link-mark { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 12.5px; font-weight: 700; color: var(--brand-ink); }
.clip.is-quote .clip-link-title { margin: 0 0 10px; font-size: 17px; line-height: 1.35; }
@media (max-width: 640px) {
  .sheet.link-sheet { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .link-view-bar { padding: calc(8px + env(safe-area-inset-top)) 8px 8px 16px; }
  .link-view-tools .btn { padding: 0 10px; }
  .link-view-page { padding: 20px 18px 48px; }
  .link-view-article { font-size: 17px; }
}
/* Saved copies of links */
.link-view-which { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--fill); font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.link-view-which:hover { background: var(--fill-hover); color: var(--ink); }
.link-view-which[hidden] { display: none; }
.link-view-copied { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 10px 14px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-ink); font-size: 13.5px; font-weight: 600; }
@media (max-width: 640px) { .link-view-which { font-size: 0; gap: 0; padding: 0 9px; } .link-view-which .icon { font-size: 14px; } }

.welcome-theme { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 12px; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--ink-2); }

/* Site icons in the Links view */
.link-site.has-icon { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.link-site.has-icon img { width: 20px; height: 20px; object-fit: contain; border-radius: 4px; }
.home-tip { margin: 0; }
.choice-row .row-sub { white-space: normal; overflow: visible; text-overflow: clip; }

/* ————— Landing: Read, phone and the one-minute pitch ————— */
.minute .explainer { margin-top: 40px; }
.demo-issues { display: grid; overflow: hidden; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); }
.demo-issue { display: grid; gap: 2px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13.5px; line-height: 1.35; }
.demo-issue:first-child { border-top: 0; }
.demo-issue strong { font-size: 12.5px; color: var(--ink-2); }
.demo-issue span { font-weight: 650; color: var(--ink-2); }
.demo-issue.is-unread strong::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 6px 1px 0; border-radius: 50%; background: var(--brand); }
.demo-issue.is-unread span { font-weight: 800; color: var(--ink); }
.demo-reader { display: grid; gap: 9px; padding: 0 0 18px; overflow: hidden; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); }
.demo-reader-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--ink-2); }
.demo-reader-bar span { flex: 1; }
.demo-reader-bar b { padding: 4px 10px; border-radius: 999px; background: var(--fill); font-size: 11.5px; color: var(--ink); }
.demo-reader-bar b:first-of-type { background: var(--ink); color: var(--on-ink); }
.demo-reader strong { margin: 6px 18px 2px; font-family: var(--serif); font-size: 19px; line-height: 1.2; color: var(--ink); }
.demo-reader i { height: 8px; margin: 0 18px; border-radius: 999px; background: var(--fill); }
.demo-reader i.is-short { width: 55%; }
.demo-clip { position: relative; display: grid; gap: 8px; padding: 22px 22px 18px; border-radius: 18px; background: #f6f3ff; box-shadow: var(--shadow-sm); }
.demo-clip-mark { font-family: var(--serif); font-size: 44px; line-height: .6; color: #b9a4ff; }
.demo-clip p { margin: 0; font-size: 16.5px; line-height: 1.5; color: var(--ink); }
.demo-clip mark { padding: 1px 0; border-radius: 3px; background: rgba(255, 200, 60, .38); color: inherit; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.demo-clip-by { font-size: 12.5px; font-weight: 700; color: #5b3fc4; }
.demo-notify { position: relative; display: grid; gap: 8px; }
.demo-push { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px; background: rgba(255, 255, 255, .78); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow-sm); }
.demo-push.is-back { opacity: .7; transform: scale(.97); }
.demo-push-app { width: 34px; height: 34px; border-radius: 9px; background: url(/assets/app-icon-192.png) center / cover, var(--brand-grad); }
.demo-push > div { display: grid; min-width: 0; line-height: 1.3; }
.demo-push strong { font-size: 13.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-push span { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-push em { align-self: start; font-style: normal; font-size: 11.5px; color: var(--ink-3); }

/* ————— Privacy Policy and Terms ————— */
.legal { max-width: 760px; margin: 0 auto; padding: 120px 24px 80px; color: var(--ink); }
.legal h1 { margin: 0 0 6px; font-family: var(--display); font-size: clamp(32px, 5vw, 44px); font-weight: 800; letter-spacing: -.035em; }
.legal-date { margin: 0 0 28px; font-size: 14px; color: var(--ink-3); }
.legal h2 { margin: 34px 0 10px; font-family: var(--display); font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.legal p, .legal li { font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.legal p.legal-key { margin: 0 0 14px; padding: 14px 18px; border-radius: 14px; background: var(--green-soft); color: #14613c; font-weight: 600; }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 6px; }
.legal strong { color: var(--ink); }
.legal a { color: var(--brand-ink); }
.legal-also { margin-top: 30px !important; padding-top: 18px; border-top: 1px solid var(--line); }
.footer-links { display: inline-flex; gap: 18px; margin-left: auto; }
.footer-links a:last-child { margin-left: 0; }
.consent a { color: var(--brand-ink); }

/* Keyword alerts (Settings › Notifications): the followed words as chips, with a field to add one */
.kw-list { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 2px 46px; }
.kw-chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 6px 5px 12px; border-radius: 999px; background: #ebe4ff; color: #5b3fc4; font-size: 14px; font-weight: 500; }
.kw-remove { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.kw-remove:hover { background: rgba(91, 63, 196, .12); }
.kw-remove .icon { width: 12px; height: 12px; }
.kw-add { display: inline-flex; gap: 6px; flex: 1 1 220px; min-width: 0; }
.kw-input { flex: 1; min-width: 0; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--field, var(--material)); color: var(--ink); font: inherit; font-size: 14px; }
.kw-input:focus { outline: none; border-color: #8c74e6; box-shadow: 0 0 0 3px rgba(140, 116, 230, .2); }
@media (max-width: 640px) { .kw-list { margin-left: 0; } }
:root[data-theme="dark"] .kw-chip { background: rgba(160, 136, 255, .18); color: #c9bbff; }

/* Landing hero picture: the real app, on a computer and a phone */
.hero-shot { position: relative; max-width: 1080px; margin: 60px auto 0; padding-bottom: 70px; animation-delay: .3s !important; }
.shot-desktop { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 0 0 1px rgba(14, 20, 56, .08), 0 30px 70px -30px rgba(14, 20, 56, .35); }
.shot-phone { position: absolute; left: -36px; bottom: 0; width: 220px; height: auto; border: 7px solid #111; border-radius: 40px; background: #111; box-shadow: 0 30px 60px -24px rgba(14, 20, 56, .45); }
@media (max-width: 760px) {
  .hero-shot { margin-top: 40px; padding-bottom: 0; }
  .shot-desktop { display: none; }
  .shot-phone { position: static; display: block; width: min(300px, 80%); margin: 0 auto; }
}
/* Landing highlights: one point per slide, with a real screen; moves on by itself, like Apple’s product pages */
.highlights { margin: 40px 0 0; padding: 70px 0 20px; overflow: hidden; }
.hl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; max-width: 1180px; margin: 0 auto 30px; padding: 0 22px; }
.hl-head h2 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -.035em; }
.hl-track { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px max(22px, calc((100vw - 1040px) / 2)) 10px; }
.hl-track::-webkit-scrollbar { display: none; }
.hl-card { position: relative; flex: none; width: min(1040px, calc(100vw - 44px)); height: 600px; display: grid; grid-template-rows: auto minmax(0, 1fr); border-radius: 30px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; scroll-snap-align: center; }
.hl-caption { max-width: 30em; margin: 0 auto; padding: 50px 40px 0; text-align: center; font-size: 22px; line-height: 1.35; font-weight: 600; letter-spacing: -.02em; color: var(--ink-3); text-wrap: balance; }
.hl-caption strong { color: var(--ink); font-weight: 700; }
.hl-visual { position: relative; display: grid; place-items: end center; padding: 34px 56px 0; min-height: 0; }
.hl-visual picture { display: contents; }
.hl-visual img { display: block; max-width: 100%; max-height: 100%; border-radius: 14px 14px 0 0; box-shadow: 0 0 0 1px rgba(14, 20, 56, .07), 0 20px 50px -24px rgba(14, 20, 56, .3); }
.hl-card.is-strip .hl-visual { place-items: center; padding: 20px 56px 40px; }
.hl-card.is-strip .hl-visual img { border-radius: 18px; }
.hl-controls { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 26px; }
.hl-dots { display: flex; align-items: center; gap: 4px; height: 52px; padding: 0 16px; border-radius: 999px; background: rgba(14, 20, 56, .06); }
.hl-dots button { position: relative; display: grid; place-items: center; width: 24px; height: 32px; }
.hl-dots button::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: rgba(14, 20, 56, .32); transition: width .45s var(--spring), background-color .3s; }
.hl-dots button.is-on { width: 56px; }
.hl-dots button.is-on::before { width: 48px; background: rgba(14, 20, 56, .18); }
.hl-dots i { position: absolute; left: 4px; top: 12px; width: 0; height: 8px; border-radius: 999px; background: var(--ink); pointer-events: none; }
.hl-dots button.is-on i { width: 48px; transform-origin: left; transform: scaleX(0); animation: hl-fill 5s linear forwards; animation-play-state: paused; }
.highlights.is-playing .hl-dots button.is-on i { animation-play-state: running; }
@keyframes hl-fill { to { transform: scaleX(1); } }
.hl-play { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: rgba(14, 20, 56, .06); color: var(--ink); }
.hl-play svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.hl-play .p-play { display: none; fill: currentColor; stroke-width: 1.6; }
.hl-play.is-paused .p-play { display: block; } .hl-play.is-paused .p-pause { display: none; }
@media (max-width: 760px) {
  .highlights { padding-top: 50px; }
  .hl-card { height: 470px; border-radius: 24px; }
  .hl-caption { padding: 30px 22px 0; font-size: 18px; }
  .hl-visual { padding: 22px 18px 0; }
  .hl-card.is-strip .hl-visual { padding: 16px 14px 24px; }
  /* On a phone each slide shows the phone screen, its top part, framed like the top of a phone. */
  .hl-card:not(.is-strip) .hl-visual { padding: 24px 34px 0; place-items: stretch; }
  .hl-card:not(.is-strip) .hl-visual picture { display: block; min-height: 0; height: 100%; }
  .hl-card:not(.is-strip) .hl-visual img { width: 100%; height: 100%; object-fit: cover; object-position: top; border: 6px solid #111; border-bottom: 0; border-radius: 34px 34px 0 0; }
}

/* The one-minute film: a play button in the hero opens it in a window */
.film-open { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px 0 8px; border-radius: 999px; font-size: 16px; font-weight: 650; color: var(--brand-ink); transition: background-color .2s; }
.film-open:hover { background: var(--brand-soft); }
.film-open-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); }
.film-open-icon .icon { width: 15px; height: 15px; fill: currentColor; stroke-width: 1.5; margin-left: 2px; }
.film { width: min(1080px, calc(100vw - 32px)); max-width: none; max-height: none; padding: 0; border: 0; border-radius: 22px; background: #000; overflow: visible; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .6); }
.film::backdrop { background: rgba(10, 13, 30, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.film[open] { animation: film-in .35s var(--spring); }
@keyframes film-in { from { opacity: 0; transform: scale(.96); } }
.film video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 22px; background: #000; }
.film-close { position: absolute; top: -48px; right: 0; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; }
.film-close:hover { background: rgba(255, 255, 255, .28); }
@media (max-width: 640px) { .film { border-radius: 14px; } .film video { border-radius: 14px; } .film-close { top: -46px; } }
.landing .closing h2 { max-width: 16em; margin: 0 auto; }
