@font-face {
  font-family: "Ysabeau";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url("fonts/ysabeau-700-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Ysabeau";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url("fonts/ysabeau-700-latin.woff2") format("woff2");
  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: "Golos Text";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url("fonts/golos-text-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url("fonts/golos-text-latin.woff2") format("woff2");
  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: "Golos Text";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url("fonts/golos-text-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+A720-A7FF;
}

:root {
  --paper: oklch(0.985 0.007 105);
  --paper-sunk: oklch(0.966 0.014 112);
  --card: oklch(0.995 0.004 105);
  --field: oklch(0.945 0.075 118);
  --field-deep: oklch(0.9 0.115 118);
  --ink: oklch(0.255 0.035 155);
  --ink-soft: oklch(0.42 0.03 150);
  --ink-faint: oklch(0.56 0.025 145);
  --line: oklch(0.88 0.022 125);
  --line-strong: oklch(0.78 0.03 135);
  --leaf: oklch(0.45 0.1 150);
  --leaf-deep: oklch(0.36 0.075 152);
  --bloom: oklch(0.63 0.19 32);
  --bloom-ink: oklch(0.52 0.17 30);
  --bloom-wash: oklch(0.955 0.03 40);
  --on-ink: oklch(0.985 0.012 105);
  --focus: oklch(0.55 0.14 145);

  --font-display: "Ysabeau", "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-text: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: 16px;
  --wrap: 1200px;
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 10px;
  --shadow-card: 0 1px 1px oklch(0.3 0.04 150 / 0.04), 0 2px 6px oklch(0.3 0.04 150 / 0.05), 0 18px 40px -18px oklch(0.3 0.06 150 / 0.28);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-kerning: normal;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }

a { color: var(--leaf); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--leaf-deep); }

button, input, textarea, select { font: inherit; color: inherit; }

:focus-visible {
  outline: 2.5px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection { background: var(--field-deep); color: var(--ink); }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.muted { color: var(--ink-soft); }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--on-ink);
  border-radius: var(--r-sm);
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--on-ink); }

/* header */

.site-header {
  background: var(--field);
  position: relative;
  z-index: 20;
}

.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}
.logo:hover { color: var(--ink); }
.logo__mark { width: 30px; height: 30px; }
.logo__word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.42rem;
  letter-spacing: -0.02em;
  line-height: 1;
  padding-bottom: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.nav__link:hover { color: var(--ink); background: oklch(0.255 0.035 155 / 0.07); }
.nav__link[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; }

.nav__tools { position: relative; }
.nav__summary { list-style: none; }
.nav__summary::-webkit-details-marker { display: none; }
.nav__summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s var(--ease-out);
}
.nav__tools[open] .nav__summary::after { transform: translateY(1px) rotate(-135deg); }

.nav__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: min(300px, calc(100vw - 32px));
  margin: 0;
  padding: 8px;
  list-style: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  animation: panel-in 0.18s var(--ease-out);
}
.nav__panel a {
  display: block;
  padding: 11px 12px;
  border-radius: var(--r-sm);
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}
.nav__panel a:hover { background: var(--paper-sunk); }
.nav__panel a[aria-current="page"] { background: var(--field); }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

/* hero */

.hero {
  background: var(--field);
  padding: 8px 0 28px;
  position: relative;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "text" "tool" "show";
  gap: 18px;
}

.hero__text { grid-area: text; padding-top: 4px; }
.hero__tool { grid-area: tool; min-width: 0; }
.hero__showcase { grid-area: show; }

.hero__title {
  font-size: clamp(2.15rem, 1.45rem + 3.1vw, 4.1rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.022em;
  max-width: 14ch;
}

.hero__lead {
  margin-top: 12px;
  font-size: 1.06rem;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 40ch;
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.hero__facts li { display: inline-flex; align-items: center; gap: 7px; }
.hero__facts li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bloom);
}

/* tool */

.tool {
  --tool-pad: 14px;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: var(--tool-pad);
}

.tool__form {
  display: grid;
  gap: 12px;
  position: relative;
}

.tool__form.is-drag::after {
  content: "Отпустите, чтобы добавить фото";
  position: absolute;
  inset: -6px;
  display: grid;
  place-items: center;
  border: 2px dashed var(--leaf);
  border-radius: var(--r-md);
  background: oklch(0.945 0.075 118 / 0.92);
  color: var(--ink);
  font-weight: 600;
  z-index: 3;
}

.photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}

.photos__list {
  display: contents;
  list-style: none;
}

.photos__item {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 14px;
  overflow: visible;
  background: var(--paper-sunk);
  animation: pop-in 0.28s var(--ease-out);
}
.photos__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}
.photos__item--loading {
  background: linear-gradient(100deg, var(--paper-sunk) 30%, var(--field) 50%, var(--paper-sunk) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.2s linear infinite;
  border-radius: 14px;
}

.photos__remove {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid var(--card);
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-ink);
  cursor: pointer;
}
.photos__remove::before {
  content: "";
  position: absolute;
  inset: -9px;
}
.photos__remove svg { width: 14px; height: 14px; }

.photos__add {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 14px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r-md);
  background: var(--paper);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.photos__add:hover { border-color: var(--leaf); background: var(--paper-sunk); }
.photos__add:focus-within { outline: 2.5px solid var(--focus); outline-offset: 2px; }

.photos__plus {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bloom);
  color: var(--on-ink);
}
.photos__plus svg { width: 22px; height: 22px; stroke-width: 2.2; }

.photos__text { display: grid; gap: 1px; line-height: 1.25; }
.photos__label { font-weight: 600; }
.photos__hint { font-size: 0.875rem; color: var(--ink-soft); }
.photos--required .photos__hint { color: var(--bloom-ink); font-weight: 500; }

.photos--filled .photos__add {
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  min-height: 0;
  padding: 0;
  justify-content: center;
}
.photos--filled .photos__text { display: none; }
.photos--full .photos__add { display: none; }

.photos__status {
  font-size: 0.875rem;
  color: var(--bloom-ink);
  margin-top: -4px;
}

.tool__prompt {
  display: block;
  width: 100%;
  min-height: 108px;
  max-height: 320px;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper);
  font-size: 1.0625rem;
  line-height: 1.45;
  resize: vertical;
  field-sizing: content;
  transition: border-color 0.2s, background-color 0.2s;
}
.tool__prompt::placeholder { color: var(--ink-faint); opacity: 1; }
.tool__prompt:hover { border-color: var(--line-strong); }
.tool__prompt:focus { outline: none; border-color: var(--leaf); background: var(--card); box-shadow: 0 0 0 3px oklch(0.55 0.14 145 / 0.16); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.chip { position: relative; display: inline-flex; }
.chip__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.chip__text {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 13px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  transition: background-color 0.18s, border-color 0.18s, color 0.18s;
  user-select: none;
}
.chip:hover .chip__text { border-color: var(--line-strong); background: var(--paper-sunk); }
.chip__input:checked + .chip__text {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
}
.chip__input:focus-visible + .chip__text { outline: 2.5px solid var(--focus); outline-offset: 2px; }

.tool__edit {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--field);
  font-size: 0.9375rem;
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--leaf);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  cursor: pointer;
}
.link-btn:hover { color: var(--leaf-deep); }

.tool__error {
  padding: 11px 14px;
  border-radius: var(--r-sm);
  background: var(--bloom-wash);
  color: oklch(0.4 0.13 30);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid transparent;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s, border-color 0.18s, color 0.18s, transform 0.18s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98); }
.btn .icon { width: 18px; height: 18px; flex: none; }

.btn--solid { background: var(--ink); color: var(--on-ink); }
.btn--solid:hover { background: var(--leaf-deep); color: var(--on-ink); }

.btn--line { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn--line:hover { border-color: var(--ink); color: var(--ink); }
.btn--line[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

.btn--create {
  width: 100%;
  min-height: 58px;
  border-radius: var(--r-md);
  background: var(--ink);
  color: var(--on-ink);
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: 0.005em;
}
.btn--create:hover { background: var(--leaf-deep); color: var(--on-ink); }
.btn--create:disabled { cursor: progress; background: var(--ink-soft); transform: none; }
.btn--create.is-busy span::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 10px;
  vertical-align: -2px;
  border: 2px solid oklch(0.985 0.012 105 / 0.35);
  border-top-color: var(--on-ink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.tool__limits {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--ink-soft);
  text-align: center;
  text-wrap: balance;
}
.tool__limits b { font-weight: 600; color: var(--ink); }
.tool__limits a { color: inherit; }

/* result */

.result {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.wait {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 2px 4px;
}

.wait__bloom {
  position: relative;
  flex: none;
  width: 46px;
  height: 46px;
  animation: spin 7s linear infinite;
}
.wait__bloom i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 15px;
  height: 22px;
  margin: -21px 0 0 -7.5px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: var(--bloom);
  transform-origin: 50% 21px;
  animation: petal 1.6s var(--ease-out) infinite;
}
.wait__bloom i:nth-child(1) { transform: rotate(0deg); animation-delay: 0s; }
.wait__bloom i:nth-child(2) { transform: rotate(72deg); animation-delay: 0.16s; }
.wait__bloom i:nth-child(3) { transform: rotate(144deg); animation-delay: 0.32s; }
.wait__bloom i:nth-child(4) { transform: rotate(216deg); animation-delay: 0.48s; }
.wait__bloom i:nth-child(5) { transform: rotate(288deg); animation-delay: 0.64s; }
.wait__bloom::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--field-deep);
  box-shadow: 0 0 0 2px var(--card);
}

.wait__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 3px;
  font-size: 0.9375rem;
}
.wait__steps li { color: var(--ink-faint); transition: color 0.3s; }
.wait__steps li.is-done { color: var(--ink-soft); }
.wait__steps li.is-done::before { content: "✓ "; color: var(--leaf); font-weight: 700; }
.wait__steps li.is-current { color: var(--ink); font-weight: 600; }
.wait__steps li.is-next { display: none; }

.result__out { display: grid; gap: 14px; animation: rise-in 0.45s var(--ease-out); }

.result__body { min-width: 0; }

.result__text {
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.result__text > * + * { margin-top: 0.7em; }
.result__text h3 {
  font-size: 1.3rem;
  line-height: 1.2;
  margin-top: 1.1em;
}
.result__text h3:first-child { margin-top: 0; }
.result__text ul { margin: 0.5em 0 0; padding-left: 0; list-style: none; display: grid; gap: 6px; }
.result__text li { position: relative; padding-left: 20px; }
.result__text li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bloom);
}

.result__figure {
  margin: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--paper-sunk);
  display: grid;
  place-items: center;
}
.result__figure img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
}
.result__figure.is-loaded img { opacity: 1; }

.result__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.result__actions--image [data-act="download"] { grid-column: 1 / -1; order: -1; }

.result__note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--ink-soft);
}
.result__note .icon { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.result__note.is-expired { color: var(--bloom-ink); }

/* showcase */

.showcase { margin: 0; }
.showcase__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.showcase__item {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--paper-sunk);
  aspect-ratio: 4 / 5;
}
.showcase__item img { width: 100%; height: 100%; object-fit: cover; }
.showcase__tag {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: oklch(0.985 0.007 105 / 0.88);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 600;
}
.showcase__tag--after { background: var(--ink); color: var(--on-ink); }
.showcase__caption {
  margin-top: 10px;
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.showcase__credit { display: block; font-size: 0.75rem; color: var(--ink-faint); margin-top: 2px; }

/* sections */

.section { padding: 48px 0; }
.section + .section { padding-top: 8px; }

.section__head { margin-bottom: 22px; }
.section__title, .section__head h2, .faq__title {
  font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.6rem);
  font-weight: 700;
}
.section__title { margin-bottom: 18px; }
.section__sub { margin-top: 8px; color: var(--ink-soft); }

.tools-index {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.tools-index li { border-bottom: 1px solid var(--line); }
.tools-index__link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 24px;
  gap: 10px;
  align-items: center;
  padding: 16px 2px;
  color: var(--ink);
  text-decoration: none;
}
.tools-index__link:hover { color: var(--ink); }
.tools-index__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--bloom-ink);
  font-variant-numeric: tabular-nums;
}
.tools-index__body { display: grid; gap: 2px; }
.tools-index__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.32rem;
  line-height: 1.15;
}
.tools-index__lead { font-size: 0.9375rem; color: var(--ink-soft); line-height: 1.45; }
.tools-index__arrow { color: var(--ink-faint); transition: transform 0.25s var(--ease-out), color 0.2s; }
.tools-index__link:hover .tools-index__arrow { transform: translateX(4px); color: var(--bloom-ink); }
.tools-index__link:hover .tools-index__label { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 0.16em; }

.examples { background: var(--paper-sunk); }
.section + .examples, .examples + .section { padding-top: 48px; }

.examples__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.example {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
}
.example__label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.example__prompt {
  padding: 12px 14px;
  border-radius: 14px 14px 14px 4px;
  background: var(--field);
}
.example__prompt .example__label { color: var(--leaf-deep); }
.example__query { display: block; font-weight: 500; }
.example__text { white-space: pre-line; line-height: 1.6; }
.example__try { justify-self: start; font-size: 0.9375rem; }

.prose { max-width: 70ch; }
.prose-section .prose { margin: 0; }
.prose h2 {
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  margin: 1.6em 0 0.5em;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.3rem; margin: 1.4em 0 0.4em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.35em; }
.prose li::marker { color: var(--bloom); }
.prose strong { font-weight: 650; }
.prose img { border-radius: var(--r-md); margin: 1.2em 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 1em; font-size: 0.9375rem; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; vertical-align: top; }

.faq__grid { display: grid; gap: 18px; }
.faq__list { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  position: relative;
  list-style: none;
  padding: 16px 40px 16px 0;
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.4;
  cursor: pointer;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::before, .faq__q::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 14px;
  height: 2px;
  margin-top: -1px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.25s var(--ease-out);
}
.faq__q::after { transform: rotate(90deg); }
.faq__item[open] .faq__q::after { transform: rotate(0deg); }
.faq__a { padding: 0 0 18px; color: var(--ink-soft); max-width: 68ch; }

/* pages */

.page { padding-top: 28px; padding-bottom: 56px; }
.page__head { margin-bottom: 24px; }
.page__title {
  font-size: clamp(2rem, 1.5rem + 2.2vw, 3.2rem);
  font-weight: 700;
  max-width: 22ch;
}
.page__lead { margin-top: 10px; color: var(--ink-soft); font-size: 1.0625rem; max-width: 60ch; }

.articles { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); max-width: 820px; }
.articles__item { padding: 20px 0; border-bottom: 1px solid var(--line); }
.articles__title { font-size: 1.45rem; line-height: 1.2; }
.articles__title a { color: var(--ink); text-decoration: none; }
.articles__title a:hover { text-decoration: underline; text-decoration-thickness: 1.5px; }
.articles__excerpt { margin-top: 6px; color: var(--ink-soft); max-width: 68ch; }

.article-layout { display: grid; gap: 36px; }
.article__crumbs { font-size: 0.9375rem; margin-bottom: 12px; }
.article__date { margin: 10px 0 0; color: var(--ink-faint); font-size: 0.9375rem; }
.article .prose { margin-top: 24px; font-size: 1.0625rem; line-height: 1.65; }

.try {
  align-self: start;
  padding: 20px;
  border-radius: var(--r-lg);
  background: var(--field);
}
.try__title { font-size: 1.45rem; }
.try__text { margin-top: 6px; font-size: 0.9375rem; color: var(--ink-soft); }
.try__list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.try__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.try__link:hover { color: var(--ink); background: var(--paper); }
.try__link .icon { width: 18px; height: 18px; color: var(--bloom-ink); flex: none; }

.legal__nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 0 calc(-1 * var(--gutter)) 24px;
  padding: 0 var(--gutter) 4px;
  scrollbar-width: none;
}
.legal__nav::-webkit-scrollbar { display: none; }
.legal__tab {
  flex: none;
  padding: 8px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.legal__tab:hover { color: var(--ink); border-color: var(--line-strong); }
.legal__tab[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.legal__doc { font-size: 0.975rem; }
.legal__doc .page__title { margin-bottom: 20px; }

.message {
  max-width: 560px;
  margin: 0 auto;
  padding: 72px 0 88px;
  text-align: center;
  display: grid;
  justify-items: center;
}
.message > svg { width: 56px; height: 56px; margin-bottom: 22px; }
.message__code { font-weight: 600; color: var(--bloom-ink); margin-bottom: 8px; }
.message__title { font-size: clamp(2rem, 1.6rem + 2vw, 3rem); }
.message__text { margin-top: 12px; color: var(--ink-soft); }
.btn-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 26px; }

/* footer */

.site-footer {
  margin-top: auto;
  background: var(--ink);
  color: oklch(0.86 0.02 130);
  padding: 44px 0 28px;
  font-size: 0.9375rem;
}
.site-footer a { color: oklch(0.95 0.015 115); text-decoration: none; }
.site-footer a:hover { color: var(--field-deep); text-decoration: underline; }
.site-footer .logo { color: var(--on-ink); }
.site-footer__grid { display: grid; gap: 30px; }
.site-footer__about p { margin-top: 12px; max-width: 36ch; line-height: 1.5; }
.site-footer h2 {
  font-family: var(--font-text);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: oklch(0.72 0.03 135);
  margin-bottom: 10px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 20px;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid oklch(0.4 0.03 150);
  font-size: 0.8125rem;
  color: oklch(0.72 0.03 135);
}

/* motion */

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -300% 0; } }
@keyframes pop-in { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes petal {
  0%, 100% { opacity: 0.35; }
  40% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .wait__bloom i { opacity: 1; }
}

/* breakpoints */

@media (max-width: 639px) {
  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 calc(-1 * var(--tool-pad));
    padding: 2px var(--tool-pad) 4px;
    scroll-padding: 0 var(--tool-pad);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--tool-pad), #000 calc(100% - 32px), transparent);
    mask-image: linear-gradient(90deg, transparent 0, #000 var(--tool-pad), #000 calc(100% - 32px), transparent);
  }
  .chips::-webkit-scrollbar { display: none; }
  .chips--many {
    display: grid;
    grid-template-rows: auto auto;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
  }
  .chip { flex: none; }
  .hero__lead { font-size: 1rem; }
  .site-header__row { position: relative; }
  .nav__tools { position: static; }
  .nav__panel { left: var(--gutter); right: var(--gutter); width: auto; top: calc(100% - 4px); }
}

@media (min-width: 420px) {
  .tool { --tool-pad: 18px; }
  .chip__text { padding: 8px 14px; }
}

@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .hero { padding: 20px 0 44px; }
  .hero__lead { font-size: 1.15rem; }
  .tool { --tool-pad: 24px; }
  .result__actions { display: flex; flex-wrap: wrap; }
  .examples__list { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
  .example { padding: 22px; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__about { grid-column: 1 / -1; }
  .section { padding: 64px 0; }
  .tools-index { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .tools-index li:nth-child(1), .tools-index li:nth-child(2) { border-top: 0; }
  .tools-index__link { padding: 20px 2px; }
}

@media (min-width: 960px) {
  .site-header__row { min-height: 76px; }
  .logo__mark { width: 34px; height: 34px; }
  .logo__word { font-size: 1.6rem; }
  .nav { gap: 6px; }
  .nav__link { padding: 0 14px; font-size: 1rem; }

  .hero { padding: 32px 0 72px; }
  .hero__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    grid-template-areas: "text tool" "show tool";
    grid-template-rows: auto 1fr;
    column-gap: 56px;
    row-gap: 32px;
    align-items: start;
  }
  .hero__text { padding-top: 28px; }
  .hero__lead { margin-top: 20px; font-size: 1.25rem; }
  .hero__facts { margin-top: 26px; font-size: 0.9375rem; }
  .hero__tool { position: relative; }
  .tool { --tool-pad: 28px; border-radius: 28px; }
  .photos__item, .photos--filled .photos__add { width: 88px; height: 88px; flex-basis: 88px; }

  .result__actions .btn { padding: 0 16px; }

  .section { padding: 88px 0; }
  .section + .examples, .examples + .section { padding-top: 88px; }
  .section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
  .section__sub { margin-top: 0; }
  .section__title { margin-bottom: 28px; }
  .examples__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .examples__list:has(> :nth-child(2):last-child), .examples__list:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .faq__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; align-items: start; }
  .faq__title { position: sticky; top: 24px; }

  .article-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 64px; }
  .try { position: sticky; top: 24px; margin-top: 64px; }

  .site-footer__grid { grid-template-columns: 1.3fr 1fr 1fr; gap: 48px; }
  .site-footer__about { grid-column: auto; }
}

@media (hover: none) {
  .tools-index__link:hover .tools-index__arrow { transform: none; }
}
