@font-face {
  font-family: "Golos Text";
  src: url("concepts/signature/assets/fonts/GolosText-Variable.ttf") format("truetype");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --paper: #f7f6f1;
  --ink: #181a17;
  --dim: #575a52;
  --rule: #d8d9d1;
  --accent: #febc34;
  --gutter: clamp(19px, 5vw, 78px);
  font-family: "Golos Text", Arial, sans-serif;
  line-height: 1.5;
  background: var(--paper);
  color: var(--ink);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, select, input { font: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 2px solid #815000; outline-offset: 4px; }
::selection { background: var(--accent); color: var(--ink); }
.wrap { width: min(100%, 1520px); padding-inline: var(--gutter); margin-inline: auto; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 4; top: 10px; left: 10px; padding: 10px 14px; color: var(--ink); background: var(--accent); }

.topbar { background: var(--ink); color: #fff; }
.topbar :focus-visible, .signature :focus-visible { outline-color: var(--accent); }
.topbar-inner { min-height: 65px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 16px; }
.brand { flex: none; }
.brand img { width: 136px; height: auto; }
.section-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); column-gap: 12px; width: 100%; border-top: 1px solid #3f4238; }
.section-nav a, .back-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; color: #f7f6ef; }
.section-nav a:hover, .back-link:hover { color: var(--accent); }
.back-link { text-decoration: underline; text-underline-offset: 4px; }

.intro { display: grid; align-items: end; gap: 16px 36px; padding-block: clamp(36px, 6vw, 88px) clamp(30px, 4.5vw, 60px); }
h1, h2, h3 { font-weight: 575; line-height: 1.08; letter-spacing: -.035em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 5.3rem); text-wrap: balance; }
.intro p { max-width: 38ch; color: var(--dim); font-size: 1.0625rem; }
.group { padding-block: clamp(32px, 4.7vw, 68px); }
.group h2 { font-size: clamp(1.6rem, 3.25vw, 3rem); margin-bottom: clamp(20px, 3vw, 36px); }
.signature { color: #f9f8f3; background: var(--ink); }
.initial { background: #fff; border-bottom: 1px solid var(--rule); }
.vologda { background: #eef0e7; border-top: 1px solid var(--rule); }
.group-heading { margin-bottom: clamp(20px, 3vw, 36px); }
.group-heading h2 { margin-bottom: .25em; }
.group-heading p { color: var(--dim); font-size: 1.0625rem; }
.grid { display: grid; gap: 23px 18px; }
.design-card { display: flex; flex-direction: column; min-width: 0; background: #fff; border: 1px solid var(--rule); transition: border-color 180ms ease, background 180ms ease; }
.design-card img { width: 100%; height: auto; aspect-ratio: 864 / 488; object-fit: cover; background: #3d3e35; }
.design-card:hover { border-color: #a06b00; background: #fff9e8; }
.design-caption { display: grid; align-content: start; gap: 6px; padding: 17px 16px 20px; }
.design-caption h3 { font-size: clamp(1.2rem, 2vw, 1.675rem); }
.design-caption p { color: var(--dim); font-size: .9375rem; line-height: 1.4; }
.signature .design-card { background: #232620; border-color: #3f4238; }
.signature .design-card:hover { background: #2c2e27; border-color: #d2a449; }
.signature .design-caption p { color: #d1d3c7; }

body[data-mode="review"] { height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: #e6e5df; }
body[data-mode="review"] .topbar { flex: none; }
body[data-mode="review"] .section-nav { display: none; }
.review { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.review-toolbar { z-index: 2; flex: none; background: var(--paper); border-bottom: 1px solid #c9cbc1; }
.review-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 10px; align-items: center; padding-block: 11px; }
.review-controls select { max-width: 100%; width: 100%; min-height: 43px; border: 1px solid #aeb0a5; border-radius: 0; color: var(--ink); background: #fff; padding: 6px 9px; font-weight: 550; font-size: .9rem; }
.device-picker { display: inline-flex; justify-self: start; border: 1px solid #aeb0a5; }
.device-picker button { border: 0; color: var(--ink); background: transparent; min-height: 40px; padding: 6px 9px; font-size: .8125rem; white-space: nowrap; }
.device-picker button + button { border-left: 1px solid #aeb0a5; }
.device-picker button[aria-pressed="true"] { color: #fff; background: var(--ink); }
.copy-link { min-height: 44px; padding: 5px 0; border: 0; background: transparent; color: var(--ink); font-size: .8125rem; text-decoration: underline; text-underline-offset: 4px; justify-self: end; }
.copy-link:hover { color: #815000; }
.full-link { grid-row: 1; grid-column: 2; min-height: 43px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); padding: 6px 10px; color: var(--ink); font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.full-link:hover { background: #ffd367; }
.copy-fallback { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; padding-bottom: 11px; font-size: .8125rem; }
.copy-fallback input { min-width: min(100%, 210px); max-width: 100%; padding: 6px 9px; flex: 1; border: 1px solid #aeb0a5; }
.canvas { display: flex; align-items: flex-start; justify-content: center; flex: 1; min-height: 275px; padding: 13px clamp(7px, 2.5vw, 38px) 20px; }
.preview-window { position: relative; flex: none; overflow: hidden; max-width: 100%; outline: 1px solid #7d8073; background: #fff; box-shadow: 0 14px 38px #2c302515; }
.preview-window iframe { position: absolute; left: 0; top: 0; display: block; border: 0; transform-origin: top left; background: #fff; }

@media (min-width: 630px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-controls { grid-template-columns: minmax(175px, 1fr) auto auto auto; gap: 12px; }
  .full-link { grid-row: auto; grid-column: auto; }
  .copy-link { padding-inline: 4px; }
}
@media (max-width: 799px) {
  .topbar-inner { padding-top: 12px; }
  .section-nav { margin-top: 10px; }
  body[data-mode="review"] .topbar-inner { padding-top: 0; }
}
@media (min-width: 800px) {
  .section-nav { display: flex; width: auto; gap: clamp(16px, 3vw, 44px); border-top: 0; }
}
@media (min-width: 950px) {
  .intro { grid-template-columns: minmax(0, 1fr) minmax(220px, 35ch); }
  .intro p { margin-bottom: 3px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .design-caption { padding: 19px 18px 22px; }
  .review-controls { grid-template-columns: minmax(220px, 1fr) auto auto auto; gap: 16px; }
  .review-controls select { max-width: 340px; }
  .device-picker button, .full-link { padding-inline: 14px; }
}
@media (max-width: 345px) {
  .review-controls { padding-inline: 12px; }
  .copy-link { max-width: 106px; text-align: right; line-height: 1.15; }
}
@media (prefers-reduced-motion: reduce) {
  .design-card { transition: none; }
}
