/* Fuzzzy Law home page.
   The Fuzzzy Law look: ink on warm paper (Paper) and white ink on cool black (Night),
   one red for the mark only, Space Grotesk for display words and numbers, Inter for
   reading, Space Mono for the address and commands, Noto Sans Georgian for Georgian.
   Corners 3 / 4 / 6. No gradients, no counters, no animation at rest. */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin.c940764593.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  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: "Noto Sans Georgian";
  src: url("fonts/noto-sans-georgian-georgian.a15bf839bf.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0589, U+10A0-10FF, U+1C90-1CBA, U+1CBD-1CBF, U+205A, U+2D00-2D2F, U+2E31;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-latin.a0d054c4af.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
  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: "Space Mono";
  src: url("fonts/space-mono-latin-400.e0c8e616bd.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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;
}

/* ---------- Looks: Paper by default, Night by system setting or by choice ---------- */
:root {
  color-scheme: light;
  --ground: #f2f0e9;
  --surface: #f8f7f2;
  --raised: #ffffff;
  --line: #d6d4cc;
  --line-strong: #b9b6ac;
  --ink: #1c1b15;
  --ink-soft: #3f3d36;
  --ink-mute: #6b6961;
  --btn-bg: #1c1b15;
  --btn-fg: #f2f0e9;
  --btn2-line: #8f8c82;
  --mark: #b2261d;
  --mark-shape: #0b0c0f;
  --red-text: #a32218;
  --tint-red: rgba(163, 34, 24, 0.07);
  --focus: #3b6e97;
  --ok: #42774e;

  --font-text: "Inter", "Noto Sans Georgian", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Noto Sans Georgian", "Inter", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, Menlo, Consolas, monospace;

  --r-1: 3px;
  --r-2: 4px;
  --r-3: 6px;
  --dur-fast: 120ms;
  --dur-std: 220ms;
  --ease-std: cubic-bezier(0.2, 0, 0, 1);
  --gutter: 1rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #0b0c0f;
    --surface: #121417;
    --raised: #1a1c1f;
    --line: #252729;
    --line-strong: #393b3e;
    --ink: #eef0f4;
    --ink-soft: #d5d8db;
    --ink-mute: #bbbec2;
    --btn-bg: #eef0f4;
    --btn-fg: #0b0c0f;
    --btn2-line: #6a6c70;
    --red-text: #ea6c5c;
    --tint-red: rgba(224, 51, 39, 0.1);
    --focus: #77a4ca;
    --ok: #7dac86;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #0b0c0f;
  --surface: #121417;
  --raised: #1a1c1f;
  --line: #252729;
  --line-strong: #393b3e;
  --ink: #eef0f4;
  --ink-soft: #d5d8db;
  --ink-mute: #bbbec2;
  --btn-bg: #eef0f4;
  --btn-fg: #0b0c0f;
  --btn2-line: #6a6c70;
  --red-text: #ea6c5c;
  --tint-red: rgba(224, 51, 39, 0.1);
  --focus: #77a4ca;
  --ok: #7dac86;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* long Georgian words may break inside a word rather than overflow: there is no Georgian hyphenation */
  overflow-wrap: anywhere;
}
:lang(ka) body, body:lang(ka) { line-height: 1.65; }
h1, h2, h3, p, ul, ol, dl, dd, figure, pre { margin: 0; }
ul, ol { padding: 0; }
img, svg { display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
code, pre, kbd { font-family: var(--font-mono); font-size: 0.9em; }
strong { font-weight: 650; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--r-1); }
[hidden] { display: none !important; }
::selection { background: var(--ink); color: var(--ground); }

.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;
}
.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 2;
  padding: 0.75rem 1rem; background: var(--btn-bg); color: var(--btn-fg);
  border-radius: var(--r-2); text-decoration: none; font-weight: 600;
}
.skip:focus { top: 0.75rem; }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 48rem) { :root { --gutter: 2rem; } }

/* ---------- Top bar ---------- */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding-top: 1rem; padding-bottom: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.625rem; min-height: 44px; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em; }
.brand svg { width: 2rem; height: 2rem; flex: none; }
.top__nav { display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap; justify-content: flex-end; }
.top__link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.75rem; border-radius: var(--r-2); font-weight: 550; text-decoration: none; }
.top__link:hover { background: var(--surface); }
.iconbtn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: var(--r-2); background: transparent; color: var(--ink); cursor: pointer;
}
.iconbtn:hover { background: var(--surface); }
.iconbtn svg { width: 22px; height: 22px; }
.ic { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; stroke-linejoin: miter; }

/* ---------- Type ---------- */
h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.125rem, 1.4rem + 3.6vw, 3.75rem); line-height: 1.04; letter-spacing: -0.025em; max-width: 22ch;
}
h1:lang(ka) { font-size: clamp(1.875rem, 1.3rem + 2.8vw, 3.125rem); line-height: 1.2; letter-spacing: 0; max-width: 24ch; }
h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.375rem, 1.15rem + 1vw, 1.75rem); line-height: 1.2; letter-spacing: -0.015em; }
h2:lang(ka) { font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem); line-height: 1.35; letter-spacing: 0; }
h3 { font-family: var(--font-display); font-size: 1.1875rem; font-weight: 700; line-height: 1.3; }
h3:lang(ka) { font-size: 1.125rem; line-height: 1.4; }
.small { font-size: 0.9375rem; }
.muted { color: var(--ink-mute) !important; font-size: 0.9375rem; }
.list { list-style: none; display: grid; gap: 0.75rem; }
.list > li { position: relative; padding-left: 1.25rem; min-width: 0; }
.list > li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 0.5rem; height: 1px; background: var(--ink-mute); }
.chev { width: 22px; height: 22px; flex: none; color: var(--ink-mute); transition: transform var(--dur-std) var(--ease-std); }
details[open] > summary .chev { transform: rotate(180deg); }

/* ---------- Hero and the picture of how it works ---------- */
.hero { padding-top: 2rem; padding-bottom: 2rem; }
@media (min-width: 60rem) { .hero { padding-top: 4rem; padding-bottom: 3rem; } }
.lead { margin-top: 1rem; font-size: 1.1875rem; line-height: 1.5; color: var(--ink-soft); max-width: 40rem; }
.lead:lang(ka) { font-size: 1.125rem; line-height: 1.65; }

.flow { margin-top: 2rem; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; max-width: 60rem; }
.flow__node { display: grid; justify-items: center; text-align: center; gap: 0.125rem; min-width: 0; }
.flow__icon {
  display: grid; place-items: center; width: 4.5rem; height: 4.5rem; margin-bottom: 0.5rem;
  border: 1px solid var(--line-strong); border-radius: var(--r-3); background: var(--raised); color: var(--ink);
}
.flow__icon svg { width: 2.25rem; height: 2.25rem; }
.flow__icon .ic { stroke-width: 1.25; }
.flow__node--law .flow__icon { border-color: var(--ink); }
.flow__node--law .flow__icon svg { width: 3rem; height: 3rem; }
.flow__name { font-family: var(--font-display); font-weight: 700; font-size: 1.0625rem; line-height: 1.25; }
.flow__sub { color: var(--ink-mute); font-size: 0.875rem; line-height: 1.35; }
.flow__link {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 0.75rem;
  width: 100%; padding: 0.375rem 0; color: var(--ink-mute); font-size: 0.875rem; line-height: 1.3;
}
.flow__link > .flow__lab:first-child { text-align: right; }
.flow__arrows { display: block; color: var(--ink-mute); }
.flow__arrows .ic { stroke-width: 1.25; }
.flow__h { display: none; width: 6rem; height: 1.75rem; }
.flow__v { width: 1.75rem; height: 4rem; }
.flow__lab--empty { min-height: 1.15em; }
@media (min-width: 44rem) {
  .flow { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; column-gap: 0.75rem; margin-top: 3rem; }
  .flow__link { grid-template-columns: auto; justify-items: center; gap: 0.125rem; width: auto; padding: 0.25rem 0 0; }
  .flow__link > .flow__lab:first-child { text-align: center; }
  .flow__link { font-size: 0.9375rem; }
  .flow__h { display: block; width: 7.5rem; height: 2.2rem; }
}
/* On wide screens the picture gets the first screen to itself */
@media (min-width: 60rem) {
  .hero { padding-bottom: 5.5rem; }
  .flow { margin-top: 4rem; max-width: 64rem; }
  .flow__icon { width: 6rem; height: 6rem; }
  .flow__icon svg { width: 3rem; height: 3rem; }
  .flow__node--law .flow__icon svg { width: 4rem; height: 4rem; }
  .flow__name { font-size: 1.25rem; }
  .flow__sub { font-size: 0.9375rem; }
  .flow__link { padding-top: 0.875rem; }
  .flow__h { width: 9rem; height: 2.5rem; }
  .flow__v { display: none; }
}

/* ---------- Blocks ---------- */
.block { padding-top: 2.5rem; padding-bottom: 2.5rem; }
@media (min-width: 60rem) { .block { padding-top: 3.5rem; padding-bottom: 3.5rem; } }
.block > h2 { margin-bottom: 1.25rem; }

/* Three steps, each with its action */
.steps { list-style: none; display: grid; gap: 1rem; counter-reset: step; }
@media (min-width: 64rem) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 1.25rem; } }
.step {
  counter-increment: step; min-width: 0; display: grid; gap: 0.875rem; align-content: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); padding: 1.25rem;
}
.step > h3 { display: flex; align-items: baseline; gap: 0.75rem; }
.step > h3::before {
  content: counter(step); flex: none; font-family: var(--font-display); font-weight: 700;
  font-size: 2rem; line-height: 1; letter-spacing: -0.03em; color: var(--ink);
}
.step__hint { color: var(--ink-mute); font-size: 0.9375rem; margin-top: -0.375rem; }

/* The address plate: the one thing to take away */
.plate { display: grid; gap: 0.875rem; background: var(--raised); border: 1px solid var(--line-strong); border-radius: var(--r-2); padding: 1rem; }
.plate__addr {
  font-family: var(--font-mono); font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.25rem); line-height: 1.4;
  letter-spacing: -0.01em; color: var(--ink); overflow-wrap: anywhere; -webkit-user-select: all; user-select: all;
}

/* The message to send */
.message {
  background: var(--raised); border: 1px solid var(--line-strong); border-radius: var(--r-2);
  padding: 1rem; font-family: var(--font-text); font-size: 0.9375rem; line-height: 1.55; color: var(--ink);
  white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%;
}
.message:lang(ka) { line-height: 1.65; }
.message.is-placeholder { border-style: dashed; color: var(--ink-mute); }

/* Pick your assistant: steps open only when picked */
.pick { border-top: 1px solid var(--line); }
.pick details { border-bottom: 1px solid var(--line); }
.pick summary {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name chev" "line chev";
  align-items: center; column-gap: 0.75rem; min-height: 3.25rem; padding: 0.625rem 0; cursor: pointer; list-style: none;
}
.pick summary::-webkit-details-marker { display: none; }
.pick__name { grid-area: name; font-family: var(--font-display); font-weight: 700; font-size: 1.0625rem; line-height: 1.25; color: var(--ink); }
.pick__line { grid-area: line; color: var(--ink-mute); font-size: 0.875rem; line-height: 1.35; }
.pick summary .chev { grid-area: chev; }
.pick__body { padding: 0.25rem 0 1.25rem; display: grid; gap: 0.875rem; color: var(--ink-soft); }
.numbered { padding-left: 1.5rem; display: grid; gap: 0.5rem; }
.numbered > li { padding-left: 0.25rem; min-width: 0; }
.numbered > li::marker { font-family: var(--font-display); font-weight: 700; color: var(--ink); }
.ui { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.source { color: var(--ink-mute) !important; font-size: 0.8125rem; }
.code { display: grid; gap: 0.75rem; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-2); padding: 0.875rem 1rem; }
.code pre { font-size: 0.8125rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }

/* An example answer */
.answer { display: grid; gap: 0.75rem; max-width: 44rem; }
.answer__q {
  justify-self: end; max-width: 88%; padding: 0.75rem 1rem; background: var(--line); color: var(--ink);
  border-radius: var(--r-3) var(--r-3) var(--r-1) var(--r-3); line-height: 1.5;
}
.answer__a {
  display: grid; gap: 0.75rem; padding: 1.125rem 1.25rem; background: var(--raised);
  border: 1px solid var(--line-strong); border-radius: var(--r-3) var(--r-3) var(--r-3) var(--r-1);
}
.answer__a > p:first-child { color: var(--ink); font-weight: 550; }
.answer blockquote { margin: 0; padding-left: 1rem; border-left: 2px solid var(--ink); font-size: 0.9375rem; line-height: 1.65; color: var(--ink-soft); }
.answer__cite, .answer__end { font-size: 0.875rem; color: var(--ink-mute); }
.answer__cite a { color: var(--ink); }
.answer figcaption { color: var(--ink-mute); font-size: 0.875rem; }

/* Live numbers, one row */
#numbers { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.stats {
  list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.75rem 2rem;
  padding: 1.25rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink-soft);
}
.stats .num { font-family: var(--font-display); font-weight: 700; font-size: 1.75rem; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--ink); margin-right: 0.25rem; }
.stats__date { color: var(--ink-mute); font-size: 0.9375rem; }
#numbers .note { margin-top: 0.75rem; }

/* Safety and help, always visible */
.honest { font-weight: 600; color: var(--ink); max-width: 44rem; }
.help { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 0.75rem; margin-top: 1rem; }
.help > li {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-width: 0;
  padding: 0.375rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2);
}
.help > li > span { color: var(--ink-soft); font-size: 0.9375rem; line-height: 1.35; }
.help .tel { display: inline-flex; align-items: center; min-height: 44px; font-size: 1.375rem; }
.help > .help__danger { border-color: var(--red-text); background: var(--tint-red); }
.help__danger .tel { color: var(--red-text); }
#all-help { margin-top: 0.75rem; max-width: 48rem; border-bottom: 1px solid var(--line); }

/* Read more: closed until opened */
.mores { border-top: 1px solid var(--line); max-width: 48rem; }
.more { border-bottom: 1px solid var(--line); }
.more > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.5rem;
  padding: 0.75rem 0; cursor: pointer; list-style: none; font-weight: 650; font-size: 1.0625rem; color: var(--ink);
}
.more > summary::-webkit-details-marker { display: none; }
.more__body { padding: 0 0 1.5rem; display: grid; gap: 0.875rem; }
.more__body p, .more__body li { color: var(--ink-soft); }
.more__body h3 { margin-top: 0.5rem; }
.laws { columns: 2 18rem; column-gap: 2rem; list-style: none; }
.laws > li { break-inside: avoid; padding: 0.5rem 0; border-bottom: 1px solid var(--line); font-size: 0.9375rem; line-height: 1.45; }
.laws a { color: var(--ink); text-decoration-color: var(--line-strong); }
.laws a:hover { text-decoration-color: currentColor; }
.laws .muted { display: block; font-size: 0.8125rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; max-width: 100%;
  min-height: 48px; padding: 0.5rem 1.125rem; text-align: center; border: 0; border-radius: var(--r-2);
  font: inherit; font-size: 1rem; font-weight: 600; line-height: 1.2; cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-std), background-color var(--dur-std) var(--ease-std);
}
.btn:active { transform: scale(0.985); }
.btn--main { background: var(--btn-bg); color: var(--btn-fg); }
.btn--second { background: transparent; color: var(--ink); border: 1px solid var(--btn2-line); }
.btn--small { min-height: 44px; padding: 0.375rem 0.875rem; font-size: 0.9375rem; }
.btn svg { width: 20px; height: 20px; flex: none; }
.step .btn--main { width: 100%; }
.code .btn, .plate .btn { justify-self: start; }
/* label and its "copied" twin share one cell, so the button never changes width */
.btn__labels { display: grid; min-width: 0; overflow-wrap: anywhere; }
.btn__labels > span { grid-area: 1 / 1; text-align: center; }
.btn__done, .btn [data-icon-done] { visibility: hidden; }
.btn[data-state="done"] .btn__idle, .btn[data-state="done"] [data-icon-idle] { visibility: hidden; }
.btn[data-state="done"] .btn__done, .btn[data-state="done"] [data-icon-done] { visibility: visible; }
.btn__icons { display: grid; }
.btn__icons > svg { grid-area: 1 / 1; }
.btn[data-state="done"] [data-icon-done] path { stroke-dasharray: 24; stroke-dashoffset: 0; animation: draw var(--dur-std) var(--ease-std); }
@keyframes draw { from { stroke-dashoffset: 24; } }

/* ---------- Notes ---------- */
.note { padding: 1rem 1.125rem; border-radius: var(--r-2); border-left: 3px solid var(--line-strong); background: var(--surface); }
.note--red { border-left-color: var(--red-text); background: var(--tint-red); }
.note--red p { color: var(--ink) !important; }
.note__big { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; line-height: 1.3; }
.note__big a { color: var(--red-text); }
.note > * + * { margin-top: 0.5rem; }
.contacts { list-style: none; display: grid; gap: 0; }
.contacts > li { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.contacts > li:first-child { border-top: 1px solid var(--line); }
.contacts h3 { color: var(--ink); }
.contacts h3 .muted { display: block; font-weight: 400; margin-top: 0.125rem; }
.contacts p { margin-top: 0.25rem; }
.tel { font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; color: var(--ink); white-space: nowrap; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); padding-top: 2rem; padding-bottom: 3rem; color: var(--ink-mute); font-size: 0.9375rem; }
.foot__row { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: center; }
.foot a { color: var(--ink); display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; overflow-wrap: anywhere; }
.foot p + p, .foot p + .foot__row { margin-top: 0.75rem; }

/* ---------- Not found page ---------- */
.nf { padding-top: 4rem; padding-bottom: 6rem; display: grid; gap: 2.5rem; }
.nf h1 { font-size: clamp(1.875rem, 1.4rem + 2.4vw, 2.75rem); }
.nf p { margin-top: 0.75rem; color: var(--ink-soft); }

/* ---------- Motion manners ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* ---------- Print: the guide on paper ---------- */
@media print {
  .top__nav, .skip, .btn, .iconbtn { display: none !important; }
  .block { break-inside: avoid-page; }
  details > *:not(summary) { display: block; }
}
