/* Kurai on top of Beer CSS (Material 3). Colours come only from the theme's tokens (--primary, --surface…), which
   Beer CSS computes from the accent colour, so the light / dark modes and every accent follow without hard-coded
   colours. The pictures use the same tokens. */

.logo-rail { width: 2.5rem; height: 2.5rem; margin: .5rem auto; display: block; }
.logo-big { width: 4.5rem; height: 4.5rem; }

/* ---------- the shell: colour washes behind everything, a stronger menu, each page's band ---------- */
/* two soft washes (the accent's container colours) so the page is never a flat white or black */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(55rem 38rem at 100% -10%, color-mix(in srgb, var(--primary-container) 70%, transparent), transparent 70%),
    radial-gradient(45rem 35rem at -10% 110%, color-mix(in srgb, var(--tertiary-container) 60%, transparent), transparent 70%); }
nav.left { background: color-mix(in srgb, var(--surface-container) 80%, transparent); }
nav:is(.left, .bottom) > a.active:not(.button, .chip) > i { background-color: var(--primary) !important;
  color: var(--on-primary) !important; }

/* the band: the accent running into its second colour (Material's tertiary, made from the same accent), the title on
   the left, the shapes on the right; one corner left sharp, so it isn't a plain box */
.hero { position: relative; overflow: hidden; display: flex; align-items: flex-start; gap: .5rem;
  margin: .75rem 0 1.5rem; padding: 1.5rem 2rem; min-block-size: 7.5rem; border-radius: 2rem 2rem 2rem .5rem;
  color: var(--on-primary);
  background: linear-gradient(115deg, var(--primary) 35%, color-mix(in srgb, var(--primary) 45%, var(--tertiary)) 100%); }
.hero-text { position: relative; z-index: 1; max-inline-size: min(40rem, 62%); }
.hero h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
.hero .lead { margin: .5rem 0 0; opacity: .9; }
.hero.tall { min-block-size: 11rem; padding-block: 2rem; }
.hero.tall h4 { font-size: 2.4rem; }
.hero-art { position: absolute; inset: 0; pointer-events: none; }
.hero-art .shape { position: absolute; }
.hero-art .a1 { inline-size: 13rem; block-size: 13rem; right: -3rem; bottom: -6.5rem; background: var(--tertiary-container); opacity: .9; }
.hero-art .a2 { inline-size: 7rem; block-size: 7rem; right: 11rem; top: -2.5rem; background: var(--primary-container); opacity: .55; }
.hero-art .a3 { inline-size: 3.25rem; block-size: 3.25rem; right: 9rem; bottom: 1rem; background: var(--tertiary); opacity: .8; }
/* the band's buttons: one pill of the accent with a shadow, readable over any shape behind it; the logout form
   steps aside (display: contents), so both buttons are siblings and line up */
.hero-tools { position: relative; z-index: 1; display: flex; align-items: center; gap: .25rem; flex: none;
  margin-inline-start: auto; padding: .25rem; border-radius: 2rem; background: var(--primary);
  box-shadow: 0 .25rem .75rem color-mix(in srgb, var(--shadow, #000) 35%, transparent); }
.hero-tools form { display: contents; }
.hero-tools button { margin: 0; color: var(--on-primary); }
.hero-tools button:hover { background: color-mix(in srgb, var(--on-primary) 14%, transparent); }
/* the shapes' slow turning only for those who don't ask for less motion */
@media (prefers-reduced-motion: reduce) { .hero-art .shape { animation: none; } }
@media (max-width: 600px) {
  .hero { padding: 1.25rem 1.25rem; border-radius: 1.5rem 1.5rem 1.5rem .5rem; }
  .hero-text { max-inline-size: 100%; }
  .hero.tall h4 { font-size: 1.9rem; }
  .hero-art .a1 { inline-size: 8rem; block-size: 8rem; right: -3rem; bottom: -4rem; }
  .hero-art .a2, .hero-art .a3 { display: none; }
}

/* a section heading inside a card: a short bar of the second colour before it */
article > h6, article > form > h6 { display: flex; align-items: center; gap: .6rem; }
article > h6::before, article > form > h6::before { content: ""; flex: none; inline-size: .3rem; block-size: 1.1em;
  border-radius: 1rem; background: var(--tertiary); }
.section-title { margin: 2rem 0 .75rem; font-weight: 600; }
.foot { display: block; margin: 2rem 0 1rem; opacity: .7; min-block-size: auto; padding: 0; }
.foot a { display: inline; padding: 0; margin: 0; min-block-size: auto; }
.narrow { max-width: 32rem; }
.grid { gap: 1rem; }
.empty { text-align: center; padding: 2rem; }
.empty i { font-size: 3rem; color: var(--primary); }
.row.wrap { flex-wrap: wrap; }
.small-text { font-size: .85rem; opacity: .8; }
.error-text { color: var(--error); margin: .5rem 0; }
.primary-text { color: var(--primary); }
.chip i { margin-right: .25rem; }

/* ---------- login: two pictures filling the empty space from top to bottom, meeting behind the card ---------- */
.login-page { overflow: hidden; }
.login { position: relative; display: flex; align-items: center; justify-content: center; min-height: 100vh;
  background: var(--surface-container, var(--surface-variant)); }
/* each scene covers half the screen: their cable / tape / wave meets at the middle, behind the card */
.login .scene { position: absolute; top: 0; bottom: 0; width: 50%; overflow: hidden; }
.login .scene-left { left: 0; } .login .scene-right { right: 0; }
.login .scene svg { width: 100%; height: 100%; display: block; }
.login-card { position: relative; z-index: 1; width: min(24rem, calc(100% - 2rem)); padding: 2rem 1.5rem; margin: 1rem 0; }
.login-card form { display: flex; flex-direction: column; gap: .75rem; }
@media (max-width: 720px) { .login .scene { opacity: .35; } }

/* ---------- error pages ---------- */
.error-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .5rem; padding: 2rem; }
.error-page .doodle svg { width: min(22rem, 80vw); height: auto; }

/* ---------- pieces ---------- */
.result .cover, .result .cover-icon { width: 3.5rem; height: 3.5rem; border-radius: .75rem; object-fit: cover; }
.result .cover-icon { display: flex; align-items: center; justify-content: center; background: var(--surface-variant); }
.qr { display: inline-block; line-height: 0; border-radius: .5rem; overflow: hidden; }
.codes { background: var(--surface-variant); padding: 1rem; border-radius: 1rem; }
/* Beer CSS lays a colour input invisibly over its parent: the swatch is what people see and click */
.color-pick { display: flex; align-items: center; gap: .75rem; margin: .5rem 0; }
.color-pick .swatch { position: relative; width: 3rem; height: 3rem; border-radius: 50%; flex: none; cursor: pointer;
  border: 2px solid var(--outline); }
.presets .preset { width: 2rem; height: 2rem; min-width: 2rem; padding: 0; }
.switch-row { padding: .25rem 0; }
.check-result.ok { color: var(--primary); }
.check-result.bad { color: var(--error); }
.app-frame { width: 100%; height: calc(100vh - 14rem); min-height: 30rem; border: 1px solid var(--outline-variant, var(--outline));
  border-radius: 1rem; background: var(--surface); }
.tab-help { margin: .25rem 0 -.25rem; }
.app-actions { margin: .75rem 0; }
/* on the whole screen: the frame fills it, with «Свернуть» floating in a corner */
.app-stage { position: relative; }
.app-noframe { display: none; text-align: center; padding: 3rem 1.5rem; }
.app-noframe > i { color: var(--primary); }
.app-stage.no-frame .app-frame { display: none; }
.app-stage.no-frame .app-noframe { display: block; }
#app-full.unframed { display: none; }
.app-exit { display: none !important; }
.app-stage:fullscreen { background: var(--surface); }
.app-stage:fullscreen .app-frame { height: 100vh; min-height: 0; border: 0; border-radius: 0; }
.app-stage:fullscreen .app-exit { display: inline-flex !important; position: absolute; right: 1rem; bottom: 1rem;
  box-shadow: var(--elevate2); opacity: .75; }
.app-stage:fullscreen .app-exit:hover, .app-stage:fullscreen .app-exit:focus-visible { opacity: 1; }
/* the run-now buttons: each with an «i» that shows what it does, over the page (on hover, or opened by a tap) */
.manual-job { display: inline-flex; align-items: center; gap: .1rem; position: relative; margin: 0; }
.manual-job button { margin: 0; }
.job-info > summary { list-style: none; cursor: pointer; display: flex; padding: .25rem; border-radius: 50%;
  color: var(--on-surface-variant); }
.job-info > summary::-webkit-details-marker { display: none; }
.job-info > summary:hover, .job-info[open] > summary { color: var(--primary); }
.job-info-text { display: none; position: absolute; z-index: 5; inset-block-start: calc(100% + .35rem);
  inset-inline-start: 0; inline-size: min(22rem, 85vw); padding: .75rem 1rem; border-radius: 1rem; opacity: 1;
  background: var(--surface-container-highest); color: var(--on-surface); box-shadow: var(--elevate2); }
.job-info[open] .job-info-text { display: block; }
.job-filters { margin-bottom: .75rem; }
.pager { margin-top: .75rem; }
.job-result { max-width: 30rem; overflow-wrap: anywhere; }
.profile { display: flex; margin: .25rem 0; }

/* ---------- docs: a wiki-like sidebar and page ---------- */
.docs { display: grid; grid-template-columns: 15rem 1fr; gap: 1rem; align-items: start; }
.docs-nav { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: .15rem; }
.docs-nav h6 { font-size: .95rem; font-weight: 600; margin: 1rem .75rem .25rem; }
.docs-nav a { display: block; text-align: left; padding: .35rem .75rem; border-radius: 1rem; }
.docs-nav a.active { background: var(--secondary-container); color: var(--on-secondary-container); }
.docs-toc { margin-bottom: 1rem; }
.markdown h1 { font-size: 1.8rem; } .markdown h2 { font-size: 1.35rem; margin-top: 1.5rem; } .markdown h3 { font-size: 1.1rem; }
.markdown table { border-collapse: collapse; } .markdown td, .markdown th { border: 1px solid var(--outline-variant, var(--outline)); padding: .3rem .6rem; }
.markdown code { background: var(--surface-variant); padding: 0 .3rem; border-radius: .3rem; }
.markdown pre code { display: block; padding: .75rem; overflow-x: auto; }
.markdown .admonition { border-left: 4px solid var(--primary); padding: .25rem 1rem; background: var(--surface-container, var(--surface-variant)); border-radius: .5rem; }
@media (max-width: 900px) { .docs { grid-template-columns: 1fr; } .docs-nav { position: static; } }

/* ---------- the pictures: theme tokens only ---------- */
.art .p { fill: var(--primary); } .art .pc { fill: var(--primary-container); } .art .on-pc { fill: var(--on-primary-container); }
.art .s { fill: var(--secondary); } .art .sc { fill: var(--secondary-container); }
.art .t { fill: var(--tertiary); } .art .tc { fill: var(--tertiary-container); }
.art .sv { fill: var(--surface-variant); } .art .sf { fill: var(--surface); } .art .bg { fill: var(--surface-container, var(--surface-variant)); }
.art .ol { fill: var(--outline); } .art .ink { fill: var(--on-surface); }
.art .line { fill: none; stroke: var(--primary); stroke-linecap: round; stroke-linejoin: round; }
.art .line-s { fill: none; stroke: var(--secondary); stroke-linecap: round; }
.art .line-t { fill: none; stroke: var(--tertiary); stroke-linecap: round; }
.art .line-ink { fill: none; stroke: var(--on-surface); stroke-linecap: round; stroke-linejoin: round; }
.art .soft { opacity: .45; }
/* narrow screens: nothing may make the page wider than the window. The tabs scroll inside their strip (and their
   sideways scrolling never passes on to the page); a field takes its row's width, however long its options; a wide
   table scrolls inside its card */
.tabs { contain: inline-size; overscroll-behavior-x: contain; }  /* its width never comes from its tabs */
.field { max-inline-size: 100%; }
.field > select, .field > input { min-inline-size: 0; max-inline-size: 100%; text-overflow: ellipsis; }
article > table { display: block; overflow-x: auto; }

/* ---------- «Для вас»: the wave large on the left, the notifications in a narrow column, then the mixes ---------- */
/* Beer CSS spaces stacked cards with a margin; in these grids the gap does it */
.split > *, .mixes > * { margin-block: 0 !important; }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; align-items: stretch; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.kicker { display: block; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  opacity: .8; }
.feature { position: relative; overflow: hidden; display: flex; align-items: center; gap: 1.5rem; margin: 0;
  padding: 1.75rem; border-radius: .5rem 2rem 2rem 2rem; min-block-size: 13rem;
  background: var(--tertiary-container); color: var(--on-tertiary-container); }
.feature h3 { margin: .25rem 0 .5rem; font-size: 2rem; font-weight: 600; }
.feature p { margin: 0 0 .75rem; }
.feature-text { position: relative; z-index: 1; flex: 1; min-inline-size: 0; }
.feature-cover { flex: none; inline-size: 9rem; block-size: 9rem; background: var(--tertiary); display: flex;
  align-items: center; justify-content: center; }
.feature-cover > i { filter: none; color: var(--on-tertiary); font-size: 3.5rem; inline-size: 3.5rem; block-size: 3.5rem; }
.feature .button { background: var(--tertiary); color: var(--on-tertiary); }
@media (max-width: 600px) { .feature { flex-direction: column; align-items: flex-start; padding: 1.25rem; }
  .feature-cover { inline-size: 5.5rem; block-size: 5.5rem; } .feature-cover > i { font-size: 2.25rem; }
  .feature h3 { font-size: 1.6rem; } }

.notes-col { margin: 0; padding: 1.25rem; border-radius: 2rem 2rem .5rem 2rem;
  background: var(--surface-container-high); display: flex; flex-direction: column; gap: .5rem; }
.notes-col h6 { margin: 0 0 .25rem; font-weight: 600; }
.note { padding: .6rem .75rem; border-radius: 1rem; background: var(--surface-container-low); }
.note.unread { background: var(--primary-container); color: var(--on-primary-container); }
.note a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }

.mixes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(20rem, 100%), 1fr)); gap: 1rem; }
.mix { display: flex; gap: 1rem; align-items: flex-start; margin: 0; padding: 1.1rem; border-radius: 1.5rem;
  background: var(--surface-container-low); transition: transform var(--speed2), box-shadow var(--speed2); }
.mix:hover { transform: translateY(-2px); box-shadow: var(--elevate2); }
.mix-text { flex: 1; min-inline-size: 0; }
.mix h6 { margin: .1rem 0 .25rem; font-weight: 600; }
.mix p { margin: 0 0 .25rem; }
.mix .cover { flex: none; inline-size: 4.5rem; block-size: 4.5rem; display: flex; align-items: center;
  justify-content: center; }
.mix .cover > i { filter: none; }
.mix .row .max, .feature .row .max { white-space: nowrap; }
/* what made the mix picks its colour: the night's mixes the secondary, requests the second accent */
.mix .cover { background: var(--primary-container); color: var(--on-primary-container); }
.mix-nightly .cover { background: var(--secondary-container); color: var(--on-secondary-container); }
.mix-nightly .kicker { color: var(--secondary); }
.mix-ask .cover { background: var(--tertiary-container); color: var(--on-tertiary-container); }
.mix-ask .kicker { color: var(--tertiary); }
