/* Content pages in the «Сукно» theme: cream paper, dark green ink and buttons.
   The tokens are the .t-sukno custom properties of docs/design/theme-mock.html. */
:root {
  --display: Georgia, "Noto Serif", "Times New Roman", serif;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --page: #f6f0dc;
  --page-ink: #1f2b25;
  --page-muted: #5d665f;
  --cta: #1e5643;
  --cta-hover: #17463a;
  --cta-ink: #f6efd6;
  --table: radial-gradient(120% 85% at 50% 42%, #2c7058 0%, #1e5643 48%, #113629 100%);
  --paper: #f6efd6;
  --field: #fffaf0;
  --card-border: #cfc49f;
  --red: #b3261e;
  --black: #1c1a17;
  --rule: rgba(31, 43, 37, .16);
  --gutter: 22px;
  /* v1 has no dark mode: keep browsers from auto-darkening the paper. */
  color-scheme: only light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--page-ink); font: 15px/1.45 var(--ui); }
h1, h2, p, ul { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--cta); text-underline-offset: .18em; }
:focus-visible { outline: 2px solid var(--cta); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: calc(680px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.home .wrap { max-width: calc(980px + 2 * var(--gutter)); }

/* ---------- header and footer ---------- */
.top { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; margin-bottom: 7px; font-size: 13px; color: var(--page-muted); }
.wordmark { font: 700 20px/1.2 var(--display); letter-spacing: .01em; color: var(--page-ink); text-decoration: none; padding: 7px 0; }
.top nav { display: flex; align-items: center; gap: 18px; }
.top nav a { display: inline-block; padding: 10px 6px; margin: 0 -6px; color: inherit; text-decoration: none; }
.top nav a:hover { color: var(--page-ink); text-decoration: underline; }
.top nav a[aria-current] { color: var(--page-ink); font-weight: 700; }

/* The language switch (v1.2 S): a pill with the page's language, and under it a list of links to the same
   page in every language. It is a <details>, so it opens where the page script does not run. */
.langs { position: relative; }
.langs summary { position: relative; display: flex; align-items: center; gap: 4px; padding: 6px 11px; border: 1px solid rgba(31, 43, 37, .3); border-radius: 999px; color: var(--page-ink); white-space: nowrap; cursor: pointer; list-style: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.langs summary::-webkit-details-marker { display: none; }
/* The tap area is 44px tall at the least, whatever the pill's own height. Asked for 45: the pill's height is rounded as it is laid out. */
.langs summary::after { content: ""; position: absolute; left: -4px; right: -4px; top: min(0px, calc((100% - 45px) / 2)); bottom: min(0px, calc((100% - 45px) / 2)); }
.langs svg { flex: none; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.langs summary svg { width: 10px; height: 10px; stroke-width: 3; }
.langs[open] summary { background: var(--cta); border-color: var(--cta); color: var(--cta-ink); }
.langs[open] summary svg { transform: rotate(180deg); }
.lang-list { position: absolute; z-index: 5; right: 0; top: calc(100% + 6px); width: 176px; padding: 6px; display: flex; flex-direction: column; gap: 2px; background: var(--field); border: 1px solid var(--card-border); border-radius: 14px; box-shadow: 0 10px 24px rgba(31, 43, 37, .22); }
.top nav .lang-list a { display: flex; flex: none; align-items: center; gap: 10px; height: 44px; margin: 0; padding: 0 10px; border-radius: 9px; color: var(--page-ink); font-size: 15px; font-weight: 400; white-space: nowrap; text-decoration: none; }
.lang-list a span { flex: 1; }
.lang-list svg { width: 18px; height: 18px; stroke-width: 2.4; color: var(--cta); }
.lang-list a:not([aria-current]) svg { visibility: hidden; }
.lang-list a:active { background: rgba(31, 43, 37, .1); }
@media (hover: hover) { .top nav .lang-list a:hover { background: rgba(31, 43, 37, .07); text-decoration: none; } }

.foot { margin-top: 44px; border-top: 1px solid var(--rule); padding-top: 16px; padding-bottom: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 20px; font-size: 13px; color: var(--page-muted); }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot a { color: inherit; white-space: nowrap; }

/* ---------- headings and buttons ---------- */
h1 { font: 700 30px/1.1 var(--display); letter-spacing: -.01em; margin-bottom: 6px; }
h2 { font: 700 21px/1.25 var(--display); margin-bottom: 8px; }
.sub { color: var(--page-muted); margin-bottom: 16px; }

.ctas { display: flex; gap: 10px; }
.cta { flex: 1; height: 50px; padding: 0 10px; white-space: nowrap; border-radius: 12px; border: 1.5px solid var(--cta); font: 600 16px var(--ui); cursor: pointer; position: relative; -webkit-tap-highlight-color: transparent; }
.cta.primary { background: var(--cta); color: var(--cta-ink); }
.cta.secondary { background: transparent; color: var(--cta); }
@media (hover: hover) {
  .cta.primary:hover:enabled { background: var(--cta-hover); border-color: var(--cta-hover); }
  .cta.secondary:hover:enabled { background: rgba(30, 86, 67, .08); }
}
.cta:disabled { cursor: default; opacity: .55; }
.cta[aria-busy="true"] { opacity: 1; }
.cta[aria-busy="true"] > span { visibility: hidden; }
.cta[aria-busy="true"]::after { content: ""; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cta[aria-busy="true"]::after { animation-duration: 2.4s; } }
.play-msg { color: var(--red); font-size: 14px; }
.play-msg:not(:empty) { padding-top: 10px; }

/* ---------- landing ---------- */
.cloth { background: var(--table); border-radius: 18px; padding: 20px 16px 16px; margin-top: 22px; }
.fan { display: block; width: 100%; max-width: 310px; height: auto; margin: 0 auto; }
.fan text { font: 700 24px var(--ui); text-anchor: middle; }
.fan .r { fill: var(--red); }
.fan .b { fill: var(--black); }

.about { margin-top: 30px; display: grid; gap: 26px; }
.about p, .prose p, .prose li { font-size: 16px; line-height: 1.6; }

/* ---------- rules ---------- */
.prose { padding-top: 10px; }
.prose h1 { margin-bottom: 12px; }
.prose .lead { color: var(--page-muted); }
.prose h2 { margin-top: 30px; }
.prose p + p { margin-top: 10px; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--cta); }
.prose .play { margin-top: 34px; }

/* ---------- feedback ---------- */
/* A short page: the footer sits at the bottom of the screen, as in the mock. */
.feedback { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.feedback > .wrap { width: 100%; }
.feedback > main { flex: 1; }

.fb { padding-top: 19px; }
.fb, .fb-form { display: grid; gap: 14px; }
.fb h1 { margin-bottom: 0; }
.fb .lead, .fb-hint, .fb-count { color: var(--page-muted); }
.fb-field { display: grid; gap: 6px; margin-top: 6px; }
.fb-field label { font-size: 13px; font-weight: 600; }
/* 16px, not the 15px of the body: iOS zooms the page into a field with smaller text. */
.fb-field textarea { display: block; width: 100%; height: 190px; margin: 0; padding: 12px; border-radius: 12px; border: 1.5px solid rgba(31, 43, 37, .45); background: var(--field); color: var(--page-ink); font: 16px/1.45 var(--ui); resize: none; }
.fb-field textarea::placeholder { color: var(--page-muted); opacity: .75; }
/* Where the browser can, the box grows with the text and the page scrolls, not the box. */
@supports (field-sizing: content) {
  .fb-field textarea { height: auto; min-height: 190px; field-sizing: content; }
}
.fb-count { justify-self: end; font-size: 12.5px; font-variant-numeric: tabular-nums; }
/* The trap field (v1.1 R6) stays an ordinary text field for a bot to find, so it is
   moved off the page, not removed: no display: none, no visibility: hidden. */
.fb-trap { position: absolute; left: -9999px; }
.fb-hint { font-size: 13.5px; text-wrap: pretty; }
.fb-msg { color: var(--red); font-size: 14px; text-wrap: balance; }
.fb-msg:empty { display: none; }
.fb-thanks { font-size: 18px; font-weight: 600; line-height: 1.3; text-wrap: balance; }
.fb-thanks:focus { outline: none; }

@media (min-width: 700px) {
  .hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 42%); gap: 32px; align-items: center; margin-top: 24px; }
  .hero h1 { font-size: 40px; margin-bottom: 10px; }
  .hero .sub { font-size: 17px; margin-bottom: 22px; }
  .cloth { margin-top: 0; padding: 30px 16px 26px; }
  .about { margin-top: 44px; grid-template-columns: 1fr 1fr; gap: 32px 36px; }
  .prose { padding-top: 24px; }
  .prose h1 { font-size: 36px; }
  .prose .ctas, .fb .ctas { max-width: 260px; }
  .fb { padding-top: 24px; }
  .fb h1 { font-size: 36px; }
}

@media (min-width: 860px) {
  :root { --gutter: 32px; }
  .top { padding-top: 18px; font-size: 14px; }
  .wordmark { font-size: 22px; }
  .foot { margin-top: 64px; }

  .hero { grid-template-columns: minmax(0, 1fr) 420px; gap: 64px; margin-top: 44px; }
  .hero h1 { font-size: 54px; margin-bottom: 12px; }
  .hero .sub { font-size: 19px; margin-bottom: 26px; }
  .hero .ctas { max-width: 430px; gap: 12px; }
  .cta { height: 54px; font-size: 17px; }
  .cloth { padding: 44px 24px 38px; }
  .fan { max-width: 340px; }

  .about { margin-top: 64px; gap: 40px 64px; }
  .about p, .prose p, .prose li { font-size: 17px; }
  h2 { font-size: 23px; }

  .prose { padding-top: 36px; }
  .prose h1 { font-size: 42px; margin-bottom: 16px; }
  .prose .lead { font-size: 18px; }
  .prose h2 { margin-top: 38px; }

  .fb { padding-top: 36px; }
  .fb h1 { font-size: 42px; }
  .fb .lead { font-size: 17px; }
  .fb-field label { font-size: 14px; }
  .fb-hint { font-size: 14.5px; }
}
