/* Сайт TidyKit. Токены совпадают с DESIGN.md и расширением (lib/ui/tokens.ts). */
:root {
  color-scheme: light dark;
  --tk-bg: oklch(0.99 0.004 345);
  --tk-surface: oklch(0.965 0.006 345);
  --tk-border: oklch(0.9 0.008 345);
  --tk-text: oklch(0.23 0.012 345);
  --tk-muted: oklch(0.5 0.014 345);
  --tk-accent: oklch(0.56 0.2 350);
  --tk-accent-hover: oklch(0.6 0.2 350);
  --tk-accent-active: oklch(0.52 0.2 350);
  --tk-accent-ink: oklch(0.99 0.004 345);
  --tk-accent-wash: oklch(0.56 0.2 350 / 0.08);
  --tk-toast-icon: oklch(0.8 0.13 150);
  --tk-shadow-1: 0 1px 2px oklch(0.2 0.01 345 / 0.12), 0 4px 12px oklch(0.2 0.01 345 / 0.1);
  --tk-shadow-2: 0 8px 24px oklch(0.2 0.01 345 / 0.22);
  --tk-font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --tk-ease: cubic-bezier(0.25, 1, 0.5, 1);
  --page: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(3.5rem, 9vw, 7rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --tk-bg: oklch(0.19 0.008 345);
    --tk-surface: oklch(0.235 0.01 345);
    --tk-border: oklch(0.33 0.012 345);
    --tk-text: oklch(0.95 0.005 345);
    --tk-muted: oklch(0.72 0.012 345);
    --tk-accent: oklch(0.72 0.17 350);
    --tk-accent-hover: oklch(0.76 0.16 350);
    --tk-accent-active: oklch(0.68 0.17 350);
    --tk-accent-ink: oklch(0.19 0.008 345);
    --tk-accent-wash: oklch(0.72 0.17 350 / 0.14);
    --tk-toast-icon: oklch(0.5 0.13 150);
    --tk-shadow-1: 0 1px 2px oklch(0 0 0 / 0.4), 0 4px 12px oklch(0 0 0 / 0.3);
    --tk-shadow-2: 0 8px 24px oklch(0 0 0 / 0.45);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--tk-bg);
  color: var(--tk-text);
  font: 400 1.0625rem/1.6 var(--tk-font);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in oklch, currentColor 35%, transparent);
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--tk-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

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

h1 {
  font-size: clamp(2.5rem, 6.4vw, 4.5rem);
  line-height: 1.03;
  font-weight: 750;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.025em;
}

h3 {
  font-size: 1.1875rem;
  line-height: 1.3;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.skip {
  position: absolute;
  left: -10000px;
}

.skip:focus {
  left: var(--gutter);
  top: 0.75rem;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  background: var(--tk-bg);
  border: 1px solid var(--tk-border);
  border-radius: 6px;
}

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

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

.lead {
  max-width: 40ch;
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.5;
}

.muted {
  color: var(--tk-muted);
}

/* Шапка и подвал */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.mark {
  width: 1.625rem;
  height: 1.625rem;
  flex: none;
}

.mark-bg {
  fill: var(--tk-accent);
}

.mark-t {
  fill: none;
  stroke: var(--tk-accent-ink);
  stroke-width: 4;
  stroke-linecap: round;
}

.site-nav {
  display: flex;
  gap: clamp(1rem, 3vw, 1.75rem);
  font-size: 0.9375rem;
}

.site-nav a {
  color: var(--tk-muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--tk-text);
}

.site-footer {
  padding-block: 2rem 2.5rem;
  border-top: 1px solid var(--tk-border);
  font-size: 0.875rem;
  color: var(--tk-muted);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.footer-nav a {
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--tk-text);
}

.footnote {
  margin-top: 1rem;
  max-width: 70ch;
}

/* Первый экран */

.hero {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
  padding-block: clamp(2.5rem, 7vw, 5.5rem) var(--section);
}

@media (min-width: 60rem) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.hero-copy {
  display: grid;
  gap: 1.5rem;
  align-content: start;
}

.hero-copy h1 {
  max-width: 12ch;
}

.hero-home h1 {
  max-width: 15ch;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 0.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 1.25rem;
  font: 600 1rem/1 var(--tk-font);
  color: var(--tk-accent-ink);
  background: var(--tk-accent);
  border: 1px solid var(--tk-accent);
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms var(--tk-ease), border-color 150ms var(--tk-ease);
}

.button:hover {
  background: var(--tk-accent-hover);
  border-color: var(--tk-accent-hover);
}

.button:active {
  background: var(--tk-accent-active);
  border-color: var(--tk-accent-active);
}

.cta-note {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.9375rem;
  color: var(--tk-muted);
}

.cta-note::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--tk-accent);
}

/* Живая таблица с рамкой и плашкой расширения */

.demo {
  display: grid;
  gap: 0.875rem;
  margin: 0;
}

.demo-page {
  padding: clamp(1rem, 3vw, 1.75rem);
  background: var(--tk-surface);
  border: 1px solid var(--tk-border);
  border-radius: 12px;
}

.demo-title {
  /* Под заголовком место для плашки: она стоит над правым краем таблицы, как в расширении. */
  margin-bottom: 2.875rem;
  font-size: 0.9375rem;
  font-weight: 650;
}

.frame {
  position: relative;
  border: 2px solid var(--tk-accent);
  border-radius: 4px;
  background: var(--tk-accent-wash);
}

.frame-scroll {
  overflow-x: auto;
}

.badge {
  position: absolute;
  right: -2px;
  bottom: calc(100% + 6px);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 3px 3px 8px;
  background: var(--tk-bg);
  border: 1px solid var(--tk-border);
  border-radius: 8px;
  box-shadow: var(--tk-shadow-1);
  font: 400 12px/1 var(--tk-font);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.badge-num {
  font-weight: 650;
  color: var(--tk-accent);
}

.badge-size {
  margin: 0 4px 0 2px;
  color: var(--tk-muted);
}

.badge-btn {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  font: 550 12px/1 var(--tk-font);
  border: 1px solid var(--tk-border);
  border-radius: 5px;
}

.badge-btn--primary {
  color: var(--tk-accent-ink);
  background: var(--tk-accent);
  border-color: var(--tk-accent);
}

.toast {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: -2.25rem;
  padding: 10px 14px;
  color: var(--tk-bg);
  background: var(--tk-text);
  border-radius: 8px;
  box-shadow: var(--tk-shadow-2);
  font: 450 13px/1.2 var(--tk-font);
  font-variant-numeric: tabular-nums;
}

.toast svg {
  flex: none;
  color: var(--tk-toast-icon);
}

.demo figcaption {
  font-size: 0.875rem;
  color: var(--tk-muted);
}

.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.data th,
.data td {
  padding: 0.5rem 0.625rem;
  text-align: left;
  border-bottom: 1px solid var(--tk-border);
  white-space: nowrap;
}

.data th {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--tk-muted);
}

.data .n {
  text-align: right;
}

.data tbody tr:last-child td {
  border-bottom: 0;
}

.data td[rowspan] {
  vertical-align: middle;
  border-left: 1px solid var(--tk-border);
}

.data sup {
  margin-left: 1px;
  font-size: 0.7em;
  color: var(--tk-accent);
}

/* Разделы */

.section {
  padding-block: var(--section);
  border-top: 1px solid var(--tk-border);
}

.section-head {
  display: grid;
  gap: 1rem;
  max-width: 44rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.steps {
  display: grid;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 48rem) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.5rem, 3vw, 2.5rem);
  }
}

.steps li {
  display: grid;
  gap: 0.625rem;
  align-content: start;
  padding-top: 1.25rem;
  border-top: 2px solid var(--tk-text);
}

.step-n {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--tk-accent);
  font-variant-numeric: tabular-nums;
}

.steps p {
  max-width: 34ch;
  color: var(--tk-muted);
}

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
}

@media (min-width: 60rem) {
  .split {
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
    align-items: start;
  }
}

.checklist {
  display: grid;
  gap: 0.875rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  gap: 0.75rem;
}

.checklist li::before {
  content: "";
  width: 0.75rem;
  height: 0.4rem;
  margin-top: 0.5rem;
  border: solid var(--tk-accent);
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg);
}

.compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1rem;
}

.compare .data {
  font-size: 0.8125rem;
}

.compare .data th,
.compare .data td {
  padding: 0.45rem 0.5rem;
}

.compare figure {
  margin: 0;
  padding: 1rem 0.75rem 0.75rem;
  background: var(--tk-surface);
  border: 1px solid var(--tk-border);
  border-radius: 10px;
}

.compare .after {
  background: var(--tk-bg);
  border: 2px solid var(--tk-accent);
}

.compare figcaption {
  margin: 0 0.625rem 0.5rem;
  font-size: 0.8125rem;
  font-weight: 650;
}

.shots {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

@media (min-width: 48rem) {
  .shots {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: end;
  }

  .shots figure:first-child {
    grid-column: 1 / -1;
  }
}

.shots figure {
  display: grid;
  gap: 0.875rem;
  margin: 0;
}

.shots img {
  border: 1px solid var(--tk-border);
  border-radius: 10px;
  box-shadow: var(--tk-shadow-1);
}

.shots figcaption {
  max-width: 56ch;
  font-size: 0.9375rem;
  color: var(--tk-muted);
}

.privacy {
  display: grid;
  gap: 1.25rem;
  max-width: 46rem;
}

.privacy p {
  font-size: 1.125rem;
}

.faq {
  max-width: 48rem;
  border-top: 1px solid var(--tk-border);
}

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

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: "+";
  flex: none;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--tk-muted);
  transition: transform 150ms var(--tk-ease);
}

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

.faq details p {
  max-width: 62ch;
  padding-bottom: 1.25rem;
  color: var(--tk-muted);
}

/* Главная */

.product {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

@media (min-width: 56rem) {
  .product {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }
}

.product-copy {
  display: grid;
  gap: 1rem;
  justify-items: start;
}

.product-icon {
  width: 3.5rem;
  height: 3.5rem;
}

.product-copy p {
  max-width: 34ch;
  font-size: 1.125rem;
}

.more {
  font-weight: 600;
  color: var(--tk-accent);
  text-decoration: none;
}

.more:hover {
  text-decoration: underline;
}

.product img.shot {
  border: 1px solid var(--tk-border);
  border-radius: 10px;
  box-shadow: var(--tk-shadow-1);
}

/* Узкие страницы: опрос, спасибо, 404 */

.narrow {
  display: grid;
  gap: 1.5rem;
  max-width: 40rem;
  padding-block: clamp(2.5rem, 7vw, 5rem) var(--section);
}

.narrow h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
}

.narrow h2 {
  margin-top: 1.5rem;
  font-size: 1.375rem;
  letter-spacing: -0.015em;
}

.narrow .checklist {
  margin-top: 0;
}

.survey {
  display: grid;
  gap: 1.75rem;
  margin-top: 0.5rem;
}

.survey fieldset {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.survey legend {
  margin-bottom: 0.75rem;
  font-weight: 650;
}

.choice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0.625rem 1rem;
  border: 1px solid var(--tk-border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 150ms var(--tk-ease), background-color 150ms var(--tk-ease);
}

.choice:hover {
  border-color: color-mix(in oklch, var(--tk-accent) 45%, var(--tk-border));
}

.choice:has(input:checked) {
  background: var(--tk-accent-wash);
  border-color: var(--tk-accent);
}

.choice input {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  accent-color: var(--tk-accent);
}

.field {
  display: grid;
  gap: 0.5rem;
}

.field label {
  font-weight: 650;
}

.field textarea {
  min-height: 7rem;
  padding: 0.75rem 1rem;
  font: inherit;
  color: inherit;
  background: var(--tk-bg);
  border: 1px solid var(--tk-border);
  border-radius: 8px;
  resize: vertical;
}

.field textarea:focus-visible {
  outline-offset: 1px;
}

.hint {
  font-size: 0.875rem;
  color: var(--tk-muted);
}

.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

/* Юридические страницы */

.prose {
  max-width: 46rem;
  padding-block: clamp(2.5rem, 7vw, 5rem) var(--section);
}

.prose h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
}

.prose .updated {
  margin-top: 1rem;
  font-size: 0.9375rem;
  color: var(--tk-muted);
}

.prose .intro {
  margin-top: 2rem;
  font-size: 1.1875rem;
}

.prose h2 {
  margin-top: 2.75rem;
  font-size: 1.375rem;
  letter-spacing: -0.015em;
}

.prose p,
.prose ul {
  max-width: 68ch;
  margin-top: 1rem;
}

.prose ul {
  display: grid;
  gap: 0.5rem;
  padding-left: 1.25rem;
}

@media (max-width: 30rem) {
  .data th,
  .data td {
    padding: 0.45rem 0.5rem;
  }
}

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