/* SPDX-FileCopyrightText: 2026 Veydan Project */
/* SPDX-License-Identifier: LicenseRef-PolyForm-Perimeter-1.0.1 */

/* The cabinet's own CSS: the fonts of the app and the layout of its pages,
   on the app's tokens only. Colours, buttons, cards are the app's
   (app/tokens.css, app/base.css, app/mobile.css); nothing here draws them
   anew (owner's decision 2026-10-21: the look of the app, no design of
   its own). */

/* The fonts the app bundles (@fontsource-variable 5.2.8, OFL-1.1), the
   Latin and the Cyrillic part, with the ranges of fontsource. */
@font-face {
  font-family: 'Manrope Variable'; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(app/fonts/manrope-cyrillic-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Manrope Variable'; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(app/fonts/manrope-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,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 Variable'; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url(app/fonts/jetbrains-mono-cyrillic-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'JetBrains Mono Variable'; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url(app/fonts/jetbrains-mono-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* The app is one screen that never scrolls (base.css body); a site scrolls. */
body.vcab {
  height: auto;
  min-height: 100dvh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  background-attachment: fixed;
}


/* ── The head: the name, the sections of a session, the language ── */
.vcab-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3) var(--sp-4);
  padding: calc(var(--sp-4) + var(--sat)) calc(var(--sp-6) + var(--sar)) var(--sp-4) calc(var(--sp-6) + var(--sal));
}
.vcab-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--text);
  font-weight: var(--fw-bold);
  font-size: var(--fs-md);
  text-decoration: none;
  margin-right: auto;
}
.vcab-logo { border-radius: var(--radius-sm); }
.vcab-nav a.tab { text-decoration: none; }
.vcab-logout { display: contents; }
.vcab-lang a.seg-btn { text-decoration: none; }

.vcab-main {
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: var(--sp-4) var(--sp-6) var(--sp-8);
}

.vcab-solo {
  max-width: 440px;
  margin: 8vh auto 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.vcab-title { font-size: var(--fs-2xl); font-weight: var(--fw-bold); line-height: 1.2; }

.vcab-foot {
  display: flex;
  justify-content: center;
  padding: var(--sp-6) var(--sp-4) calc(var(--sp-6) + var(--sab));
  font-size: var(--fs-xs);
}

/* ── Pieces shared by the pages ── */
.vcab-small { font-size: var(--fs-sm); }
.vcab-line { margin: 0; font-size: var(--fs-base); color: var(--text-body); }
.vcab-icon-line { display: flex; align-items: flex-start; gap: var(--sp-2); }
.vcab-icon-line > .icon { flex-shrink: 0; margin-top: 3px; }
.vcab-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.vcab-actions .btn, .vcab-qr-box .btn, .vcab-none .btn { text-decoration: none; }
/* The notice of the app (cloud/Notice.svelte), its tokens. */
.vcab-note {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-md);
  border: 1px solid var(--accent-tint-border); background: var(--accent-tint); color: var(--text-body);
  font-size: var(--fs-sm); line-height: 1.5;
}
.vcab-note > .icon { flex-shrink: 0; margin-top: 2px; color: var(--accent-text); }
.vcab-note.warn { border-color: var(--warn-border); background: var(--warn-bg); }
.vcab-note.warn > .icon { color: var(--warn-text); }
.vcab-note.danger { border-color: var(--danger-border); background: var(--danger-bg); color: var(--danger-text); }
.vcab-note.danger > .icon { color: var(--danger-text); }
/* A copy button: its icon, then a check for a moment (vcab.js). */
.vcab-copy .vcab-i-done, .vcab-copy.done .vcab-i-copy { display: none; }
.vcab-copy.done .vcab-i-done { display: inline-flex; color: var(--success-text); }
.vcab-copy span { display: inline-flex; }

/* ── Login ── */
.vcab-panel { display: flex; flex-direction: column; gap: var(--sp-4); }
.vcab-tabs { align-self: stretch; }
.vcab-tabs .tab { flex: 1; justify-content: center; text-decoration: none; }
.vcab-qr-box { display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); text-align: center; }
/* The app's QR (LinkNewDevice.svelte .qr): white paper whatever the theme, for every reader. */
.vcab-qr {
  width: min(232px, 100%); height: auto; aspect-ratio: 1;
  background: #fff; border-radius: var(--radius-lg); padding: var(--sp-2);
}
.vcab-hint { margin: 0; font-weight: var(--fw-semibold); color: var(--text); }
.vcab-form { display: flex; flex-direction: column; gap: var(--sp-3); }
/* A field takes the row; a radio or a checkbox stays the app's mark. */
.vcab-form input:not([type="radio"]):not([type="checkbox"]) { width: 100%; }
/* A part the script hides (the email of a way to pay that sends no receipt). */
.vcab-form [hidden] { display: none; }
.vcab-code { font-size: var(--fs-xl); letter-spacing: 0.3em; text-align: center; }

/* ── The account (AccountHead, PlanCard, UsageCard of the app) ── */
.vcab-page { display: flex; flex-direction: column; gap: var(--sp-3); }
.vcab-page > .card { display: flex; flex-direction: column; gap: var(--sp-3); }
.vcab-who { display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); padding: var(--sp-2) 0 var(--sp-3); }
.vcab-who strong { font-size: var(--fs-lg); font-weight: var(--fw-bold); text-align: center; }
.vcab-ava {
  display: inline-flex; align-items: center; justify-content: center; width: 68px; height: 68px; border-radius: 50%;
  background: var(--accent-grad); color: #fff; margin-bottom: var(--sp-2);
}
.vcab-ava .icon { width: 30px; height: 30px; }
.vcab-npub { display: inline-flex; align-items: center; gap: var(--sp-1); color: var(--text-2); font-size: var(--fs-sm); max-width: 100%; }
.vcab-npub .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.vcab-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); }
.vcab-grid > .card { min-width: 0; display: flex; flex-direction: column; gap: var(--sp-4); }
@media (min-width: 860px) {
  .vcab-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vcab-wide { grid-column: 1 / -1; }
}

.vcab-plan-top { display: flex; align-items: center; gap: var(--sp-3); }
.vcab-tile {
  display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; flex-shrink: 0;
  border-radius: var(--radius-md); background: var(--accent-grad); color: #fff; box-shadow: var(--shadow-accent);
}
.vcab-tile .icon { width: 22px; height: 22px; }
.vcab-plan-words { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vcab-plan-name { font-size: var(--fs-xl); font-weight: var(--fw-extrabold); color: var(--text); line-height: 1.15; letter-spacing: -0.01em; }
.vcab-facts { margin: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--sp-2); }
.vcab-facts div { display: flex; flex-direction: column; gap: 2px; padding: var(--sp-3); border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--border); min-width: 0; }
.vcab-facts dd { margin: 0; font-size: var(--fs-lg); font-weight: var(--fw-bold); color: var(--text); white-space: nowrap; }
.vcab-facts dt { font-size: var(--fs-xs); color: var(--text-2); line-height: 1.35; }

/* The bars of the pools: <progress>, as the CSP allows no style attribute for a width. */
.vcab-pool-main { display: flex; flex-direction: column; gap: var(--sp-2); }
.vcab-figures { display: flex; align-items: baseline; gap: var(--sp-2); }
.vcab-used { font-size: var(--fs-xl); font-weight: var(--fw-extrabold); color: var(--text); letter-spacing: -0.01em; }
.vcab-percent { margin-left: auto; font-weight: var(--fw-semibold); color: var(--text-2); }
.vcab-bar {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 6px; border: 0;
  border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; color: var(--accent);
}
.vcab-bar.big { height: 10px; }
.vcab-bar::-webkit-progress-bar { background: var(--surface-3); border-radius: var(--radius-pill); }
.vcab-bar::-webkit-progress-value { background: var(--accent-grad); border-radius: var(--radius-pill); }
.vcab-bar::-moz-progress-bar { background: var(--accent-grad); border-radius: var(--radius-pill); }
.warn > .vcab-bar::-webkit-progress-value, .warn .vcab-bar::-webkit-progress-value { background: var(--warn); }
.warn > .vcab-bar::-moz-progress-bar, .warn .vcab-bar::-moz-progress-bar { background: var(--warn); }
.full .vcab-bar::-webkit-progress-value { background: var(--danger); }
.full .vcab-bar::-moz-progress-bar { background: var(--danger); }
.full .vcab-percent { color: var(--danger-text); }
.vcab-pools { list-style: none; margin: 0; padding: var(--sp-4) 0 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: var(--sp-3); }
.vcab-pools li { display: flex; flex-direction: column; gap: 6px; }
.vcab-row { display: flex; justify-content: space-between; gap: var(--sp-3); font-size: var(--fs-base); color: var(--text-body); }
.vcab-row .vcab-small { white-space: nowrap; }
.vcab-stopped { font-size: var(--fs-sm); color: var(--danger-text); line-height: 1.4; }

/* Lists of payments, codes, orders, sessions. */
.vcab-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.vcab-item { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) 0; border-top: 1px solid var(--border); }
.vcab-item:first-child { border-top: 0; padding-top: 0; }
.vcab-item:last-child { padding-bottom: 0; }
.vcab-item-icon { display: inline-flex; color: var(--text-2); flex-shrink: 0; }
.vcab-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.vcab-item-main strong { font-weight: var(--fw-semibold); overflow-wrap: anywhere; }
.vcab-amount { white-space: nowrap; font-weight: var(--fw-semibold); }
.vcab-item form { flex-shrink: 0; }
.vcab-key { display: inline-flex; align-items: center; gap: var(--sp-1); margin-top: var(--sp-1); }
.vcab-key code { overflow-wrap: anywhere; }
.vcab-link-row {
  display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3); border-radius: var(--radius-md);
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text); text-decoration: none;
}
.vcab-link-row:hover { border-color: var(--border-2); }
.vcab-link-row > .icon { flex-shrink: 0; color: var(--text-2); }
.vcab-none { align-items: center; text-align: center; }
.vcab-none .vcab-link-row { align-self: stretch; text-align: left; }
/* A line of a list that is a link as a whole (an order). */
.vcab-row-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--sp-3); color: inherit; text-decoration: none; }
.vcab-row-link > .icon { flex-shrink: 0; color: var(--text-3); }
a.vcab-row-link:hover strong, .vcab-strong-link:hover { color: var(--accent-text); }
.vcab-strong-link { font-weight: var(--fw-semibold); color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.vcab-more { display: inline-flex; align-items: center; gap: var(--sp-1); align-self: flex-start; color: var(--accent-text); text-decoration: none; font-size: var(--fs-sm); }

/* ── Pages of one column: a purchase, an order, the deletion ── */
.vcab-narrow { max-width: 640px; width: 100%; margin: 0 auto; }
.vcab-back { display: inline-flex; align-items: center; gap: var(--sp-1); align-self: flex-start; text-decoration: none; }
.vcab-buy { align-items: center; }
.vcab-buy-sum { font-size: var(--fs-xl); font-weight: var(--fw-extrabold); color: var(--text); white-space: nowrap; }
.vcab-npub-full { display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; }
.vcab-npub-full .vcab-key { margin-top: 0; }
/* A long key or address breaks anywhere rather than widen the page. */
.vcab-wrap { overflow-wrap: anywhere; word-break: break-all; }
.vcab-choices { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.vcab-choices legend { padding: 0 0 var(--sp-1); }
.vcab-choice {
  display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-3); cursor: pointer;
  border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--surface-2);
}
.vcab-choice:has(input:checked) { border-color: var(--accent-border); background: var(--accent-tint); }
.vcab-choice input { margin-top: 3px; flex-shrink: 0; }
.vcab-live { display: flex; flex-direction: column; gap: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--border); }
/* The poll is an empty element: it takes no gap (htmx polls it all the same). */
.vcab-live > [hx-trigger]:empty { display: none; }
.vcab-status { justify-content: flex-start; align-items: center; flex-wrap: wrap; }
.vcab-bought { display: flex; flex-direction: column; gap: var(--sp-2); }
.vcab-key-big { padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--border); align-self: flex-start; max-width: 100%; }
.vcab-key-big code { font-size: var(--fs-lg); font-weight: var(--fw-semibold); letter-spacing: 0.04em; color: var(--text); }
.vcab-key-input { font-size: var(--fs-md); letter-spacing: 0.06em; text-transform: uppercase; }
.vcab-letter { margin: 0; padding: var(--sp-3); border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--border); white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--fs-sm); }

/* ── The plans (PlanPicker of the app), the prices of the site under each ── */
.vcab-plans { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: var(--sp-3); align-items: start; }
.vcab-plan-card { display: flex; flex-direction: column; gap: var(--sp-4); min-width: 0; }
.vcab-plan-card.pointed { border-color: var(--accent-border); box-shadow: 0 0 0 1px var(--accent-border); }
.vcab-plan-card.mine:not(.pointed) { border-color: var(--border-2); }
.vcab-plan-head { align-items: center; min-height: 26px; }
.vcab-plan-card .vcab-plan-name { font-size: var(--fs-lg); }
.vcab-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.vcab-features li { display: flex; align-items: flex-start; gap: var(--sp-2); font-size: var(--fs-sm); line-height: 1.4; color: var(--text-body); }
.vcab-features li > .icon { flex-shrink: 0; width: 14px; height: 14px; margin-top: 2px; color: var(--success-text); }
.vcab-features li.more { color: var(--text); font-weight: var(--fw-semibold); }
.vcab-gone li > .icon { color: var(--danger-text); }
.vcab-free { display: flex; flex-direction: column; gap: 2px; padding-top: var(--sp-3); border-top: 1px solid var(--border); }
.vcab-free strong { font-size: var(--fs-xl); font-weight: var(--fw-extrabold); color: var(--text); }
.vcab-prices { display: flex; flex-direction: column; gap: var(--sp-1); padding-top: var(--sp-3); border-top: 1px solid var(--border); }
.vcab-price .vcab-item-main strong { font-size: var(--fs-md); }
.vcab-price .btn { flex-shrink: 0; text-decoration: none; }
.vcab-wide-btn { justify-content: center; text-decoration: none; }

/* The phone: the gutters of the app's screens (16 px), no line wider than the screen. */
@media (max-width: 640px) {
  .vcab-head { padding-left: calc(var(--sp-4) + var(--sal)); padding-right: calc(var(--sp-4) + var(--sar)); }
  .vcab-nav { order: 3; width: 100%; }
  .vcab-nav .tab, .vcab-nav .vcab-logout .tab { flex: 1; justify-content: center; padding: 0 var(--sp-2); }
  .vcab-main { padding: var(--sp-2) var(--sp-4) var(--sp-6); }
  .vcab-solo { margin-top: var(--sp-6); }
  .vcab-grid > .card, .vcab-solo.card, .vcab-page > .card { padding: var(--sp-4); }
  .vcab-facts { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
  .vcab-facts div { padding: var(--sp-2) var(--sp-3); }
  .vcab-facts dd { font-size: var(--fs-md); }
  .vcab-actions .btn { flex: 1 1 auto; min-height: 48px; }
  .vcab-item { flex-wrap: wrap; }
  .vcab-row-link { flex-wrap: wrap; }
  .vcab-price { flex-wrap: nowrap; }
  .vcab-plans { grid-template-columns: minmax(0, 1fr); }
  .vcab-plan-card { padding: var(--sp-4); }
  .vcab-buy-sum { font-size: var(--fs-lg); }
  .vcab-key-big { align-self: stretch; }
  .vcab-key-big code { font-size: var(--fs-md); }
}
