/* CapDrafts by Emmy Drafts
   A light, glassy interface in the spirit of Apple's Liquid Glass: translucent layers, capsule controls,
   soft light, lots of room. Brand colors appear only as small accents. */

@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url(/fonts/poppins-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url(/fonts/poppins-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url(/fonts/poppins-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 400; font-display: swap; src: url(/fonts/open-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 500; font-display: swap; src: url(/fonts/open-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 600; font-display: swap; src: url(/fonts/open-sans-latin-600-normal.woff2) format("woff2"); }

:root {
  /* Emmy Drafts palette */
  --fawn: #F0B67F;
  --bitter: #FE5F55;
  --raisin: #25272C;
  --tea: #C7EFCF;
  --beige: #EEF5DB;

  --bg: #f4f4f6;
  --ink: #25272C;
  --ink-2: rgba(37, 39, 44, .66);
  --ink-3: rgba(37, 39, 44, .45);
  --hair: rgba(37, 39, 44, .09);
  --glass: rgba(255, 255, 255, .56);
  --glass-hi: rgba(255, 255, 255, .78);
  --dock: rgba(255, 255, 255, .94);
  --solid: #ffffff;
  --field: rgba(255, 255, 255, .72);
  --chip: rgba(37, 39, 44, .06);
  --shadow: 0 1px 1px rgba(37, 39, 44, .04), 0 18px 48px -12px rgba(37, 39, 44, .18);
  --shadow-sm: 0 1px 1px rgba(37, 39, 44, .04), 0 8px 24px -8px rgba(37, 39, 44, .16);
  --btn-bg: var(--raisin);
  --btn-ink: #fff;
  --edge-a: rgba(255, 255, 255, .95);
  --edge-b: rgba(255, 255, 255, .12);
  --err-ink: #b3261e;
  --ok-ink: #1f5a32;
  --pillbg: var(--solid);
  --orb-a: .38; --orb-b: .55; --orb-c: .9; --orb-d: .16;

  --head: "Poppins", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Open Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --spring: cubic-bezier(.3, 1.35, .5, 1);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1012;
    --ink: #f3f3f5;
    --ink-2: rgba(243, 243, 245, .68);
    --ink-3: rgba(243, 243, 245, .42);
    --hair: rgba(255, 255, 255, .1);
    --glass: rgba(44, 46, 52, .52);
    --glass-hi: rgba(58, 60, 68, .7);
    --dock: rgba(34, 36, 41, .94);
    --solid: #1c1d21;
    --field: rgba(255, 255, 255, .07);
    --chip: rgba(255, 255, 255, .08);
    --shadow: 0 1px 1px rgba(0, 0, 0, .3), 0 18px 48px -12px rgba(0, 0, 0, .6);
    --shadow-sm: 0 1px 1px rgba(0, 0, 0, .3), 0 8px 24px -8px rgba(0, 0, 0, .55);
    --btn-bg: #f3f3f5;
    --btn-ink: #25272C;
    --edge-a: rgba(255, 255, 255, .28);
    --edge-b: rgba(255, 255, 255, .04);
    --err-ink: #ff8f87;
    --ok-ink: #c7efcf;
    --pillbg: rgba(255, 255, 255, .17);
    --orb-a: .16; --orb-b: .14; --orb-c: .07; --orb-d: .14;
  }
}
:root[data-theme="dark"] {
    --bg: #0f1012;
    --ink: #f3f3f5;
    --ink-2: rgba(243, 243, 245, .68);
    --ink-3: rgba(243, 243, 245, .42);
    --hair: rgba(255, 255, 255, .1);
    --glass: rgba(44, 46, 52, .52);
    --glass-hi: rgba(58, 60, 68, .7);
    --dock: rgba(34, 36, 41, .94);
    --solid: #1c1d21;
    --field: rgba(255, 255, 255, .07);
    --chip: rgba(255, 255, 255, .08);
    --shadow: 0 1px 1px rgba(0, 0, 0, .3), 0 18px 48px -12px rgba(0, 0, 0, .6);
    --shadow-sm: 0 1px 1px rgba(0, 0, 0, .3), 0 8px 24px -8px rgba(0, 0, 0, .55);
    --btn-bg: #f3f3f5;
    --btn-ink: #25272C;
    --edge-a: rgba(255, 255, 255, .28);
    --edge-b: rgba(255, 255, 255, .04);
    --err-ink: #ff8f87;
    --ok-ink: #c7efcf;
    --pillbg: rgba(255, 255, 255, .17);
    --orb-a: .16; --orb-b: .14; --orb-c: .07; --orb-d: .14;
  }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 400 15px/1.55 var(--body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3 { font-family: var(--head); font-weight: 600; letter-spacing: -.02em; margin: 0; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(254, 95, 85, .5); outline-offset: 2px; border-radius: 12px; }

/* ---------- light behind the glass ---------- */
.backdrop { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); will-change: transform; }
.o1 { width: 560px; height: 560px; left: -140px; top: -160px; background: var(--fawn); opacity: var(--orb-a); animation: drift1 26s ease-in-out infinite alternate; }
.o2 { width: 620px; height: 620px; right: -180px; bottom: -200px; background: var(--tea); opacity: var(--orb-b); animation: drift2 32s ease-in-out infinite alternate; }
.o3 { width: 720px; height: 520px; left: 30%; top: 22%; background: var(--beige); opacity: var(--orb-c); animation: drift3 38s ease-in-out infinite alternate; }
.o4 { width: 260px; height: 260px; right: 12%; top: 6%; background: var(--bitter); opacity: var(--orb-d); animation: drift1 30s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(90px, 60px) scale(1.08); } }
@keyframes drift2 { to { transform: translate(-80px, -50px) scale(1.06); } }
@keyframes drift3 { to { transform: translate(-60px, 40px) scale(.94); } }

/* ---------- glass ---------- */
.glass {
  position: relative; border-radius: 28px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(28px) saturate(1.8); backdrop-filter: blur(28px) saturate(1.8);
  box-shadow: var(--shadow), inset 0 1px 0 var(--edge-a), inset 0 -1px 0 var(--edge-b);
}
.glass::after { /* thin light-catching edge */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(150deg, var(--edge-a), var(--edge-b) 38%, var(--edge-b) 62%, var(--edge-a));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.glass.shine::before { /* light that follows the pointer */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s var(--ease);
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .5), transparent 60%);
}
.glass.shine:hover::before { opacity: 1; }
/* the glow sits behind the card's content (never on top of text, fields or links), and fades away while the pointer
   is over anything you can type in or click, so what you're about to use is always fully legible */
.glass.shine { isolation: isolate; }
.glass.shine::before { z-index: -1; }
.glass.shine:has(:is(input, textarea, select, button, a, label, [role="button"], [role="slider"], .seg, summary):hover)::before { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .glass.shine::before { display: none; } }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .glass.shine::before { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .09), transparent 60%); }
}
:root[data-theme="dark"] .glass.shine::before { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .09), transparent 60%); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .glass { background: var(--solid); } }
@media (prefers-reduced-transparency: reduce) {
  .glass { background: var(--solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .orb { display: none; }
}

/* ---------- layout ---------- */
#app { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
.band { position: fixed; z-index: 5; top: 0; left: 0; right: 0; height: 5px; background: url(/img/band.png) center / 100% 100% no-repeat; }
.shell { width: 100%; max-width: 920px; margin: 0 auto; padding: 0 20px; flex: 1; }
.toolbar {
  position: sticky; top: 14px; z-index: 10; margin: 14px auto 0; width: calc(100% - 28px); max-width: 920px;
  display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 22px; border-radius: 999px;
}
.toolbar .grow { flex: 1; }
.wordmark { display: block; height: 15px; aspect-ratio: 13280 / 1692; background: currentColor; -webkit-mask: url(/img/wordmark.svg) center / contain no-repeat; mask: url(/img/wordmark.svg) center / contain no-repeat; }
.wordmark.lg { height: 22px; }
.tb-actions { display: flex; align-items: center; gap: 6px; }
main { padding: 44px 0 120px; display: flex; flex-direction: column; gap: 22px; }
.foot { padding: 0 20px 28px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--ink-3); font-size: 12.5px; }
.foot img { width: 16px; height: 16px; opacity: .75; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .foot img { filter: invert(1); }
}
:root[data-theme="dark"] .foot img { filter: invert(1); }

.hero h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.1; }
.hero p { margin-top: 10px; color: var(--ink-2); max-width: 560px; font-size: 16px; }
.card { padding: 28px; }
@media (max-width: 560px) {
  .card { padding: 20px; border-radius: 24px; }
  main { padding-top: 28px; }
  .toolbar { flex-wrap: wrap; border-radius: 28px; padding: 8px 8px 10px 18px; row-gap: 8px; }
  .toolbar .grow { order: 1; }
  .toolbar .grow.g2 { display: none; }
  .toolbar .themectl { order: 2; }
  .toolbar .tb-actions { order: 3; }
  .toolbar .seg.nav { order: 4; flex: 0 0 100%; }
  .seg.theme button { padding: 0 9px; font-size: 12.5px; }
  .seg.sm button { height: 34px; }
  .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .stat b { font-size: 24px; }
}

/* ---------- controls ---------- */
.btn {
  --h: 46px; height: var(--h); padding: 0 22px; border: 0; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--btn-bg); color: var(--btn-ink); font: 600 14.5px var(--body); text-decoration: none; white-space: nowrap;
  transition: transform .35s var(--spring), box-shadow .25s var(--ease), background .2s, opacity .2s;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 10px 24px -10px rgba(37, 39, 44, .55);
}
.btn:hover { transform: translateY(-1px) scale(1.015); }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn.quiet { background: var(--glass-hi); color: var(--ink); box-shadow: inset 0 1px 0 var(--edge-a), 0 0 0 1px var(--hair), var(--shadow-sm); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.btn.ghost { background: transparent; color: var(--ink-2); box-shadow: none; padding: 0 14px; }
.btn.ghost:hover { background: var(--chip); color: var(--ink); }
.btn.sm { --h: 34px; padding: 0 14px; font-size: 13px; }
.btn.danger { color: var(--err-ink); }
.btn.icon { width: 38px; padding: 0; --h: 38px; }
.btn svg, .ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn.sm svg { width: 16px; height: 16px; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .label { font: 600 12.5px var(--body); letter-spacing: .02em; color: var(--ink-2); text-transform: uppercase; }
.input {
  height: 50px; width: 100%; border-radius: 16px; border: 1px solid var(--hair); padding: 0 16px; background: var(--field); font-size: 16px; color: var(--ink);
  box-shadow: inset 0 1px 2px rgba(37, 39, 44, .05); transition: border-color .2s, box-shadow .25s var(--ease), background .2s;
}
.input::placeholder { color: var(--ink-3); }
.input:hover { background: var(--glass-hi); }
.input:focus { outline: none; border-color: var(--fawn); box-shadow: 0 0 0 4px rgba(240, 182, 127, .38); background: var(--glass-hi); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 22px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.hint { color: var(--ink-3); font-size: 13px; }

/* segmented control */
.seg { --n: 2; --i: 0; position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 4px; border-radius: 999px; background: var(--chip); box-shadow: inset 0 1px 2px rgba(37, 39, 44, .08); }
.seg .pill { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n)); border-radius: 999px; background: var(--pillbg); box-shadow: 0 1px 2px rgba(37, 39, 44, .16), 0 6px 14px -6px rgba(37, 39, 44, .3); transform: translateX(calc(var(--i) * 100%)); transition: transform .45s var(--spring); }
.seg button { position: relative; z-index: 1; border: 0; background: none; height: 38px; border-radius: 999px; font: 600 13.5px var(--body); color: var(--ink-2); padding: 0 12px; transition: color .2s; white-space: nowrap; }
.seg button[aria-checked="true"] { color: var(--ink); }
.seg.sm button { height: 32px; font-size: 13px; padding: 0 16px; }
.seg.nav .pill { background: var(--raisin); }
.seg.nav button[aria-checked="true"] { color: #fff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .seg.nav .pill { background: #f3f3f5; }
  :root:not([data-theme="light"]) .seg.nav button[aria-checked="true"] { color: #25272C; }
}
:root[data-theme="dark"] .seg.nav .pill { background: #f3f3f5; }
:root[data-theme="dark"] .seg.nav button[aria-checked="true"] { color: #25272C; }

/* slider */
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--bitter) var(--p, 20%), var(--chip) var(--p, 20%)); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 99px; background: var(--chip); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 99px; background: var(--bitter); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 1px 3px rgba(37, 39, 44, .3), 0 6px 14px -4px rgba(37, 39, 44, .35); transition: transform .3s var(--spring); }
input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 1px 3px rgba(37, 39, 44, .3), 0 6px 14px -4px rgba(37, 39, 44, .35); }
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.15); }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 999px; font: 600 12px var(--body); background: var(--chip); color: var(--ink-2); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .6; }
.badge.done { background: var(--tea); color: #1d4a2c; } .badge.done::before { opacity: 1; background: #2e8b57; }
.badge.work { background: var(--fawn); color: #4a2c0e; } .badge.work::before { background: #4a2c0e; animation: pulse 1.2s ease-in-out infinite; }
.badge.err { background: rgba(254, 95, 85, .16); color: var(--err-ink); } .badge.err::before { background: var(--bitter); opacity: 1; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .badge.done { background: rgba(199, 239, 207, .18); color: var(--tea); }
  :root:not([data-theme="light"]) .badge.work { background: rgba(240, 182, 127, .2); color: var(--fawn); }
  :root:not([data-theme="light"]) .badge.work::before { background: var(--fawn); }
}
:root[data-theme="dark"] .badge.done { background: rgba(199, 239, 207, .18); color: var(--tea); }
:root[data-theme="dark"] .badge.work { background: rgba(240, 182, 127, .2); color: var(--fawn); }
:root[data-theme="dark"] .badge.work::before { background: var(--fawn); }
@keyframes pulse { 50% { opacity: .25; transform: scale(.7); } }

/* progress */
.bar { height: 10px; border-radius: 99px; background: var(--chip); overflow: hidden; box-shadow: inset 0 1px 2px rgba(37, 39, 44, .08); }
.bar > i { display: block; height: 100%; width: var(--w, 0%); border-radius: 99px; background: linear-gradient(90deg, var(--fawn), var(--bitter)); transition: width .8s var(--ease); position: relative; overflow: hidden; }
.bar > i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .55) 50%, transparent 80%); transform: translateX(-100%); animation: sheen 1.8s ease-in-out infinite; }
.bar.indet > i { width: 38%; animation: slide 1.5s ease-in-out infinite alternate; }
@keyframes sheen { to { transform: translateX(100%); } }
@keyframes slide { from { margin-left: 0; } to { margin-left: 62%; } }
.bar.finished > i::after { display: none; }

/* notices */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 18px; background: var(--glass-hi); box-shadow: 0 0 0 1px var(--hair); font-size: 14px; color: var(--ink-2); }
.notice .ico { margin-top: 2px; }
.notice.err { background: rgba(254, 95, 85, .12); box-shadow: 0 0 0 1px rgba(254, 95, 85, .3); color: var(--err-ink); }
.notice.ok { background: rgba(199, 239, 207, .55); color: #1d4a2c; box-shadow: 0 0 0 1px rgba(46, 139, 87, .2); }
.notice strong { color: var(--ink); }
.notice.err strong { color: inherit; }
.errtext { color: var(--err-ink); font-size: 14px; display: flex; gap: 8px; align-items: center; min-height: 22px; }
.errtext:empty { display: none; }
.row.between > .btn:last-child { margin-left: auto; }

/* ---------- page list ---------- */
.list { border-radius: 20px; background: var(--field); box-shadow: 0 0 0 1px var(--hair); overflow: hidden; }
.list-scroll { max-height: min(54vh, 560px); overflow: auto; overscroll-behavior: contain; }
.item { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-top: 1px solid var(--hair); cursor: pointer; transition: background .15s; }
.item:first-child { border-top: 0; }
.item:hover { background: var(--chip); }
.chk { appearance: none; -webkit-appearance: none; width: 24px; height: 24px; flex: none; margin: 0; border-radius: 50%; border: 1.5px solid var(--ink-3); background: transparent; display: grid; place-items: center; transition: background .2s, border-color .2s, transform .3s var(--spring); cursor: pointer; }
.chk:checked { background: var(--btn-bg); border-color: var(--btn-bg); }
.chk:checked::after { content: ""; width: 6px; height: 11px; border: solid var(--btn-ink); border-width: 0 2.2px 2.2px 0; transform: translateY(-1px) rotate(45deg); }
.chk:active { transform: scale(.88); }
.item .t { min-width: 0; flex: 1; }
.item .t b { display: block; font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .t span { display: block; color: var(--ink-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font: 600 11px var(--body); letter-spacing: .03em; text-transform: uppercase; color: var(--ink-3); background: var(--chip); border-radius: 99px; padding: 3px 9px; }
.list-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; flex-wrap: wrap; border-bottom: 1px solid var(--hair); }
.list-head .input { height: 40px; border-radius: 99px; flex: 1; min-width: 160px; font-size: 14.5px; }
.live-list { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-3); max-height: 150px; overflow: hidden; -webkit-mask: linear-gradient(transparent, #000 40%); mask: linear-gradient(transparent, #000 40%); justify-content: flex-end; min-height: 90px; }
.live-list span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: rise .4s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* action bar */
.dock.glass { background: var(--dock); }
.dock { position: fixed; z-index: 9; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(720px, calc(100% - 28px)); display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 24px; border-radius: 999px; animation: dockin .5s var(--spring); }
.dock .grow { flex: 1; min-width: 0; line-height: 1.3; }
.dock .grow b { display: block; font-weight: 600; }
.dock .grow span { color: var(--ink-3); font-size: 12.5px; }
@keyframes dockin { from { transform: translate(-50%, 30px); opacity: 0; } }
@media (max-width: 560px) { .dock { padding: 8px; } .dock .grow { display: none; } .dock .lbl { display: none; } .dock .btn:last-child { flex: 1; } .dock .btn.ghost { padding: 0 12px; } }

/* ---------- tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.tile { position: relative; border-radius: 20px; overflow: hidden; background: var(--field); box-shadow: 0 0 0 1px var(--hair), var(--shadow-sm); display: flex; flex-direction: column; animation: pop .5s var(--spring); }
.tile .img { aspect-ratio: 16 / 10; background: var(--chip); position: relative; overflow: hidden; }
.tile .img img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.tile .img.wait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .5) 50%, transparent 80%); transform: translateX(-100%); animation: sheen 1.8s ease-in-out infinite; }
.tile .meta { padding: 10px 12px 12px; min-width: 0; }
.tile .meta b { display: block; font: 600 13px var(--body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .meta span { display: block; font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .dot { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--tea); color: #1d4a2c; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.tile .dot.bad { background: var(--bitter); color: #fff; }
.tile .dot .ico { width: 14px; height: 14px; stroke-width: 2.4; }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(8px); } }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.stat { padding: 16px 18px; border-radius: 20px; background: var(--field); box-shadow: 0 0 0 1px var(--hair); }
.stat b { display: block; font: 600 26px var(--head); letter-spacing: -.02em; line-height: 1.2; }
.stat span { color: var(--ink-3); font-size: 12.5px; }

/* history */
.group { overflow: hidden; }
.group > button.gh { width: 100%; display: flex; align-items: center; gap: 14px; padding: 20px 24px; background: none; border: 0; text-align: left; }
.group .gh .t { flex: 1; min-width: 0; }
.group .gh .t b { display: block; font: 600 18px var(--head); letter-spacing: -.01em; }
.group .gh .t span { color: var(--ink-3); font-size: 13px; }
.chev { transition: transform .4s var(--spring); } .group.open .chev { transform: rotate(90deg); }
.group .body { display: none; padding: 0 12px 12px; }
.group.open .body { display: block; animation: rise .35s var(--ease); }
.cap { display: flex; align-items: center; gap: 14px; padding: 14px 14px; border-radius: 18px; flex-wrap: wrap; }
.cap + .cap { border-top: 1px solid var(--hair); border-radius: 0; }
.cap:hover { background: var(--chip); }
.cap .t { flex: 1; min-width: 200px; cursor: pointer; }
.cap .t b { display: block; font-weight: 600; font-size: 14.5px; }
.cap .t span { display: block; color: var(--ink-3); font-size: 12.5px; }
.cap .acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.empty { text-align: center; padding: 56px 20px; color: var(--ink-2); }
.empty h3 { font-size: 20px; margin-bottom: 6px; color: var(--ink); }

/* login */
.login { flex: 1; display: grid; place-items: center; padding: 40px 20px; }
.login .card { width: min(420px, 100%); display: flex; flex-direction: column; gap: 22px; align-items: stretch; padding: 36px 32px 30px; }
.login .brand { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.login .brand p { color: var(--ink-2); font-size: 14.5px; max-width: 280px; }
.login .by { display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--ink-3); font-size: 12.5px; }
.login .by img { width: 18px; height: 18px; opacity: .75; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .login .by img { filter: invert(1); }
}
:root[data-theme="dark"] .login .by img { filter: invert(1); }

.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 13.5px; background: none; border: 0; padding: 0; }
.crumb:hover { color: var(--ink); }
.crumb .ico { width: 16px; height: 16px; }
.mono { font-variant-numeric: tabular-nums; }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fadein { animation: rise .45s var(--ease); }
.spin { animation: spin .9s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; z-index: 30; left: 50%; top: 84px; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); overflow-wrap: anywhere; text-align: center; padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 14px; animation: dockin .4s var(--spring); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .orb { animation: none; }
}

/* ---------- pinning, storage, history tools ---------- */
.badge.pin::before { display: none; }
.badge.pin .ico { width: 13px; height: 13px; }
.badge.pin { background: var(--beige); color: #4a4a22; }
.badge.pin.warn { background: var(--fawn); color: #4a2c0e; }
.badge.pin.err { background: rgba(254, 95, 85, .18); color: var(--err-ink); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .badge.pin { background: rgba(238, 245, 219, .14); color: var(--beige); }
  :root:not([data-theme="light"]) .badge.pin.warn { background: rgba(240, 182, 127, .22); color: var(--fawn); }
}
:root[data-theme="dark"] .badge.pin { background: rgba(238, 245, 219, .14); color: var(--beige); }
:root[data-theme="dark"] .badge.pin.warn { background: rgba(240, 182, 127, .22); color: var(--fawn); }
.storage { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.storage:empty { display: none; }
.storage b { color: var(--ink); }
.bar.hot > i { background: linear-gradient(90deg, var(--bitter), #c0392b); }
.hist-tools { gap: 14px; }
.hist-tools .input { max-width: 340px; flex: 1 1 220px; }
.ctools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 4px 14px 16px; margin: 0 2px 10px; border-bottom: 1px solid var(--hair); } /* project tools, set apart from the captures below */
.ctools .hint { flex-basis: 100%; }
.cap .badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cap.nested { margin-left: 22px; border-left: 3px solid var(--fawn); border-radius: 0 14px 14px 0; padding-left: 14px; }
.input.sm { height: 38px; padding: 0 14px; font-size: 13.5px; max-width: 100%; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
textarea.input { font-family: var(--body); height: auto; min-height: 84px; padding: 12px 16px; resize: vertical; line-height: 1.5; }

/* ---------- before and after ---------- */
.cmp-ctl { gap: 12px; margin: 4px 0; }
.sec { font-size: 20px; margin-top: 8px; }
.card.pair { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.card.pair > header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.card.pair > header .t { flex: 1; min-width: 200px; }
.card.pair > header h3 { font-size: 17px; }
.card.pair > header .t span { color: var(--ink-3); font-size: 12.5px; word-break: break-all; }
.matchbox { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-radius: 14px; background: var(--chip); }
.matchbox .input { flex: 1; min-width: 220px; }
.chips { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; font: 600 12.5px var(--body); text-decoration: none; background: var(--glass-hi); box-shadow: 0 0 0 1px var(--hair); color: var(--ink); }
.chip:hover { background: var(--chip); }
.chip .ico { width: 14px; height: 14px; }
.list-rows { padding: 6px 8px; }
.lr { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 12px; }
.lr + .lr { border-top: 1px solid var(--hair); }
.lr .t { flex: 1; min-width: 200px; }
.lr .t b { display: block; font-size: 14px; } .lr .t span { color: var(--ink-3); font-size: 12.5px; }
.lr .input { width: min(340px, 100%); }

.cmp-meta { align-items: stretch; gap: 16px; }
.cmp-meta > .card { padding: 20px; }
.cmp-meta .input { min-width: 0; }
.sharerow .input { flex: 1 1 220px; min-width: 0; }

/* pages that were not captured */
.tile.missed .img { background: color-mix(in srgb, var(--chip) 85%, transparent); display: grid; place-items: center; }
.tile .ph { display: grid; place-items: center; width: 100%; height: 100%; color: var(--ink-3); }
.tile .ph .ico { width: 30px; height: 30px; stroke-width: 1.5; opacity: .55; }
.tile .meta .why { color: var(--ink-3); font-size: 11.5px; margin-top: 1px; }
.btn.stopping { opacity: .85; cursor: default; }
.btn.stopping .ico { width: 15px; height: 15px; }
.acts .row { display: contents; }

/* client suggestions (Google-style dropdown) */
.combo { position: relative; }
.combo .input.hasclear { padding-right: 44px; }
.fieldclear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: transparent; color: var(--ink-3); cursor: pointer; padding: 0; }
.fieldclear:hover, .fieldclear:focus-visible { background: color-mix(in srgb, currentColor 12%, transparent); color: var(--ink); }
.fieldclear svg { width: 16px; height: 16px; }
.fieldclear[hidden] { display: none; }
.sugg { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: var(--solid); border-radius: 18px; box-shadow: 0 0 0 1px var(--hair), 0 14px 36px rgba(20, 20, 30, .16); max-height: 300px; overflow: auto; backdrop-filter: blur(14px); }
.sugg[hidden] { display: none; }
.sugg li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; cursor: pointer; font: 500 15px var(--body); }
.sugg li .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sugg li .nm b { font-weight: 700; }
.sugg li .sub { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; flex: none; }
.sugg li.on, .sugg li:hover { background: var(--chip); }
.urlnote { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-3); min-height: 0; }
.urlnote { min-height: 20px; }  /* reserve the line so the layout never jumps under the pointer */
.urlnote .ico { width: 15px; height: 15px; flex: none; }
.urlnote.ok { color: #2f7a4b; } .urlnote.warn { color: #9a6200; }
.urlnote .linkbtn { all: unset; cursor: pointer; font-weight: 600; text-decoration: underline; }
.sugg li .nm { color: var(--ink-2); }
.sugg li .nm b { color: var(--ink); font-weight: 800; }

/* pinned badge as a button */
.badge.pinbtn { cursor: pointer; border: 0; font: inherit; font-size: inherit; line-height: inherit; }
.badge.pinbtn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.badge.pinbtn[disabled] { opacity: .6; cursor: default; }
/* note flag in history */
.noteflag { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--chip); color: var(--ink-3); }
.noteflag .ico { width: 14px; height: 14px; }
/* pages-found header with storage readout */
.hero.split { display: flex; gap: 28px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.hero.split > div:first-child { flex: 1 1 360px; min-width: 0; }
.hero.split p { max-width: none; }
.readout { flex: 0 1 260px; min-width: 220px; display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 18px; background: var(--glass); box-shadow: 0 0 0 1px var(--hair); font-size: 13.5px; }
.readout:empty { display: none; }
.readout > div { display: flex; flex-direction: column; gap: 1px; }
.readout b { font: 600 15px var(--body); }

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
/* compact theme control in the top bar */
.themectl { position: relative; display: flex; align-items: center; }
.themepanel { width: max-content; position: absolute; left: 50%; top: 50%; z-index: 30; padding: 4px; border-radius: 999px; transform: translate(calc(-50% + var(--dx, 0px)), -50%); animation: themein .18s ease-out; }
.themepanel[hidden] { display: none; }
.themepanel { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 0 0 1px rgba(37,39,44,.1), 0 12px 30px -8px rgba(37,39,44,.35); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .themepanel { background: #2a2c31; box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 12px 30px -8px rgba(0,0,0,.6); } }
:root[data-theme="dark"] .themepanel { background: #2a2c31; box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 12px 30px -8px rgba(0,0,0,.6); }
.themectl.open .themebtn { visibility: hidden; }
.seg.theme { grid-auto-columns: 1fr; }
.seg.theme .tl { display: inline-flex; align-items: center; gap: 6px; }
.seg.theme .tl .ico { width: 15px; height: 15px; }
.seg.theme button { padding: 0 12px; }
@keyframes themein { from { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), -50%) scale(.86); } to { opacity: 1; transform: translate(calc(-50% + var(--dx, 0px)), -50%) scale(1); } }
@media (prefers-reduced-motion: reduce) { .themepanel { animation: none; } }
.foot { flex-direction: column; gap: 14px; }
.foot .by { display: flex; align-items: center; gap: 8px; }

/* stacked storage bar */
.sbarwrap { display: flex; flex-direction: column; gap: 8px; }
.sbar { display: flex; height: 10px; border-radius: 99px; background: var(--chip); overflow: hidden; box-shadow: inset 0 1px 2px rgba(37, 39, 44, .08); }
.sbar i { display: block; height: 100%; transition: width .8s var(--ease); }
.sbar i.pin { background: linear-gradient(90deg, var(--fawn), #e58a4a); }
.sbar i.tmp { background: linear-gradient(90deg, #8fd6a4, var(--tea)); }
.sbar.hot i.tmp { background: linear-gradient(90deg, var(--bitter), #c0392b); }
.slegend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--ink-2); }
.slegend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.slegend .dot.pin { background: #e58a4a; } .slegend .dot.tmp { background: #8fd6a4; }
.slegend b { color: var(--ink); font-weight: 600; }
/* checkbox row */
.check { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: #25272C; flex: none; }
/* keep the theme control in the exact middle of the top bar */
/* the theme button sits in the bar's flow, right beside New Capture, so it can never cover the tabs */
.toolbar .grow.g2 { display: none; }
@media (min-width: 561px) { .toolbar .themectl { margin-right: 2px; } }

/* account, admin, storage link */
.seg.none .pill { opacity: 0; }
.slegend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.slegend.end { justify-content: flex-end; }
.morespace { margin-left: auto; font-size: 12px; color: var(--ink-3); text-decoration: none; }
.morespace u { text-underline-offset: 2px; } .morespace:hover { color: var(--ink); }
.tb-admin, .tb-actions .btn.icon { position: relative; }
.dotbadge { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #FE5F55; color: #fff; font: 700 10px/16px var(--body); text-align: center; }
.ulist { display: flex; flex-direction: column; gap: 10px; }
.urow { border-radius: 18px; background: var(--chip); }
.urow.off { opacity: .6; }
.urow .t { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .urow .t b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.urow .t span { color: var(--ink-3); font-size: 12.5px; overflow-wrap: anywhere; }
.ustore { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.ureset { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; } .ureset .input { flex: 1; min-width: 220px; }
.reqnote { font-style: italic; display: block; margin-top: 2px; }
.lr .t { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 200px; }
.themectl { z-index: 6; } .themectl.open { z-index: 40; }

/* roles, space card, subtle self-delete */
.linkquiet { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 13px; color: var(--ink-3); cursor: pointer; text-decoration: none; }
.linkquiet:hover, .linkquiet:focus-visible { text-decoration: underline; }
.delmine { margin-top: 28px; padding-top: 8px; }
.delpanel .dellist { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.btn.danger:not(.ghost):not(.quiet) { background: #c62828; color: #fff; border-color: #c62828; }
.btn.danger:disabled { opacity: .4; cursor: not-allowed; }
.spacecard .row.warn b { color: #b26a00; }
.spacecard .sbar .mar { background: repeating-linear-gradient(45deg, rgba(178,106,0,.55) 0 4px, rgba(178,106,0,.25) 4px 8px); }
.bignum { font-size: 44px; font-weight: 700; line-height: 1; }
.notice.warn { background: rgba(255,170,0,.14); border-color: rgba(178,106,0,.5); }

.cmpdates span { display: block; }

/* help menu + embedded knowledge base */
.helpwrap { position: relative; display: flex; }
.helpmenu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; min-width: 200px; padding: 6px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px rgba(37,39,44,.1), 0 12px 30px -8px rgba(37,39,44,.35); display: grid; gap: 2px; animation: helpin .16s ease-out; transform-origin: top right; }
@keyframes helpin { from { opacity: 0; transform: translateY(-4px) scale(.96); } to { opacity: 1; transform: none; } }
.helpmenu[hidden] { display: none; }
.helpmenu a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: inherit; text-decoration: none; font-size: 14px; white-space: nowrap; }
.helpmenu a:hover, .helpmenu a:focus-visible { background: var(--chip); outline: none; }
.helpmenu .ico { width: 16px; height: 16px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .helpmenu { background: #2a2c31; box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 12px 30px -8px rgba(0,0,0,.6); } }
:root[data-theme="dark"] .helpmenu { background: #2a2c31; box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 12px 30px -8px rgba(0,0,0,.6); }
.kbhero { margin-bottom: 4px; }
.kbframe { border-radius: 18px; overflow: hidden; padding: 0; background: #fff; }
.kbframe iframe { display: block; width: 100%; height: calc(100vh - 220px); min-height: 520px; border: 0; background: #fff; }

/* integrations */
.badge.api { background: rgba(84, 110, 230, .14); color: #3a4fb8; }
.keybox { font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; padding: 8px 12px; border-radius: 10px; background: var(--chip); word-break: break-all; }
.keyfresh { box-shadow: 0 0 0 2px rgba(46, 139, 87, .35); }
.conn .field .row .input { flex: 1; min-width: 200px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ink, #25272c); }
.conn details summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 4px 0; }
.loglist { display: grid; gap: 6px; margin-top: 8px; }
.logrow { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--chip); font-size: 13px; }
.logrow .t { display: flex; flex-direction: column; min-width: 0; }
.logrow .t span { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) { .logrow { grid-template-columns: auto 1fr; } }
.codewrap { position: relative; }
.codewrap .btn { position: absolute; top: 8px; right: 8px; }
pre.code { margin: 0; padding: 12px 90px 12px 14px; border-radius: 12px; background: var(--chip); font: 12.5px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-word; }
.copydlg { position: fixed; z-index: 60; left: 50%; top: 20%; transform: translateX(-50%); width: min(520px, calc(100% - 32px)); padding: 18px; border-radius: 16px; display: grid; gap: 10px; background: var(--solid, #fff); box-shadow: 0 20px 50px -10px rgba(0,0,0,.4); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
:root[data-theme="dark"] .badge.api { color: #aab8ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge.api { color: #aab8ff; } }

.connhead { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.connhead .t { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.connhead .t b { font-size: 17px; }
.connhead .t .hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.connhead .chev .ico { transition: transform .2s var(--ease); }
.conn.open .connhead .chev .ico { transform: rotate(180deg); }
.conn .connbody { display: none; gap: 14px; }
.conn.open .connbody { display: flex; }

/* menus, support, paused connections */
.helpmenu .mcount { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: #e5484d; color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.helpwrap .btn { position: relative; }
.reqrow { display: grid; gap: 6px; padding: 14px; border-radius: 14px; background: var(--chip); }
.reqtext { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.reqshot { max-width: 260px; max-height: 180px; border-radius: 10px; box-shadow: 0 0 0 1px rgba(37,39,44,.12); display: block; }
.replies { display: grid; gap: 8px; }
.reply { padding: 10px 12px; border-radius: 12px; background: var(--solid); box-shadow: 0 0 0 1px rgba(37,39,44,.08); }
.reply p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.notes .reply { background: rgba(255, 196, 0, .1); }
.connheadrow { display: flex; align-items: center; gap: 12px; }
.connheadrow .connhead { flex: 1; min-width: 0; }
.switchlbl { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.switchlbl input { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; border-radius: 99px; background: rgba(37,39,44,.2); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.switchlbl input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switchlbl input:checked { background: #2e8b57; }
.switchlbl input:checked::after { transform: translateX(16px); }
.conn.paused .connhead .t b { opacity: .6; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fchip { border: 0; padding: 8px 14px; border-radius: 99px; background: var(--chip); font: 600 13.5px var(--body); color: var(--ink-2, inherit); cursor: pointer; }
.fchip.on { background: var(--ink); color: #fff; }
:root[data-theme="dark"] .fchip.on { background: #f2f2f3; color: #1d1e22; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fchip.on { background: #f2f2f3; color: #1d1e22; } }

.switchlbl.arming { background: rgba(255, 152, 0, .16); padding: 4px 10px 4px 6px; margin: -4px -10px -4px -6px; border-radius: 99px; color: #b25c00; transition: background .2s; }
.switchlbl.arming input { background: #f59e0b; }
.switchlbl.arming input::after { transform: translateX(8px); }

/* retry / retake, open in new tab */
.openlink { display: inline-flex; vertical-align: middle; color: var(--ink-3); padding: 2px; border-radius: 6px; }
.openlink:hover { color: var(--ink); background: var(--chip); }
.openlink .ico { width: 14px; height: 14px; }
.item .openlink { margin-left: auto; }
.rtrow { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 8px; }
.rtrow .btn { gap: 6px; }
.rtrow .btn .ico { width: 14px; height: 14px; }
.rtnote { font-size: 12px; color: var(--ink-3); }
.rtnote.ok { color: #2e7d4f; }
.rtnote.bad { color: var(--err-ink); }

.badge.beta { background: rgba(124, 92, 255, .14); color: #5b3fd0; }
.tile .meta .rtnote { white-space: normal; overflow: visible; text-overflow: clip; word-break: break-word; line-height: 1.35; }
/* schedules */
.schedcard { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line, rgba(127,127,127,.18)); }
.schedcard:first-child { border-top: 0; padding-top: 0; }
.schedcard .t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.schedcard .t span { overflow-wrap: anywhere; }
.schedmeta { display: flex; flex-direction: column; gap: 4px; font-size: .92em; }
.schedmeta .badge { vertical-align: middle; }
.err-ink { color: var(--err-ink); }
.schedhist summary { cursor: pointer; font-size: .92em; color: var(--muted, inherit); }
.schedhist .list { margin-top: 8px; }
.schedform { gap: 14px; }
.schedform .hint .ico { width: 15px; height: 15px; vertical-align: -3px; }
.ctools a.badge { text-decoration: none; }
/* notifications and public password pages */
.forgotlink { display: block; text-align: center; font-size: .92em; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.pubh { margin: 0; font-size: 1.25rem; }
.okmsg { margin: 0; line-height: 1.5; }
.okmsg .ico { width: 18px; height: 18px; vertical-align: -4px; }
.nrow { align-items: flex-start; }
.nrow input { margin-top: 3px; }
/* Admin Settings: People rows (summary + Manage panel) and Add a person */
.urow { display: block; padding: 0; }
.uhead { display: grid; grid-template-columns: minmax(160px, 1.3fr) minmax(170px, 1fr) auto; gap: 12px 20px; align-items: center; padding: 14px 16px; }
.managebtn { gap: 6px; }
.managebtn .chev { width: 16px; height: 16px; transition: transform .25s; }
.urow.open .managebtn .chev { transform: rotate(180deg); }
.upanel { border-top: 1px solid var(--line, rgba(127,127,127,.18)); padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 14px; }
.ugrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.ugroup { background: var(--bg); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.ugh { display: flex; flex-direction: column; gap: 2px; }
.ugh b { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.ugbody { display: flex; flex-direction: column; gap: 10px; }
.uline { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.uline .ul, .udanger .ul { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 150px; }
.uline .ul > span:first-child, .udanger .ul > span:first-child { font-weight: 600; font-size: 13.5px; }
.uline .hint, .udanger .hint, .ugh .hint { font-size: 12px; }
.uctl { display: flex; gap: 6px; align-items: center; }
.ustep { display: flex; align-items: center; gap: 8px; }
.ustep b { min-width: 52px; text-align: center; font-size: 13.5px; }
.ugroup .ureset { display: flex; gap: 8px; flex-wrap: wrap; }
.ugroup .ureset .input { flex: 1 1 200px; min-width: 0; }
.udanger { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; border: 1px dashed rgba(254, 95, 85, .45); }
.udanger .ul > span:first-child { color: var(--err-ink); }
/* "How they get in": even space above and below the selected pill */
.seg.addhow { padding: 5px; }
.seg.addhow .pill { top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / var(--n)); box-shadow: 0 1px 2px rgba(37, 39, 44, .14), 0 1px 4px rgba(37, 39, 44, .08); }
@media (max-width: 760px) { .uhead { grid-template-columns: 1fr; } .managebtn { justify-self: start; } }
.ugroup.wide { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ugroup.wide .ugbody { flex: 0 1 380px; }
.managebtn { min-width: 112px; justify-content: center; }
.roleswitch { --n: 3; --i: 0; --a: 0; position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 5px; border-radius: 999px; background: var(--chip); box-shadow: inset 0 1px 2px rgba(37, 39, 44, .08); width: 100%; max-width: 420px; }
.roleswitch .rpill, .roleswitch .rask { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / var(--n)); border-radius: 999px; pointer-events: none; transform-origin: center; }
.roleswitch .rpill { background: var(--pillbg); box-shadow: 0 1px 2px rgba(37, 39, 44, .14), 0 1px 4px rgba(37, 39, 44, .08); transform: translateX(calc(var(--i) * 100%)); }
.roleswitch .rask { background: rgba(255, 152, 0, .16); box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .5); transform: translateX(calc(var(--a) * 100%)) scale(.94); opacity: 0; transition: opacity .25s ease, transform .35s cubic-bezier(.32,.72,0,1); }
.roleswitch.asking .rask { opacity: 1; transform: translateX(calc(var(--a) * 100%)) scale(1); }
.roleswitch button { position: relative; z-index: 1; border: 0; background: none; height: 32px; border-radius: 999px; font: 600 13px var(--body); color: var(--ink-2); padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; transition: color .3s ease; display: flex; align-items: center; justify-content: center; }
.roleswitch button span { display: inline-block; transition: opacity .2s ease; }
.roleswitch button.on { color: var(--ink); }
.roleswitch button.asking { color: #b25c00; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .roleswitch button.asking { color: #ffb84d; } }
:root[data-theme="dark"] .roleswitch button.asking { color: #ffb84d; }
@media (prefers-reduced-motion: reduce) { .roleswitch .rask { transition: none; } }
/* Server Health and Backups */
.hlist { display: flex; flex-direction: column; gap: 8px; }
.hrow { display: grid; grid-template-columns: 10px minmax(110px, 160px) 1fr; gap: 10px; align-items: baseline; }
.hrow .hint { font-size: 13px; overflow-wrap: anywhere; }
.hdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; transform: translateY(-1px); }
.hdot.ok { background: #34c38f; } .hdot.bad { background: var(--bitter, #fe5f55); }
@media (max-width: 560px) { .hrow { grid-template-columns: 10px 1fr; } .hrow .hint { grid-column: 2; } }

/* ---------- portfolio ---------- */
.sbar i.pub { background: linear-gradient(90deg, #6b7cf0, #8e9bff); }
.slegend .dot.pub { background: #6b7cf0; }
.badge.pub { background: rgba(84, 110, 230, .14); color: #3a4fb8; text-decoration: none; }
.badge.pub .ico, .badge.done .ico { width: 13px; height: 13px; }
:root[data-theme="dark"] .badge.pub { color: #aab8ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge.pub { color: #aab8ff; } }
.tb-folio.on { background: var(--chip); }
.folio-site .siteurl { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 17px; min-width: 0; }
.folio-site .siteurl b { overflow-wrap: anywhere; }
.folio-site .siteurl .ico { width: 18px; height: 18px; flex: none; color: var(--ink-2); }
.folio-tools { margin: 4px 0 2px; }
.flist { display: flex; flex-direction: column; gap: 12px; }
.frow { padding: 12px 14px; transition: box-shadow .2s, transform .2s; }
.frow.pub { box-shadow: 0 0 0 1.5px rgba(107, 124, 240, .35), var(--shadow-sm); }
.fhead { display: flex; align-items: center; gap: 12px; min-width: 0; }
.grip { flex: none; width: 28px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--ink-3); cursor: grab; border-radius: 8px; touch-action: none; }
.grip:hover, .grip:focus-visible { background: var(--chip); color: var(--ink); }
.grip .ico { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.frow.dragging .grip { cursor: grabbing; }
.fcover { flex: none; width: 96px; height: 60px; border-radius: 10px; overflow: hidden; background: var(--chip); border: 0; padding: 0; display: grid; place-items: center; color: var(--ink-3); cursor: pointer; }
.fcover img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.fhead .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fhead .t b { font: 600 15px var(--head); display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.fhead .t > span { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ftags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.ftags i { font-style: normal; font-size: 11.5px; padding: 2px 8px; border-radius: 99px; background: var(--chip); color: var(--ink-2); }
.fact { display: flex; align-items: center; gap: 12px; flex: none; }
.fedit { margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--hair); }
.fpages { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.fpage { border-radius: 14px; background: var(--field); box-shadow: 0 0 0 1px var(--hair); overflow: hidden; display: flex; flex-direction: column; }
.fpage.on { box-shadow: 0 0 0 2px #6b7cf0; }
.fpage .pick { position: relative; border: 0; padding: 0; background: var(--chip); aspect-ratio: 16 / 10; cursor: pointer; display: grid; place-items: center; color: var(--ink-3); }
.fpage .pick img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.fpage:not(.on) .pick img { opacity: .55; filter: grayscale(.4); }
.fpage .tick { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: #6b7cf0; color: #fff; display: grid; place-items: center; }
.fpage .tick .ico { width: 13px; height: 13px; stroke-width: 2.6; }
.fpage .meta { padding: 7px 9px 4px; min-width: 0; }
.fpage .meta b { display: block; font: 600 12px var(--body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fpage .meta span { display: block; font-size: 11px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fpage .coverbtn { margin: 2px 8px 8px; align-self: flex-start; }
.fpage.cover .coverbtn { background: rgba(232, 85, 62, .12); color: #b23b27; }
.fpage .coverbtn .ico { width: 13px; height: 13px; }
@media (max-width: 720px) {
  .fhead { flex-wrap: wrap; }
  .fhead .t { flex-basis: calc(100% - 150px); }
  .fact { width: 100%; justify-content: space-between; padding-left: 40px; }
  .fcover { width: 72px; height: 48px; }
  .fedit .grid2 { grid-template-columns: 1fr; }
}
.folio-tools .input { width: 100%; }
.sitesettings { border-top: 1px solid var(--hair); padding-top: 12px; }
.sitesettings summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.slugrow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.slugrow .input { max-width: 240px; }
.slugrow span { color: var(--ink-2); font-size: 14px; overflow-wrap: anywhere; }
.colorin { height: 46px; padding: 4px 6px; max-width: 120px; cursor: pointer; }
.logoprev { max-height: 44px; max-width: 180px; border-radius: 8px; background: var(--chip); padding: 4px; }
/* the favicon preview: a little browser tab */
.tabprev { display: inline-flex; align-items: center; gap: 8px; max-width: 220px; min-width: 150px; height: 34px; padding: 0 10px 0 12px; border-radius: 10px 10px 0 0; background: var(--solid); border: 1px solid var(--hair); border-bottom: 0; box-shadow: var(--shadow-sm); font-size: 12.5px; color: var(--ink); }
.tabprev img { width: 16px; height: 16px; flex: none; image-rendering: auto; }
.tabprev .tabdot { width: 16px; height: 16px; border-radius: 4px; background: var(--chip); flex: none; }
.tabprev .tabname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabprev .tabx { color: var(--ink-3); font-size: 14px; }
.domainbox { border-top: 1px solid var(--hair); padding-top: 14px; }

/* portfolio: publish switch with its words on the left */
.pubsw { gap: 10px; }
.pubsw .swtext { min-width: 66px; text-align: right; color: var(--ink-2); }
/* portfolio: DNS records */
.dnsrec { display: grid; grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1.6fr); gap: 10px 14px; padding: 12px 14px; border-radius: 14px; background: var(--chip); }
.dnscell { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dnscell .label { font-size: 11px; }
.dnsval { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dnsval code { font: 600 13px ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; min-width: 0; }
.dnsnote { grid-column: 1 / -1; margin: 0; }
.dnsmsg { margin: 0; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; }
.dnsmsg.ok { background: rgba(46, 139, 87, .12); color: #1d6b40; }
.dnsmsg.wait { background: rgba(245, 158, 11, .14); color: #8a5300; }
:root[data-theme="dark"] .dnsmsg.ok { color: #9be2b5; } :root[data-theme="dark"] .dnsmsg.wait { color: #ffcf85; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dnsmsg.ok { color: #9be2b5; } :root:not([data-theme="light"]) .dnsmsg.wait { color: #ffcf85; } }
.dnshelp summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.dnshelp ul { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); display: grid; gap: 4px; }
@media (max-width: 640px) { .dnsrec { grid-template-columns: 1fr; } }
/* portfolio: tags as pills, with the tag bank underneath */
.tagin { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 46px; padding: 7px 10px; border-radius: 14px; background: var(--field); box-shadow: 0 0 0 1px var(--hair); cursor: text; }
.tagin:focus-within { box-shadow: 0 0 0 2px #6b7cf0; }
.tagpill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 11px; border-radius: 99px; background: rgba(107, 124, 240, .14); color: #3a4fb8; font: 600 12.5px var(--body); }
:root[data-theme="dark"] .tagpill { color: #aab8ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tagpill { color: #aab8ff; } }
.tagpill button { border: 0; background: none; color: inherit; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; padding: 0; }
.tagpill button:hover { background: rgba(107, 124, 240, .2); }
.tagpill .ico { width: 12px; height: 12px; stroke-width: 2.4; }
.tagtext { flex: 1; min-width: 140px; border: 0; background: none; outline: none; font: 14px var(--body); color: var(--ink); padding: 4px 2px; }
.tagbank { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.tagbank:empty { display: none; }
.tagopt { display: inline-flex; align-items: center; gap: 4px; border: 0; border-radius: 99px; padding: 5px 11px 5px 8px; background: var(--chip); color: var(--ink-2); font: 600 12.5px var(--body); cursor: pointer; }
.tagopt:hover { background: rgba(107, 124, 240, .14); color: #3a4fb8; }
.tagopt .ico { width: 12px; height: 12px; stroke-width: 2.4; }
/* portfolio: dragging */
.flist .frow { will-change: transform; }
.frow.dragging { z-index: 5; position: relative; cursor: grabbing; box-shadow: 0 18px 40px rgba(0, 0, 0, .22); }
/* (?) explanations */
.tip { position: relative; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--ink-3); cursor: help; outline: none; flex: none; }
.tip:hover, .tip:focus-visible, .tip:focus { color: var(--ink); background: var(--chip); }
.tip .ico { width: 16px; height: 16px; }
.tipbox { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%) translateY(4px); width: max-content; max-width: min(320px, calc(100vw - 40px)); padding: 10px 12px; border-radius: 12px; background: #25272C; color: #fff; font: 13px/1.45 var(--body); text-align: left; box-shadow: 0 10px 28px rgba(0, 0, 0, .25); opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 20; }
.tip:hover .tipbox, .tip:focus .tipbox { opacity: 1; transform: translateX(-50%); }
:root[data-theme="dark"] .tipbox { background: #f1f0ec; color: #25272C; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tipbox { background: #f1f0ec; color: #25272C; } }
@media (max-width: 560px) { .tipbox { left: auto; right: -8px; transform: translateY(4px); } .tip:hover .tipbox, .tip:focus .tipbox { transform: none; } }

/* quicker sign-in */
.altsign { display: flex; justify-content: center; align-items: center; gap: 6px 18px; flex-wrap: wrap; color: var(--ink-3); }
.altsign .forgotlink { margin: 0; }
.check.keepme { font-size: 13.5px; color: var(--ink-2); }
.input.codein, .input.pinin { text-align: center; font-size: 24px; letter-spacing: .4em; font-variant-numeric: tabular-nums; padding-left: .4em; }
.devrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, currentColor 5%, transparent); }

/* back to the team's iDashboard (shown only to @emmydrafts.com accounts) */
.toolbar .tb-idash { margin-right: 10px; padding: 0 12px 0 8px; gap: 4px; flex: none; }
.toolbar .tb-idash svg { width: 16px; height: 16px; }
@media (max-width: 560px) { .toolbar .tb-idash { order: 0; padding: 0 8px; margin-right: 4px; } .toolbar .tb-idash span { display: none; } }
.hero .version { margin-top: 6px; font-size: 12.5px; }

/* ---------- portfolio analytics ---------- */
.folio-tabs { display: inline-flex; gap: 4px; margin-top: 16px; padding: 4px; border-radius: 999px; background: var(--chip); }
.folio-tabs a { padding: 7px 16px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.folio-tabs a.on { background: var(--btn-bg); color: var(--btn-ink); }
.an-tools { gap: 12px; flex-wrap: wrap; align-items: center; }
.an-custom { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.an-custom .input.sm, .an-owner .input.sm { height: 36px; padding: 0 10px; font-size: 13.5px; width: auto; }
.an-owner { display: inline-flex; gap: 8px; align-items: center; }
.an-own { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px; border-radius: 18px; }
.an-own-main { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.an-own-main .switch { margin-left: auto; }
.an-own .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.an-own .dot.on { background: #1baf7a; } .an-own .dot.off { background: var(--ink-3); }
.switch { position: relative; display: inline-flex; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: color-mix(in srgb, var(--ink) 22%, transparent); transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s var(--ease); }
.switch input:checked + i { background: #1baf7a; }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--ink); outline-offset: 2px; }
.an-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.an-kpi { display: flex; flex-direction: column; gap: 2px; }
.an-kpi .an-l { font-size: 12.5px; color: var(--ink-3); }
.an-kpi .an-sub, .an-kpi .an-delta { font-size: 12.5px; color: var(--ink-2); }
.an-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.an-card h3 { margin: 0; }
@media (max-width: 860px) { .an-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .an-grid { grid-template-columns: 1fr; } }

/* chart colours: reference palette slots 1 (blue) and 2 (orange), stepped for each theme */
:root { --viz-1: #2a78d6; --viz-2: #eb6834; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --viz-1: #3987e5; --viz-2: #d95926; } }
:root[data-theme="dark"] { --viz-1: #3987e5; --viz-2: #d95926; }
.viz-legend { display: flex; gap: 16px; font-size: 13px; color: var(--ink-2); }
.viz-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.sw.s1 { background: var(--viz-1); } .sw.s2 { background: var(--viz-2); }
.viz-wrap { position: relative; }
.viz-svg { display: block; width: 100%; height: auto; overflow: visible; outline: none; touch-action: pan-y; }
.viz-svg:focus-visible { box-shadow: 0 0 0 2px var(--ink-3); border-radius: 8px; }
.viz-grid { stroke: var(--hair); stroke-width: 1; }
.viz-base { stroke: var(--ink-3); stroke-width: 1; }
.viz-tick { fill: var(--ink-3); font-size: 11px; font-family: var(--body); }
.viz-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-line.s1, .viz-dot.s1, .viz-mark.s1 { stroke: var(--viz-1); }
.viz-line.s2, .viz-dot.s2, .viz-mark.s2 { stroke: var(--viz-2); }
.viz-dot { fill: var(--viz-1); stroke-width: 0; } .viz-dot.s2 { fill: var(--viz-2); }
.viz-mark { stroke-width: 2.5; fill: var(--solid); }
.viz-cross { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.viz-tip { position: absolute; top: 8px; min-width: 140px; padding: 8px 10px; border-radius: 10px; background: var(--solid); box-shadow: var(--shadow-sm), 0 0 0 1px var(--hair); font-size: 12.5px; color: var(--ink-2); pointer-events: none; }
.viz-tip b { color: var(--ink); margin: 0 2px 0 6px; } .viz-tip-d { font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.viz-tip .sw { width: 8px; height: 8px; }
.viz-table summary { cursor: pointer; font-size: 13px; color: var(--ink-2); }
.viz-table table, .an-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.viz-table th, .viz-table td, .an-table th, .an-table td { text-align: right; padding: 8px 10px; border-bottom: 1px solid var(--hair); }
.viz-table th:first-child, .viz-table td:first-child, .an-table th:first-child, .an-table td:first-child { text-align: left; }
.an-table th, .viz-table th { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.an-table td a { color: inherit; }
.an-tablewrap { overflow-x: auto; }
.barlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bl-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.bl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-val { font-weight: 600; white-space: nowrap; } .bl-pct { font-weight: 400; color: var(--ink-3); }
.bl-track { height: 6px; border-radius: 4px; background: var(--chip); margin-top: 4px; }
.bl-track i { display: block; height: 100%; border-radius: 4px; background: var(--viz-1); }

/* ---------- analytics 2.5: locations, CSV menu, piece detail, screenshot heat ---------- */
.an-cardhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.an-plink { color: var(--ink); font-weight: 600; text-decoration: none; }
.an-plink:hover { text-decoration: underline; }
.an-ext { margin-left: 8px; color: var(--ink-3); text-decoration: none; font-size: 13px; }
.an-ext:hover { color: var(--ink); }
.an-menu { position: relative; }
.an-menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.an-menu > summary::-webkit-details-marker { display: none; }
.an-menu > summary .ico { width: 16px; height: 16px; }
.an-menu-p { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; display: flex; flex-direction: column; gap: 2px; min-width: 240px; padding: 6px; border-radius: 16px; background: var(--solid); box-shadow: var(--shadow-sm), 0 0 0 1px var(--hair); }
.an-menu-i { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 9px 12px; border: 0; border-radius: 11px; background: none; font: 500 14px var(--body); color: var(--ink); text-align: left; cursor: pointer; }
.an-menu-i:hover, .an-menu-i:focus-visible { background: var(--chip); }
.an-menu-i .hint { font-size: 12.5px; }
.an-back { align-self: flex-start; font-size: 14px; color: var(--ink-2); text-decoration: none; }
.an-back:hover { color: var(--ink); }
.an-piece-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.an-piece-head h2 { margin: 0; font-size: 24px; }
.heat-ctl { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.heat-ctl .input.sm { height: 36px; padding: 0 10px; font-size: 13.5px; width: auto; max-width: 100%; }
.heat-scroll { max-height: 760px; overflow: auto; border-radius: 14px; box-shadow: 0 0 0 1px var(--hair); background: var(--chip); overscroll-behavior: contain; }
.heat-scroll.mobile { max-width: 420px; margin: 0 auto; width: 100%; }
.heat-img { position: relative; }
.heat-img img { display: block; width: 100%; height: auto; }
.heat-layer { position: absolute; inset: 0; pointer-events: none; }
.heat-layer.clicks { pointer-events: auto; }
.heat-veil { position: absolute; left: 0; right: 0; background: #16181d; }
.heat-line { position: absolute; left: 0; right: 0; border-top: 2px dashed #ffffff; box-shadow: 0 -1px 0 rgba(0, 0, 0, .35); }
.heat-line span { position: absolute; left: 10px; top: 6px; padding: 3px 9px; border-radius: 999px; background: rgba(22, 24, 29, .86); color: #fff; font: 600 12px var(--body); white-space: nowrap; }
.heat-dot { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; background: #2a78d6; box-shadow: 0 0 0 2px #ffffff, 0 1px 6px rgba(0, 0, 0, .35); }
.heat-tip { position: absolute; z-index: 2; min-width: 0; white-space: nowrap; }
@media (max-width: 640px) { .an-menu-p { right: auto; left: 0; } .heat-line span { font-size: 11px; } }
.nrow-sub { margin: -6px 0 0 30px; font-size: 13px; }
.heat-ctl select.input.sm, .an-owner select.input.sm { padding-right: 34px; background-position: right 12px center; }
.an-refresh { display: inline-flex; align-items: center; gap: 8px; }
.an-refresh .hint { font-size: 12.5px; white-space: nowrap; }
.an-refresh .btn .ico { width: 16px; height: 16px; }

/* ---------- import past work ---------- */
.imp-kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.imp-kind { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--hair); background: var(--solid); color: var(--ink); text-align: left; font: inherit; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.imp-kind b { font-size: 15px; }
.imp-kind span { font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.imp-kind:hover { border-color: var(--ink-3); }
.imp-kind.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.imp-row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.imp-date { display: inline-flex; align-items: center; gap: 8px; }
.imp-date .input.sm { height: 36px; padding: 0 10px; font-size: 13.5px; width: auto; }
.imp-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 16px; border: 1.5px dashed var(--ink-3); border-radius: 16px; text-align: center; cursor: pointer; color: var(--ink-2); }
.imp-drop .ico { width: 22px; height: 22px; }
.imp-drop b { color: var(--ink); font-weight: 600; }
.imp-drop.over, .imp-drop:hover, .imp-drop:focus-visible { border-color: var(--ink); background: var(--chip); outline: none; }
.imp-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.imp-file { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 14px; background: var(--chip); }
.imp-file.bad { box-shadow: inset 0 0 0 1.5px #d14343; }
.imp-file.bad .hint { color: #c03a3a; }
.imp-thumb { width: 56px; height: 42px; object-fit: cover; object-position: top; border-radius: 8px; background: #fff; box-shadow: 0 0 0 1px var(--hair); }
.imp-thumb.m { width: 30px; height: 52px; justify-self: center; }
.imp-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.imp-meta .input.sm { height: 34px; padding: 0 10px; font-size: 14px; }
.imp-meta .hint { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-move { display: inline-flex; gap: 2px; }
.imp-move .btn { width: 32px; height: 32px; }
.imp-todo { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13.5px; }
.imp-bar { height: 8px; border-radius: 99px; background: var(--chip); overflow: hidden; }
.imp-bar i { display: block; height: 100%; background: var(--viz-1); border-radius: 99px; transition: width .3s; }
@media (max-width: 760px) {
  .imp-kinds, .imp-row2 { grid-template-columns: 1fr; }
  .imp-file { grid-template-columns: 44px minmax(0, 1fr); }
  .imp-file .seg, .imp-file .imp-move { grid-column: 2; justify-self: start; }
  .imp-thumb { width: 44px; height: 34px; }
}

/* top bar: "New Capture" and "History" shrink to "New" and an icon when the bar is crowded (fitBar in app.js) */
.seg.nav .nv-short { display: none; }
.toolbar.nav-compact .seg.nav .nv-full { display: none; }
.toolbar.nav-compact .seg.nav .nv-short { display: inline-flex; align-items: center; justify-content: center; }
.toolbar.nav-compact .seg.nav button { padding: 0 14px; }
.seg.nav .nv-short .ico { width: 17px; height: 17px; }
@media (min-width: 561px) { .toolbar .seg.nav { flex: none; } }
.toolbar.bar-tight { gap: 8px; padding-left: 16px; }
.toolbar.bar-tight .tb-idash { padding: 0 8px; margin-right: 2px; }
.toolbar.bar-tight .tb-idash span { display: none; }
.toolbar.bar-wrap { flex-wrap: wrap; border-radius: 28px; padding: 8px 8px 10px 16px; row-gap: 8px; }
.toolbar.bar-wrap .grow { order: 1; }
.toolbar.bar-wrap .grow.g2 { display: none; }
.toolbar.bar-wrap .themectl { order: 2; }
.toolbar.bar-wrap .tb-actions { order: 3; }
.toolbar.bar-wrap .seg.nav { order: 4; flex: 0 0 100%; }

/* portfolio: private site */
.badge.priv { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; background: color-mix(in srgb, #d98a1f 18%, transparent); color: var(--ink); }
.badge.priv .ico { width: 12px; height: 12px; }
.privbox { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--chip); }
.privbox.on { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, #d98a1f 55%, transparent); }
.privrow { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; }
.privrow .hint { font-size: 13px; }
.privrow .switch { margin-left: auto; flex: none; }
.privrow .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; margin-top: 6px; }
.privrow .dot.on { background: #1baf7a; } .privrow .dot.off { background: #d98a1f; }
.privbox .input.sm { height: 36px; padding: 0 12px; font-size: 14px; }
.privrow .switch input:checked + i { background: #d98a1f; }
