:root {
  color-scheme: light dark;
  --paper: light-dark(#f8f8f6, #181a19);
  --ink: light-dark(#191a19, #f2f3ef);
  --muted: light-dark(#50534f, #bdc1b9);
  --line: light-dark(#b9bcb5, #52564e);
  --sheet: light-dark(#fff, #222521);
  --accent: light-dark(#d8ef99, #cfec8d);
  --focus: light-dark(#405e16, #c4e998);
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font: 100%/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: inherit; text-underline-offset: .22em; }
button, summary, a { touch-action: manipulation; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.frame { width: min(calc(100% - 2.5rem), 72rem); margin-inline: auto; }
.skip { position: fixed; left: 1rem; top: .5rem; z-index: 1; padding: .6rem; background: var(--sheet); transform: translateY(-180%); }
.skip:focus { transform: none; }
.mast { display: flex; justify-content: space-between; align-items: center; min-height: 4.5rem; border-bottom: 1px solid var(--line); }
.mast a { display: inline-flex; min-height: 44px; align-items: center; }
.wordmark { font-size: 2rem; font-weight: 800; line-height: 1; letter-spacing: -.068em; text-decoration: none; }
.return { gap: .5rem; font-size: .94rem; }
.intro { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, .65fr); align-items: end; gap: 2rem; padding-block: clamp(2rem, 6vw, 5rem); }
h1, h2, p { margin: 0; }
h1 { max-width: 15ch; font-size: clamp(2.15rem, 5.25vw, 4.85rem); line-height: 1.02; font-weight: 730; letter-spacing: -.061em; }
.intro p { max-width: 43ch; font-size: clamp(1rem, 1.3vw, 1.14rem); color: var(--muted); }
.work { border-block: 1px solid var(--ink); padding-block: clamp(1.25rem, 3vw, 2.1rem); }
.field-header, .actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .4rem 1rem; }
.field-header label, h2 { font-size: clamp(1.22rem, 2.4vw, 1.8rem); letter-spacing: -.045em; font-weight: 650; line-height: 1.2; }
.counter { font: .85rem/1.5 var(--mono); color: var(--muted); }
.hint, .send p, .note, .feedback { color: var(--muted); font-size: .95rem; }
.hint, .send p { margin-top: .45rem; }
textarea, pre { tab-size: 4; font: 1rem/1.6 var(--mono); }
textarea { display: block; width: 100%; min-height: 10rem; margin-top: 1rem; padding: clamp(.75rem, 2vw, 1.3rem); border: 1px solid var(--line); border-radius: .25rem; background: var(--sheet); color: var(--ink); resize: vertical; }
textarea::placeholder { color: var(--muted); }
details { margin-top: .25rem; }
summary { width: fit-content; padding-block: .7rem; min-height: 44px; cursor: pointer; color: var(--muted); }
pre { margin: .2rem 0; padding: .8rem 1rem; overflow: auto; background: var(--sheet); border-left: 2px solid var(--ink); font-size: .88rem; }
.text-action { min-height: 44px; padding: .3rem 0; border: 0; background: none; text-decoration: underline; text-underline-offset: .22em; }
.actions { justify-content: flex-start; margin-top: 1rem; gap: .65rem 1rem; }
.primary, .secondary { min-height: 46px; border-radius: .25rem; padding: .64rem 1rem; font-weight: 650; }
.primary { color: #202719; border: 1px solid var(--ink); background: var(--accent); }
.secondary { border: 1px solid var(--line); background: var(--sheet); }
.primary span, .secondary span { margin-left: .45em; }
button:hover, a:hover, summary:hover { text-decoration: underline; text-underline-offset: .22em; }
.feedback:not(:empty) { margin-top: .8rem; }
.send { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 1rem 3rem; padding-block: clamp(1.5rem, 4vw, 3.2rem); }
.contacts { display: grid; align-items: start; }
.contacts a { display: inline-flex; width: fit-content; align-items: center; min-height: 44px; gap: .35em; }
@media (max-width: 760px) {
  .intro { grid-template-columns: 1fr; gap: 1rem; }
  .note { max-width: 44ch; }
}
@media (max-width: 440px) {
  .intro { padding-block: 1.65rem; }
  .actions { align-items: flex-start; }
  .note { width: 100%; }
  .field-header .text-action { align-self: start; }
  .send { gap: .4rem; }
}
