* {
  box-sizing: border-box;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  margin: -1px !important;
}

html {
  min-width: 320px;
  max-width: 100%;
  overflow-x: clip;
  background: var(--paper);
  /* History navigation must never wait for a document-level smooth scroll.
   * Long application views own their scrolling inside the shell. */
  scroll-behavior: auto;
}

body {
  min-width: 320px;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: clip;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% -10%, rgba(232, 79, 53, 0.09), transparent 29rem),
    var(--paper);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

:where(select:not([multiple])) {
  padding-right: 38px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2374736b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}

@supports (corner-shape: squircle) {
  :where(
    button,
    input,
    textarea,
    select,
    dialog,
    [class*="card"],
    [class*="modal"],
    [class*="sheet"],
    [class*="avatar"],
    [class*="popover"]
  ) {
    corner-shape: squircle;
  }
}

/*
 * Nested surfaces keep an even-looking gutter in their corners.  Consumers
 * choose the outer curve and the actual inset; the child curve is derived,
 * never eyeballed.  `corner-shape: squircle` above enhances this where the
 * browser supports continuous corners.
 */
.concentric-corners {
  --corner-outer: var(--radius-12);
  --corner-gap: var(--radius-4);
  border-radius: var(--corner-outer);
}

.concentric-corners .concentric-corners__inner {
  border-radius: max(0px, calc(var(--corner-outer) - var(--corner-gap)));
}

button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  /* Кнопка без своего фона обязана быть прозрачной. В светлой теме браузер
     подставлял buttonface ≈ цвет бумаги, и это сходило за «нет фона»; в тёмной
     тот же buttonface — сплошная серая плита rgb(107,107,107), на которой
     приглушённый текст не читается (контраст 2.2). Так серели вкладки админки,
     переключатель «Мои/Все» и мелкие кнопки карточек. */
  background: transparent;
}

button:not(:disabled),
a,
select,
input[type="range"] {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(232, 79, 53, 0.28);
  outline-offset: 2px;
}

a {
  color: inherit;
}

img,
video {
  display: block;
  max-width: 100%;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: var(--on-dark);
  font: inherit;
  background: var(--surface-dark);
  border: 0;
  border-radius: var(--radius-8);
  cursor: pointer;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen {
  min-width: 0;
  padding: 28px clamp(22px, 3vw, 48px) 56px;
}

.screen.full-bleed {
  padding: 0;
}

.screen.dark {
  color: var(--on-dark);
  background: var(--surface-dark);
}

.screen-head {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 28px;
}

.screen-head > div:first-child {
  min-width: 0;
}

.screen-head h1,
.screen-head h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: -.045em;
  line-height: 1.02;
}

.screen-head h2 {
  font-size: clamp(24px, 2.4vw, 34px);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.eyebrow.accent {
  color: var(--accent);
}

.screen-subtitle {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.screen-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
