/* Paralels Brief — same dark system as paralels.space */
@font-face { font-family: 'Unbounded'; src: url('fonts/unbounded-cyrillic.woff2') format('woff2'); font-weight: 200 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; src: url('fonts/unbounded-latin.woff2') format('woff2'); font-weight: 200 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Onest'; src: url('fonts/onest-cyrillic.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; src: url('fonts/onest-latin.woff2') format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; src: url('fonts/jetbrains-mono-cyrillic.woff2') format('woff2'); font-weight: 100 800; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JetBrains Mono'; src: url('fonts/jetbrains-mono-latin.woff2') format('woff2'); font-weight: 100 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #08090b; --bg-2: #0f1013; --bg-3: #16171c; --field: #0b0c0f;
  --fg: #ecebe4; --fg-2: #c9c8c1; --dim: #8b8a84;
  --acid-rgb: 42 75 255; --acid-text-rgb: 106 128 255; --acid: #2a4bff; --acid-text: #6a80ff; --acid-soft: rgb(var(--acid-rgb) / .14);
  --ok: #3ddc97; --warn: #ffb547; --bad: #ff5f6d;
  --line: rgba(236, 235, 228, .11); --line-2: rgba(236, 235, 228, .2);
  --display: 'Unbounded', system-ui, sans-serif; --body: 'Onest', system-ui, sans-serif; --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1); --gut: clamp(16px, 3vw, 44px); --r: 22px;
  --on-acid: #fff; --glass: rgb(8 9 11 / .78); --glass-soft: rgb(8 9 11 / .45); --hover: rgba(255, 255, 255, .03); --ph: #55554f; --scheme: dark; --blob-o: .55; --btn-r: 999px;
  color-scheme: dark; font-family: var(--body); color: var(--fg); background: var(--bg); -webkit-font-smoothing: antialiased; font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 90px; }
body { margin: 0; min-height: 100dvh; background: var(--bg); overflow-x: clip; font-size: 15px; line-height: 1.5; }
body::before { content: ''; position: fixed; inset: 0; z-index: 200; pointer-events: none; opacity: .05; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: not-allowed; opacity: .45; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ol { margin: 0; }
:focus-visible { outline: 2px solid var(--acid-text); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--acid); color: #fff; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 300; background: var(--acid); color: #fff; padding: 10px 16px; border-radius: 999px; }
.skip:focus { left: 8px; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mono { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.dim { color: var(--dim); }
.acid { color: var(--acid-text); }
.small { font-size: 13px; }
.pre { white-space: pre-wrap; }
.req { color: var(--acid-text); margin-left: 4px; }
.tag { display: inline-block; font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--acid-text); margin-bottom: 18px; }
.tag a:hover { color: var(--fg); }
em { font-style: normal; color: var(--acid-text); }
.boot { min-height: 100dvh; display: grid; place-content: center; gap: 10px; text-align: center; font-family: var(--display); font-size: 22px; letter-spacing: -.05em; }
.boot span { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }

/* logo — skewed twin bars, as on the site */
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: -.06em; white-space: nowrap; }
.logo-mark { display: flex; gap: 4px; transform: skew(-16deg); }
.logo-mark i { width: 5px; height: 21px; background: currentColor; transition: transform .5s var(--ease); }
a:hover > .logo .logo-mark i:first-child { transform: translateY(-4px); }
a:hover > .logo .logo-mark i:last-child { transform: translateY(4px); }
.logo sup { align-self: center; display: inline-flex; align-items: center; height: 17px; padding: 0 7px; margin-left: 2px; border-radius: 999px; border: 1px solid var(--line-2); font-family: var(--mono); font-size: 8.5px; font-weight: 500; line-height: 1; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); vertical-align: 0; transform: translateY(1px); }

/* buttons */
.btn { position: relative; overflow: hidden; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 50px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 15px; white-space: nowrap; transition: color .3s, border-color .3s, background .3s, box-shadow .5s var(--ease); }
.btn-acid { background: var(--acid); color: var(--on-acid); }
.btn-acid::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--fg); border-radius: inherit; transform: translateY(101%); transition: transform .6s var(--ease); }
.btn-acid:hover:not(:disabled) { color: var(--bg); box-shadow: 0 0 50px rgb(var(--acid-rgb) / .35); }
.btn-acid:hover:not(:disabled)::before { transform: none; }
.btn .ic { transition: transform .5s var(--ease); }
.btn-acid:hover .ic { transform: rotate(-45deg); }
.btn-ghost { border: 1px solid var(--line-2); font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; background: rgba(8, 9, 11, .35); }
.btn-ghost:hover:not(:disabled) { border-color: var(--acid-text); color: var(--acid-text); }
.btn-ghost.danger:hover:not(:disabled) { border-color: var(--bad); color: var(--bad); }
.btn-danger { background: var(--bad); color: #160406; }
.btn-sm { height: 38px; padding: 0 15px; gap: 7px; }
.btn-sm .ic { width: 15px; height: 15px; }
.btn-wide { width: 100%; }
.btn-icon { width: 38px; height: 38px; flex: none; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); color: var(--fg-2); transition: border-color .25s, color .25s, background .25s; }
.btn-icon .ic { width: 16px; height: 16px; }
.btn-icon:hover:not(:disabled) { border-color: var(--acid-text); color: var(--acid-text); }
.btn-icon.danger:hover:not(:disabled) { border-color: var(--bad); color: var(--bad); background: rgba(255, 95, 109, .08); }
.btn-icon.acid { background: var(--acid); border-color: var(--acid); color: #fff; }
.btn-icon.acid:hover { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* chips & pills */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--fg-2); transition: border-color .25s, color .25s, background .25s; }
button.chip:hover { border-color: var(--line-2); color: var(--fg); }
.chip.on { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.chip-xs { height: 26px; padding: 0 10px; font-size: 10.5px; }
.chip-xs .ic { width: 13px; height: 13px; }
.chip.acid { border-color: rgb(var(--acid-text-rgb) / .4); color: var(--acid-text); background: var(--acid-soft); }
.pill { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; color: var(--fg-2); }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.st-sent i { background: var(--acid-text); box-shadow: 0 0 10px var(--acid); }
.st-in_progress i { background: var(--warn); box-shadow: 0 0 10px rgba(255, 181, 71, .6); }
.st-submitted { color: var(--fg); } .st-submitted i { background: var(--ok); box-shadow: 0 0 10px rgba(61, 220, 151, .6); }
.st-archived { color: var(--dim); }
.bar { position: relative; display: block; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: var(--acid); border-radius: inherit; box-shadow: 0 0 12px var(--acid); transition: width .6s var(--ease); }

/* forms */
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field-l { font-family: var(--mono); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--dim); }
.field-h { font-size: 13px; color: var(--dim); }
input:not([type=checkbox]):not([type=radio]), textarea, select { width: 100%; min-height: 50px; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--field); outline: none; transition: border-color .25s, box-shadow .25s; }
textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
select { appearance: none; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238b8a84' stroke-width='1.6'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 18px center; }
input::placeholder, textarea::placeholder { color: var(--ph); }
input:hover:not(:disabled), textarea:hover:not(:disabled), select:hover:not(:disabled) { border-color: var(--line-2); }
input:focus, textarea:focus, select:focus { border-color: var(--acid); box-shadow: 0 0 0 4px rgb(var(--acid-rgb) / .18); }
input:disabled, textarea:disabled, select:disabled { opacity: .6; }
.input-row { display: flex; gap: 8px; align-items: center; }
.input-row .btn { height: 50px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; align-items: end; }
.form-error { min-height: 20px; color: var(--bad); font-size: 14px; margin: 2px 0 12px; }
.form-error:empty { min-height: 0; margin: 0; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.form-actions .danger { margin-right: auto; }
.toggle { display: flex; align-items: center; gap: 12px; min-height: 50px; cursor: pointer; font-size: 14.5px; color: var(--fg-2); }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle span { position: relative; width: 40px; height: 24px; flex: none; border-radius: 999px; background: var(--bg-3); border: 1px solid var(--line-2); transition: background .3s, border-color .3s; }
.toggle span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--dim); transition: transform .35s var(--ease), background .3s; }
.toggle input:checked + span { background: var(--acid); border-color: var(--acid); }
.toggle input:checked + span::after { transform: translateX(16px); background: #fff; }
.toggle input:focus-visible + span { outline: 2px solid var(--acid-text); outline-offset: 3px; }
.notice { padding: 16px 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-2); color: var(--fg-2); margin-bottom: 20px; }
.notice.bad { border-color: rgba(255, 95, 109, .35); background: rgba(255, 95, 109, .06); color: #ffc5ca; }
.notice .actions { margin-top: 12px; }

/* surfaces */
.card { position: relative; border: 1px solid var(--line); border-radius: var(--r); background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 60%), var(--bg-2); padding: 26px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 22px; }
.h3 { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-family: var(--display); font-weight: 500; font-size: 18px; letter-spacing: -.04em; margin-bottom: 16px; }
.empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 64px 24px; }
.empty b { font-family: var(--display); font-weight: 500; font-size: 21px; letter-spacing: -.045em; }
.empty p { color: var(--dim); max-width: 42ch; }
.empty .btn { margin-top: 12px; }
.empty-mark { display: flex; gap: 7px; transform: skew(-16deg); margin-bottom: 8px; }
.empty-mark i { width: 9px; height: 40px; background: var(--acid); opacity: .9; animation: bars 2.6s var(--ease) infinite alternate; }
.empty-mark i + i { opacity: .45; animation-delay: -.8s; }
@keyframes bars { to { transform: translateY(-8px); } }

/* admin shell */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 34px; padding: 26px 18px 20px; border-right: 1px solid var(--line); background: rgba(15, 16, 19, .6); }
.side-logo { padding: 0 10px; }
.side-nav { display: grid; gap: 2px; }
.side-nav a { position: relative; display: flex; align-items: center; gap: 14px; height: 44px; padding: 0 12px; border-radius: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); transition: color .25s, background .25s; }
.side-nav a:hover { color: var(--fg); background: rgba(255, 255, 255, .03); }
.side-nav a.active { color: var(--fg); background: var(--bg-3); }
.side-nav a.active::before { content: ''; position: absolute; left: -18px; top: 11px; bottom: 11px; width: 3px; border-radius: 0 3px 3px 0; background: var(--acid); box-shadow: 0 0 14px var(--acid); }
.nav-i { font-size: 10px; opacity: .55; }
.nav-n { margin-left: auto; min-width: 24px; height: 22px; padding: 0 7px; display: grid; place-items: center; border-radius: 999px; background: var(--acid-soft); color: var(--acid-text); font-size: 10.5px; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px 4px 0 6px; border-top: 1px solid var(--line); }
.me { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; }
.me > span:last-child { display: grid; min-width: 0; }
.me b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { font-family: var(--mono); font-size: 10.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--acid); color: #fff; font-family: var(--display); font-weight: 600; font-size: 12.5px; letter-spacing: -.03em; }
.avatar.lg { width: 52px; height: 52px; font-size: 16px; background: var(--bg-3); color: var(--fg); border: 1px solid var(--line-2); }
.main { width: min(1320px, 100%); padding: 44px var(--gut) 90px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; flex-wrap: wrap; margin-bottom: 38px; }
.page-head h1 { font-family: var(--display); font-weight: 500; font-size: clamp(32px, 4.2vw, 60px); line-height: 1.02; letter-spacing: -.055em; max-width: 16ch; text-wrap: balance; }
.lead { margin-top: 16px; max-width: 60ch; color: var(--fg-2); font-size: 16.5px; }

/* dashboard */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 26px; }
.stat { display: grid; gap: 18px; padding: 22px 24px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { font-family: var(--display); font-weight: 500; font-size: clamp(36px, 4vw, 58px); line-height: 1; letter-spacing: -.06em; }
.stat:first-child b { color: var(--acid-text); }
.panel { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); overflow: hidden; }
.panel-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 16px; border-bottom: 1px solid var(--line); }
.search { position: relative; display: block; width: min(320px, 100%); color: var(--dim); }
.search .ic { position: absolute; left: 15px; top: 50%; translate: 0 -50%; width: 16px; height: 16px; }
.panel .search input { min-height: 40px; padding: 8px 16px 8px 42px; border-radius: 999px; font-size: 14px; }
.rows { display: grid; }
.row { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.2fr) 150px 120px 70px 38px; align-items: center; gap: 18px; padding: 16px 22px; border-bottom: 1px solid var(--line); transition: background .25s; }
.row:last-child { border-bottom: 0; }
a.row:hover { background: rgba(255, 255, 255, .025); }
.row-main { display: grid; gap: 2px; min-width: 0; }
.row-main b { font-weight: 600; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-main small, .row-date { color: var(--dim); font-size: 13px; }
.row-client { color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-prog { display: grid; gap: 6px; }
.row-prog small { font-family: var(--mono); font-size: 10.5px; color: var(--dim); }
.row-go { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); color: var(--dim); transition: all .35s var(--ease); }
a.row:hover .row-go { background: var(--acid); border-color: var(--acid); color: #fff; transform: rotate(45deg); }
.duo { display: grid; grid-template-columns: 1.15fr 1fr; gap: 26px; margin-top: 34px; }
.duo > section:not(.card) { padding-top: 4px; }
.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.quick-card { position: relative; display: grid; gap: 4px; align-content: start; text-align: left; padding: 18px 18px 22px; min-height: 150px; border-radius: 18px; border: 1px solid var(--line); background: var(--bg-2); transition: border-color .3s, background .3s; }
.quick-card b { margin-top: auto; font-family: var(--display); font-weight: 500; font-size: 17px; letter-spacing: -.045em; }
.quick-card small { color: var(--dim); font-size: 13px; }
.quick-card .ic { position: absolute; top: 16px; right: 16px; color: var(--dim); transition: transform .5s var(--ease), color .3s; }
.quick-card:hover { border-color: rgb(var(--acid-text-rgb) / .45); background: linear-gradient(160deg, var(--acid-soft), transparent 70%), var(--bg-2); }
.quick-card:hover .ic { color: var(--acid-text); transform: rotate(45deg); }
.event { display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.event:last-child { border-bottom: 0; }
.event-dot { width: 8px; height: 8px; margin-top: 8px; flex: none; border-radius: 50%; background: var(--acid-text); }
.event-dot.ok { background: var(--ok); } .event-dot.bad { background: var(--bad); }
.event p { font-size: 14.5px; }
.event small { color: var(--dim); font-size: 12.5px; }
.event a { color: var(--acid-text); }

/* clients, library */
.card.client, .card.module { display: flex; flex-direction: column; gap: 16px; min-height: 230px; }
.client-info { display: grid; gap: 4px; min-width: 0; }
.client-info h3, .module h3 { font-family: var(--display); font-weight: 500; font-size: 19px; letter-spacing: -.045em; line-height: 1.15; }
.client-info p { color: var(--fg-2); font-size: 14px; overflow-wrap: anywhere; }
.tg { color: var(--acid-text); }
.tg:hover { text-decoration: underline; text-underline-offset: 3px; }
.module p { color: var(--dim); font-size: 14px; }
.cards.modules { margin-top: 22px; }
.preview { display: grid; gap: 2px; padding: 0; margin: 22px 0 0; list-style: none; counter-reset: q; max-height: 52vh; overflow: auto; }
.preview li { counter-increment: q; display: grid; gap: 3px; padding: 12px 0 12px 46px; position: relative; border-bottom: 1px solid var(--line); }
.preview li::before { content: counter(q, decimal-leading-zero); position: absolute; left: 0; top: 14px; font-family: var(--mono); font-size: 11px; color: var(--acid-text); }
.preview b { font-weight: 500; }
.preview small { color: var(--dim); font-size: 13px; }

/* editor */
.editor { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 26px; align-items: start; }
.picker { position: sticky; top: 24px; max-height: calc(100dvh - 48px); overflow: auto; display: grid; gap: 22px; padding: 22px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); scrollbar-width: thin; }
.picker > .mono { padding: 0 6px; }
.picker-g { display: grid; gap: 4px; }
.picker-g > .mono { padding: 0 6px 6px; }
.pick { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; padding: 10px 12px; border-radius: 12px; font-size: 14px; color: var(--fg-2); border: 1px solid transparent; transition: background .25s, border-color .25s, color .25s; }
.pick .ic { width: 15px; height: 15px; color: var(--dim); }
.pick:hover { background: rgba(255, 255, 255, .03); color: var(--fg); }
.pick.on { background: var(--acid-soft); border-color: rgb(var(--acid-text-rgb) / .35); color: var(--fg); }
.pick.on .ic { color: var(--acid-text); }
.doc { display: grid; gap: 14px; min-width: 0; }
.doc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; color: var(--dim); margin-bottom: 6px; }
.doc-meta .ok { color: var(--ok); } .doc-meta .warn { color: var(--warn); }
.meta-bar { width: 140px; }
.doc-head { display: grid; gap: 14px; }
.doc-head .field { margin: 0; }
.title-input { font-family: var(--display); font-weight: 500; font-size: clamp(22px, 2.4vw, 32px) !important; letter-spacing: -.05em; background: transparent !important; border-color: transparent !important; padding-left: 0 !important; }
.title-input:hover, .title-input:focus { border-color: transparent !important; box-shadow: none !important; }
.block { padding: 0; overflow: hidden; }
.block-head { display: flex; align-items: center; gap: 18px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.block-num { font-family: var(--display); font-weight: 500; font-size: 30px; line-height: 1; letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1px var(--acid-text); flex: none; }
.block-titles { flex: 1; min-width: 0; display: grid; }
.block-title, .block-desc { min-height: 0 !important; padding: 2px 0 !important; border: 0 !important; background: transparent !important; border-radius: 6px !important; box-shadow: none !important; }
.block-title { font-family: var(--display); font-weight: 500; font-size: 20px; letter-spacing: -.045em; }
.block-desc { font-size: 14px; color: var(--dim); }
.block-title:hover, .block-desc:hover { background: rgba(255, 255, 255, .03) !important; }
.block-h { font-family: var(--display); font-weight: 500; font-size: 20px; letter-spacing: -.045em; }
.block-tools { display: flex; gap: 6px; }
.qs { display: grid; }
.q { border-bottom: 1px solid var(--line); transition: background .25s; }
.q.open { background: rgba(255, 255, 255, .02); }
.q-head { display: flex; align-items: center; gap: 14px; padding: 12px 22px; }
.q-num { font-family: var(--mono); font-size: 11px; color: var(--dim); flex: none; min-width: 40px; }
.q-title { flex: 1; min-width: 0; text-align: left; font-size: 15px; padding: 6px 0; line-height: 1.4; }
.q-title:hover { color: var(--acid-text); }
.q-meta { display: flex; gap: 6px; flex: none; }
.q-head .btn-icon { width: 34px; height: 34px; }
.q-body { padding: 4px 22px 18px 76px; }
.block-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 22px 20px; }
.restore { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.restore .chip { max-width: 260px; text-transform: none; letter-spacing: 0; font-family: var(--body); font-size: 12.5px; }
.restore .chip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; line-height: 24px; }
.restore .chip .ic { vertical-align: -2px; margin-right: 4px; }
.res-tools { margin: 4px 0 22px; }
.ans { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.ans:last-child { border-bottom: 0; }
.ans h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.ans p { color: var(--fg-2); }
.ans .q-num { padding-top: 3px; }

/* team */
.team .row { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) 130px auto; }
.row.static { border: 1px solid var(--line); border-radius: 18px; margin-bottom: 8px; background: var(--bg-2); }
.row.muted { opacity: .55; }
.perm-list { display: flex; flex-wrap: wrap; gap: 6px; }
.perm-list .chip { text-transform: none; letter-spacing: 0; font-family: var(--body); font-size: 12px; }
.perms { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; margin: 6px 0 4px; }
.perms .toggle { min-height: 44px; font-size: 14px; }
.team-hint { margin-top: 18px; }
.setting { display: flex; flex-direction: column; gap: 12px; }
.setting h3 { font-family: var(--display); font-weight: 500; font-size: 18px; letter-spacing: -.045em; margin-top: 6px; }
.setting p { font-size: 14px; }

/* dialog */
dialog { width: min(560px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: auto; padding: 34px; border: 1px solid var(--line-2); border-radius: 28px; background: var(--bg-2); color: var(--fg); box-shadow: 0 40px 120px rgba(0, 0, 0, .6); }
dialog.wide { width: min(720px, calc(100% - 24px)); }
dialog[open] { animation: pop .45s var(--ease); }
dialog::backdrop { background: rgba(4, 5, 7, .7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
dialog h2 { font-family: var(--display); font-weight: 500; font-size: clamp(24px, 3vw, 32px); line-height: 1.08; letter-spacing: -.05em; margin-bottom: 10px; padding-right: 40px; overflow-wrap: anywhere; }
dialog h2 + p { margin-bottom: 24px; }
dialog form { margin-top: 22px; }
dialog h2 + p + form { margin-top: 0; }
.dialog-x { position: absolute; top: 22px; right: 22px; }
.link-out { margin-top: 6px; padding: 16px 18px; border-radius: 14px; border: 1px dashed rgb(var(--acid-text-rgb) / .5); background: var(--acid-soft); font-family: var(--mono); font-size: 13px; line-height: 1.6; color: var(--fg); word-break: break-all; white-space: pre-wrap; user-select: all; }
.choice { display: grid; gap: 8px; margin-bottom: 20px; }
.opt { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); cursor: pointer; transition: border-color .25s, background .25s; }
.opt input { accent-color: var(--acid); width: 18px; height: 18px; flex: none; }
.opt span { display: grid; }
.opt small { color: var(--dim); font-size: 13px; }
.opt:has(input:checked) { border-color: var(--acid); background: var(--acid-soft); }
.opt.off { opacity: .45; cursor: not-allowed; }
.otp { font-family: var(--mono) !important; font-size: 26px !important; letter-spacing: .4em; text-align: center; }
#toast { position: fixed; left: 50%; bottom: 26px; z-index: 250; translate: -50% 20px; max-width: calc(100% - 32px); padding: 14px 22px; border-radius: 999px; background: var(--fg); color: var(--bg); font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .3s, translate .5s var(--ease); }
#toast.visible { opacity: 1; translate: -50% 0; }

/* login — one quiet card */
.auth { position: relative; isolation: isolate; min-height: 100dvh; display: grid; place-items: center; padding: 48px var(--gut); overflow: hidden; }
.auth-fx { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(42% 38% at 50% 18%, rgb(var(--acid-rgb) / .22), transparent 70%); }
.auth-fx i { position: absolute; top: -10%; width: 1px; height: 120%; background: linear-gradient(180deg, transparent, var(--line-2) 40%, transparent); transform: skew(-16deg); }
.auth-fx i:nth-child(1) { left: 22%; } .auth-fx i:nth-child(2) { left: 50%; opacity: .6; } .auth-fx i:nth-child(3) { left: 78%; }
.auth-card { width: min(400px, 100%); padding: 34px 32px 28px; border-radius: 28px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 40%), rgba(15, 16, 19, .82); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 40px 120px -40px rgba(0, 0, 0, .8); animation: authIn .8s var(--ease) both; }
.auth-logo { display: flex; justify-content: center; margin-bottom: 26px; }
.auth-switch { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin-bottom: 28px; border-radius: 999px; border: 1px solid var(--line); background: var(--field); }
.auth-switch button { position: relative; z-index: 1; height: 38px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--dim); transition: color .3s; }
.auth-switch button[aria-selected=true] { color: var(--bg); }
.auth-switch i { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--fg); transition: transform .5s var(--ease); }
.is-signup .auth-switch i { transform: translateX(100%); }
.auth-card h1 { font-family: var(--display); font-weight: 500; font-size: 30px; letter-spacing: -.055em; line-height: 1.05; text-align: center; }
.auth-sub { text-align: center; margin: 8px 0 26px; font-size: 14px; }
.auth-card .field { margin-bottom: 14px; }
.auth-card .btn-wide { margin-top: 6px; }
.auth-note { text-align: center; font-size: 13px; margin-top: 18px; }
.pw { position: relative; display: block; }
.pw input { padding-right: 50px !important; }
.pw-eye { position: absolute; right: 6px; top: 50%; translate: 0 -50%; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--dim); transition: color .25s, background .25s; }
.pw-eye:hover { color: var(--fg); background: var(--bg-3); }
.pw-hint { display: flex; align-items: center; gap: 8px; min-height: 18px; font-size: 12.5px; color: var(--dim); transition: color .25s; }
.pw-hint:empty { display: none; }
.pw-hint i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.pw-hint.ok { color: var(--ok); } .pw-hint.bad { color: var(--bad); }
.auth .form-error { text-align: center; }
.shake { animation: shake .45s var(--ease); }
@keyframes authIn { from { opacity: 0; transform: translateY(14px) scale(.985); } }
@keyframes shake { 20% { translate: -6px 0; } 40% { translate: 5px 0; } 60% { translate: -3px 0; } 80% { translate: 2px 0; } }
@media (max-width: 480px) { .auth { padding: 24px 16px; align-items: start; } .auth-card { padding: 28px 20px 22px; border-radius: 24px; } .auth-card h1 { font-size: 25px; } .auth-fx i:nth-child(odd) { display: none; } }

/* templates, client pages, cabinet */
.sec-h { margin-top: 34px; justify-content: flex-start; }
.sec-h .mono { font-size: 11px; }
.tpls { margin-bottom: 8px; }
.tpl { display: flex; flex-direction: column; gap: 8px; min-height: 200px; transition: border-color .3s, transform .5s var(--ease); }
.tpl:hover { border-color: var(--line-2); }
.tpl h3 { font-family: var(--display); font-weight: 500; font-size: 19px; letter-spacing: -.045em; }
.tpl p { font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tpl-ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--acid-soft); color: var(--acid-text); margin-bottom: 6px; }
.tpl-new { border-style: dashed; background: transparent; }
.tpl-new:hover { border-color: var(--acid-text); transform: translateY(-2px); }
.tpl-new .tpl-ic { background: transparent; border: 1px dashed rgb(var(--acid-text-rgb) / .5); }
.bases { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 8px; margin: 8px 0 18px; max-height: 260px; overflow: auto; padding: 2px; }
.base-tip { margin: -8px 0 18px; }
.base input { position: absolute; opacity: 0; pointer-events: none; }
.base span { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; height: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--field); cursor: pointer; transition: border-color .25s, background .25s; }
.base span .ic { grid-row: span 2; color: var(--acid-text); }
.base b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.base small { font-size: 12px; color: var(--dim); }
.base:hover span { border-color: var(--line-2); }
.base input:checked + span { border-color: var(--acid); background: var(--acid-soft); }
.base input:focus-visible + span { outline: 2px solid var(--acid-text); outline-offset: 2px; }
a.card.client { display: flex; flex-direction: column; gap: 14px; transition: border-color .3s, transform .5s var(--ease); }
a.card.client:hover { border-color: var(--line-2); transform: translateY(-2px); }
.client-cab { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--dim); }
.client-cab .ic { width: 14px; height: 14px; }
.client-cab.on { color: var(--ok); }
.cab { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; }
.cab .h3 { margin-bottom: 4px; }
.cab-ic { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); color: var(--dim); }
.cab.on .cab-ic { border-color: rgba(61, 220, 151, .5); color: var(--ok); background: rgba(61, 220, 151, .08); }
@media (max-width: 760px) { .cab { grid-template-columns: auto minmax(0, 1fr); } .cab .actions { grid-column: 1 / -1; } }
.portal { width: min(860px, 100%); margin: 0 auto; padding: clamp(40px, 8vw, 96px) var(--gut) 80px; }
.portal-hero h1 { font-family: var(--display); font-weight: 500; font-size: clamp(36px, 6vw, 64px); letter-spacing: -.06em; line-height: 1; margin-bottom: 18px; }
.portal-hero .lead { max-width: 52ch; color: var(--fg-2); margin-bottom: 40px; }
.portal-list { display: grid; gap: 10px; }
.portal-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) 140px 38px; align-items: center; gap: 18px; padding: 20px 22px; border-radius: var(--r); border: 1px solid var(--line); background: var(--bg-2); transition: border-color .3s, transform .5s var(--ease); }
.portal-item:hover { border-color: var(--acid-text); transform: translateY(-2px); }
.pi-main { display: grid; gap: 6px; min-width: 0; }
.pi-main b { font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi-main small { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--dim); font-size: 13px; }
.pi-prog { display: grid; gap: 6px; } .pi-prog small { color: var(--dim); font-size: 10.5px; }
.portal-item.st-submitted { opacity: .75; }
@media (max-width: 620px) { .portal-item { grid-template-columns: minmax(0, 1fr) 38px; } .portal-item > .mono, .pi-prog { display: none; } }

/* client */
.cl-page { min-height: 100dvh; }
.client-top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px var(--gut); border-bottom: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.save-state { display: inline-flex; align-items: center; gap: 9px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); font-family: var(--mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--fg-2); }
.save-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.save-state.busy i { background: var(--warn); animation: blink 1s infinite; }
.save-state.bad { border-color: rgba(255, 95, 109, .4); color: #ffc5ca; } .save-state.bad i { background: var(--bad); }
@keyframes blink { 50% { opacity: .3; } }
.client-hero { position: relative; padding: clamp(50px, 8vw, 110px) var(--gut) 50px; border-bottom: 1px solid var(--line); background: radial-gradient(50% 80% at 85% 0%, rgb(var(--acid-rgb) / .25), transparent 70%); }
.client-hero h1 { font-family: var(--display); font-weight: 500; font-size: clamp(38px, 6.4vw, 100px); line-height: .98; letter-spacing: -.06em; max-width: 14ch; text-wrap: balance; overflow-wrap: anywhere; }
.client-hero .lead { max-width: 62ch; margin: 24px 0 28px; }
.client-body { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); width: min(1240px, 100%); margin: 0 auto; padding: 50px var(--gut) 90px; }
.client-nav { position: sticky; top: 92px; align-self: start; display: grid; gap: 2px; }
.client-nav a { display: flex; gap: 12px; padding: 9px 10px; border-radius: 10px; font-size: 14px; color: var(--dim); transition: color .25s, background .25s; }
.client-nav a:hover { color: var(--fg); background: var(--hover); }
.client-nav a .mono { font-size: 10.5px; padding-top: 3px; color: var(--acid-text); }
.client-nav > p { margin-top: 18px; padding: 0 10px; }
.client-prog { display: grid; gap: 10px; padding: 0 10px 22px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.client-prog b { font-family: var(--display); font-weight: 500; font-size: 44px; letter-spacing: -.06em; line-height: 1; }
.client-prog small { font-family: var(--mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--dim); }
.client-section { padding-bottom: 30px; margin-bottom: 40px; }
.section-h { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 18px; }
.section-h .block-num { font-size: 44px; }
.section-h h2 { font-family: var(--display); font-weight: 500; font-size: clamp(24px, 2.8vw, 36px); line-height: 1.05; letter-spacing: -.05em; margin: 6px 0 8px; }
.cq { padding: 24px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); transition: border-color .3s; }
.cq:focus-within { border-color: rgb(var(--acid-text-rgb) / .45); }
.cq-l { display: flex; gap: 12px; font-size: 17px; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; margin-bottom: 6px; }
.cq-l .q-num { min-width: 0; padding-top: 4px; color: var(--acid-text); }
.cq-h { color: var(--dim); font-size: 14px; margin-bottom: 14px; }
.cq-l + input, .cq-l + textarea, .cq-l + .opts { margin-top: 10px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-chip { position: relative; cursor: pointer; }
.opt-chip input { position: absolute; opacity: 0; pointer-events: none; }
.opt-chip span { display: inline-flex; align-items: center; gap: 0; min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14.5px; color: var(--fg-2); transition: all .3s var(--ease); }
.opt-chip .ic { width: 0; height: 15px; opacity: 0; transition: width .3s var(--ease), opacity .2s, margin .3s var(--ease); }
.opt-chip:hover span { border-color: var(--fg-2); color: var(--fg); }
.opt-chip input:checked + span { background: var(--acid); border-color: var(--acid); color: var(--on-acid); }
.opt-chip input:checked + span .ic { width: 15px; opacity: 1; margin-right: 8px; }
.opt-chip input:focus-visible + span { outline: 2px solid var(--acid-text); outline-offset: 3px; }
.opt-chip input:disabled + span { opacity: .6; cursor: default; }
.opts + .field-h { display: block; margin-top: 10px; }
.submit-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 30px; margin-bottom: 18px; border-radius: 26px; border: 1px solid rgb(var(--acid-text-rgb) / .4); background: radial-gradient(80% 140% at 100% 0%, rgb(var(--acid-rgb) / .3), transparent 70%), var(--bg-2); }
.submit-card h3 { font-family: var(--display); font-weight: 500; font-size: 26px; letter-spacing: -.05em; margin-bottom: 6px; }
.done { min-height: calc(100dvh - 70px); display: grid; place-content: center; justify-items: start; gap: 4px; width: min(760px, 100%); margin: 0 auto; padding: 60px var(--gut); }
.done h1 { font-family: var(--display); font-weight: 500; font-size: clamp(36px, 6vw, 80px); line-height: .98; letter-spacing: -.06em; }
.done .lead { margin: 18px 0 28px; }
.done > .dim { margin-top: 20px; }
.done-mark { width: 74px; height: 74px; display: grid; place-items: center; border-radius: 50%; background: var(--acid); color: var(--on-acid); margin-bottom: 28px; box-shadow: 0 0 80px rgb(var(--acid-rgb) / .5); }
.done-mark .ic { width: 32px; height: 32px; stroke-width: 2.2; }
.client-read { width: min(900px, 100%); margin: 0 auto; padding: 50px var(--gut) 90px; display: grid; gap: 14px; }
.client-read h1 { font-family: var(--display); font-weight: 500; font-size: clamp(30px, 4vw, 52px); letter-spacing: -.055em; line-height: 1.02; margin-bottom: 20px; }

/* ===================================================== motion layer */
/* intro loader */
:is(#intro, .stage-intro) { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; pointer-events: none; }
.intro-wipe { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(5, 1fr); z-index: -1; }
.intro-wipe i { background: var(--bg); transition: transform 1s var(--ease); transition-delay: calc(var(--k) * 70ms); }
.intro-wipe i:nth-child(1) { --k: 0; } .intro-wipe i:nth-child(2) { --k: 1; } .intro-wipe i:nth-child(3) { --k: 2; } .intro-wipe i:nth-child(4) { --k: 3; } .intro-wipe i:nth-child(5) { --k: 4; }
.intro-bars { position: absolute; display: flex; gap: 18px; transform: skew(-16deg); }
.intro-bars i { width: 22px; height: 120px; border-radius: 3px; background: var(--acid); box-shadow: 0 0 60px rgb(var(--acid-rgb) / .55); transform-origin: 50% 100%; animation: intro-bar 1.1s var(--ease) infinite alternate; }
.intro-bars i:nth-child(2) { animation-delay: .15s; opacity: .65; } .intro-bars i:nth-child(3) { animation-delay: .3s; opacity: .35; }
@keyframes intro-bar { from { transform: scaleY(.25); } to { transform: scaleY(1); } }
.intro-copy { position: absolute; left: var(--gut); right: var(--gut); bottom: 34px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.intro-n { font-family: var(--display); font-weight: 500; font-size: clamp(64px, 14vw, 200px); line-height: .8; letter-spacing: -.07em; font-variant-numeric: tabular-nums; }
.intro-copy span { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); padding-bottom: 6px; }
:is(#intro, .stage-intro).out .intro-wipe i { transform: translateY(-101%); }
:is(#intro, .stage-intro).out .intro-bars, :is(#intro, .stage-intro).out .intro-copy { opacity: 0; transform: translateY(-40px) skew(-16deg); transition: opacity .4s, transform .6s var(--ease); }
:is(#intro, .stage-intro).out .intro-copy { transform: translateY(-40px); }

/* entrances */
.rise { opacity: 0; transform: translateY(22px); filter: blur(6px); animation: rise .9s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes rise { to { opacity: 1; transform: none; filter: none; } }
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.split .w > span { display: inline-block; transform: translateY(105%) rotate(4deg); transform-origin: 0 100%; animation: word 1s var(--ease) forwards; animation-delay: calc(.12s + var(--i) * 70ms); }
@keyframes word { to { transform: none; } }
.main.enter > * { opacity: 0; transform: translateY(18px); animation: rise .8s var(--ease) forwards; }
.main.enter > *:nth-child(2) { animation-delay: .07s; } .main.enter > *:nth-child(3) { animation-delay: .14s; } .main.enter > *:nth-child(4) { animation-delay: .21s; } .main.enter > *:nth-child(5) { animation-delay: .28s; }
.main.enter .row, .main.enter .card { opacity: 0; animation: rise .7s var(--ease) forwards; animation-delay: calc(.2s + var(--n, 0) * 40ms); }
.reveal, .cq { opacity: 0; transform: translateY(34px) scale(.985); filter: blur(8px); transition: opacity .8s var(--ease), transform .9s var(--ease), filter .8s var(--ease), border-color .4s, box-shadow .4s, background .4s; }
.reveal.in, .cq.in { opacity: 1; transform: none; filter: none; }

/* top progress line, like on the site */
.top-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 120; height: 2px; pointer-events: none; }
.top-progress i { display: block; height: 100%; width: var(--p, 0%); background: linear-gradient(90deg, var(--acid), var(--acid-text)); box-shadow: 0 0 14px var(--acid); transition: width .8s var(--ease); }

/* client hero */
.client-hero { overflow: hidden; isolation: isolate; min-height: min(86dvh, 820px); display: flex; flex-direction: column; justify-content: flex-end; background: none; }
.hero-fx { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: var(--blob-o); animation: drift 18s ease-in-out infinite alternate; }
.b1 { width: 46vw; height: 46vw; right: -8vw; top: -16vw; background: radial-gradient(circle, var(--acid), transparent 65%); }
.b2 { width: 30vw; height: 30vw; right: 22vw; top: 10vw; background: radial-gradient(circle, var(--acid-text), transparent 65%); opacity: .35; animation-duration: 23s; animation-delay: -6s; }
.b3 { width: 34vw; height: 34vw; left: -12vw; bottom: -18vw; background: radial-gradient(circle, var(--acid-text), transparent 65%); opacity: calc(var(--blob-o) * .7); animation-duration: 27s; }
@keyframes drift { 33% { transform: translate(-6vw, 4vw) scale(1.12); } 66% { transform: translate(3vw, -3vw) scale(.92); } to { transform: translate(-2vw, 6vw) scale(1.05); } }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 84px 84px; mask-image: radial-gradient(70% 70% at 70% 30%, #000, transparent 75%); -webkit-mask-image: radial-gradient(70% 70% at 70% 30%, #000, transparent 75%); opacity: .45; }
.hero-bars { position: absolute; right: clamp(16px, 9vw, 160px); top: 18%; display: flex; gap: clamp(12px, 1.6vw, 24px); transform: skew(-16deg); }
.hero-bars i { width: clamp(16px, 2.6vw, 42px); height: clamp(150px, 34vh, 360px); border-radius: 4px; background: linear-gradient(180deg, rgb(var(--acid-text-rgb) / .9), rgb(var(--acid-rgb) / 0)); opacity: 0; animation: bar-in 1.4s var(--ease) forwards, float 6s ease-in-out infinite alternate; }
.hero-bars i:nth-child(1) { animation-delay: .3s, 1.7s; } .hero-bars i:nth-child(2) { animation-delay: .45s, 2.3s; translate: 0 50px; } .hero-bars i:nth-child(3) { animation-delay: .6s, 2.9s; translate: 0 100px; }
@keyframes bar-in { from { opacity: 0; transform: translateY(80px) scaleY(.4); } to { opacity: .9; transform: none; } }
@keyframes float { to { transform: translateY(-18px); } }
.client-hero h1 { margin-bottom: 0; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.hero-meta span { display: inline-flex; align-items: baseline; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass-soft); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-family: var(--mono); font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--dim); line-height: 40px; }
.hero-meta b { font-family: var(--display); font-weight: 500; font-size: 16px; letter-spacing: -.04em; color: var(--fg); text-transform: none; }
.hero-go { align-self: flex-start; height: 58px; padding: 0 28px; }
.hero-go .ic { animation: nudge-down 1.8s var(--ease) infinite; }
.btn-acid.hero-go:hover .ic { transform: none; }
@keyframes nudge-down { 50% { transform: translateY(4px); } }

/* nav with per-section state */
.client-nav a { position: relative; align-items: flex-start; }
.client-nav a.active { color: var(--fg); background: var(--bg-2); }
.nav-dot { position: relative; width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); font-family: var(--mono); font-size: 9.5px; color: var(--acid-text); transition: background .4s, border-color .4s; }
.nav-dot .ic { position: absolute; width: 13px; height: 13px; color: #fff; opacity: 0; transform: scale(.4); transition: opacity .3s, transform .5s var(--ease); }
.client-nav a.done .nav-dot { background: var(--acid); border-color: var(--acid); }
.client-nav a.done .nav-dot span { opacity: 0; }
.client-nav a.done .nav-dot .ic { opacity: 1; transform: none; }
.client-nav a.active .nav-dot { box-shadow: 0 0 0 4px var(--acid-soft); }
.nav-t { display: grid; padding-top: 3px; }
.nav-t small { font-family: var(--mono); font-size: 10px; color: var(--dim); letter-spacing: .05em; }

/* section number fills when the block is complete */
.client-section .block-num { transition: color .6s var(--ease), -webkit-text-stroke-color .6s; }
.client-section.complete .section-h .block-num { color: var(--acid); -webkit-text-stroke-color: var(--acid); text-shadow: 0 0 30px rgb(var(--acid-rgb) / .5); }

/* question cards */
.cq { position: relative; overflow: hidden; isolation: isolate; padding: 28px 30px 30px; margin-bottom: 12px; }
.cq::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .5s; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgb(var(--acid-rgb) / .13), transparent 60%); }
.cq:hover::before, .cq:focus-within::before { opacity: 1; }
.cq:focus-within { border-color: rgb(var(--acid-text-rgb) / .55); box-shadow: 0 0 0 1px rgb(var(--acid-text-rgb) / .2), 0 30px 80px -40px rgb(var(--acid-rgb) / .6); }
.cq-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cq-num { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); font-family: var(--mono); font-size: 10.5px; color: var(--acid-text); transition: all .5s var(--ease); }
.cq-num .ic { width: 0; height: 13px; opacity: 0; transition: width .4s var(--ease), opacity .3s; }
.cq.is-done .cq-num { background: var(--acid); border-color: var(--acid); color: var(--on-acid); }
.cq.is-done .cq-num .ic { width: 13px; opacity: 1; }
.cq-req { font-family: var(--mono); font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--dim); }
.cq.is-done .cq-req { opacity: .4; }
.cq-l { display: block; font-family: var(--display); font-weight: 500; font-size: clamp(19px, 1.9vw, 25px); line-height: 1.2; letter-spacing: -.04em; margin-bottom: 8px; text-wrap: balance; }
.cq-h { color: var(--dim); font-size: 14.5px; margin-bottom: 4px; max-width: 64ch; }
.cq.nudge { animation: nudge .6s var(--ease); border-color: var(--acid); }
@keyframes nudge { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

/* ink fields: big type on a line that fills with blue */
.ink { position: relative; display: flex; align-items: center; gap: 12px; margin-top: 18px; padding-bottom: 2px; }
.ink::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line-2); }
.ink > i { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: linear-gradient(90deg, var(--acid), var(--acid-text)); box-shadow: 0 0 16px var(--acid); transform: scaleX(0); transform-origin: 0 50%; transition: transform .7s var(--ease); }
.ink:focus-within > i { transform: none; }
.ink > .ic { color: var(--dim); width: 20px; height: 20px; transition: color .3s, transform .5s var(--ease); }
.ink:focus-within > .ic { color: var(--acid-text); transform: rotate(45deg); }
.ink input, .ink textarea, .cq .ink input:not([type=checkbox]):not([type=radio]) { min-height: 0; padding: 12px 0 14px; border: 0 !important; border-radius: 0; background: transparent !important; box-shadow: none !important; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.45; letter-spacing: -.01em; }
.ink input:focus-visible, .ink textarea:focus-visible { outline: none; }
.ink textarea { resize: none; overflow: hidden; min-height: 52px; }
.ink input::placeholder, .ink textarea::placeholder { color: var(--ph); transition: opacity .3s, transform .4s var(--ease); }
.ink input:focus::placeholder, .ink textarea:focus::placeholder { opacity: .5; }
.ink-date input { max-width: 240px; color-scheme: var(--scheme); }
.ink-number input { max-width: 260px; font-family: var(--display) !important; font-weight: 500; }
.ink-big textarea { font-size: clamp(19px, 2vw, 24px); min-height: 110px; }

/* chips */
.opts { margin-top: 20px; gap: 10px; }
.opt-chip span { position: relative; overflow: hidden; isolation: isolate; min-height: 48px; padding: 11px 20px; background: rgba(255, 255, 255, .015); }
.opt-chip em { font-style: normal; color: inherit; }
.opt-chip:hover span { transform: translateY(-2px); background: rgba(255, 255, 255, .04); }
.opt-chip input:checked + span { box-shadow: 0 10px 30px -10px rgb(var(--acid-rgb) / .8); animation: pop .5s var(--ease); }
@keyframes pop { 30% { transform: scale(.94); } 65% { transform: scale(1.04); } }
.opt-chip.is-other span { border-style: dashed; color: var(--acid-text); }
.opt-chip.is-other .ic { width: 15px; opacity: 1; margin-right: 8px; }
.opt-chip.is-other input:checked + span { border-style: solid; color: #fff; }
.ripple { position: absolute; z-index: -1; width: 12px; height: 12px; margin: -6px; border-radius: 50%; background: rgba(255, 255, 255, .35); pointer-events: none; animation: ripple .7s ease-out forwards; }
@keyframes ripple { to { transform: scale(30); opacity: 0; } }

/* «Другое» sheet */
dialog.sheet { width: min(640px, calc(100% - 24px)); padding: 36px; background: radial-gradient(90% 60% at 100% 0%, rgb(var(--acid-rgb) / .22), transparent 70%), var(--bg-2); border-color: rgb(var(--acid-text-rgb) / .35); }
dialog.sheet[open] { animation: sheet .6s var(--ease); }
@keyframes sheet { from { opacity: 0; transform: translateY(40px) scale(.97); filter: blur(6px); } }
dialog.sheet h2 { font-size: clamp(22px, 2.6vw, 30px); }
.sheet .ink { margin-top: 6px; }
.other-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; }
.kbd { padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px; }

/* submit */
.submit-card { position: relative; overflow: hidden; isolation: isolate; padding: 38px; border-color: transparent; }
.submit-card::after { content: ''; position: absolute; inset: 0; z-index: -2; border-radius: inherit; padding: 1px; background: conic-gradient(from var(--spin, 0deg), transparent 0 40%, var(--acid-text), var(--acid) 55%, transparent 70%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spin 5s linear infinite; }
.submit-card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(500px circle at var(--mx, 80%) var(--my, 0%), rgb(var(--acid-rgb) / .25), transparent 60%); }
@property --spin { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes spin { to { --spin: 360deg; } }
.submit-card h3 { font-size: clamp(26px, 3vw, 38px); }
.submit-card .tag { margin-bottom: 10px; }
.btn-xl { height: 64px; padding: 0 32px; font-size: 16.5px; }
.submit-card.ready .btn-xl { animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 8px rgb(var(--acid-rgb) / .18), 0 0 60px rgb(var(--acid-rgb) / .5); } }

/* burst of studio bars */
.burst { position: fixed; z-index: 260; width: 0; height: 0; pointer-events: none; }
.burst i { position: absolute; left: -3px; top: -9px; width: 6px; height: 18px; border-radius: 2px; background: var(--c); transform: rotate(var(--a)) translateY(0) skew(-16deg); animation: burst 1.1s var(--ease) forwards; }
@keyframes burst { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) skew(-16deg) scaleY(.4); } 70% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(var(--r) * -1)) skew(-16deg) scaleY(1); } }

/* curtain between the form and the finale */
.curtain { position: fixed; inset: 0; z-index: 380; display: grid; grid-template-columns: repeat(5, 1fr); pointer-events: none; }
.curtain i { background: var(--acid); transform: translateY(101%); animation: cur-in .7s var(--ease) forwards; animation-delay: calc(var(--k) * 60ms); }
.curtain i:nth-child(1) { --k: 0; } .curtain i:nth-child(2) { --k: 1; } .curtain i:nth-child(3) { --k: 2; } .curtain i:nth-child(4) { --k: 3; } .curtain i:nth-child(5) { --k: 4; }
.curtain.open i { animation: cur-out .8s var(--ease) forwards; animation-delay: calc(var(--k) * 60ms); transform: none; }
@keyframes cur-in { to { transform: none; } }
@keyframes cur-out { from { transform: none; } to { transform: translateY(-101%); } }

/* finale */
.done-mark { background: none; box-shadow: none; width: 96px; height: 96px; }
.done-mark svg { width: 96px; height: 96px; fill: none; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 24px rgb(var(--acid-rgb) / .7)); }
.done-mark circle { stroke: var(--acid); stroke-width: 2.5; stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .9s var(--ease) .15s forwards; fill: rgb(var(--acid-rgb) / .12); }
.done-mark path { stroke: var(--fg); stroke-width: 3.5; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .6s var(--ease) .7s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done { position: relative; }
.done::before { content: ''; position: fixed; inset: 0; z-index: -1; background: radial-gradient(50% 50% at 50% 30%, rgb(var(--acid-rgb) / .22), transparent 70%); animation: rise 1.4s var(--ease) both; }

/* responsive */
@media (max-width: 1100px) {
  .row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 140px 38px; }
  .row-prog, .row-date { display: none; }
  .team .row { grid-template-columns: minmax(0, 1fr) 130px auto; }
  .team .perm-list { display: none; }
  .duo { grid-template-columns: 1fr; }
  .editor { grid-template-columns: 1fr; }
  .picker { position: static; max-height: none; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .picker > .mono { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; z-index: 60; height: auto; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 12px; padding: 12px 14px; border-right: 0; border-bottom: 1px solid var(--line); background: rgba(8, 9, 11, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .side-logo { padding: 0; }
  .side-logo .logo sup { display: none; }
  .side-nav { display: flex; gap: 4px; overflow-x: auto; flex: 1; min-width: 0; scrollbar-width: none; order: 3; flex-basis: 100%; margin: 0 -14px; padding: 0 14px; }
  .side-nav a { height: 38px; padding: 0 12px; flex: none; }
  .side-nav a.active::before, .nav-i { display: none; }
  .side-foot { margin: 0; padding: 0; border: 0; flex: none; }
  .me { display: none; }
  .main { padding-top: 30px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .quick { grid-template-columns: 1fr; }
  .quick-card { min-height: 0; }
  .picker { grid-template-columns: 1fr; }
  .client-body { grid-template-columns: minmax(0, 1fr); padding-top: 24px; }
  .client-nav { position: sticky; top: 67px; z-index: 40; margin: 0 calc(var(--gut) * -1); padding: 12px var(--gut); background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
  .client-nav a, .client-nav > p { display: none; }
  .client-prog { grid-template-columns: auto 1fr; align-items: center; padding: 0; margin: 0; border: 0; }
  .client-prog b { font-size: 22px; }
  .client-prog small { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  body { font-size: 14.5px; }
  .page-head { margin-bottom: 26px; }
  .page-head .actions, .page-head .actions .btn { width: 100%; }
  .row { grid-template-columns: minmax(0, 1fr) 38px; gap: 12px; padding: 14px 16px; }
  .row > span:nth-child(2), .row > span:nth-child(3) { display: none; }
  .row-main small::after { content: ''; }
  .team .row { grid-template-columns: minmax(0, 1fr) auto; }
  .team .pill { display: none; }
  .card { padding: 20px; }
  .block-head { flex-wrap: wrap; padding: 16px; gap: 12px; }
  .block-titles { flex-basis: calc(100% - 60px); }
  .block-tools { margin-left: auto; }
  .q-head { flex-wrap: wrap; padding: 12px 16px; gap: 8px 10px; }
  .q-num { min-width: 0; }
  .q-title { flex-basis: calc(100% - 60px); order: -1; }
  .q-num { order: -2; }
  .q-meta { flex: 1; }
  .q-body { padding: 4px 16px 16px; }
  .block-foot, .ans { padding-left: 16px; padding-right: 16px; }
  .ans { grid-template-columns: 1fr; gap: 4px; }
  .grid2, .perms { grid-template-columns: 1fr; }
  dialog { padding: 26px 20px; border-radius: 24px; }
  .form-actions .btn { flex: 1; }
  .input-row { flex-wrap: wrap; }
  .input-row .btn { width: 100%; }
  .cq { padding: 18px; }
  .section-h .block-num { font-size: 32px; }
  .submit-card { padding: 22px; }
  .submit-card .btn { width: 100%; }
  .client-top .logo { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rise, .split .w > span, .reveal, .cq, .main.enter > *, .main.enter .row, .main.enter .card, .hero-bars i { opacity: 1; transform: none; filter: none; }
  .done-mark circle, .done-mark path { stroke-dashoffset: 0; }
}
@media (max-width: 620px) {
  .hero-bars { opacity: .45; top: 10%; }
  .client-hero { min-height: 80dvh; }
  .hero-go { width: 100%; }
  .cq { padding: 22px 20px 24px; }
  dialog.sheet { padding: 28px 20px; }
  .intro-bars i { width: 16px; height: 90px; }
}
@media print {
  body::before, .side, .client-top, .no-print, .page-head .actions, .client-nav, .submit-card { display: none !important; }
  :root { --bg: #fff; --bg-2: #fff; --fg: #111; --fg-2: #222; --dim: #555; --line: #ddd; }
  .shell { display: block; } .main { padding: 0; }
  .card { break-inside: avoid; }
}


/* ===================================================== answers & materials */
.ans .ans-text { color: var(--acid-text); font-size: 16px; font-weight: 500; line-height: 1.55; }
.ans h3 + .ans-text { padding-left: 14px; border-left: 2px solid var(--acid); }
.mat-view { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.mat-thumb { display: block; width: 132px; height: 132px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line-2); background: var(--bg-3); transition: transform .4s var(--ease), border-color .3s; }
.mat-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mat-thumb:hover { transform: translateY(-3px); border-color: var(--acid-text); }
.mat-file, .mat-link { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid rgb(var(--acid-text-rgb) / .4); background: var(--acid-soft); color: var(--acid-text); font-size: 14px; }
.mat-file span, .mat-link span, .mat-link a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mat-file .ic, .mat-link .ic { width: 15px; height: 15px; flex: none; }
.mat-view .mat-link:hover, .mat-file:hover { border-color: var(--acid-text); background: rgb(var(--acid-rgb) / .22); }

.mats { margin-top: 22px; }
.mat-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.mat-tile { position: relative; width: 104px; height: 104px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--bg-3); overflow: hidden; animation: pop .5s var(--ease); }
.mat-open { display: grid; place-items: center; width: 100%; height: 100%; gap: 6px; padding: 0; color: var(--fg-2); }
.mat-open img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.mat-open:hover img { transform: scale(1.06); }
.mat-tile.is-file .mat-open { padding: 14px 10px; align-content: center; }
.mat-tile small { display: block; max-width: 100%; padding: 0 8px; font-size: 11px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.mat-x { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--glass); color: var(--fg); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: background .25s, transform .3s var(--ease); }
.mat-x .ic { width: 13px; height: 13px; }
.mat-x:hover { background: var(--bad); transform: scale(1.08); }
.mat-link { position: relative; padding-right: 40px; }
.mat-link a { min-width: 0; }
.mat-link .mat-x { top: 50%; right: 7px; translate: 0 -50%; }
.mat-tile.is-loading { display: grid; place-content: center; gap: 10px; justify-items: center; border-style: dashed; }
.mat-prog { position: relative; width: 48px; height: 48px; border-radius: 50%; background: conic-gradient(var(--acid) var(--up, 4%), var(--line) 0); }
.mat-prog b { position: absolute; inset: 4px; border-radius: 50%; background: var(--bg-3); }
.mat-tile.is-loading small { width: 96px; }
.mat-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mat-btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 999px; border: 1px dashed rgb(var(--acid-text-rgb) / .5); color: var(--acid-text); font-size: 14px; cursor: pointer; transition: background .3s, border-color .3s, color .3s, transform .4s var(--ease); }
.mat-btn .ic { width: 17px; height: 17px; }
.mat-btn:hover { border-style: solid; border-color: var(--acid); background: var(--acid-soft); color: var(--fg); transform: translateY(-2px); }
.mat-btn:focus-within { outline: 2px solid var(--acid-text); outline-offset: 3px; }
.mat-hint { font-size: 12.5px; color: var(--dim); }
.mats-big .mat-actions { padding: 26px; border-radius: 20px; border: 1px dashed var(--line-2); background: repeating-linear-gradient(-56deg, transparent 0 14px, rgba(255, 255, 255, .012) 14px 28px); justify-content: center; text-align: center; }
.mats-big .mat-hint { flex-basis: 100%; }
.mats-big .mat-btn { height: 50px; padding: 0 22px; }
.mats-big .mat-btn:first-child { background: var(--acid); border: 0; color: #fff; }
.cq.drop { border-color: var(--acid) !important; box-shadow: 0 0 0 4px var(--acid-soft), 0 30px 80px -30px rgb(var(--acid-rgb) / .7) !important; }
.cq.drop .mat-actions { border-color: var(--acid); background: var(--acid-soft); }
dialog.lb { padding: 18px; background: var(--bg); }
.lightbox { margin: 0; display: grid; gap: 12px; }
.lightbox img { width: 100%; max-height: 78dvh; object-fit: contain; border-radius: 16px; background: var(--bg-3); }
@media (pointer: coarse) { .mat-x { width: 32px; height: 32px; } }
@media (max-width: 620px) {
  .mat-tile, .mat-thumb { width: calc((100% - 20px) / 3); height: auto; aspect-ratio: 1; }
  .mat-grid, .mat-view { gap: 10px; }
  .mat-actions .mat-btn { flex: 1; justify-content: center; }
  .mat-hint { flex-basis: 100%; }
  .mats-big .mat-actions { padding: 18px; }
}
/* ===================================================== touch, phones, tablets */
/* iOS zooms into fields under 16px; keep every field at 16px+ on touch screens. */
@media (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]), textarea, select, .panel .search input { font-size: 16px; }
  .btn-icon, .q-head .btn-icon { width: 44px; height: 44px; }
  .btn-sm { height: 42px; }
  .chip { height: 40px; }
  .chip-xs { height: 30px; }
  .toggle { min-height: 48px; }
  .opt-chip span { min-height: 50px; }
}
/* No sticky hover on touch: lift and rotate only where a real pointer hovers. */
@media (hover: none) {
  .opt-chip:hover span { transform: none; background: rgba(255, 255, 255, .015); }
  .opt-chip input:checked + span { background: var(--acid); }
  a.row:hover .row-go { background: none; border-color: var(--line); color: var(--dim); transform: none; }
  .quick-card:hover .ic { transform: none; }
  .cq::before { display: none; }
}
.client-top { padding-top: max(16px, env(safe-area-inset-top)); padding-left: max(var(--gut), env(safe-area-inset-left)); padding-right: max(var(--gut), env(safe-area-inset-right)); }
#toast { bottom: max(26px, calc(env(safe-area-inset-bottom) + 14px)); }
.cq, .client-section { scroll-margin-top: 110px; }

/* tablets */
@media (max-width: 1100px) and (min-width: 861px) {
  .shell { grid-template-columns: 220px minmax(0, 1fr); }
  .side { padding-inline: 12px; }
  .client-body { grid-template-columns: 210px minmax(0, 1fr); gap: 36px; }
  .client-hero h1 { font-size: clamp(44px, 7vw, 80px); }
  .stats .stat { padding: 20px; }
}
@media (max-width: 860px) {
  html { scroll-padding-top: 150px; }
  .side { padding-top: max(12px, env(safe-area-inset-top)); }
  .cq, .client-section { scroll-margin-top: 150px; }
  .picker { max-height: 300px; overflow: auto; }
  .duo { gap: 34px; }
  .team .row { grid-template-columns: minmax(0, 1fr) auto auto; }
  .client-body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .hero-meta span { height: 36px; line-height: 36px; padding: 0 13px; }
  .submit-card { flex-direction: column; align-items: stretch; }
  .submit-card .btn { width: 100%; }
}
/* phones */
@media (max-width: 620px) {
  .row { grid-template-columns: minmax(0, 1fr) 38px; row-gap: 8px; }
  .row > span:nth-child(3) { display: block; grid-column: 1; grid-row: 2; }
  .row > .row-go { grid-column: 2; grid-row: 1 / span 2; }
  .stats { margin-bottom: 18px; }
  .stat { padding: 16px; gap: 10px; }
  .panel-bar { padding: 12px; }
  .panel .search { width: 100%; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; }
  .chips::-webkit-scrollbar { display: none; }
  .chips .chip { flex: none; }
  .duo > section.card { padding: 18px; }
  /* dialogs become bottom sheets */
  dialog, dialog.wide, dialog.sheet { width: 100%; max-width: 100%; margin: auto 0 0; max-height: 92dvh; border-radius: 26px 26px 0 0; border-bottom: 0; padding: 26px 18px calc(22px + env(safe-area-inset-bottom)); }
  dialog[open], dialog.sheet[open] { animation: up-sheet .5s var(--ease); }
  @keyframes up-sheet { from { transform: translateY(100%); } }
  dialog::before { content: ''; display: block; width: 44px; height: 4px; margin: -12px auto 18px; border-radius: 4px; background: var(--line-2); }
  .dialog-x { top: 18px; right: 14px; }
  .form-actions { position: sticky; bottom: calc(-22px - env(safe-area-inset-bottom)); margin: 20px -18px calc(-22px - env(safe-area-inset-bottom)); padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(15, 16, 19, 0), var(--bg-2) 30%); }
  .form-actions .danger { flex-basis: 100%; order: 3; }
  .other-foot .kbd { display: none; }
  .client-hero { padding-top: 40px; }
  .cq-l { font-size: 19px; }
  .cq-top { margin-bottom: 10px; }
  .opts { gap: 8px; }
  .opt-chip span { padding: 10px 16px; font-size: 14.5px; }
  .client-top { padding-bottom: 12px; }
  .save-state { height: 30px; padding: 0 11px; font-size: 10px; }
  .done { padding-top: 40px; }
}
/* landscape phones: keep the hero from swallowing the screen */
@media (max-height: 500px) and (orientation: landscape) {
  .client-hero { min-height: 0; padding-top: 40px; }
  .hero-bars { display: none; }
  .client-nav { position: static; }
}

/* Briefspace: studio name in the sidebar, sign-up tabs, studio settings form */
.side-ws { display: grid; gap: 4px; padding: 0 10px; margin-top: -14px; }
.side-ws b { font-family: var(--display); font-weight: 500; font-size: 15px; letter-spacing: -.04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-tabs { margin-bottom: 18px; }
.ws-form { margin-bottom: 14px; }

/* ---------- plans & brief design ---------- */
.cl-brand { display: inline-flex; align-items: center; gap: 14px; min-width: 0; } .cl-for { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-own { gap: 12px; } .cl-logo { height: 30px; max-width: 170px; object-fit: contain; display: block; }
.cl-credit { display: block; width: fit-content; margin: 0 auto; padding: 26px 16px 34px; font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--dim); transition: color .25s; } .cl-credit:hover { color: var(--acid-text); }
[data-brand="own-plain"] .hero-fx .hero-bars, [data-brand="own-plain"] .hero-grid { display: none; }
[data-brand] #intro .intro-bars i { background: var(--acid); }
[data-brand-theme="light"] { --bg: #f4f5f7; --bg-2: #ffffff; --bg-3: #eceef2; --field: #ffffff; --fg: #101218; --fg-2: #2b2f3a; --dim: #6b707c; --line: rgba(16, 18, 24, .1); --line-2: rgba(16, 18, 24, .2); color-scheme: light; }
[data-brand-theme="light"] body::before { opacity: .02; }
[data-brand-theme="light"] .client-top { background: rgba(244, 245, 247, .82); }
[data-brand-theme="light"] .btn-ghost { background: transparent; }
[data-brand-theme="light"] input::placeholder, [data-brand-theme="light"] textarea::placeholder { color: #a3a7b0; }
[data-brand-theme="light"] .card, [data-brand-theme="light"] .cq { background: var(--bg-2); }
.plan-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 24px; align-items: center; margin-bottom: 14px; }
.plan-card.is-pro { border-color: rgb(var(--acid-text-rgb) / .45); background: linear-gradient(160deg, var(--acid-soft), transparent 70%), var(--bg-2); }
.plan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; color: var(--fg-2); } .plan-list li { display: flex; gap: 10px; align-items: flex-start; } .plan-list .ic { width: 16px; height: 16px; color: var(--dim); margin-top: 2px; } .plan-list li.on .ic { color: var(--ok); }
@media (max-width: 1000px) { .plan-card { grid-template-columns: minmax(0, 1fr); } }
.brand-form { margin-bottom: 14px; } .brand-form.locked .brand-fields { opacity: .55; } .brand-form .chips { margin: 8px 0 18px; } .brand-form .chip input { position: absolute; opacity: 0; pointer-events: none; } .brand-form .chip { cursor: pointer; position: relative; }
.brand-form input[type=color] { width: 56px; min-height: 50px; padding: 4px; }
.brand-form input[type=file] { min-height: 0; padding: 10px; font-size: 13px; }
.brand-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; } @media (max-width: 1000px) { .brand-grid { grid-template-columns: minmax(0, 1fr); } }
.brand-preview { position: sticky; top: 24px; border-radius: var(--pr, 22px); overflow: hidden; border: 1px solid var(--line-2); background: #08090b; color: #ecebe4; font-size: 13px; --pl: rgba(236, 235, 228, .12); }
.brand-preview[data-theme="light"] { background: #f4f5f7; color: #101218; --pl: rgba(16, 18, 24, .1); }
.bp-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--pl); min-height: 54px; } .bp-top img { height: 24px; max-width: 120px; object-fit: contain; } .bp-top b { font-family: var(--pf); font-weight: 600; letter-spacing: -.04em; font-size: 15px; }
.bp-hero { position: relative; display: grid; gap: 10px; padding: 26px 16px 22px; overflow: hidden; border-bottom: 1px solid var(--pl); }
.bp-hero strong { font-family: var(--pf); font-weight: 500; font-size: 30px; line-height: 1; letter-spacing: -.05em; position: relative; }
.bp-tag { font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--pa); position: relative; }
.bp-btn { justify-self: start; padding: 9px 16px; border-radius: 999px; background: var(--pa); color: #fff; font-weight: 600; font-size: 12px; position: relative; }
.bp-bars { position: absolute; right: 18px; top: 16px; display: flex; gap: 6px; transform: skew(-16deg); } .bp-bars i { width: 10px; height: 74px; border-radius: 3px; background: var(--pa); opacity: .85; } .bp-bars i + i { opacity: .55; height: 64px; margin-top: 10px; } .bp-bars i + i + i { opacity: .3; }
.bp-q { display: grid; gap: 10px; padding: 18px 16px 20px; } .bp-q span { font-family: var(--mono); font-size: 10px; color: var(--pa); } .bp-q p { font-weight: 600; } .bp-q div { display: flex; gap: 6px; flex-wrap: wrap; }
.bp-q i { font-style: normal; font-size: 11.5px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--pl); } .bp-q i.on { border-color: var(--pa); background: color-mix(in oklab, var(--pa) 18%, transparent); }
.plan-actions { display: grid; gap: 10px; justify-items: start; max-width: 260px; }

/* ---------- motion presets (client page + design preview) ---------- */
[data-motion="off"] *, [data-motion="off"] *::before, [data-motion="off"] *::after { animation: none !important; transition: none !important; }
[data-motion="off"] :is(.rise, .split .w > span, .reveal, .cq, .hero-bars i) { opacity: 1 !important; transform: none !important; filter: none !important; }
[data-motion="off"] .hero-bars i { opacity: .9 !important; }
[data-motion="off"] :is(.done-mark circle, .done-mark path) { stroke-dashoffset: 0; }
[data-motion="calm"] .rise { filter: none; transform: translateY(8px); animation-duration: .7s; }
[data-motion="calm"] .split .w > span { transform: none; opacity: 0; animation: calm-word .8s ease forwards; animation-delay: calc(.1s + var(--i) * 50ms); }
@keyframes calm-word { to { opacity: 1; } }
[data-motion="calm"] :is(.reveal, .cq):not(.in) { filter: none; transform: translateY(10px); }
[data-motion="calm"] :is(.blob, .hero-go .ic) { animation: none; }
[data-motion="calm"] .hero-bars i { animation: bar-in 1.2s var(--ease) forwards; }
[data-motion="calm"] .hero-bars i:nth-child(1) { animation-delay: .2s; } [data-motion="calm"] .hero-bars i:nth-child(2) { animation-delay: .3s; } [data-motion="calm"] .hero-bars i:nth-child(3) { animation-delay: .4s; }

/* ---------- design studio ---------- */
.studio { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
.studio-panel { position: sticky; top: 20px; max-height: calc(100dvh - 40px); overflow: auto; padding: 0; scrollbar-width: thin; }
.dz { padding: 20px 22px; border-bottom: 1px solid var(--line); }
.dz-h { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; color: var(--dim); margin-bottom: 12px; }
.dz .toggle { min-height: 40px; font-size: 14px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.sw { position: relative; width: 30px; height: 30px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); transition: transform .3s var(--ease), box-shadow .3s; cursor: pointer; }
.sw:hover { transform: scale(1.1); }
.sw.on { box-shadow: 0 0 0 2px var(--bg-2), 0 0 0 4px var(--fg); }
.sw-custom { background: conic-gradient(#ff4d2e, #e8a33d, #00b37e, #0ea5e9, #7b5cff, #ff2e88, #ff4d2e); overflow: hidden; }
.sw-custom input { position: absolute; inset: -8px; width: 46px !important; height: 46px; min-height: 0 !important; opacity: 0; cursor: pointer; padding: 0 !important; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: var(--field); }
.seg label { position: relative; }
.seg input, .fonts input, .motions input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: grid; place-items: center; height: 36px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--dim); cursor: pointer; white-space: nowrap; transition: color .25s, background .3s var(--ease); }
.seg input:checked + span { background: var(--fg); color: var(--bg); }
.seg input:focus-visible + span, .fonts input:focus-visible + span, .motions input:focus-visible + span { outline: 2px solid var(--acid-text); outline-offset: 2px; }
.seg-sm span { height: 30px; font-size: 12px; }
.fonts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fonts span { display: grid; justify-items: center; gap: 2px; padding: 12px 6px 10px; border-radius: 14px; border: 1px solid var(--line); cursor: pointer; transition: border-color .25s, background .25s; }
.fonts b { font-size: 24px; font-weight: 500; letter-spacing: -.05em; line-height: 1.1; }
.fonts small { font-family: var(--mono); font-size: 9.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--dim); }
.fonts input:checked + span, .motions input:checked + span { border-color: var(--acid); background: var(--acid-soft); }
.motions { display: grid; gap: 8px; margin-bottom: 8px; }
.motions span { display: grid; gap: 2px; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--line); cursor: pointer; transition: border-color .25s, background .25s; }
.motions b { font-size: 14px; } .motions small { font-size: 12.5px; color: var(--dim); }
.logo-pick { display: flex; gap: 8px; margin-bottom: 6px; }
.studio-save { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 16px 22px; background: linear-gradient(180deg, transparent, var(--bg-2) 30%); }
.studio-save .chip { margin-right: auto; }
.studio-panel .form-error { padding: 0 22px; }
.studio-stage { display: grid; gap: 12px; min-width: 0; position: sticky; top: 20px; }
.stage-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.stage-bar [data-replay] { margin-left: auto; }
.stage { position: relative; height: min(calc(100dvh - 150px), 760px); min-height: 460px; border-radius: 18px; border: 1px solid var(--line-2); overflow: hidden; background: var(--bg-3); }
.stage[data-device="phone"] { display: grid; justify-items: center; background: radial-gradient(60% 50% at 50% 30%, rgb(var(--acid-rgb) / .12), transparent), var(--bg); }
.stage-frame { position: relative; transform-origin: 0 0; overflow: auto; background: var(--bg); color: var(--fg); font-family: var(--body); scrollbar-width: none; isolation: isolate; }
.stage[data-device="phone"] .stage-frame { transform-origin: 50% 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.stage-frame::-webkit-scrollbar { display: none; }
.stage-frame .client-top { top: 0; }
.stage-frame .client-hero { min-height: 600px; }
.stage-frame .client-hero h1 { font-size: 92px; }
.stage-frame .hero-bars { right: 120px; } .stage-frame .hero-bars i { width: 38px; height: 320px; }
.stage-frame .stage-qs { padding: 40px 44px 60px; max-width: 860px; }
.stage-frame .cq-l { display: block; }
.stage-frame .done { min-height: 640px; }
.stage-frame .done h1 { font-size: 72px; }
.stage-intro { position: absolute; z-index: 300; background: transparent; }
.stage-intro .intro-n { font-size: 160px; }
.stage-burst { position: absolute; z-index: 5; }
.stage[data-device="phone"] .client-hero { min-height: 640px; padding: 40px 18px 34px; }
.stage[data-device="phone"] .client-hero h1 { font-size: 44px; }
.stage[data-device="phone"] .hero-bars { right: 18px; top: 12%; opacity: .5; } .stage[data-device="phone"] .hero-bars i { width: 18px; height: 180px; }
.stage[data-device="phone"] .stage-qs { padding: 22px 14px 40px; }
.stage[data-device="phone"] .cq { padding: 20px; }
.stage[data-device="phone"] .done { padding: 40px 20px; } .stage[data-device="phone"] .done h1 { font-size: 40px; }
.stage[data-device="phone"] .intro-n { font-size: 90px; } .stage[data-device="phone"] .save-state { display: none; }
.stage-note { text-align: center; font-size: 10.5px; }
.design-link { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; margin-bottom: 14px; transition: border-color .3s; }
.design-link .h3 { margin-bottom: 4px; } .design-link:hover { border-color: var(--acid-text); }
@media (max-width: 1100px) { .studio { grid-template-columns: minmax(0, 1fr); } .studio-panel, .studio-stage { position: static; max-height: none; } .studio-stage { order: -1; } .stage { height: 520px; } }

/* ---------- brand: everything a Pro studio can change ---------- */
[data-brand] body, [data-brand].stage-frame { font-family: var(--body); }
[data-brand] :is(.client-hero h1, .done h1, .section-h h2, .submit-card h3, .portal-hero h1, .block-num) { font-weight: var(--hw, 500); text-transform: var(--hcase, none); letter-spacing: var(--htrack, -.06em); }
[data-brand] .client-hero h1 { font-size: calc(clamp(38px, 6.4vw, 100px) * var(--hscale, 1)); }
[data-brand] .done h1 { font-size: calc(clamp(36px, 6vw, 80px) * var(--hscale, 1)); }
[data-brand] :is(.btn, .opt-chip span, .hero-meta span, .save-state, .cq-num, .mat-btn, .mat-link, .mat-file, .seg) { border-radius: var(--btn-r); }
[data-hero-align="center"] .client-hero { align-items: center; text-align: center; }
[data-hero-align="center"] .client-hero :is(h1, .lead) { margin-inline: auto; }
[data-hero-align="center"] .client-hero .hero-meta { justify-content: center; }
[data-hero-align="center"] .client-hero .hero-go { align-self: center; }
[data-hero-align="center"] .hero-bars { opacity: .35; }
[data-hero-size="compact"] .client-hero { min-height: 0 !important; padding-top: clamp(50px, 7vw, 90px); }
[data-fx="soft"] :is(.hero-grid, .blob.b2, .blob.b3) { display: none; }
[data-fx="none"] :is(.hero-grid, .blob) { display: none; }
[data-brand="own-plain"] .hero-bars { display: none; }
.stage-frame .client-hero h1 { font-size: calc(92px * var(--hscale, 1)) !important; }
.stage-frame .done h1 { font-size: calc(72px * var(--hscale, 1)) !important; }
.stage[data-device="phone"] .client-hero h1 { font-size: calc(44px * var(--hscale, 1)) !important; }
.stage[data-device="phone"] .done h1 { font-size: calc(40px * var(--hscale, 1)) !important; }
.stage-frame[data-hero-size="compact"] .client-hero { min-height: 0 !important; padding-top: 70px; }
/* design panel: collapsible groups, presets, rows */
details.dz { padding: 0; }
details.dz > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; margin: 0; cursor: pointer; transition: color .25s; }
details.dz > summary::-webkit-details-marker { display: none; }
details.dz > summary:hover { color: var(--fg); }
details.dz > summary .ic { width: 15px; height: 15px; transition: transform .4s var(--ease); }
details.dz[open] > summary { color: var(--fg); }
details.dz[open] > summary .ic { transform: rotate(180deg); }
.dz-b { display: grid; gap: 4px; padding: 0 22px 20px; }
.dz-row { display: grid; gap: 8px; margin-bottom: 12px; }
.dz-l { font-size: 13px; color: var(--fg-2); }
.dz-b .fonts { grid-template-columns: repeat(5, 1fr); margin: 8px 0 14px; }
.dz-b .fonts b { font-size: 19px; } .dz-b .fonts small { font-size: 8.5px; }
.dz-b .seg span { padding: 0 6px; font-size: 12px; }
.dz-b .field { margin-bottom: 12px; }
.dz-b select { min-height: 42px; padding-block: 8px; }
.dz-warn { display: flex; gap: 8px; font-size: 12.5px; color: var(--warn); margin: -4px 0 12px; } .dz-warn .ic { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.swatches .chip-xs { height: 30px; }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.preset { display: grid; gap: 6px; padding: 0; text-align: center; }
.preset span { position: relative; display: grid; place-items: center; height: 64px; border-radius: 14px; background: var(--pb); color: var(--pf); border: 1px solid var(--line); overflow: hidden; transition: transform .4s var(--ease), border-color .25s; }
.preset span b { font-family: var(--pfont); font-size: 24px; font-weight: 600; letter-spacing: -.04em; }
.preset span i { position: absolute; right: 8px; bottom: 8px; width: 14px; height: 14px; border-radius: 50%; background: var(--pa); }
.preset small { font-size: 12px; color: var(--fg-2); }
.preset:hover span { transform: translateY(-2px); border-color: var(--line-2); }
textarea.code { font-family: var(--mono); font-size: 12.5px; min-height: 150px; }
/* sidebar logo: the badge fits the column instead of running into the border */
.side-logo { padding: 0 6px; }
.side-logo .logo { font-size: 17px; gap: 8px; }
.side-logo .logo sup { height: 16px; padding: 0 6px; font-size: 7.5px; letter-spacing: .05em; margin-left: 0; }
/* studio mailbox */
.mail-card { display: grid; gap: 16px; margin-bottom: 14px; }
.mail-card.on { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; }
.mail-card.on .h3 { margin-bottom: 4px; }
.mail-card.on .cab-ic { border-color: rgba(61, 220, 151, .5); color: var(--ok); background: rgba(61, 220, 151, .08); }
.mail-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; }
.mail-head .h3 { margin-bottom: 4px; }
.mail-prov { max-width: 520px; }
.mail-card .field { margin-bottom: 0; }
.mail-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--acid-soft); color: var(--fg-2); }
.mail-hint .ic { width: 15px; height: 15px; color: var(--acid-text); }
.mail-hint a { display: inline-flex; align-items: center; gap: 4px; color: var(--acid-text); font-weight: 600; } .mail-hint a .ic { width: 13px; height: 13px; }
@media (max-width: 760px) { .mail-card.on { grid-template-columns: auto minmax(0, 1fr); } .mail-card.on .actions { grid-column: 1 / -1; } }

/* =====================================================================
   ADMIN · CHROME. Same language as paralels.space: liquid chrome underneath,
   heavy chrome type, frosted glass with lit edges, one blue. Scoped to body.admin
   and kept out of the client-page preview (.stage-frame).
   ===================================================================== */
@font-face { font-family: 'Dela Gothic One'; src: url('fonts/dela-cyrillic.woff2') format('woff2'); font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Dela Gothic One'; src: url('fonts/dela-latin.woff2') format('woff2'); font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
body.admin {
  --heavy: 'Dela Gothic One', 'Unbounded', system-ui, sans-serif;
  --glass: rgba(14, 15, 20, .58); --glass-hi: rgba(255, 255, 255, .14); --glass-line: rgba(255, 255, 255, .11);
  --chrome: linear-gradient(180deg, #ffffff 0%, #e9ecf3 30%, #9aa1b4 47%, #3c4150 53%, #c9cfdc 66%, #ffffff 82%, #b8bfcf 100%);
  background: transparent;
}
html:has(body.admin) { background: #06070a; }
body.admin::before { opacity: .035; }
#chrome-bg { position: fixed; inset: 0; z-index: -2; width: 100vw; height: 100vh; display: block; pointer-events: none; }
#chrome-bg.fallback { background: radial-gradient(60% 50% at 70% 10%, #9aa3bd, transparent 60%), radial-gradient(50% 50% at 20% 30%, #565d75, transparent 60%), #06070a; }
.chrome-shade { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(6, 7, 10, .18) 0, rgba(6, 7, 10, .5) 240px, rgba(6, 7, 10, .84) 520px, rgba(6, 7, 10, .9) 100%); }
body:not(.admin) #chrome-bg, body:not(.admin) .chrome-shade { display: none; }

/* glass surface — the one material of the system */
.admin :is(.side, .card, .panel, .stats, .quick-card, dialog, .studio-panel):not(.stage-frame *) {
  background: linear-gradient(160deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .015) 40%, rgba(120, 138, 255, .04)), var(--glass);
  backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 30px 60px -36px rgba(0, 0, 0, .7);
}
.admin dialog { background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .02) 40%), rgba(16, 17, 23, .86); }
.admin dialog::backdrop { background: rgba(4, 5, 8, .45); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }

/* shell: floating glass sidebar */
.admin .shell { grid-template-columns: 248px minmax(0, 1fr); }
.admin .side { position: sticky; top: 12px; height: calc(100dvh - 24px); margin: 12px 0 12px 12px; padding: 22px 14px 16px; border-radius: 26px; gap: 26px; }
.admin .side-ws { margin-top: -8px; padding: 0 8px; }
.admin .side-ws .mono { font-family: var(--body); font-size: 12px; letter-spacing: 0; text-transform: none; }
.admin .side-ws b { font-family: var(--body); font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.admin .side-nav { gap: 3px; }
.admin .side-nav a { height: 42px; gap: 12px; padding: 0 12px; border-radius: 14px; font-family: var(--body); font-size: 14.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: rgba(236, 235, 228, .62); }
.admin .side-nav a .ic { width: 18px; height: 18px; opacity: .8; }
.admin .side-nav a:hover { color: var(--fg); background: rgba(255, 255, 255, .05); }
.admin .side-nav a.active { color: #fff; background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .06)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 0 0 1px rgba(255, 255, 255, .08); }
.admin .side-nav a.active::before { display: none; }
.admin .side-nav a.active .ic { opacity: 1; }
.admin .nav-n { font-family: var(--mono); background: rgba(255, 255, 255, .1); color: var(--fg); }
.admin .side-foot { border-top-color: var(--glass-line); }
.admin .me small { font-family: var(--body); font-size: 12px; }
.admin .avatar { background: linear-gradient(180deg, #fff, #9aa1b4); color: #111318; }

/* page head: the title is the chrome wordmark */
.admin .main { padding-top: 54px; }
.admin .page-head { margin-bottom: 30px; align-items: flex-end; }
.admin .crumbs { display: flex; gap: 6px; margin-bottom: 14px; font-size: 13.5px; color: rgba(236, 235, 228, .6); }
.admin .crumbs a { color: var(--fg); } .admin .crumbs a:hover { color: #9fb0ff; }
.admin .chrome-title {
  font-family: var(--heavy); font-weight: 400; font-size: clamp(44px, 6.2vw, 96px); line-height: .96; letter-spacing: -.03em; max-width: none;
  background: var(--chrome); background-size: 100% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 18px rgba(0, 0, 0, .45)); padding-bottom: .06em;
}
.admin .page-head .lead { margin-top: 12px; font-size: 15px; color: rgba(236, 235, 228, .72); max-width: 60ch; }

/* type: body font for labels, mono only for numbers and codes */
.admin .field-l:not(.stage-frame *), .admin .dz-h { font-family: var(--body); font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--fg-2); }
.admin .h3:not(.stage-frame *) { font-family: var(--body); font-weight: 600; font-size: 17px; letter-spacing: -.015em; }
.admin .h3 .mono, .admin .sec-h .mono { font-family: var(--mono); text-transform: none; }
.admin .tag:not(.stage-frame *) { font-family: var(--body); font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: #9fb0ff; margin-bottom: 10px; }
.admin dialog h2, .admin .tpl h3, .admin .client-info h3, .admin .empty b { font-family: var(--body); font-weight: 650; letter-spacing: -.025em; }
.admin dialog h2 { font-size: 26px; }
.admin .pill:not(.stage-frame *) { font-family: var(--body); font-size: 13px; letter-spacing: 0; text-transform: none; }
.admin .mono.dim:not(.stage-frame *) { letter-spacing: .02em; }

/* buttons: the site's blue pill with a lit top edge; glass ghosts */
.admin .btn:not(.stage-frame *) { height: 46px; padding: 0 20px; font-family: var(--body); font-size: 14.5px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.admin .btn-sm:not(.stage-frame *) { height: 36px; padding: 0 14px; font-size: 13.5px; }
.admin .btn-acid:not(.stage-frame *) { background: linear-gradient(180deg, #4766ff, #2342f2); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), inset 0 -1px 0 rgba(0, 0, 0, .25), 0 10px 26px -10px rgba(42, 75, 255, .75); }
.admin .btn-acid:not(.stage-frame *)::before { display: none; }
.admin .btn-acid:not(.stage-frame *):hover:not(:disabled) { color: #fff; background: linear-gradient(180deg, #5a77ff, #2c4bff); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 14px 34px -10px rgba(42, 75, 255, .9); }
.admin .btn-acid:not(.stage-frame *):active { transform: translateY(1px); }
.admin .btn-ghost:not(.stage-frame *) { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); color: var(--fg); }
.admin .btn-ghost:not(.stage-frame *):hover:not(:disabled) { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .28); color: #fff; }
.admin .btn-ghost.danger:not(.stage-frame *):hover:not(:disabled) { color: #ffb3ba; border-color: rgba(255, 95, 109, .5); background: rgba(255, 95, 109, .1); }
.admin .btn-icon:not(.stage-frame *), .admin .row-go { border-color: var(--glass-line); background: rgba(255, 255, 255, .05); }
.admin .btn-icon.acid { background: linear-gradient(180deg, #4766ff, #2342f2); border-color: transparent; }

/* chips → glass segments */
.admin .chip:not(.stage-frame *) { height: 34px; font-family: var(--body); font-size: 13.5px; font-weight: 500; letter-spacing: 0; text-transform: none; border-color: transparent; background: rgba(255, 255, 255, .05); color: rgba(236, 235, 228, .72); }
.admin button.chip:not(.stage-frame *):hover { color: var(--fg); background: rgba(255, 255, 255, .09); border-color: transparent; }
.admin .chip.on:not(.stage-frame *) { background: linear-gradient(180deg, #fff, #d9dde7); color: #0d0e12; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); }
.admin .chip-xs:not(.stage-frame *) { height: 24px; font-size: 12px; }
.admin .chip.acid:not(.stage-frame *) { background: rgba(42, 75, 255, .18); color: #b9c5ff; }

/* fields */
.admin :is(input:not([type=checkbox]):not([type=radio]), textarea, select):not(.stage-frame *) { background: rgba(0, 0, 0, .32); border-color: rgba(255, 255, 255, .1); }
.admin :is(input, textarea, select):not(.stage-frame *):focus { border-color: #5a77ff; box-shadow: 0 0 0 4px rgba(42, 75, 255, .22); }
.admin .seg:not(.stage-frame *) { background: rgba(0, 0, 0, .3); border-color: rgba(255, 255, 255, .08); }
.admin .seg input:checked + span { background: linear-gradient(180deg, #fff, #d9dde7); color: #0d0e12; }

/* dashboard */
.admin .stats { gap: 0; }
.admin .stat { gap: 10px; border-right-color: var(--glass-line); }
.admin .stat span { font-size: 13.5px; color: rgba(236, 235, 228, .68); }
.admin .stat b { font-family: var(--heavy); font-weight: 400; font-size: clamp(34px, 3.6vw, 52px); letter-spacing: -.02em; background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }
.admin .stat:first-child b { color: transparent; }
.admin .panel-bar { border-bottom-color: var(--glass-line); }
.admin .row { border-bottom-color: rgba(255, 255, 255, .06); }
.admin .row:hover { background: rgba(255, 255, 255, .04); }
.admin .row:hover .row-go { background: linear-gradient(180deg, #4766ff, #2342f2); border-color: transparent; color: #fff; }
.admin .quick-card { border-radius: 20px; min-height: 132px; }
.admin .quick-card b { font-family: var(--body); font-weight: 650; font-size: 16px; letter-spacing: -.02em; }
.admin .quick-card:hover { border-color: rgba(255, 255, 255, .26); background: linear-gradient(160deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .03)), var(--glass); }
.admin .quick-card .mono.acid { color: #9fb0ff; }
.admin .event { border-bottom-color: rgba(255, 255, 255, .07); }
.admin .event a { color: #9fb0ff; }
.admin .bar i { background: linear-gradient(90deg, #8a9cff, #fff); box-shadow: 0 0 10px rgba(160, 176, 255, .7); }
.admin .empty { padding: 56px 24px; }
.admin .empty b { font-size: 19px; }
.admin .tpl-ic, .admin .cab-ic:not(.on *) { background: rgba(255, 255, 255, .07); border: 1px solid var(--glass-line); color: var(--fg); }
.admin .tpl-new { background: rgba(255, 255, 255, .02) !important; backdrop-filter: none !important; border-style: dashed !important; box-shadow: none !important; }
.admin .mail-hint { background: rgba(42, 75, 255, .12); }
.admin .plan-card.is-pro { border-color: rgba(160, 176, 255, .4); }
.admin a.card.client:hover, .admin .tpl:hover { border-color: rgba(255, 255, 255, .26); }
.admin .notice { background: var(--glass); border-color: var(--glass-line); }
.admin #toast { background: linear-gradient(180deg, #fff, #d9dde7); box-shadow: 0 16px 40px -14px rgba(0, 0, 0, .7); }
.admin .main.enter > * { animation-duration: .6s; }

/* login: the liquid chrome hero, wordmark behind one glass card */
.admin .auth { background: none; }
.admin .auth-word { position: absolute; left: 0; right: 0; top: 50%; translate: 0 -55%; z-index: 0; text-align: center; font-family: var(--heavy); font-size: calc((100vw - var(--gut) * 2) / 8.4); line-height: 1; letter-spacing: -.035em; text-transform: uppercase; color: #fff; mix-blend-mode: difference; white-space: nowrap; pointer-events: none; user-select: none; }
.admin .auth-card { position: relative; z-index: 1; padding: 30px 30px 26px; border-radius: 30px; background: linear-gradient(140deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04) 45%, rgba(120, 138, 255, .1)), rgba(12, 13, 18, .42); backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%); border: 1px solid rgba(255, 255, 255, .24); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 0 70px -16px rgba(83, 106, 255, .45), 0 40px 80px -40px rgba(0, 0, 0, .7); }
.admin .auth-card h1 { font-family: var(--heavy); font-weight: 400; font-size: 34px; letter-spacing: -.02em; background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }
.admin .auth-sub { color: rgba(236, 235, 228, .78); }
.admin .auth-switch { background: rgba(0, 0, 0, .3); border-color: rgba(255, 255, 255, .12); }
.admin .auth-switch i { background: linear-gradient(180deg, #fff, #d9dde7); }
.admin .auth .field-l { color: rgba(236, 235, 228, .82); }
.admin .auth .btn-acid { height: 52px; }
@media (max-width: 900px) {
  .admin .shell { grid-template-columns: minmax(0, 1fr); }
  .admin .side { position: sticky; top: 0; height: auto; margin: 0; border-radius: 0 0 22px 22px; padding: 12px 14px; }
  .admin .side-nav a .ic { display: none; }
  .admin .chrome-title { font-size: clamp(40px, 12vw, 64px); }
  .admin .auth-word { top: 14%; translate: 0 0; font-size: 15vw; }
}
@media (prefers-reduced-transparency: reduce) { .admin :is(.side, .card, .panel, .stats, .quick-card, dialog, .studio-panel):not(.stage-frame *) { background: #121318; backdrop-filter: none; } }
/* login layout: card on top, chrome wordmark resting on the bottom edge */
.admin .auth { --word: calc((100vw - var(--gut) * 2) / 8.4); padding-bottom: calc(var(--word) * 1.25 + 24px); }
.admin .auth-word { top: auto; bottom: clamp(10px, 2.4vh, 28px); translate: none; font-size: var(--word); }
.admin .auth-card { background: linear-gradient(140deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .03) 45%, rgba(120, 138, 255, .08)), rgba(12, 13, 18, .66); }
@media (max-width: 900px) { .admin .auth { --word: 15vw; } .admin .auth-word { top: auto; } }

/* ---------- buttons: one primary per screen, words not glyphs ---------- */
.admin .page-head .actions { align-items: center; gap: 10px; }
.admin .row { grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.2fr) 160px 120px 70px; }
.btn-text { display: inline-flex; align-items: center; height: 36px; padding: 0 4px; font-family: var(--body); font-size: 14px; font-weight: 600; color: var(--fg-2); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .25); text-underline-offset: 4px; transition: color .2s, text-decoration-color .2s; }
.btn-text:hover { color: var(--fg); text-decoration-color: currentColor; }
.btn-text.danger { color: #ff9aa4; text-decoration-color: rgba(255, 95, 109, .35); }
.btn-text.danger:hover { color: #ffc5ca; }
.form-actions .btn-text.danger { margin-right: auto; }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; gap: 8px; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary .ic { width: 15px; height: 15px; transition: transform .3s var(--ease); }
.menu[open] > summary .ic { transform: rotate(180deg); }
.menu-sm > summary { height: 36px !important; padding: 0 14px !important; font-size: 13.5px !important; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 80; display: grid; min-width: 220px; padding: 6px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(18, 19, 25, .96); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 24px 50px -16px rgba(0, 0, 0, .8); animation: pop .25s var(--ease); }
.menu-i { display: flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 10px; font-family: var(--body); font-size: 14px; font-weight: 500; color: var(--fg); text-align: left; white-space: nowrap; }
.menu-i:hover, .menu-i:focus-visible { background: rgba(255, 255, 255, .08); outline: none; }
.menu-i.danger { color: #ff9aa4; }
.menu-i.danger:hover { background: rgba(255, 95, 109, .12); }
.menu-i:not(.danger) + .menu-i.danger { margin-top: 5px; position: relative; }
.menu-i:not(.danger) + .menu-i.danger::before { content: ''; position: absolute; left: 8px; right: 8px; top: -3px; height: 1px; background: rgba(255, 255, 255, .1); }
.admin .quick-card { min-height: 112px; }
.admin .cab .actions { gap: 14px; }
@media (max-width: 1100px) { .admin .row { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 150px; } .admin .row-prog, .admin .row-date { display: none; } }
@media (max-width: 900px) {
  .admin .side-ws { display: none; }
  .admin .page-head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .admin .page-head .actions { width: 100%; }
}
@media (max-width: 620px) {
  .admin .row { grid-template-columns: minmax(0, 1fr) auto; }
  .admin .row > span:nth-child(2) { display: none; }
  .admin .row > span:nth-child(3) { display: block; grid-column: 2; grid-row: 1; }
  .admin .page-head .actions .btn, .admin .page-head .actions .menu { width: auto; }
  .admin .page-head .actions > .btn-acid { flex: 1; }
  .menu-pop { right: auto; left: 0; }
}
@media print { .menu { display: none; } }
.admin .page-head { position: relative; z-index: 20; }
:is(.card, .panel, .page-head, section, article):has(> * .menu[open], > .menu[open], .menu[open]) { position: relative; z-index: 40; }
.menu-pop { background: #14151b; }

/* =====================================================================
   LIQUID GLASS. Lens = translucent fill + refraction (Chromium, via the library)
   or blur (Safari/Firefox) + a lit rim + a specular sheen. Admin only, never in the
   client-page preview.
   ===================================================================== */
body.admin {
  --lg-rim: inset 1.5px 1.5px 0 -.5px rgba(255, 255, 255, .55), inset -1px -1px 0 -.5px rgba(255, 255, 255, .22), inset 0 0 0 1px rgba(255, 255, 255, .1);
  --lg-depth: 0 10px 30px -12px rgba(0, 0, 0, .65), 0 2px 6px -2px rgba(0, 0, 0, .35);
  --lg-spring: cubic-bezier(.34, 1.56, .64, 1);
}
/* refraction wins over the plain blur wherever the library is active */
html.liquid body.admin [rt-liquid-glass]:not(.stage-frame *) { -webkit-backdrop-filter: var(--rt-liquid-final-filter, blur(18px)) saturate(170%) brightness(1.06) !important; backdrop-filter: var(--rt-liquid-final-filter, blur(18px)) saturate(170%) brightness(1.06) !important; }

/* ---- big lenses: sidebar, panels, cards, dialogs */
.admin :is(.side, .card, .panel, .stats, .quick-card, .studio-panel):not(.stage-frame *) {
  background: linear-gradient(155deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .02) 38%, rgba(255, 255, 255, 0) 60%, rgba(150, 165, 255, .05)), rgba(12, 13, 18, .34);
  border: 0; box-shadow: var(--lg-rim), 0 30px 70px -40px rgba(0, 0, 0, .8);
}
html:not(.liquid) .admin :is(.side, .card, .panel, .stats, .quick-card, .studio-panel):not(.stage-frame *) { background: linear-gradient(155deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .02) 40%), rgba(14, 15, 20, .55); }
.admin .menu-pop:not(.stage-frame *) { border: 0; background: linear-gradient(155deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .04) 40%), rgba(16, 17, 23, .86); box-shadow: var(--lg-rim), 0 30px 60px -20px rgba(0, 0, 0, .85); }
.admin dialog { background: linear-gradient(155deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .02) 40%), rgba(14, 15, 20, .62); border: 0; box-shadow: var(--lg-rim), 0 50px 120px -40px rgba(0, 0, 0, .9); }
html:not(.liquid) .admin dialog, html:not(.liquid) .admin .menu-pop { background-color: rgba(16, 17, 23, .9); }
.admin .row { border-bottom-color: rgba(255, 255, 255, .06); }

/* ---- buttons: small lenses */
.admin :is(.btn, .menu > summary):not(.stage-frame *) {
  position: relative; isolation: isolate; overflow: hidden; border: 0 !important;
  transition: transform .45s var(--lg-spring), box-shadow .3s ease, background-color .3s ease, color .2s ease;
}
.admin :is(.btn, .menu > summary):not(.stage-frame *)::after {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 90% at 30% -10%, rgba(255, 255, 255, .38), rgba(255, 255, 255, 0) 55%), linear-gradient(0deg, rgba(255, 255, 255, .08), transparent 40%);
  opacity: .9; transition: opacity .3s;
}
.admin :is(.btn, .menu > summary):not(.stage-frame *):hover:not(:disabled) { transform: translateY(-1px) scale(1.03); }
.admin :is(.btn, .menu > summary):not(.stage-frame *):active:not(:disabled) { transform: scale(.96); transition-duration: .12s; }
/* clear glass */
.admin :is(.btn-ghost, .menu > summary):not(.stage-frame *) { background: rgba(255, 255, 255, .07) !important; color: #f4f5f9 !important; box-shadow: var(--lg-rim), var(--lg-depth) !important; }
.admin :is(.btn-ghost, .menu > summary):not(.stage-frame *):hover:not(:disabled) { background: rgba(255, 255, 255, .13) !important; }
.admin .menu[open] > summary { background: rgba(255, 255, 255, .16) !important; }
.admin .btn-ghost.danger:not(.stage-frame *):hover:not(:disabled) { background: rgba(255, 95, 109, .16) !important; color: #ffd0d4 !important; }
/* tinted glass: the one primary action */
.admin .btn-acid:not(.stage-frame *) {
  background: linear-gradient(180deg, rgba(92, 120, 255, .78), rgba(36, 66, 245, .72)) !important; color: #fff !important;
  box-shadow: inset 1.5px 1.5px 0 -.5px rgba(255, 255, 255, .75), inset -1px -1px 0 -.5px rgba(255, 255, 255, .3), inset 0 0 0 1px rgba(160, 180, 255, .35), 0 12px 32px -10px rgba(42, 75, 255, .85), 0 2px 6px -2px rgba(0, 0, 0, .4) !important;
}
.admin .btn-acid:not(.stage-frame *):hover:not(:disabled) { background: linear-gradient(180deg, rgba(110, 135, 255, .85), rgba(46, 76, 255, .8)) !important; box-shadow: inset 1.5px 1.5px 0 -.5px rgba(255, 255, 255, .85), inset -1px -1px 0 -.5px rgba(255, 255, 255, .35), inset 0 0 0 1px rgba(170, 190, 255, .45), 0 16px 40px -10px rgba(42, 75, 255, 1), 0 2px 6px -2px rgba(0, 0, 0, .4) !important; }
.admin .btn-danger:not(.stage-frame *) { background: linear-gradient(180deg, rgba(255, 110, 122, .8), rgba(230, 60, 76, .75)) !important; color: #fff !important; box-shadow: inset 1.5px 1.5px 0 -.5px rgba(255, 255, 255, .7), 0 12px 30px -10px rgba(255, 70, 90, .7) !important; }
.admin .btn:disabled { transform: none !important; }
.admin .btn-icon:not(.stage-frame *) { border: 0; background: rgba(255, 255, 255, .07); box-shadow: var(--lg-rim); transition: transform .45s var(--lg-spring), background .25s; }
.admin .btn-icon:not(.stage-frame *):hover:not(:disabled) { transform: scale(1.08); background: rgba(255, 255, 255, .13); }

/* ---- selection pills: nav, chips, segments become sliding droplets */
.admin .side-nav a.active { background: rgba(255, 255, 255, .12); box-shadow: var(--lg-rim), 0 8px 20px -10px rgba(0, 0, 0, .6); }
.admin .chip:not(.stage-frame *) { background: rgba(255, 255, 255, .045); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); transition: transform .4s var(--lg-spring), background .25s, color .2s; }
.admin button.chip:not(.stage-frame *):active { transform: scale(.95); }
.admin .chip.on:not(.stage-frame *) { background: rgba(255, 255, 255, .82); color: #0c0d11; box-shadow: inset 1.5px 1.5px 0 -.5px #fff, inset -1px -1px 0 -.5px rgba(0, 0, 0, .12), 0 8px 18px -8px rgba(0, 0, 0, .6); }
.admin .seg:not(.stage-frame *) { background: rgba(0, 0, 0, .22); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(255, 255, 255, .06); border: 0; }
.admin .seg input:checked + span { background: rgba(255, 255, 255, .82); box-shadow: inset 1.5px 1.5px 0 -.5px #fff, 0 6px 14px -6px rgba(0, 0, 0, .6); transition: background .3s, box-shadow .3s; }
.admin .nav-n { background: rgba(255, 255, 255, .14); box-shadow: inset 1px 1px 0 -.5px rgba(255, 255, 255, .5); }

/* ---- fields: recessed glass */
.admin :is(input:not([type=checkbox]):not([type=radio]):not([type=color]), textarea, select):not(.stage-frame *) { background: rgba(0, 0, 0, .26); border: 0; box-shadow: inset 0 1.5px 3px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .08), 0 1px 0 rgba(255, 255, 255, .06); }
.admin :is(input, textarea, select):not(.stage-frame *):focus { box-shadow: inset 0 1.5px 3px rgba(0, 0, 0, .45), inset 0 0 0 1.5px rgba(120, 145, 255, .9), 0 0 0 4px rgba(42, 75, 255, .2); }
.admin .toggle span { background: rgba(0, 0, 0, .3); border: 0; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .1); }
.admin .toggle span::after { background: linear-gradient(180deg, #fff, #cfd4e0); box-shadow: 0 2px 5px rgba(0, 0, 0, .5); transition: transform .45s var(--lg-spring); }
.admin .toggle input:checked + span { background: rgba(60, 92, 255, .75); }

/* ---- login lens */
.admin .auth-card { background: linear-gradient(150deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .03) 42%, rgba(140, 160, 255, .08)), rgba(10, 11, 16, .4); border: 0; box-shadow: inset 2px 2px 0 -1px rgba(255, 255, 255, .6), inset -1px -1px 0 -.5px rgba(255, 255, 255, .25), inset 0 0 0 1px rgba(255, 255, 255, .12), 0 0 80px -20px rgba(83, 106, 255, .5), 0 50px 90px -40px rgba(0, 0, 0, .8); }
html:not(.liquid) .admin .auth-card { background-color: rgba(10, 11, 16, .62); }
.admin .auth-switch { background: rgba(0, 0, 0, .25); border: 0; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .08); }
.admin .auth-switch i { background: rgba(255, 255, 255, .85); box-shadow: inset 1.5px 1.5px 0 -.5px #fff, 0 6px 16px -6px rgba(0, 0, 0, .6); transition: transform .55s var(--lg-spring); }

@media (prefers-reduced-motion: reduce) { .admin :is(.btn, .menu > summary, .chip, .btn-icon) { transition: none !important; } .admin :is(.btn, .menu > summary):hover { transform: none !important; } }

/* ---------- readable chrome: bright metal, no dark band through the letters ---------- */
body.admin { --chrome: linear-gradient(180deg, #ffffff 0%, #f1f3f8 34%, #c9cfdc 50%, #e3e7ef 58%, #ffffff 78%, #d7dce6 100%); }
.admin .chrome-title { letter-spacing: -.012em; filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .25)) drop-shadow(0 3px 14px rgba(0, 0, 0, .55)); }
.admin .stat b { font-family: var(--display); font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .5)); }
.admin .auth-card h1 { letter-spacing: -.01em; }

/* ---------- chrome v3: real reflections (sky / sharp horizon / steel), legible thanks to a lit rim and depth ---------- */
body.admin { --chrome: linear-gradient(180deg, #ffffff 0%, #eef2fb 18%, #cdd6f0 38%, #9aa6c6 47.5%, #3d4458 48.5%, #5a6276 56%, #9aa2b6 70%, #e9ecf4 88%, #ffffff 100%); }
.admin :is(.chrome-title, .stat b, .auth-card h1) {
  background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .55);
  paint-order: stroke fill;
  filter: drop-shadow(0 1.5px 0 rgba(10, 12, 20, .9)) drop-shadow(0 4px 0 rgba(10, 12, 20, .35)) drop-shadow(0 10px 22px rgba(0, 0, 0, .55));
}
.admin .chrome-title { letter-spacing: -.02em; }
.admin .stat b { font-family: var(--heavy); font-weight: 400; letter-spacing: 0; -webkit-text-stroke-width: .8px; }
.admin .auth-card h1 { -webkit-text-stroke-width: .7px; }
.admin .stat b { font-size: clamp(44px, 4.6vw, 64px); line-height: 1.05; }

/* ---------- combobox: our dropdown instead of the browser datalist ---------- */
.combo { position: relative; display: block; }
.combo input { padding-right: 52px !important; }
.combo-toggle { position: absolute; right: 6px; top: 6px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--dim); transition: color .2s, background .2s; }
.combo-toggle:hover { color: var(--fg); background: rgba(255, 255, 255, .07); }
.combo-toggle .ic { width: 17px; height: 17px; transition: transform .35s var(--ease); }
.combo.open .combo-toggle .ic { transform: rotate(180deg); }
.combo-pop { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30; display: grid; gap: 2px; max-height: 280px; overflow: auto; padding: 6px; border-radius: 18px; background: linear-gradient(155deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .03) 40%), rgba(18, 19, 26, .97); box-shadow: inset 1.5px 1.5px 0 -.5px rgba(255, 255, 255, .5), inset -1px -1px 0 -.5px rgba(255, 255, 255, .18), inset 0 0 0 1px rgba(255, 255, 255, .1), 0 24px 50px -16px rgba(0, 0, 0, .85); animation: pop .22s var(--ease); scrollbar-width: thin; }
.combo-pop[hidden] { display: none; }
.combo-opt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 52px; padding: 7px 10px; border-radius: 12px; text-align: left; color: var(--fg); transition: background .15s; }
.combo-opt:hover, .combo-opt.on { background: rgba(255, 255, 255, .09); }
.combo-opt .avatar { width: 34px; height: 34px; font-size: 12px; }
.combo-opt b { display: block; font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-opt small { display: block; font-size: 12.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-opt mark { background: none; color: #a9b8ff; }
.combo-opt > .ic { width: 16px; height: 16px; color: #a9b8ff; }
.combo-opt.is-new { grid-template-columns: 34px minmax(0, 1fr); border-top: 1px solid rgba(255, 255, 255, .08); border-radius: 0 0 12px 12px; margin-top: 2px; }
.combo-opt.is-new:first-child { border-top: 0; border-radius: 12px; margin-top: 0; }
.combo-opt.is-new > .ic { justify-self: center; width: 18px; height: 18px; }
.combo-empty { padding: 14px 12px; font-size: 13.5px; color: var(--dim); }

/* =====================================================================
   SPEED. Big surfaces use a precomputed frost (blurred snapshot of the static chrome,
   fixed to the viewport) instead of a live backdrop-filter. Only small controls refract.
   ===================================================================== */
.admin :is(.side, .card, .panel, .stats, .quick-card, .studio-panel, .mail-card):not(.stage-frame *) {
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .02) 38%, rgba(255, 255, 255, 0) 60%, rgba(150, 165, 255, .05)),
    linear-gradient(rgba(12, 13, 18, .34), rgba(12, 13, 18, .34)),
    var(--frost, linear-gradient(#0d0e13, #0d0e13)) center / 100vw 100vh no-repeat fixed,
    #0c0d12 !important;
}
/* nested surfaces inside a panel do not stack another frost */
.admin :is(.card, .panel, .stats, .studio-panel) :is(.card, .quick-card):not(.stage-frame *) { background: rgba(255, 255, 255, .04) !important; }
.admin dialog { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: linear-gradient(155deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .02) 40%), #121319 !important; }
.admin dialog::backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(4, 5, 8, .72); }
.admin .auth-card { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: linear-gradient(150deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .03) 42%, rgba(140, 160, 255, .08)), linear-gradient(rgba(10, 11, 16, .45), rgba(10, 11, 16, .45)), var(--frost, #0c0d12) center / 100vw 100vh no-repeat fixed !important; }
.admin :is(.btn, .menu > summary, .chip, .seg, .side-nav a, .nav-n):not([rt-liquid-glass]):not(.stage-frame *) { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.admin [rt-liquid-glass] { will-change: auto !important; }
/* entrances: short fades, no blur filters */
@keyframes admin-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.admin .main.enter > *, .admin .main.enter .row, .admin .main.enter .card { animation: admin-in .28s ease both !important; filter: none !important; }
.admin .main.enter > *:nth-child(n) { animation-delay: 0s !important; }
.admin .main.enter > *:nth-child(2) { animation-delay: .03s !important; } .admin .main.enter > *:nth-child(3) { animation-delay: .06s !important; }
.admin .tpl .card-foot { flex-wrap: wrap; row-gap: 12px; } .admin .tpl .card-foot .actions { margin-left: auto; }

/* ---------- smooth overlays: no bounce, soft in and out ---------- */
@keyframes sheet-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(8px) scale(.99); } }
@keyframes drop-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes veil-in { from { opacity: 0; } to { opacity: 1; } }
dialog[open], dialog.sheet[open] { animation: sheet-in .32s cubic-bezier(.22, 1, .36, 1) both; }
dialog[open]::backdrop { animation: veil-in .3s ease both; }
dialog.closing { animation: sheet-out .2s ease forwards !important; pointer-events: none; }
dialog.closing::backdrop { animation: veil-in .2s ease reverse forwards; }
.menu-pop, .combo-pop { animation: drop-in .18s cubic-bezier(.22, 1, .36, 1) both; transform-origin: top; }
@media (prefers-reduced-motion: reduce) { dialog[open], dialog.closing, .menu-pop, .combo-pop { animation: none !important; } }

/* ---------- editor readability: question gets the full width, labels go under it ---------- */
.admin .q-head { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; column-gap: 12px; row-gap: 6px; align-items: center; padding: 14px 22px; }
.admin .q-num { grid-row: 1 / span 2; align-self: start; padding-top: 9px; color: rgba(236, 235, 228, .55); }
.admin .q-title { grid-column: 2; grid-row: 1; color: #f4f5f8; font-size: 15.5px; font-weight: 500; padding: 4px 0 0; }
.admin .q-title:hover { color: #b9c5ff; }
.admin .q-meta { grid-column: 2; grid-row: 2; flex-wrap: wrap; }
.admin .q-head > .btn-icon { grid-row: 1 / span 2; }
.admin .q-meta .chip-xs { height: 24px; font-size: 12px; background: rgba(255, 255, 255, .06); }
.admin .q-meta .chip.acid { background: rgba(42, 75, 255, .2); color: #c3ceff; }
.admin .q-body { padding: 4px 22px 18px 78px; }
/* content surfaces sit on a denser tint so text never fights the chrome behind */
.admin :is(.block, .doc-head, .picker, .panel):not(.stage-frame *) {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .015) 40%),
    linear-gradient(rgba(11, 12, 17, .74), rgba(11, 12, 17, .74)),
    var(--frost, linear-gradient(#0d0e13, #0d0e13)) center / 100vw 100vh no-repeat fixed,
    #0c0d12 !important;
}
.admin .block-head { background: rgba(255, 255, 255, .03); }
.admin .block-desc { color: rgba(236, 235, 228, .66); }
@media (max-width: 620px) {
  .admin .q-head { grid-template-columns: 34px minmax(0, 1fr) auto auto; padding: 12px 14px; }
  .admin .q-body { padding-left: 14px; }
}

/* link term picker */
.seg.terms { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; border-radius: 16px; margin: 8px 0 6px; }
.seg.terms span { border-radius: 12px; }
.seg.terms label.locked span { opacity: .38; cursor: not-allowed; }
.seg.terms label.locked span::after { content: ' · Pro'; font-size: 10.5px; }
@media (max-width: 520px) { .seg.terms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
