/* Jekto website - shared styles. Dark glass over a live background, green accent, amber for emphasis. */
:root {
  --bg: #0d0e0d;
  --glass: rgba(26, 28, 27, 0.55);
  --glass-2: rgba(36, 38, 37, 0.6);
  --glass-hi: rgba(255, 255, 255, 0.06);
  --edge: rgba(255, 255, 255, 0.07);
  --solid: #181918;
  --solid-2: #202120;
  --text: #ededed;
  --muted: #9a9d9b;
  --dim: #636664;
  --accent: #22c55e;
  --accent-2: #4ade80;
  --accent-ink: #04210f;
  --accent-soft: rgba(34, 197, 94, 0.13);
  --amber: #f59e0b;
  --amber-2: #fbbf24;
  --amber-soft: rgba(245, 158, 11, 0.13);
  --danger: #ef4444;
  --radius: 18px;
  --blur: blur(18px) saturate(150%);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
:where(svg[viewBox="0 0 24 24"]) { width: 1.15em; height: 1.15em; flex: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ---------- Page changes (site.js swaps <main> without reloading) ---------- */
main, .foot { transition: opacity .32s ease, translate .32s ease; }
.page-leave main, .page-leave .foot { opacity: 0; translate: 0 -18px; pointer-events: none; }
.page-enter main, .page-enter .foot { opacity: 0; translate: 0 26px; transition: none; }

/* ---------- Live background ---------- */
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none; }
.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px circle at var(--gx, 70%) var(--gy, 20%), rgba(34,197,94,.10), transparent 60%),
    radial-gradient(500px circle at calc(100% - var(--gx, 70%)) calc(100% - var(--gy, 20%)), rgba(245,158,11,.05), transparent 60%);
  transition: background .2s;
}

/* ---------- Primitives ---------- */
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.glass { background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--edge); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.eyebrow.amber { color: var(--amber); }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.025em; }
h2 { font-size: clamp(32px, 4.6vw, 58px); font-weight: 700; }
h3 { font-size: clamp(24px, 2.6vw, 34px); font-weight: 700; }
.lead { color: var(--muted); font-size: clamp(15px, 1.35vw, 18px); max-width: 600px; margin: 0; }
.accent { color: var(--accent); }
.amber { color: var(--amber); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.center { text-align: center; margin-inline: auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px; border: 0;
  background: var(--glass-2); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: inset 0 0 0 1px var(--edge);
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: transform .2s, background .2s, box-shadow .2s, color .2s;
}
.btn:hover { transform: translateY(-1px); background: rgba(52,55,53,.7); }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.btn.primary:hover { background: var(--accent-2); box-shadow: 0 0 0 4px var(--accent-soft), 0 10px 30px rgba(34,197,94,.28); }
.btn.amber { background: var(--amber-soft); color: var(--amber-2); box-shadow: inset 0 0 0 1px rgba(245,158,11,.25); }
.btn.amber:hover { background: rgba(245,158,11,.2); }
.btn.ghost { background: transparent; box-shadow: none; backdrop-filter: none; }
.btn.ghost:hover { background: var(--glass-hi); }
.btn.big { height: 54px; padding: 0 28px; font-size: 16px; }
.btn.danger { color: #fca5a5; background: rgba(239,68,68,.08); box-shadow: inset 0 0 0 1px rgba(239,68,68,.25); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn svg { width: 18px; height: 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 3px 11px; border-radius: 999px; background: var(--glass-hi); color: var(--muted); }
.chip.green { color: var(--accent-2); background: var(--accent-soft); }
.chip.amber { color: var(--amber-2); background: var(--amber-soft); }

/* ---------- Nav (floating glass bar with dropdowns) ---------- */
.nav { position: fixed; top: 14px; left: 0; right: 0; z-index: 60; pointer-events: none; }
.nav-bar {
  pointer-events: auto; width: min(1180px, 100% - 24px); margin: 0 auto; height: 60px; padding: 0 10px 0 18px;
  display: flex; align-items: center; gap: 22px; border-radius: 18px;
  background: rgba(20,21,20,.45); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: inset 0 0 0 1px var(--edge), 0 10px 40px rgba(0,0,0,.25);
  transition: background .3s;
}
.nav.scrolled .nav-bar { background: rgba(20,21,20,.72); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.brand img { width: 26px; height: 26px; filter: drop-shadow(0 0 10px rgba(34,197,94,.35)); }
.menu { display: flex; align-items: center; gap: 2px; height: 100%; }
.menu > .mi { position: relative; height: 100%; display: flex; align-items: center; }
.menu > .mi > a, .menu > .mi > button {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 10px;
  background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 500; transition: color .2s, background .2s;
}
.menu > .mi:hover > a, .menu > .mi:hover > button, .menu > .mi:focus-within > button { color: var(--text); background: var(--glass-hi); }
.menu .caret { width: 12px; height: 12px; transition: transform .25s; }
.menu > .mi:hover .caret, .menu > .mi:focus-within .caret { transform: rotate(180deg); }
.drop {
  position: absolute; top: calc(100% - 4px); left: -12px; min-width: 300px; padding: 10px; border-radius: 18px;
  background: rgba(22,23,22,.88); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  box-shadow: inset 0 0 0 1px var(--edge), 0 24px 60px rgba(0,0,0,.45);
  opacity: 0; visibility: hidden; transform: translateY(8px) scale(.98); transform-origin: top left;
  transition: opacity .22s, transform .22s, visibility .22s;
}
.drop.wide { min-width: 560px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.mi:hover > .drop, .mi:focus-within > .drop { opacity: 1; visibility: visible; transform: none; }
.drop a { display: flex; gap: 12px; padding: 10px 12px; border-radius: 12px; transition: background .15s; }
.drop a:hover { background: var(--glass-hi); }
.drop .di { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.drop .di.amber { background: var(--amber-soft); color: var(--amber); }
.drop .di svg { width: 17px; height: 17px; }
.drop b { display: block; font-size: 14px; font-weight: 600; }
.drop small { display: block; font-size: 12px; color: var(--muted); line-height: 1.4; }
.nav-right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.nav-right .btn { height: 40px; padding: 0 16px; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.mobile-menu { display: none; }
@media (max-width: 980px) {
  .menu, .nav-right .hide-md { display: none; }
  .nav-toggle { display: block; }
  .mobile-menu {
    pointer-events: auto; display: block; position: fixed; inset: 84px 12px auto; max-height: calc(100svh - 100px); overflow: auto;
    padding: 12px; border-radius: 18px; background: rgba(20,21,20,.92); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
    box-shadow: inset 0 0 0 1px var(--edge); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all .25s;
  }
  .nav.open .mobile-menu { opacity: 1; visibility: visible; transform: none; }
  .mobile-menu small { display: block; padding: 12px 10px 4px; font-size: 11px; letter-spacing: .12em; color: var(--dim); font-weight: 600; }
  .mobile-menu a { display: block; padding: 10px; border-radius: 10px; color: var(--muted); }
  .mobile-menu a:hover { background: var(--glass-hi); color: var(--text); }
  .mobile-menu .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
  .mobile-menu .btns .btn { display: flex; padding: 0; color: inherit; }
  .mobile-menu .btns .btn.primary { color: var(--accent-ink); }
}
@media (max-width: 520px) { .nav-right .hide-sm { display: none; } }

/* ---------- Scroll-driven effects (site.js sets --p: -1..1, --a: |p|) ---------- */
.fx { opacity: calc(1 - var(--a, 0) * 1.1); transform: translateY(calc(var(--p, 0) * 60px)); will-change: opacity, transform; }
.fx-3d {
  --side: 1;
  transform: perspective(1600px)
    rotateX(calc(var(--p, 0) * 28deg))
    rotateY(calc(var(--p, 0) * var(--side) * -16deg))
    translateY(calc(var(--p, 0) * 90px))
    scale(calc(1 - var(--a, 0) * .14));
  opacity: calc(1 - var(--a, 0) * .95);
  transform-origin: 50% 50%; will-change: transform, opacity;
}
@media (prefers-reduced-motion: reduce) {
  .fx, .fx-3d { transform: none !important; opacity: 1 !important; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- Hero ---------- */
.hero { min-height: 100svh; padding: 150px 0 40px; text-align: center; }
.hero .badge-row { display: flex; justify-content: center; }
.hero .pill { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; font-size: 13px; color: var(--muted); }
.hero .pill b { background: var(--amber); color: #2a1a00; padding: 2px 10px; border-radius: 999px; font-size: 12px; }
.hero h1 { font-size: clamp(44px, 8vw, 108px); font-weight: 800; margin: 26px auto 22px; max-width: 1000px; text-shadow: 0 4px 40px rgba(0,0,0,.6); }
.hero h1 em { font-style: normal; background: linear-gradient(100deg, var(--accent-2), var(--accent) 50%, var(--amber-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { margin: 0 auto; text-shadow: 0 2px 20px rgba(0,0,0,.8); }
.hero .ctas { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero .meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 22px; margin-top: 22px; color: var(--dim); font-size: 13px; }
.hero-stage { margin: 70px auto 0; width: min(1100px, 100%); }
.hero-tilt { transform: perspective(1800px) rotateX(calc(var(--h, 1) * 32deg)) scale(calc(1 - var(--h, 1) * .08)) translateY(calc(var(--h, 1) * -20px)); transform-origin: 50% 0; will-change: transform; }

/* App window mockup (hero) */
.app { border-radius: 16px; overflow: hidden; text-align: left; background: rgba(18,19,18,.82); box-shadow: inset 0 0 0 1px var(--edge), 0 40px 120px rgba(0,0,0,.6), 0 0 0 1px rgba(34,197,94,.05); }
.app-top { height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 14px; font-size: 12px; color: var(--muted); background: rgba(255,255,255,.02); }
.app-top img { width: 16px; height: 16px; }
.app-top .search { margin: 0 auto; width: 34%; height: 24px; border-radius: 7px; background: rgba(255,255,255,.05); display: flex; align-items: center; padding: 0 10px; font-size: 11px; color: var(--dim); }
.app-body { display: grid; grid-template-columns: 190px 1fr; min-height: 470px; }
.app-side { padding: 10px; font-size: 12.5px; color: var(--muted); background: rgba(255,255,255,.015); }
.app-side div { padding: 6px 10px; border-radius: 8px; display: flex; gap: 10px; align-items: center; }
.app-side div.on { color: var(--accent); background: var(--accent-soft); }
.app-side small { display: block; padding: 12px 10px 4px; font-size: 10px; letter-spacing: .12em; color: var(--dim); }
.app-side svg { width: 15px; height: 15px; }
.app-main { position: relative; }
@media (max-width: 760px) { .app-body { grid-template-columns: 1fr; } .app-side { display: none; } }

/* ---------- Statement breaks (words light up with scroll) ---------- */
.statement { padding: 22vh 0; }
.statement p { font-size: clamp(30px, 5vw, 68px); font-weight: 700; line-height: 1.15; letter-spacing: -.03em; margin: 0 auto; max-width: 1000px; text-align: center; }
.statement .w { opacity: .12; transition: opacity .25s, color .25s; }
.statement .w.on { opacity: 1; }
.statement .w.hl.on { color: var(--accent); }
.statement .w.am.on { color: var(--amber); }

/* ---------- Feature rail (follows you through the features) ---------- */
.rail {
  position: fixed; left: 18px; top: 50%; z-index: 40; padding: 8px; border-radius: 16px; display: grid; gap: 2px;
  transform: translate(-20px, -50%); opacity: 0; visibility: hidden; transition: opacity .35s, transform .35s, visibility .35s;
}
.rail.show { opacity: 1; visibility: visible; transform: translate(0, -50%); }
.rail a { position: relative; display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 11px; border-radius: 10px; color: var(--muted); font-size: 13px; font-weight: 500; overflow: hidden; width: 40px; transition: width .3s, background .2s, color .2s; }
.rail:hover a { width: 186px; }
.rail a svg { width: 18px; height: 18px; flex: none; }
.rail a span { white-space: nowrap; opacity: 0; transition: opacity .2s; }
.rail:hover a span { opacity: 1; }
.rail a:hover { background: var(--glass-hi); color: var(--text); }
.rail a.active { color: var(--accent); background: var(--accent-soft); }
.rail a.active::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--accent); }
@media (max-width: 1100px) {
  .rail { top: auto; bottom: 14px; left: 50%; transform: translate(-50%, 20px); display: flex; max-width: calc(100% - 24px); overflow-x: auto; scrollbar-width: none; }
  .rail.show { transform: translate(-50%, 0); }
  .rail a, .rail:hover a { width: auto; flex: none; }
  .rail a span { opacity: 1; }
}

/* ---------- Feature rows (alternating demo / blurb) ---------- */
.features .wrap { position: relative; }
@media (min-width: 1101px) { .features .wrap { width: min(1180px, 100% - 200px); } }
.group-head { padding: 12vh 0 4vh; text-align: center; display: grid; gap: 14px; justify-items: center; }
.feature { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: center; min-height: 92vh; padding: 6vh 0; scroll-margin-top: 80px; }
.feature.flip { grid-template-columns: 1fr 1.25fr; }
.feature.flip .demo { order: 2; }
.feature.flip .fx-3d { --side: -1; }
.blurb { display: grid; gap: 16px; align-content: center; }
.blurb p { color: var(--muted); margin: 0; font-size: 16px; }
.blurb ul { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 10px; }
.blurb li { display: flex; gap: 12px; color: #d4d6d5; font-size: 14.5px; }
.blurb li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/11px no-repeat; }
@media (max-width: 900px) {
  .feature, .feature.flip { grid-template-columns: 1fr; min-height: 0; padding: 8vh 0; }
  .feature.flip .demo { order: 0; }
}

/* ---------- Demo surfaces ---------- */
.stage { position: relative; border-radius: var(--radius); overflow: hidden; background: rgba(20,21,20,.7); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: inset 0 0 0 1px var(--edge), 0 30px 80px rgba(0,0,0,.45); }
.stage-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-size: 12px; color: var(--muted); }
.stage-bar b { color: var(--text); font-weight: 600; font-size: 13px; }
.stage-bar .sp { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.dots { background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px); background-size: 22px 22px; }
.hint { position: absolute; right: 14px; bottom: 10px; font-size: 11px; color: var(--dim); pointer-events: none; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: rgba(255,255,255,.05); }
.seg button { border: 0; background: none; height: 28px; padding: 0 12px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; transition: all .2s; }
.seg button.on { background: var(--solid-2); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.av { width: 24px; height: 24px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; font-size: 10px; font-weight: 700; color: #111; }

/* Board / flowchart */
.board { height: 440px; touch-action: none; }
.board svg.wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.board svg.wires path { fill: none; stroke: #8b8f8d; stroke-width: 1.6; }
.node { position: absolute; border-radius: 12px; background: var(--solid-2); padding: 12px 14px; font-size: 13px; cursor: grab; user-select: none; box-shadow: 0 8px 24px rgba(0,0,0,.35); transition: box-shadow .2s; }
.node.dragging { cursor: grabbing; box-shadow: 0 0 0 2px var(--accent), 0 18px 40px rgba(0,0,0,.5); z-index: 3; }
.node.note { background: #3b3417; width: 190px; }
.node.swatch { padding: 0; width: 104px; overflow: hidden; }
.node.swatch i { display: block; height: 58px; }
.node.swatch b { display: block; padding: 7px 10px 0; font-size: 12px; }
.node.swatch small { display: block; padding: 0 10px 8px; color: var(--muted); font-size: 11px; }
.node.heading { background: none; box-shadow: none; font-size: 24px; font-weight: 700; padding: 0; }
.node.step { border-radius: 999px; padding: 9px 18px; font-weight: 600; background: #1d3426; color: var(--accent-2); }
.node.decide { width: 104px; height: 104px; padding: 0; background: none; box-shadow: none; display: grid; place-items: center; font-weight: 600; font-size: 12px; color: #2a1a00; }
.node.decide::before { content: ""; position: absolute; inset: 15px; background: var(--amber); transform: rotate(45deg); border-radius: 10px; z-index: -1; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.node.decide { isolation: isolate; }
.node.task { width: 200px; }
.node.task .st { color: var(--accent); font-size: 11px; background: var(--accent-soft); padding: 1px 8px; border-radius: 6px; }
.node.task b { display: block; margin: 6px 0 2px; }
.node.task small { color: var(--accent); }

/* Lists: kanban <-> table */
.lists { padding: 0 16px 16px; min-height: 380px; }
.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.col { background: rgba(255,255,255,.025); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 300px; transition: background .2s, box-shadow .2s; }
.col.over { background: rgba(34,197,94,.06); box-shadow: inset 0 0 0 1px rgba(34,197,94,.4); }
.col h4 { margin: 2px 4px 4px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; display: flex; justify-content: space-between; color: var(--muted); }
.card { background: var(--solid-2); border-radius: 10px; padding: 10px 12px; font-size: 13px; cursor: grab; box-shadow: 0 2px 8px rgba(0,0,0,.25); animation: pop .3s ease-out; }
.card.dragging { opacity: .35; }
.card .meta { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.card .meta .av { margin-left: auto; width: 20px; height: 20px; font-size: 9px; }
.tag { font-size: 10px; padding: 1px 7px; border-radius: 6px; font-weight: 600; }
.t-g { background: rgba(34,197,94,.15); color: var(--accent-2); }
.t-y { background: rgba(245,158,11,.15); color: var(--amber-2); }
.t-r { background: rgba(239,68,68,.15); color: #f87171; }
.t-b { background: rgba(96,165,250,.15); color: #93c5fd; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 500; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); padding: 8px 10px; }
.tbl td { padding: 10px; border-top: 1px solid rgba(255,255,255,.05); }
.tbl tr { animation: pop .3s ease-out; }
.tbl tbody tr:hover td { background: rgba(255,255,255,.02); }
.pri { display: inline-flex; align-items: center; gap: 6px; }
.pri::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
@media (max-width: 640px) { .kanban { grid-template-columns: 1fr; } .col { min-height: 0; } .tbl .opt { display: none; } }

/* Custom views + filters */
.views { padding: 0 16px 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.fpill { border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 500; background: rgba(255,255,255,.05); color: var(--muted); transition: all .2s; }
.fpill.on { background: var(--accent-soft); color: var(--accent-2); box-shadow: inset 0 0 0 1px rgba(34,197,94,.35); }
.fields { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; font-size: 11px; color: var(--dim); align-items: center; }
.fields span { background: rgba(255,255,255,.04); border-radius: 6px; padding: 2px 8px; color: var(--muted); }
.fields span.custom { color: var(--amber-2); background: var(--amber-soft); }
.toast { position: absolute; left: 50%; bottom: 16px; transform: translate(-50%, 20px); opacity: 0; padding: 10px 16px; border-radius: 12px; font-size: 13px; background: rgba(28,30,29,.95); box-shadow: inset 0 0 0 1px var(--edge), 0 10px 30px rgba(0,0,0,.5); transition: all .35s; white-space: nowrap; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Dashboard */
.dash { padding: 0 16px 16px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tile { background: rgba(255,255,255,.03); border-radius: 12px; padding: 14px; }
.tile small { color: var(--dim); font-size: 11px; display: block; }
.tile b { font-size: 26px; font-weight: 700; display: block; margin-top: 2px; }
.tile .up { font-size: 11px; color: var(--accent); }
.tile.span2 { grid-column: span 2; }
.tile.span4 { grid-column: span 4; }
.rings { display: flex; gap: 18px; flex-wrap: wrap; }
.ring { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.ring svg { width: 46px; height: 46px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 5; }
.ring .bgc { stroke: rgba(255,255,255,.07); }
.ring .fg { stroke-linecap: round; transition: stroke-dashoffset 1.4s cubic-bezier(.2,.8,.2,1); }
.spark { width: 100%; height: 60px; margin-top: 6px; }
.spark path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 600; stroke-dashoffset: 600; transition: stroke-dashoffset 2s ease-out; }
.spark .area { fill: url(#sg); stroke: none; opacity: 0; transition: opacity 1.5s .5s; }
.dash.go .spark path { stroke-dashoffset: 0; }
.dash.go .spark .area { opacity: 1; }
.soon { border: 1px dashed rgba(245,158,11,.35); background: rgba(245,158,11,.04); }
@media (max-width: 640px) { .dash { grid-template-columns: 1fr 1fr; } .tile.span4 { grid-column: span 2; } }

/* Calendar */
.cal { padding: 0 16px 16px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-grid .dow { font-size: 11px; color: var(--dim); text-align: center; padding-bottom: 4px; }
.day { aspect-ratio: 1.2; border-radius: 9px; background: rgba(255,255,255,.03); padding: 6px; font-size: 11px; color: var(--muted); cursor: pointer; transition: background .2s, box-shadow .2s; }
.day:hover { background: rgba(255,255,255,.06); }
.day.today { box-shadow: inset 0 0 0 1px var(--accent); color: var(--text); }
.day.sel { background: var(--accent-soft); }
.day.off { opacity: .25; pointer-events: none; }
.ev { display: block; margin-top: 3px; height: 4px; border-radius: 3px; }
.ev.g { background: var(--accent); } .ev.y { background: var(--amber); } .ev.b { background: #60a5fa; }
.cal-detail { margin-top: 12px; font-size: 13px; color: var(--muted); min-height: 22px; }

/* Chat + DMs + notifications */
.chat { display: grid; grid-template-columns: 190px 1fr; height: 400px; }
.chat-ch { padding: 4px 8px 12px; font-size: 13px; background: rgba(255,255,255,.015); overflow: hidden; }
.chat-ch div { padding: 6px 10px; border-radius: 8px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.chat-ch div.on { background: rgba(255,255,255,.06); color: var(--text); }
.chat-ch div .n { margin-left: auto; font-size: 10px; background: var(--amber); color: #2a1a00; border-radius: 999px; padding: 0 6px; font-weight: 700; }
.chat-ch small { display: block; padding: 10px 10px 4px; font-size: 10px; letter-spacing: .12em; color: var(--dim); }
.chat-ch .proj { font-size: 10px; color: var(--dim); margin-left: auto; }
.chat-main { display: flex; flex-direction: column; min-width: 0; }
.msgs { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 14px; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; }
.msg { display: flex; gap: 10px; animation: pop .35s ease-out; }
.msg .av { width: 30px; height: 30px; font-size: 12px; }
.msg b { font-size: 13px; } .msg time { font-size: 11px; color: var(--dim); margin-left: 6px; }
.msg p { margin: 2px 0 0; font-size: 13px; color: #cfd1d0; }
.typing { font-size: 12px; color: var(--dim); padding: 0 14px 6px; height: 22px; }
.chat-input { margin: 0 14px 14px; display: flex; gap: 8px; }
.chat-input input { flex: 1; min-width: 0; background: rgba(255,255,255,.05); border: 0; border-radius: 10px; padding: 10px 12px; outline: none; font-size: 13px; }
.chat-input input:focus { box-shadow: 0 0 0 2px var(--accent); }
.notifs { position: absolute; right: 12px; top: 52px; display: grid; gap: 8px; width: 250px; z-index: 4; pointer-events: none; }
.notif { display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: 12px; background: rgba(30,32,31,.94); box-shadow: inset 0 0 0 1px var(--edge), 0 10px 30px rgba(0,0,0,.5); animation: slidein .4s ease-out; }
.notif.out { animation: slideout .4s ease-in forwards; }
.notif b { display: block; font-size: 12px; }
.notif span { color: var(--muted); }
.bell { position: relative; }
.bell i { position: absolute; top: -4px; right: -6px; min-width: 15px; height: 15px; border-radius: 999px; background: var(--amber); color: #2a1a00; font-size: 9px; font-style: normal; font-weight: 700; display: grid; place-items: center; transform: scale(0); transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.bell i.on { transform: scale(1); }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }
@keyframes slidein { from { opacity: 0; transform: translateX(30px); } }
@keyframes slideout { to { opacity: 0; transform: translateX(30px); } }
@media (max-width: 640px) { .chat { grid-template-columns: 1fr; } .chat-ch { display: none; } .notifs { width: 210px; } }

/* Role editor (mirrors the app's role dialog) */
.re { padding: 0 16px 16px; display: grid; gap: 12px; }
.re-head b { font-size: 16px; }
.re-head p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.re-tags { display: flex; flex-wrap: wrap; gap: 6px; max-height: 92px; overflow: auto; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.025); }
.re-tag { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 6px 0 10px; border-radius: 999px; font-size: 12px; color: var(--accent-2); background: rgba(34,197,94,.12); box-shadow: inset 0 0 0 1px rgba(34,197,94,.3); animation: pop .25s ease-out; }
.re-tag button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px; opacity: .8; }
.re-tag button:hover { opacity: 1; }
.re-tags.locked .re-tag { color: var(--amber-2); background: var(--amber-soft); box-shadow: inset 0 0 0 1px rgba(245,158,11,.3); }
.re-tags .empty { font-size: 12px; color: var(--dim); }
.re-search { position: relative; }
.re-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--dim); }
.re-search input { width: 100%; height: 38px; border: 0; border-radius: 10px; padding: 0 12px 0 36px; font-size: 13px; background: rgba(255,255,255,.04); outline: none; }
.re-search input:focus { box-shadow: 0 0 0 2px var(--accent-soft), inset 0 0 0 1px var(--accent); }
.re-groups { display: grid; gap: 8px; max-height: 390px; overflow: auto; padding-right: 4px; }
.re-group { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.025); }
.re-group .gi { display: flex; gap: 10px; align-items: flex-start; }
.re-group .gi > span:first-child { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,.05); color: var(--muted); flex: none; }
.re-group .gi b { display: block; font-size: 13px; }
.re-group .gi small { display: block; font-size: 11px; color: var(--muted); line-height: 1.35; }
.re-perms { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.re-perm { position: relative; text-align: left; border: 0; cursor: pointer; padding: 7px 34px 7px 10px; border-radius: 9px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); transition: background .2s, box-shadow .2s; min-width: 0; }
.re-perm code { display: block; font: 600 11.5px ui-monospace, Consolas, monospace; color: var(--text); }
.re-perm small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.re-perm i { position: absolute; right: 10px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.18); display: grid; place-items: center; transition: all .2s; }
.re-perm i svg { width: 11px; height: 11px; stroke: var(--accent-ink); opacity: 0; transition: opacity .2s; }
.re-perm.on { background: rgba(34,197,94,.1); box-shadow: inset 0 0 0 1px rgba(34,197,94,.35); }
.re-perm.on i { background: var(--accent); box-shadow: none; }
.re-perm.on i svg { opacity: 1; }
.re.locked .re-perm { cursor: not-allowed; }
.re.locked .re-perm.on { background: var(--amber-soft); box-shadow: inset 0 0 0 1px rgba(245,158,11,.3); }
.re.locked .re-perm.on i { background: var(--amber); }
.re.locked .re-perm.on i svg { stroke: #2a1a00; }
.re-foot { display: flex; align-items: center; gap: 8px; }
.re-foot .btn { height: 34px; padding: 0 14px; font-size: 12px; }
.re-foot .note { font-size: 12px; color: var(--amber); margin-right: auto; }
@media (max-width: 640px) { .re-group { grid-template-columns: 1fr; } .re-perms { grid-template-columns: 1fr; } }

/* Roles matrix */
.roles { padding: 0 16px 16px; overflow-x: auto; }
.roles table { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-size: 13px; min-width: 440px; }
.roles th { font-size: 12px; font-weight: 600; padding: 6px; text-align: center; }
.roles th:first-child, .roles td:first-child { text-align: left; color: var(--muted); }
.roles td { padding: 6px; text-align: center; background: rgba(255,255,255,.02); }
.roles td:first-child { border-radius: 8px 0 0 8px; padding-left: 12px; }
.roles td:last-child { border-radius: 0 8px 8px 0; }
.perm { width: 26px; height: 26px; border-radius: 8px; border: 0; cursor: pointer; display: inline-grid; place-items: center; background: rgba(255,255,255,.06); transition: all .2s; }
.perm svg { width: 14px; height: 14px; opacity: 0; transform: scale(.5); transition: all .2s; stroke: var(--accent-ink); }
.perm.on { background: var(--accent); }
.perm.on svg { opacity: 1; transform: none; }
.perm.lock { background: var(--amber); cursor: not-allowed; }
.perm.lock svg { opacity: 1; transform: none; stroke: #2a1a00; }
.crown { color: var(--amber); }

/* Run anywhere */
.modes { padding: 0 16px 16px; }
.net { position: relative; height: 320px; border-radius: 14px; background: rgba(255,255,255,.02); overflow: hidden; }
.net .dev { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 6px; font-size: 11px; color: var(--muted); transition: opacity .5s, transform .5s; }
.net .dev .ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--solid-2); box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.net .dev .ic svg { width: 24px; height: 24px; }
.net .dev.me .ic { background: #1d3426; color: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft), 0 8px 24px rgba(0,0,0,.4); }
.net .dev.hide { opacity: 0; transform: translate(-50%, -50%) scale(.6); }
.net .ping { position: absolute; left: 50%; top: 55%; width: 60px; height: 60px; margin: -30px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(34,197,94,.5); opacity: 0; }
.net.lan .ping { animation: ping 2.4s infinite; }
.net.lan .ping:nth-child(2) { animation-delay: .8s; }
.net.lan .ping:nth-child(3) { animation-delay: 1.6s; }
@keyframes ping { from { transform: scale(.6); opacity: .9; } to { transform: scale(6); opacity: 0; } }
.net svg.links { position: absolute; inset: 0; width: 100%; height: 100%; }
.net svg.links path { vector-effect: non-scaling-stroke; fill: none; stroke: rgba(34,197,94,.55); stroke-width: 2; stroke-dasharray: 6 8; animation: flow 1s linear infinite; opacity: 0; transition: opacity .5s; }
.net.cloud svg.links path.c, .net.lan svg.links path.l { opacity: 1; }
@keyframes flow { to { stroke-dashoffset: -28; } }
.net .status { position: absolute; left: 14px; bottom: 12px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.net .status i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

/* Make it yours */
.yours { display: grid; grid-template-columns: 1fr 1.1fr; gap: 14px; padding: 0 16px 16px; }
.toggles { display: grid; gap: 4px; align-content: start; }
.tog { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 10px; font-size: 13px; background: rgba(255,255,255,.02); cursor: pointer; user-select: none; }
.switch { width: 34px; height: 20px; border-radius: 999px; background: rgba(255,255,255,.12); position: relative; transition: background .25s; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .25s; }
.tog.on .switch { background: var(--accent); }
.tog.locked { cursor: not-allowed; }
.tog.locked .switch { opacity: .55; }
.tog .lock { margin-left: auto; margin-right: 10px; font-size: 10px; font-weight: 600; color: var(--amber-2); background: var(--amber-soft); padding: 1px 8px; border-radius: 999px; }
.tog.on .switch::after { transform: translateX(14px); }
.swatches { display: flex; gap: 8px; margin: 10px 0 4px; }
.swatches button { width: 24px; height: 24px; border-radius: 50%; border: 0; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.swatches button.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px currentColor; transform: scale(1.1); }
.mini { --ma: #22c55e; border-radius: 12px; background: #141514; padding: 10px; font-size: 12px; transition: background .4s, color .4s; }
.mini.light { background: #f3f4f3; color: #222; }
.mini .mh { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 8px; }
.mini .mh i { width: 18px; height: 18px; border-radius: 5px; background: var(--ma); transition: background .4s; }
.mini .ms { display: grid; }
.mini .ms div { display: flex; align-items: center; gap: 8px; padding: 0 8px; border-radius: 7px; color: inherit; opacity: .75; height: 30px; overflow: hidden; transition: height .35s, opacity .35s, padding .35s; }
.mini .ms div.on { color: var(--ma); background: color-mix(in srgb, var(--ma) 15%, transparent); opacity: 1; }
.mini .ms div.gone { height: 0; opacity: 0; }
.mini .ms div::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: currentColor; opacity: .7; flex: none; }
@media (max-width: 640px) { .yours { grid-template-columns: 1fr; } }

/* Activity */
.activity { padding: 0 16px 16px; display: grid; gap: 6px; height: 360px; overflow: hidden; align-content: start; }
.act { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.025); font-size: 13px; animation: pop .4s ease-out; }
.act > span:not(.av) { flex: 1; min-width: 0; }
.act span em { font-style: normal; color: var(--accent-2); }
.act time { font-size: 11px; color: var(--dim); }
.act button { border: 0; background: rgba(255,255,255,.06); color: var(--muted); font-size: 11px; border-radius: 7px; height: 26px; padding: 0 10px; cursor: pointer; }
.act button:hover { color: var(--amber-2); background: var(--amber-soft); }
.act.undone span { text-decoration: line-through; color: var(--dim); }

/* Security */
.secure { padding: 10px 16px 22px; display: grid; justify-items: center; gap: 16px; text-align: center; }
.shield { width: 84px; height: 84px; border-radius: 26px; display: grid; place-items: center; background: rgba(255,255,255,.04); color: var(--muted); transition: all .5s; }
.shield svg { width: 40px; height: 40px; }
.shield.ok { background: var(--accent-soft); color: var(--accent); box-shadow: 0 0 0 10px rgba(34,197,94,.06), 0 0 60px rgba(34,197,94,.25); }
.otp { display: flex; gap: 8px; }
.otp span { width: 42px; height: 52px; border-radius: 12px; background: rgba(255,255,255,.05); display: grid; place-items: center; font-size: 22px; font-weight: 700; transition: all .2s; }
.otp span.f { box-shadow: inset 0 0 0 1px rgba(34,197,94,.5); }
.sec-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; text-align: left; }
.sec-list div { background: rgba(255,255,255,.03); border-radius: 10px; padding: 10px 12px; font-size: 12px; color: var(--muted); }
.sec-list b { display: block; color: var(--text); font-size: 13px; }

/* ---------- Pricing ---------- */
.pricing { padding: 16vh 0; }
.price-wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.price-card { border-radius: 26px; padding: clamp(26px, 4vw, 44px); background: linear-gradient(160deg, rgba(34,197,94,.12), rgba(20,21,20,.6) 50%); }
.price-card .was { color: var(--dim); text-decoration: line-through; text-decoration-color: var(--amber); text-decoration-thickness: 3px; font-size: 22px; font-weight: 600; }
.price-card .price { font-size: clamp(80px, 12vw, 150px); font-weight: 800; line-height: .95; letter-spacing: -.05em; }
.price-card .per { color: var(--muted); font-size: 16px; }
.price-card .stamp { display: inline-block; margin-top: 18px; transform: rotate(-4deg); font-weight: 800; letter-spacing: .06em; color: var(--amber); padding: 6px 14px; border: 2px solid var(--amber); border-radius: 10px; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; color: #d6d8d7; }
.checks li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/12px no-repeat; }
.fineprint { font-size: 12px; color: var(--dim); margin-top: 18px; font-style: italic; }
@media (max-width: 860px) { .price-wrap { grid-template-columns: 1fr; } }

/* ---------- About / donate band ---------- */
.about-band { padding: 10vh 0; }
.about-grid { display: grid; grid-template-columns: auto 1fr; gap: clamp(28px, 6vw, 80px); align-items: center; }
.about-grid .big-logo { width: clamp(120px, 18vw, 220px); filter: drop-shadow(0 0 60px rgba(34,197,94,.35)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-14px) rotate(-3deg); } }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; } .about-grid .lead { margin-inline: auto; } }
.donate-band { padding: 6vh 0 14vh; }
.donate-inner { border-radius: 28px; padding: clamp(28px, 5vw, 60px); display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between; background: linear-gradient(120deg, rgba(245,158,11,.14), rgba(34,197,94,.10) 60%, rgba(20,21,20,.5)); }
.donate-inner h2 { font-size: clamp(28px, 3.6vw, 44px); }
.donate-inner p { color: #c3c7c4; margin: 10px 0 0; max-width: 560px; }
.heart { display: inline-block; animation: beat 1.6s infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.18); } 30% { transform: scale(1); } 45% { transform: scale(1.12); } }

/* ---------- Footer ---------- */
.foot { position: relative; margin-top: 4vh; padding: 80px 0 0; overflow: hidden; background: linear-gradient(transparent, rgba(10,11,10,.85) 30%); }
.foot-top { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: 32px; }
.foot-brand p { color: var(--muted); font-size: 14px; max-width: 280px; margin: 14px 0 20px; }
.foot h5 { margin: 4px 0 14px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); font-weight: 600; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14px; color: var(--muted); }
.foot ul a:hover { color: var(--text); }
.foot-bottom { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; padding: 40px 0 24px; font-size: 13px; color: var(--dim); }
.wordmark { font-size: clamp(90px, 22vw, 330px); font-weight: 800; letter-spacing: -.06em; line-height: .78; text-align: center; color: transparent; background: linear-gradient(rgba(255,255,255,.09), transparent 85%); -webkit-background-clip: text; background-clip: text; user-select: none; margin-bottom: -2vw; }
@media (max-width: 900px) { .foot-top { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: span 2; } }

/* ---------- Inner pages ---------- */
.page { min-height: 80svh; padding: 130px 0 60px; }
.page-head { display: grid; gap: 14px; margin-bottom: 40px; }
.page-head h1 { font-size: clamp(36px, 5.5vw, 64px); font-weight: 800; }
.auth-card { width: min(440px, 100%); margin: 0 auto; border-radius: 24px; padding: 32px; }
.auth-card .logo-top { width: 40px; height: 40px; margin-bottom: 18px; }
.auth-card h1 { font-size: 26px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); margin: 0 0 24px; font-size: 14px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 500; }
.input, .field input, .field textarea, .field select { height: 46px; background: rgba(255,255,255,.04); border: 0; box-shadow: inset 0 0 0 1px var(--edge); border-radius: 12px; padding: 0 14px; outline: none; transition: box-shadow .2s; width: 100%; }
.field textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px var(--accent-soft); }
.code { letter-spacing: .4em; font-size: 20px !important; text-align: center; font-weight: 600; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 18px; }
.form-actions .btn { flex: 1; }
.linkish { background: none; border: 0; color: var(--accent); cursor: pointer; font-size: 13px; padding: 0; }
.linkish:hover { text-decoration: underline; }
.alert { border-radius: 12px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; display: none; }
.alert.show { display: block; }
.alert.err { background: rgba(239,68,68,.1); color: #fca5a5; }
.alert.ok { background: var(--accent-soft); color: var(--accent-2); }

.panel { border-radius: 20px; padding: 26px; scroll-margin-top: 100px; }
.panel h2 { font-size: 19px; margin-bottom: 4px; display: flex; align-items: center; gap: 10px; }
.panel > p { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.05); }
.row:first-of-type { border-top: 0; }
.badge { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.badge.on { background: var(--accent-soft); color: var(--accent-2); }
.badge.off { background: rgba(255,255,255,.07); color: var(--muted); }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form .input { height: 40px; width: auto; flex: 1; min-width: 120px; }
.qr { background: #fff; padding: 12px; border-radius: 14px; width: max-content; }
.secret { font-family: ui-monospace, Consolas, monospace; background: rgba(255,255,255,.04); border-radius: 10px; padding: 8px 12px; font-size: 13px; word-break: break-all; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; font-family: ui-monospace, Consolas, monospace; font-size: 14px; }
.codes span { background: rgba(255,255,255,.04); border-radius: 10px; padding: 8px; text-align: center; }
.twofa-setup { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: start; margin-top: 12px; }

/* Download page */
.os-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.os { border-radius: 22px; padding: 28px; display: grid; gap: 14px; align-content: start; position: relative; transition: transform .25s; }
.os:hover { transform: translateY(-3px); }
.os.rec { box-shadow: inset 0 0 0 1px rgba(34,197,94,.45), 0 0 0 4px var(--accent-soft); }
.os .os-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.05); }
.os .os-ic svg { width: 26px; height: 26px; }
.os h3 { font-size: 22px; }
.os .spec { font-size: 13px; color: var(--muted); display: grid; gap: 2px; }
.os .rec-tag { position: absolute; top: 18px; right: 18px; }
.notes { display: grid; gap: 8px; margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.vtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.vtable th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); font-weight: 600; padding: 8px 10px; }
.vtable td { padding: 12px 10px; border-top: 1px solid rgba(255,255,255,.05); color: var(--muted); }
.vtable td:first-child { color: var(--text); font-weight: 600; }
@media (max-width: 860px) { .os-grid { grid-template-columns: 1fr; } }

/* Donate / support / legal */
.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 36px; }
.tier { border-radius: 20px; padding: 24px; display: grid; gap: 8px; cursor: pointer; text-align: left; border: 0; transition: transform .2s, box-shadow .2s; }
.tier:hover { transform: translateY(-2px); }
.tier.on { box-shadow: inset 0 0 0 1px var(--amber), 0 0 0 4px var(--amber-soft); }
.tier .amt { font-size: 38px; font-weight: 800; }
.tier p { margin: 0; color: var(--muted); font-size: 13px; }
.faq details { border-radius: 16px; padding: 4px 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 20px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 0 0 16px; font-size: 14px; }
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cards3 > * { border-radius: 20px; padding: 24px; display: grid; gap: 10px; align-content: start; }
.cards3 p { color: var(--muted); margin: 0; font-size: 14px; }
.legal section { border-radius: 20px; padding: 28px; margin-bottom: 16px; scroll-margin-top: 100px; }
.legal h2 { font-size: 22px; margin-bottom: 10px; }
.legal p, .legal li { color: var(--muted); font-size: 14px; }
@media (max-width: 860px) { .tiers { grid-template-columns: 1fr 1fr; } .cards3 { grid-template-columns: 1fr; } }

/* Donate */
.donate-box { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-top: 36px; align-items: stretch; }
.donate-info, .donate-qr { border-radius: 20px; padding: 28px; }
.donate-info { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.donate-info h2, .donate-qr h2 { font-size: 19px; margin: 0; }
.donate-info p { margin: 0; color: var(--muted); }
.donate-info .btn { margin-top: auto; }
.donate-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 22px; padding: 0; list-style: none; }
.donate-facts li { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--edge); }
.donate-facts svg { width: 14px; height: 14px; color: var(--accent); }
.donate-qr { display: grid; justify-items: center; align-content: center; gap: 12px; text-align: center; }
.donate-qr img { width: 168px; height: 168px; border-radius: 14px; background: #fff; padding: 6px; }
.donate-qr p { margin: 0; font-size: 13px; color: var(--muted); }
@media (max-width: 800px) { .donate-box { grid-template-columns: 1fr; } }

/* Ko-fi tip panel modal. The panel itself is light, so the card is too. */
.kofi-modal {
  width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border: 0; border-radius: 22px; padding: 0; overflow: hidden;
  background: #f9f9f9; color: #202020; box-shadow: 0 40px 100px rgba(0,0,0,.55);
  opacity: 0; transform: translateY(18px) scale(.97);
  transition: opacity .25s ease, transform .4s cubic-bezier(.2,.9,.25,1), overlay .4s allow-discrete, display .4s allow-discrete;
}
.kofi-modal[open] { opacity: 1; transform: none; display: flex; flex-direction: column; }
.kofi-modal.closing { opacity: 0; transform: translateY(12px) scale(.98); transition-duration: .2s; }
@starting-style { .kofi-modal[open] { opacity: 0; transform: translateY(18px) scale(.97); } }
.kofi-modal::backdrop { background: rgba(0,0,0,0); backdrop-filter: blur(0); transition: background .3s, backdrop-filter .3s, overlay .4s allow-discrete, display .4s allow-discrete; }
.kofi-modal[open]::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(4px); }
.kofi-modal.closing::backdrop { background: rgba(0,0,0,0); backdrop-filter: blur(0); }
@starting-style { .kofi-modal[open]::backdrop { background: rgba(0,0,0,0); backdrop-filter: blur(0); } }
.kofi-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 12px 20px; }
.kofi-head div { flex: 1; display: grid; line-height: 1.3; }
.kofi-head b { font-size: 16px; }
.kofi-head span { font-size: 12px; color: #6b6b6b; }
.kofi-close { width: 34px; height: 34px; border: 0; border-radius: 10px; display: grid; place-items: center; background: transparent; color: #555; cursor: pointer; transition: background .15s; }
.kofi-close:hover { background: #ececec; }
.kofi-close svg { width: 18px; height: 18px; }
.kofi-body { position: relative; flex: 0 1 auto; min-height: 0; height: min(690px, calc(100dvh - 140px)); }
.kofi-body iframe { position: relative; width: 100%; height: 100%; border: 0; display: block; background: transparent; opacity: 0; transition: opacity .3s; }
.kofi-body.loaded iframe { opacity: 1; }
.kofi-loading { position: absolute; left: 50%; top: 40%; width: 30px; height: 30px; margin: -15px; border-radius: 50%; border: 3px solid #e2e2e2; border-top-color: #29abe0; animation: spin .8s linear infinite; }
.kofi-body.loaded .kofi-loading { display: none; }
.kofi-alt { display: block; padding: 10px 16px 14px; text-align: center; font-size: 12px; color: #6b6b6b; }
.kofi-alt:hover { color: #202020; text-decoration: underline; }
@keyframes spin { to { transform: rotate(360deg); } }

.kofi-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px 0 12px;
  border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 600 14px/1 inherit; font-family: inherit; cursor: pointer;
  box-shadow: 0 12px 30px rgba(34,197,94,.3), 0 4px 12px rgba(0,0,0,.35); transition: transform .2s, box-shadow .2s, background .2s;
}
.kofi-fab:hover { background: var(--accent-2); transform: translateY(-2px); box-shadow: 0 16px 36px rgba(34,197,94,.38), 0 4px 12px rgba(0,0,0,.35); }
.kofi-fab img { background: #fff; border-radius: 50%; padding: 2px; }
.kofi-fab[hidden] { display: none; }
@media (max-width: 600px) { .kofi-fab { right: 16px; bottom: 16px; } .kofi-fab span { display: none; } .kofi-fab { padding: 0 12px; } }
@media (prefers-reduced-motion: reduce) { .kofi-modal, .kofi-modal::backdrop { transition: none; } }

/* ---------- Avatars ---------- */
.av { width: 30px; height: 30px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; overflow: hidden; font-size: 13px; font-weight: 700; color: #fff; background: var(--solid-2); }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av.lg { width: 40px; height: 40px; font-size: 16px; }
.av.xl { width: 104px; height: 104px; font-size: 40px; }

/* Signed-in menu in the nav */
.user-mi { position: relative; display: flex; align-items: center; height: 100%; }
.user-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 5px; border: 0; border-radius: 999px; background: rgba(255,255,255,.05); cursor: pointer; color: var(--text); font-size: 14px; font-weight: 500; transition: background .2s; }
.user-btn:hover, .user-mi:focus-within .user-btn { background: rgba(255,255,255,.09); }
.user-btn .caret { width: 12px; height: 12px; color: var(--muted); transition: transform .25s; }
.user-mi:hover .caret, .user-mi:focus-within .caret, .user-mi.open .caret { transform: rotate(180deg); }
.user-mi.open > .drop { opacity: 1; visibility: visible; transform: none; }
.user-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop.user-drop { left: auto; right: 0; min-width: 250px; transform-origin: top right; padding: 8px; }
.user-head { display: flex; gap: 12px; align-items: center; padding: 8px 10px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--edge); }
.user-head span:last-child { min-width: 0; }
.user-head b { font-size: 14px; }
.user-head small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-drop a, .user-drop button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: var(--text); font-size: 14px; cursor: pointer; text-align: left; }
.user-drop a:hover, .user-drop button:hover { background: var(--glass-hi); }
.user-drop svg { width: 17px; height: 17px; color: var(--muted); }
@media (max-width: 520px) { .user-name, .user-btn .caret { display: none; } .user-btn { padding: 0 5px; } }

/* ---------- Dialogs and notices ---------- */
.jdialog { width: min(420px, calc(100vw - 32px)); border: 0; border-radius: 20px; padding: 24px; color: var(--text); background: var(--solid); box-shadow: inset 0 0 0 1px var(--edge), 0 30px 80px rgba(0,0,0,.6); }
.jdialog::backdrop, .crop-dialog::backdrop { background: rgba(0,0,0,.62); backdrop-filter: blur(3px); }
.jdialog h3 { margin: 0 0 8px; font-size: 18px; }
.jdialog p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.jdialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.btn.danger.solid { background: var(--danger); color: #fff; box-shadow: none; }
.btn.danger.solid:hover { background: #dc2626; }
.btn.soft { background: var(--accent-soft); color: var(--accent-2); box-shadow: none; }
.btn.soft:hover { background: rgba(34,197,94,.2); }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 8px; }
.toast { padding: 11px 16px; border-radius: 12px; font-size: 14px; background: var(--solid-2); box-shadow: inset 0 0 0 1px var(--edge), 0 12px 30px rgba(0,0,0,.4); animation: toast-in .25s ease; transition: opacity .3s, transform .3s; }
.toast.ok::before { content: "✓"; color: var(--accent); font-weight: 700; margin-right: 8px; }
.toast.err { color: #fca5a5; }
.toast.out { opacity: 0; transform: translateY(6px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Sign-up / sign-in extras ---------- */
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 18px; }
.auth-icon svg { width: 24px; height: 24px; }

/* ---------- Account settings (laid out like the app's Settings) ---------- */
.set { display: grid; grid-template-columns: 250px 1fr; gap: 36px; align-items: start; }
.set-nav { position: sticky; top: 100px; display: grid; gap: 4px; }
.set-title { font-size: 28px; font-weight: 700; margin: 0 0 14px 8px; }
.set-nav button { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: none; color: var(--muted); font-size: 15px; cursor: pointer; text-align: left; transition: background .15s, color .15s; }
.set-nav button:hover { background: var(--glass-hi); color: var(--text); }
.set-nav button.on { background: rgba(34,197,94,.16); color: var(--accent-2); }
.set-nav svg { width: 19px; height: 19px; }
.set-sec { display: none; }
.set-sec.on { display: grid; gap: 16px; animation: toast-in .25s ease; }
.set-sec h2 { font-size: 17px; margin: 0; }
.set-desc { margin: -12px 0 0; color: var(--muted); font-size: 14px; }
.set-card { border-radius: 18px; padding: 8px 22px; background: rgba(24,25,24,.82); box-shadow: inset 0 0 0 1px var(--edge); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-top: 1px solid rgba(255,255,255,.06); }
.set-row:first-child, .set-group + .set-row, .alert + .set-row, .alert + form > .set-row:first-child, form > .set-row:first-child { border-top: 0; }
.set-row > div:first-child { min-width: 0; }
.set-row b { font-weight: 600; font-size: 15px; }
.set-row small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.set-row > .input, .set-row .pair { width: min(350px, 50%); flex: none; height: 42px; }
.set-row .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.set-row .pair .input { height: 42px; width: 100%; }
.set-row.dim { opacity: .45; pointer-events: none; }
.set-group { padding: 18px 0 6px; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.set-group small { width: 100%; color: var(--muted); font-weight: 400; font-size: 13.5px; }
.set-card > .set-group:first-child { padding-top: 14px; }
.set-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px -22px -8px; padding: 14px 22px; border-radius: 0 0 18px 18px; background: rgba(255,255,255,.035); color: var(--muted); font-size: 14px; }
.set-card .alert { margin: 8px 0; }
.email-box { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.prof-head { display: flex; gap: 22px; align-items: center; margin: -8px -22px 0; padding: 22px; border-radius: 18px 18px 0 0; background: linear-gradient(90deg, rgba(34,197,94,.1), rgba(34,197,94,.02)); border-bottom: 1px solid rgba(255,255,255,.06); }
.prof-pic { position: relative; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; }
.prof-pic:hover .av { filter: brightness(.85); }
.prof-cam { position: absolute; right: -2px; bottom: -2px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 3px var(--solid); }
.prof-cam svg { width: 16px; height: 16px; }
.prof-name { font-size: 22px; font-weight: 700; }
.prof-sub { color: var(--muted); font-size: 14px; min-height: 20px; }
.prof-btns { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.prof-btns .btn { height: 38px; padding: 0 14px; font-size: 14px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; max-width: 380px; }
.swatches button { width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer; transition: transform .15s; }
.swatches button:hover { transform: scale(1.1); }
.swatches button.on { box-shadow: 0 0 0 2px var(--solid), 0 0 0 4px #fff; }
.sw { position: relative; width: 42px; height: 24px; flex: none; border: 0; border-radius: 999px; background: rgba(255,255,255,.14); cursor: pointer; transition: background .2s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.sw.on { background: var(--accent); }
.sw.on::after { transform: translateX(18px); }
.set-row .seg { flex: none; }
.set-row .seg button { height: 32px; font-size: 13px; }
.vol { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.vol input { width: 180px; accent-color: var(--accent); }
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; padding: 6px 0 18px; }
.theme { display: grid; gap: 8px; padding: 8px; border: 0; border-radius: 14px; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--edge); color: var(--muted); font-size: 13px; cursor: pointer; text-align: left; }
.theme.on { box-shadow: inset 0 0 0 2px var(--accent); color: var(--text); }
.theme-prev { display: grid; grid-template-columns: 28% 1fr; gap: 5px; height: 62px; padding: 6px; border-radius: 9px; }
.theme-prev i { border-radius: 5px; }
.dev { display: flex; align-items: center; gap: 14px; }
.dev-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.05); color: var(--muted); }
.dev-ic svg { width: 20px; height: 20px; }
.set-row .inline-form { justify-content: flex-end; }
.code-sm { max-width: 110px; text-align: center; letter-spacing: .2em; }
.backup { padding: 10px 0 18px; }
.twofa-setup { padding-bottom: 18px; }
@media (max-width: 860px) {
  .set { grid-template-columns: 1fr; gap: 20px; }
  .set-nav { position: static; display: flex; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .set-title { display: none; }
  .set-nav button { flex: none; height: 40px; }
  .set-row { flex-wrap: wrap; }
  .set-row > .input, .set-row .pair { width: 100%; }
  .swatches { justify-content: flex-start; }
  .prof-head { flex-wrap: wrap; }
  .twofa-setup { grid-template-columns: 1fr; }
}

/* ---------- Picture editor ---------- */
.crop-dialog { width: min(640px, calc(100vw - 24px)); border: 0; border-radius: 22px; padding: 22px; color: var(--text); background: var(--solid); box-shadow: inset 0 0 0 1px var(--edge), 0 30px 80px rgba(0,0,0,.6); }
.crop-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.crop-head h3 { margin: 0; font-size: 20px; }
.crop-x { width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.crop-x:hover { background: var(--glass-hi); color: var(--text); }
.crop-stage { position: relative; height: min(420px, 62vh); border-radius: 16px; overflow: hidden; background: #0b0c0b; }
.crop-stage canvas { display: block; cursor: grab; touch-action: none; }
.crop-stage canvas:active { cursor: grabbing; }
.crop-hint { position: absolute; left: 50%; bottom: 74px; transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; background: rgba(0,0,0,.55); font-size: 13px; pointer-events: none; transition: opacity .4s; white-space: nowrap; }
.crop-hint.gone { opacity: 0; }
.crop-controls { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 22px; padding: 18px 20px 16px; background: linear-gradient(transparent, rgba(0,0,0,.75) 45%); font-size: 14px; }
.crop-ctl { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.crop-ctl output { min-width: 40px; color: var(--muted); font-variant-numeric: tabular-nums; }
.crop-range { flex: 1; min-width: 60px; height: 22px; margin: 0; background: none; accent-color: #fff; cursor: pointer; }
.crop-range.ticks { background: repeating-linear-gradient(90deg, rgba(255,255,255,.55) 0 1.5px, transparent 1.5px 12px) center / 100% 10px no-repeat; -webkit-appearance: none; appearance: none; }
.crop-range.ticks::-webkit-slider-runnable-track { height: 22px; background: none; }
.crop-range.ticks::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.25); }
.crop-range.ticks::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: #fff; }
.crop-turn { flex: none; width: 34px; height: 34px; border: 0; border-radius: 10px; background: rgba(255,255,255,.1); color: var(--text); cursor: pointer; display: grid; place-items: center; margin-left: -10px; }
.crop-turn:hover { background: rgba(255,255,255,.18); }
.crop-turn svg { width: 16px; height: 16px; }
.crop-reset { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--text); font-size: 14px; cursor: pointer; padding: 6px 4px; }
.crop-reset svg { width: 16px; height: 16px; }
.crop-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.crop-actions .btn { min-width: 120px; }
@media (max-width: 560px) { .crop-controls { flex-wrap: wrap; gap: 10px 16px; } .crop-ctl { flex: 1 1 100%; } .crop-hint { bottom: 128px; } }

/* ---------- Step-by-step dialogs (two-factor) ---------- */
.jdialog.wizard { width: min(460px, calc(100vw - 32px)); }
.wiz-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.wiz-head h3 { margin: 0; }
.wiz-steps { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: wiz; }
.wiz-steps li { counter-increment: wiz; flex: 1; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); padding-top: 8px; border-top: 3px solid rgba(255,255,255,.08); transition: color .2s, border-color .2s; }
.wiz-steps li::before { content: counter(wiz); display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: 11px; font-weight: 600; background: rgba(255,255,255,.08); }
.wiz-steps li.on { color: var(--text); border-color: var(--accent); }
.wiz-steps li.on::before { background: var(--accent); color: #06130a; }
.wiz-steps li.done { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.wiz-steps li.done::before { content: "\2713"; background: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--accent); }
.wiz-body { display: grid; gap: 12px; }
.wiz-body p { margin: 0; }
.wiz-body .input { width: 100%; }
.wiz-qr { display: grid; place-items: center; }
.wiz-qr .qr { min-width: 168px; min-height: 168px; display: grid; place-items: center; }
.wiz-code { display: grid; gap: 8px; justify-items: start; }
.wiz-code .digits { justify-self: stretch; }
.backup-input { font-family: ui-monospace, Consolas, monospace; letter-spacing: .15em; text-transform: uppercase; }
.wizard .alert.show { margin-bottom: 12px; }

/* Six boxes for a sign-in code */
.digits { display: flex; gap: 8px; justify-content: center; }
.digit { width: 46px; height: 54px; border: 0; border-radius: 12px; text-align: center; font: 600 22px/1 ui-monospace, Consolas, monospace; color: var(--text); background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--edge); caret-color: var(--accent); transition: box-shadow .15s, background .15s; }
.digit:focus { outline: none; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 2px var(--accent); }
.digits:nth-child(n) .digit:nth-child(3) { margin-right: 10px; }
.digits.bad .digit { box-shadow: inset 0 0 0 1px rgba(239,68,68,.55); animation: digits-shake .3s; }
@keyframes digits-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@media (max-width: 420px) { .digit { width: 38px; height: 48px; font-size: 19px; } .digits { gap: 6px; } }

.captcha { display: flex; justify-content: center; min-height: 65px; margin: 6px 0 2px; }
