/* FakeToHuman design system "Paper" (class prefix b-, body class .brut).
   Calm and tool-like: one family (Golos Text, 400–650), a warm paper canvas
   with white sheets, 1px hairlines instead of boxes and hard shadows, and
   colour only as punctuation — a highlighter yellow for what matters and
   muted dots for work types. Structure comes from spacing and type weight. */

@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url("/static/vendor/fonts/golos-text-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: "Golos Text";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url("/static/vendor/fonts/golos-text-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: "Golos Text";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url("/static/vendor/fonts/golos-text-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+20A0-20C0;
}

:root {
  --ink: #1d1c1a;
  --paper: #ffffff;
  --paper-2: #f7f6f2;
  --paper-3: #efede7;
  --line: #e6e3db;
  --line-strong: #d3cfc4;
  --text-2: #4b4943;
  --text-3: #7a776f;

  /* Accents are small: a highlighter, a link blue and soft type tints. */
  --lemon: #fff0a6;
  --lemon-strong: #ffe066;
  --lemon-soft: #fffbe6;
  --cobalt: #2f54d6;
  --cobalt-deep: #2442b3;
  --blue-soft: #e8edfd;
  --pink: #f9dde9;
  --mint: #dcf2e6;
  --orange: #ffe2c4;
  --red: #c2362f;
  --green: #1f7a4d;

  --font-display: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --stroke: 1px;
  --stroke-thin: 1px;
  --shadow-s: 0 1px 2px rgba(29, 28, 26, 0.06);
  --shadow: 0 1px 2px rgba(29, 28, 26, 0.04), 0 8px 24px rgba(29, 28, 26, 0.06);
  --shadow-l: 0 2px 6px rgba(29, 28, 26, 0.05), 0 18px 48px rgba(29, 28, 26, 0.1);
  --ring: 0 0 0 3px rgba(47, 84, 214, 0.18);
  --r-s: 8px;
  --r: 12px;
  --r-l: 16px;
  --r-pill: 999px;

  --t-hero: clamp(40px, 5.4vw, 68px);
  --t-h1: clamp(32px, 3.8vw, 48px);
  --t-h2: clamp(26px, 2.8vw, 36px);
  --t-h3: clamp(18px, 1.5vw, 20px);
  --t-lead: clamp(17px, 1.3vw, 19px);
  --t-body: 16.5px;
  --t-small: 14px;

  --gutter: clamp(18px, 3vw, 32px);
  --section: clamp(56px, 7.5vw, 104px);
  --container: 1160px;

  /* Kept for markup written for the earlier sticker style: nothing tilts now. */
  --tilt-a: 0deg;
  --tilt-b: 0deg;
  --tilt-c: 0deg;
  --tilt-d: 0deg;

  --dur: 160ms;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- base ---------- */

.brut,
.brut * {
  box-sizing: border-box;
}

body.brut {
  margin: 0;
  min-width: 320px;
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}

.brut .hidden,
.brut [hidden] {
  display: none !important;
}

.brut ::selection {
  background: var(--lemon-strong);
  color: var(--ink);
}

.brut img,
.brut svg {
  display: block;
  max-width: 100%;
}

.brut a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.brut a:hover {
  color: var(--cobalt);
}

.brut :focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 2px;
  border-radius: 6px;
}

.brut h1,
.brut h2,
.brut h3 {
  text-wrap: balance;
}

.brut p,
.brut li {
  text-wrap: pretty;
}

.b-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.b-skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-s);
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
}

.b-skip:focus {
  top: 12px;
}

/* ---------- layout ---------- */

.b-wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.b-section {
  padding-block: var(--section);
}

/* Bands alternate the canvas with white paper, separated by a hairline. */
.b-band {
  border-block: 1px solid var(--line);
}

.b-band--paper2 {
  background: var(--paper);
}

.b-band--ink {
  background: var(--ink);
  color: var(--paper);
}

.b-stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap, 16px);
}

.b-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap, 16px);
}

/* ---------- type ---------- */

.b-display,
.b-hero,
.b-h1,
.b-h2,
.b-h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.b-hero {
  font-size: var(--t-hero);
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.b-h1 {
  font-size: var(--t-h1);
  letter-spacing: -0.03em;
}

.b-h2 {
  font-size: var(--t-h2);
}

.b-h3 {
  font-size: var(--t-h3);
  letter-spacing: -0.012em;
  line-height: 1.3;
}

.b-lead {
  margin: 0;
  max-width: 58ch;
  color: var(--text-2);
  font-size: var(--t-lead);
  font-weight: 400;
  line-height: 1.55;
}

.b-muted {
  color: var(--text-3);
}

.b-kicker {
  margin: 0;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* The signature: a highlighter stroke behind the words that matter. */
.b-mark,
.b-hl {
  padding-inline: 0.06em;
  background: linear-gradient(transparent 58%, var(--lemon-strong) 58%, var(--lemon-strong) 94%, transparent 94%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.b-mark--pink { background-image: linear-gradient(transparent 58%, var(--pink) 58%, var(--pink) 94%, transparent 94%); }
.b-mark--mint { background-image: linear-gradient(transparent 58%, var(--mint) 58%, var(--mint) 94%, transparent 94%); }
.b-mark--cobalt { background-image: linear-gradient(transparent 58%, var(--blue-soft) 58%, var(--blue-soft) 94%, transparent 94%); }

.b-price {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---------- buttons ---------- */

.b-btn {
  --btn-bg: var(--paper);
  --btn-fg: var(--ink);
  --btn-line: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--btn-line);
  border-radius: 10px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.1;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.brut .b-btn,
.brut .b-btn:hover {
  color: var(--btn-fg);
}

.b-btn:hover {
  border-color: var(--ink);
}

.b-btn:active {
  box-shadow: inset 0 1px 2px rgba(29, 28, 26, 0.12);
}

.b-btn[disabled],
.b-btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.5;
}

/* The one filled button: ink, like a marker on paper. */
.b-btn--primary,
.b-btn--ink {
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  --btn-line: var(--ink);
}

.b-btn--primary:hover,
.b-btn--ink:hover {
  --btn-bg: #34322e;
}

.b-btn--lemon {
  --btn-bg: var(--lemon);
  --btn-line: #ead77a;
}

.b-btn--pink {
  --btn-bg: var(--pink);
}

.b-btn--l {
  min-height: 52px;
  padding: 0 24px;
  border-radius: 12px;
  font-size: 16px;
}

.b-btn--s {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 14px;
}

.b-btn--block {
  width: 100%;
}

.b-btn--quiet {
  --btn-line: transparent;
  --btn-bg: transparent;
}

.b-btn--quiet:hover {
  --btn-bg: var(--paper-3);
}

.b-link {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color var(--dur) var(--ease);
}

.b-link:hover {
  text-decoration-color: currentColor;
}

/* ---------- surfaces ---------- */

.b-card {
  position: relative;
  min-width: 0;
  padding: clamp(20px, 2.2vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--paper);
  color: var(--ink);
}

.b-card--shadow { box-shadow: var(--shadow-s); }
.b-card--shadow-l { box-shadow: var(--shadow); }
.b-card--paper2 { background: var(--paper-2); }
.b-card--lemon { background: #fffbe6; border-color: #f1e5ad; }
.b-card--pink { background: #fdf2f7; border-color: #f2d6e2; }
.b-card--mint { background: #f1faf5; border-color: #cfe9db; }
.b-card--cobalt { background: #f2f5fe; border-color: #d6defa; }
.b-card--ink { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.brut .b-card--ink {
  color: var(--paper);
}

a.b-card {
  display: block;
  text-decoration: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

a.b-card:hover {
  color: inherit;
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.b-tilt-a,
.b-tilt-b,
.b-tilt-c,
.b-tilt-d {
  transform: none;
}

/* Small label (the old "sticker"): a quiet tag. */
.b-sticker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--paper);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.b-sticker--lemon { background: #fffbe6; border-color: #f1e5ad; color: var(--ink); }
.b-sticker--pink { background: #fdf2f7; border-color: #f2d6e2; color: var(--ink); }
.b-sticker--mint { background: #f1faf5; border-color: #cfe9db; color: var(--ink); }
.b-sticker--cobalt { background: #f2f5fe; border-color: #d6defa; color: var(--ink); }
.b-sticker--paper { background: var(--paper); }

.b-sticker--round {
  flex-direction: column;
  justify-content: center;
  width: var(--size, 120px);
  height: var(--size, 120px);
  padding: 10px;
  border-radius: 50%;
  text-align: center;
  white-space: normal;
}

/* Grain belonged to the sticker style; paper stays flat now. */
.b-grain::after {
  content: none;
}

/* ---------- pills, chips, tags ---------- */

.b-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.brut .b-pill:hover {
  background: var(--paper-3);
  color: var(--ink);
}

.brut .b-pill[aria-current="page"],
.brut .b-pill.is-active {
  background: var(--paper-3);
  color: var(--ink);
}

.b-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--paper);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.3;
}

.b-chip svg {
  flex: none;
}

.b-tick {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--green);
}

.b-tick--empty {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

/* Type dots: work types keep one muted colour everywhere. */
.b-dot {
  display: inline-block;
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
}

[data-work-type="coursework_draft"] .b-dot { background: #6f8ae6; }
[data-work-type="exam_answers"] .b-dot { background: #e98fb5; }
[data-work-type="abstract"] .b-dot { background: #e7c443; }
[data-work-type="report"] .b-dot { background: #5cc08f; }
[data-work-type="essay"] .b-dot { background: #b8b3a6; }

/* ---------- header & footer ---------- */

.b-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}

.b-header__inner {
  display: flex;
  align-items: center;
  gap: 12px 28px;
  min-height: 68px;
}

.b-logo {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.025em;
  text-decoration: none;
  white-space: nowrap;
}

.b-logo__arrow {
  flex: none;
  width: 0.9em;
  height: 0.6em;
  margin: 0 0.1em;
  color: var(--cobalt);
}

.brut .b-logo:hover {
  color: var(--ink);
}

.b-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.b-header__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  font-weight: 500;
  font-size: 15px;
}

.b-header__actions > a:not(.b-btn) {
  text-decoration: none;
  color: var(--text-2);
}

.b-menu {
  display: none;
  position: relative;
}

.b-menu > summary {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
  list-style: none;
  cursor: pointer;
}

.b-menu > summary::-webkit-details-marker {
  display: none;
}

.b-menu[open] > summary {
  background: var(--paper-3);
}

.b-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: min(86vw, 300px);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--paper);
  box-shadow: var(--shadow-l);
}

.b-menu__panel .b-pill {
  min-height: 44px;
  justify-content: flex-start;
  font-size: 16px;
}

.b-menu__panel .b-btn {
  margin-top: 6px;
}

@media (max-width: 860px) {
  .b-header .b-nav,
  .b-header__actions .b-hide-m {
    display: none;
  }

  .b-menu {
    display: block;
  }
}

.b-footer {
  border-top: 1px solid var(--line);
  padding-block: 44px 36px;
  color: var(--text-2);
}

.b-footer__mark {
  display: flex;
  align-items: center;
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.b-footer__mark .b-logo__arrow {
  width: 0.9em;
  height: 0.6em;
}

.b-footer__cols {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 56px;
  margin-top: 24px;
  font-size: 15px;
}

.b-footer__cols nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.b-footer__cols strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.b-footer__cols a {
  text-decoration: none;
}

.b-footer__cols a:hover {
  text-decoration: underline;
}

/* ---------- tick list ---------- */

.b-ticks {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.b-ticks li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.b-ticks--big {
  gap: 14px;
  margin: 24px 0 28px;
  font-size: 17px;
}

/* ---------- sample cards (landing, library, related) ---------- */

.b-lib {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.b-lib > li {
  display: flex;
  min-width: 0;
}

.b-lib__card {
  display: flex !important;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-height: 180px;
  text-decoration: none;
}

.b-lib__card .b-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}

[data-work-type="coursework_draft"] .b-chip::before { background: #6f8ae6; }
[data-work-type="exam_answers"] .b-chip::before { background: #e98fb5; }
[data-work-type="abstract"] .b-chip::before { background: #e7c443; }
[data-work-type="report"] .b-chip::before { background: #5cc08f; }

.b-lib__topic {
  font-size: 17.5px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.b-lib__meta {
  margin-top: auto;
  font-size: 14px;
}

/* ---------- forms ---------- */

.b-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.b-label {
  font-weight: 500;
  font-size: 15px;
}

.b-hint {
  font-size: 14px;
  color: var(--text-3);
}

.b-input,
.b-textarea,
.b-select {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.45 var(--font-body);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.b-textarea {
  min-height: 160px;
  resize: vertical;
}

.b-input::placeholder,
.b-textarea::placeholder {
  color: #9a978e;
}

.b-input:focus,
.b-textarea:focus,
.b-select:focus {
  outline: none;
  border-color: var(--cobalt);
  box-shadow: var(--ring);
}

.b-input[aria-invalid="true"],
.b-textarea[aria-invalid="true"] {
  border-color: var(--red);
}

.b-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  cursor: pointer;
}

.b-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--ink);
}

/* Segmented control: real radios on a soft track, the checked one lifts. */
.b-seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: 0;
  padding: 3px;
  border: 0;
  border-radius: 11px;
  background: var(--paper-3);
}

.b-seg label {
  position: relative;
  cursor: pointer;
}

.b-seg input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.b-seg span {
  display: grid;
  place-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 500;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.b-seg label:hover span {
  color: var(--ink);
}

.b-seg input:checked + span {
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-s), 0 0 0 1px var(--line);
}

.b-seg input:focus-visible + span {
  outline: 2px solid var(--cobalt);
  outline-offset: 1px;
}

/* ---------- notices ---------- */

.b-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--paper);
  color: var(--text-2);
  font-size: 15px;
}

.b-note--warn { background: #fffbe6; border-color: #f1e5ad; color: var(--ink); }
.b-note--error { background: #fdf0ef; border-color: #f2cfcc; color: var(--ink); }
.b-note--ok { background: #f1faf5; border-color: #cfe9db; color: var(--ink); }

/* ---------- FAQ ---------- */

.b-faq {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.b-faq details {
  border-bottom: 1px solid var(--line);
}

.b-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding: 14px 0;
  font-weight: 500;
  font-size: 17px;
  list-style: none;
  cursor: pointer;
}

.b-faq summary::-webkit-details-marker {
  display: none;
}

.b-faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--text-3);
  font-size: 20px;
  font-weight: 400;
  transition: transform var(--dur) var(--ease);
}

.b-faq summary:hover::after {
  background: var(--paper-3);
}

.b-faq details[open] summary::after {
  transform: rotate(45deg);
}

.b-faq details p {
  margin: 0;
  padding: 0 40px 20px 0;
  color: var(--text-2);
}

/* ---------- hand-drawn marks ---------- */

.b-scribble {
  position: absolute;
  pointer-events: none;
  color: var(--text-3);
}

.b-scribble path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  .brut *,
  .brut *::before,
  .brut *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- cookie consent (markup comes from base.html) ---------- */

:is(.brut, .brut-cabinet) .cookie-consent {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 90;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  width: min(calc(100% - 24px), 720px);
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--paper);
  box-shadow: var(--shadow-l);
  transform: translate(-50%, 140%);
  transition: transform 220ms var(--ease);
}

:is(.brut, .brut-cabinet) .cookie-consent.visible {
  transform: translate(-50%, 0);
}

:is(.brut, .brut-cabinet) .cookie-consent.hidden {
  display: none;
}

:is(.brut, .brut-cabinet) .cookie-copy {
  flex: 1 1 300px;
  min-width: 0;
  font-size: 14px;
  line-height: 1.45;
}

:is(.brut, .brut-cabinet) .cookie-copy strong {
  font-size: 14px;
  font-weight: 600;
}

:is(.brut, .brut-cabinet) .cookie-copy p {
  margin: 4px 0 0;
  color: var(--text-2);
}

:is(.brut, .brut-cabinet) .cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

:is(.brut, .brut-cabinet) .cookie-actions .primary-button,
:is(.brut, .brut-cabinet) .cookie-actions .ghost-button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font: 500 14px var(--font-body);
  text-decoration: none;
  cursor: pointer;
}

:is(.brut, .brut-cabinet) .cookie-actions .primary-button {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

@media (max-width: 560px) {
  :is(.brut, .brut-cabinet) .cookie-consent {
    bottom: 8px;
    padding: 12px;
  }

  :is(.brut, .brut-cabinet) .cookie-copy p {
    display: none;
  }
}

/* ---------- formats list (landing, /study) ---------- */

.b-formats {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.b-formats li {
  border-bottom: 1px solid var(--line);
}

.b-format {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(110px, 0.55fr) minmax(0, 2fr) auto 20px;
  align-items: center;
  gap: 8px 24px;
  padding: 20px 4px;
  text-decoration: none;
  transition: background-color var(--dur) var(--ease);
}

.brut .b-format:hover {
  color: var(--ink);
  background: var(--paper-2);
}

.b-format__name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.b-format__volume {
  color: var(--text-3);
  font-size: 14.5px;
}

.b-format__what {
  color: var(--text-2);
  font-size: 15px;
}

.b-format__price {
  font-size: 22px;
}

.b-format__go {
  color: var(--text-3);
  transition: transform var(--dur) var(--ease), color var(--dur) var(--ease);
}

.b-format:hover .b-format__go {
  color: var(--ink);
  transform: translateX(3px);
}

@media (max-width: 760px) {
  .b-format {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 16px;
  }

  .b-format__volume {
    grid-row: 2;
  }

  .b-format__what {
    grid-column: 1 / -1;
  }

  .b-format__go {
    display: none;
  }
}

/* ---------- pricing & payment (billing.html, guests and cabinet) ---------- */

.b-pricing {
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 4vw, 48px);
  padding-block: clamp(24px, 4vw, 48px) clamp(48px, 6vw, 80px);
}

.b-pricing__head {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.b-pricing__block {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.b-pricing__block > .b-h2 {
  font-size: clamp(22px, 2.2vw, 28px);
}

.b-pricing__status:empty {
  display: none;
}

.b-pricing__status,
.b-pricing__hint {
  margin: 0;
  color: var(--text-2);
  font-size: 15px;
}

.b-balance {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--paper);
}

.b-balance__label {
  margin: 0;
  color: var(--text-3);
  font-size: 14px;
}

.b-balance__value {
  margin: 2px 0 0;
  font-size: 17px;
}

.b-balance__value b {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}

.b-packs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.b-pack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--paper);
}

.b-pack.is-fit,
.b-pack.is-best {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

.b-pack__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 0;
  font-weight: 600;
}

.b-pack__name .b-sticker {
  padding: 2px 9px;
  font-size: 12px;
}

.b-pack__tokens {
  margin: 4px 0 0;
  color: var(--text-2);
  font-size: 15px;
}

.b-pack__tokens b {
  color: var(--ink);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.b-pack__tokens span {
  display: block;
  color: var(--green);
  font-size: 13.5px;
  font-weight: 500;
}

.b-pack__what {
  flex: 1;
  margin: 0;
  color: var(--text-3);
  font-size: 14px;
  line-height: 1.45;
}

.b-pack__price {
  margin: 6px 0 8px;
  font-size: 24px;
}

.b-costs,
.b-history {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.b-costs li,
.b-history li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto;
  align-items: center;
  gap: 6px 20px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}

.b-costs__name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.b-costs__note,
.b-history__date {
  color: var(--text-3);
  font-size: 14.5px;
}

.b-costs__price {
  color: var(--text-2);
  white-space: nowrap;
}

.b-costs__price b {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.b-history li {
  grid-template-columns: 140px minmax(0, 1fr) auto;
}

.b-history__what {
  min-width: 0;
  overflow-wrap: anywhere;
}

.b-history__delta {
  color: var(--text-2);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.b-history__delta.is-plus {
  color: var(--green);
}

.b-pricing__faq .b-faq {
  max-width: 820px;
}

@media (max-width: 640px) {
  .b-costs li {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .b-costs__note {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .b-history li {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .b-history__date {
    grid-column: 1 / -1;
  }
}

/* Payment toast for guests and users (the cabinet also styles it via Tailwind). */
.brut .copy-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: var(--r);
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  box-shadow: var(--shadow-l);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.brut .copy-toast.visible {
  opacity: 1;
  transform: none;
}

.b-format__price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: var(--text-2);
  font-size: 14px;
  white-space: nowrap;
}

.b-format__price .b-price {
  color: var(--ink);
  font-size: 22px;
}

.b-format__price small {
  color: var(--text-3);
  font-size: 13px;
}
