/* =========================================================
   Natalia Timofeeva — drawing-sheet identity
   Palette comes from her drawings: paper, graphite, wall poché,
   dimension blue; and the green wall of the Tivat dining room.
   ========================================================= */

/* Jost, variable weight, served from the site (assets/fonts, from Google Fonts) */
@font-face {
  font-family: 'Jost'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/jost-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: 'Jost'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/jost-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Jost'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/jost-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --paper: #F1F1ED;
  --sheet: #FFFFFF;
  --ink: #23272A;
  --poche: #6E726D;
  --rule: #CDCFC9;
  --blue: #3B5A82;
  --blue-wash: rgba(59, 90, 130, .14);
  --green: #33463A;
  --green-ink: #E7ECE6;
  --green-muted: #A9B8AC;
  --bp: #1E2A23;
  --bp-ink: #E7ECE6;
  --bp-muted: #9DAEA2;
  --bp-grid: rgba(231, 236, 230, .045);
  --bp-line: rgba(231, 236, 230, .16);
  --bp-line-strong: rgba(231, 236, 230, .45);

  --font: 'Jost', 'Futura', 'Century Gothic', system-ui, sans-serif;

  /* type scale, ratio 4:3 from 17px */
  --t-sm: 14px;
  --t-base: 17px;
  --t-md: 22px;
  --t-lg: clamp(30px, 3.4vw, 40px);
  --t-xl: clamp(38px, 5.6vw, 72px);

  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --top-h: 68px;
  --ease: cubic-bezier(.25, .7, .25, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 8px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--t-base)/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--sheet); padding: 8px 12px; }

.h2 { font-size: var(--t-lg); font-weight: 300; line-height: 1.1; letter-spacing: -.005em; }
.h3 { font-size: var(--t-md); font-weight: 400; line-height: 1.25; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 26px;
  font-size: 16px; font-weight: 500; text-decoration: none;
  border: 1.5px solid transparent;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn--dark { background: var(--ink); color: var(--paper); }
.btn--dark:hover { background: var(--blue); }
.btn--line { border-color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--paper); }
.btn--blue { background: var(--blue); color: #fff; }
.btn--blue:hover { background: var(--ink); }
.link { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* ---------- Dimension line: |—— 105 m² ——| ---------- */
.dim {
  position: relative; display: flex; justify-content: center; align-items: center;
  height: 18px; color: var(--blue); font-size: var(--t-sm); line-height: 1;
  border-left: 1px solid currentColor; border-right: 1px solid currentColor;
}
.dim::before {
  content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid currentColor;
}
.dim > span { position: relative; background: var(--paper); padding: 0 8px; }
.dim--inline { display: inline-flex; min-width: 120px; }
.dim--inline > span { background: var(--sheet); }

/* ---------- Header (light on paper, transparent over the blueprint) ---------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: var(--top-h);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  transition: background-color .3s, color .3s, border-color .3s;
}
.on-hero .top { background: rgba(30, 42, 35, .9); color: var(--bp-ink); border-bottom-color: var(--bp-line); }
.on-hero.at-top .top { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.on-hero .logo img { filter: invert(1); }
.on-hero .top__row > .lang a { color: var(--bp-muted); }
.on-hero .top__row > .lang a[aria-current] { color: var(--bp-ink); }
.on-hero .menu-btn span { background: var(--bp-ink); }
.top__row { height: 100%; display: flex; align-items: center; gap: 32px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.logo span { font-size: 15px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; white-space: nowrap; }
.menu { display: flex; gap: 28px; }
.menu a { text-decoration: none; font-size: 16px; padding: 6px 0; border-bottom: 1px solid transparent; white-space: nowrap; }
.menu a:hover { border-bottom-color: currentColor; }
.lang { display: flex; gap: 2px; }
.lang a { font-size: 14px; padding: 6px 8px; color: var(--poche); text-decoration: none; }
.lang a[aria-current] { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; }
.lang--menu { display: none; }
.menu-btn { display: none; width: 40px; height: 40px; position: relative; }
.menu-btn span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease), top .3s var(--ease); }
.menu-btn span:first-child { top: 16px; }
.menu-btn span:last-child { top: 23px; }
.menu-btn[aria-expanded="true"] span:first-child { top: 19.5px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { top: 19.5px; transform: rotate(-45deg); }

/* ---------- Hero: the plan as a blueprint ---------- */
.bp {
  position: relative;
  min-height: 100svh; padding: calc(var(--top-h) + clamp(24px, 4vh, 48px)) 0 clamp(24px, 4vh, 40px);
  background-color: var(--bp);
  background-image:
    linear-gradient(var(--bp-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bp-grid) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
  color: var(--bp-ink);
  display: flex; overflow: hidden;
}
.bp__inner { width: 100%; display: flex; flex-direction: column; gap: clamp(20px, 3.5vh, 40px); }
.bp__title { font-weight: 300; font-size: clamp(38px, min(5.6vw, 8.4vh), 96px); line-height: 1; letter-spacing: -.025em; }
.bp__line { display: block; }

.bp__stage { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.plan {
  position: relative; width: 100%;
  max-width: calc((100svh - var(--top-h) - 360px) * 2.29);
  min-width: min(100%, 640px);
  mix-blend-mode: screen;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.9s cubic-bezier(.65, .05, .3, 1);
}
.is-drawn .plan { clip-path: inset(0 -2% -80px 0); }
.plan img { width: 100%; filter: grayscale(1) invert(1) contrast(1.35) brightness(1.15); }

.plan__room {
  position: absolute; border: 1px solid transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background-color .25s, border-color .25s;
}
.plan__room span {
  font-size: 13px; line-height: 1.2; padding: 4px 8px; background: var(--bp); color: var(--bp-ink);
  border: 1px solid var(--bp-ink); white-space: nowrap;
  opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; pointer-events: none;
}
.plan__room:hover, .plan__room:focus-visible { background: rgba(231, 236, 230, .12); border-color: rgba(231, 236, 230, .7); }
.plan__room:hover span, .plan__room:focus-visible span { opacity: 1; transform: none; }

/* a marker in every room: once the plan is drawn, each one fades in and out on its own rhythm
   (--dd delay and --dt duration are set per dot in main.js, so they never blink in sync) */
.plan__dot {
  position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px;
  border-radius: 50%; background: var(--bp-ink); box-shadow: 0 0 0 2px rgba(30, 42, 35, .6);
  opacity: 0; pointer-events: none;
}
.is-drawn .plan__dot { animation: dot-breathe var(--dt, 3.2s) ease-in-out calc(1.7s + var(--dd, 0s)) infinite; }
.plan__room:hover .plan__dot, .plan__room:focus-visible .plan__dot { animation: none; opacity: 0; }
@keyframes dot-breathe {
  0%, 100% { opacity: 0; transform: scale(.5); }
  40%, 60% { opacity: .95; transform: scale(1); }
}

/* the hint plaque sits on the plan's empty lower-left corner */
.plan-hint {
  position: absolute; left: 0; bottom: 3%; z-index: 1;
  display: flex; align-items: center; gap: 10px; padding: 9px 14px;
  font-size: 15px; line-height: 1.2; white-space: nowrap; color: var(--bp-ink);
  background: var(--bp); border: 1px solid var(--bp-line-strong);
  opacity: 0; transform: translateY(6px); pointer-events: none;
  transition: opacity .4s 1.9s, transform .4s 1.9s var(--ease);
}
.plan-hint__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bp-ink); flex-shrink: 0; }
.is-drawn .plan-hint { opacity: 1; transform: none; }
.hint-done .plan-hint { opacity: 0; transform: translateY(6px); transition-delay: 0s; }
.plan__room:focus-visible { outline: none; }

/* CAD crosshair that follows the pointer over the plan */
.cad { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s; }
.cad.is-on { opacity: 1; }
.cad__x, .cad__y { position: absolute; background: rgba(231, 236, 230, .35); }
.cad__x { top: 0; bottom: 0; width: 1px; left: var(--cx, 50%); }
.cad__y { left: 0; right: 0; height: 1px; top: var(--cy, 50%); }
.cad__read {
  position: absolute; left: var(--cx, 50%); top: var(--cy, 50%); transform: translate(10px, 10px);
  font-size: 12px; font-variant-numeric: tabular-nums; letter-spacing: .02em; white-space: nowrap;
  color: var(--bp-ink); background: var(--bp); padding: 2px 6px; border: 1px solid var(--bp-line);
}

.bp__foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 40px; align-items: end; }
.bp__lead { max-width: 52ch; color: var(--bp-muted); }
.bp__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn--paper { background: var(--bp-ink); color: var(--bp); }
.btn--paper:hover { background: #fff; }
.btn--ghost-light { border-color: var(--bp-line-strong); color: var(--bp-ink); }
.btn--ghost-light:hover { border-color: var(--bp-ink); }

/* The room opening out of the plan */
.open-room {
  position: fixed; inset: 0; z-index: 40;
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  background: var(--bp); color: var(--bp-ink);
  clip-path: inset(var(--t, 40%) var(--r, 40%) var(--b, 40%) var(--l, 40%));
  transition: clip-path .75s cubic-bezier(.7, 0, .2, 1);
}
.open-room[hidden] { display: none; }
.open-room.is-open { clip-path: inset(0 0 0 0); }
.open-room__text {
  /* fits the viewport height exactly: the plan crop takes whatever room is left */
  padding: clamp(24px, 6vh, 64px) clamp(24px, 4vw, 64px) clamp(20px, 4vh, 48px);
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
}
.open-room__where { color: var(--bp-muted); margin-bottom: clamp(4px, 1.4vh, 12px); }
.open-room__name { font-weight: 300; font-size: clamp(34px, min(6vw, 9vh), 104px); line-height: .98; letter-spacing: -.025em; margin-bottom: clamp(10px, 2vh, 20px); text-wrap: balance; }
.open-room .dim { max-width: 260px; flex-shrink: 0; }
/* the box flexes to fill the free height; the plan sits inside at its own proportion */
.room-plan-box { flex: 1 1 0; min-height: 0; margin: clamp(12px, 3vh, 32px) 0; container-type: size; }
/* the room's own piece of the floor plan */
.room-plan {
  --ratio: 1.5;
  position: relative; width: min(100cqw, 100cqh * var(--ratio), 560px); aspect-ratio: var(--ratio);
  border: 1px solid var(--bp-line);
}
.room-plan__img {
  position: absolute; inset: 0;
  background: url('../img/tivat105/38.webp') no-repeat;
  filter: grayscale(1) invert(1) contrast(1.35) brightness(1.15);
  mix-blend-mode: screen; opacity: .8;
  transition: background-size .5s var(--ease), background-position .5s var(--ease);
}
.room-plan__hl {
  position: absolute; border: 1.5px solid var(--bp-ink); background: rgba(231, 236, 230, .1);
  transition: left .5s var(--ease), top .5s var(--ease), width .5s var(--ease), height .5s var(--ease);
}
.dim--light { color: var(--bp-ink); }
.dim--light > span { background: var(--bp); }
.open-room__list { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0 0 clamp(6px, 2vh, 20px); flex-shrink: 0; }
.open-room__list button { padding: clamp(3px, .7vh, 6px) 10px; font-size: 15px; color: var(--bp-muted); border: 1px solid transparent; }
.open-room__list button:hover { color: var(--bp-ink); }
.open-room__list button[aria-pressed="true"] { color: var(--bp-ink); border-color: var(--bp-ink); }
.open-room__back { align-self: flex-start; flex-shrink: 0; font-size: 16px; padding: clamp(4px, 1vh, 12px) 0; text-decoration: underline; text-underline-offset: 5px; }
.open-room__img { position: relative; overflow: hidden; background: #111; }
.open-room__img > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.12); transition: transform 1.1s cubic-bezier(.2, .7, .2, 1), opacity .3s;
}
.open-room.is-open .open-room__img > img { transform: none; }
.open-room__img > img.is-loading { opacity: 0; }

.open-room__nav {
  position: absolute; top: 50%; width: 52px; height: 52px; margin-top: -26px; z-index: 2;
  border-radius: 50%; background: rgba(30, 42, 35, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background-color .2s;
}
.open-room__nav:hover { background: rgba(30, 42, 35, .85); }
.open-room__nav::before {
  content: ''; position: absolute; top: 50%; left: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-top: 1.5px solid var(--bp-ink); border-right: 1.5px solid var(--bp-ink);
}
.open-room__nav--prev { left: 20px; }
.open-room__nav--prev::before { transform: translateX(2px) rotate(-135deg); }
.open-room__nav--next { right: 20px; }
.open-room__nav--next::before { transform: translateX(-2px) rotate(45deg); }
.open-room__nav[hidden] { display: none; }
.open-room__bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; align-items: center; gap: 16px; padding: 40px 20px 18px;
  background: linear-gradient(transparent, rgba(20, 28, 23, .75));
}
.open-room__count { color: var(--bp-ink); font-size: 15px; font-variant-numeric: tabular-nums; min-width: 3.2em; }
.open-room__thumbs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.open-room__thumbs button { flex: 0 0 64px; height: 64px; opacity: .55; transition: opacity .2s; }
.open-room__thumbs button:hover { opacity: .85; }
.open-room__thumbs button[aria-current="true"] { opacity: 1; outline: 2px solid var(--bp-ink); outline-offset: -2px; }
.open-room__thumbs img { width: 100%; height: 100%; object-fit: cover; }
/* ---------- Generic block ---------- */
.block { padding: clamp(72px, 10vw, 140px) 0; border-top: 1px solid var(--rule); }
.block--sheet { background: var(--sheet); }
.block__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px 48px; align-items: end; margin-bottom: clamp(40px, 6vw, 88px); }
.block__lead { max-width: 52ch; color: var(--poche); }
.block__head > .h2:only-child { grid-column: 1 / -1; }
.h2--big { font-size: clamp(56px, 10vw, 160px); font-weight: 200; line-height: .9; letter-spacing: -.04em; }

/* ---------- Projects: featured rows with giant areas ---------- */
.feats { display: grid; gap: clamp(72px, 10vw, 150px); }
.feat { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 72px); align-items: end; }
.feat:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
.feat:nth-child(even) .feat__img { order: 2; }
.feat__img { display: block; width: 100%; overflow: hidden; text-decoration: none; background: #E4E4DF; aspect-ratio: 5 / 4; cursor: zoom-in; }
.feat__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.feat__img:hover img { transform: scale(1.04); }
.feat__num {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: clamp(96px, 14vw, 224px); font-weight: 200; line-height: .8; letter-spacing: -.05em;
  font-variant-numeric: lining-nums; margin-bottom: 18px;
}
.feat__num small { font-size: .22em; font-weight: 300; letter-spacing: 0; line-height: 1; margin-top: .25em; }
.feat__num--word { font-size: clamp(56px, 8vw, 128px); letter-spacing: -.035em; }
.feat .dim { margin-bottom: 24px; }
.feat__title { font-size: var(--t-md); font-weight: 400; line-height: 1.25; margin-bottom: 24px; max-width: 26ch; }
.feat__open { display: inline-flex; text-decoration: none; gap: 10px; align-items: baseline; font-size: 16px; font-weight: 500; padding: 4px 0; border-bottom: 1.5px solid var(--ink); }
.feat__open small { font-weight: 400; color: var(--poche); font-size: var(--t-sm); }
.feat__open:hover { color: var(--blue); border-color: var(--blue); }

.more-title { font-size: var(--t-lg); font-weight: 300; margin: clamp(80px, 10vw, 140px) 0 28px; padding-top: 24px; border-top: 1px solid var(--ink); }
.works { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3vw, 44px) clamp(16px, 2vw, 28px); }
.work { display: block; width: 100%; text-align: left; text-decoration: none; }
.work__img { aspect-ratio: 4 / 3; overflow: hidden; background: #E4E4DF; margin-bottom: 12px; }
.work__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.work:hover .work__img img { transform: scale(1.04); }
.work .dim { margin-bottom: 10px; }
.work__title { font-size: 19px; font-weight: 400; line-height: 1.25; margin-bottom: 2px; }
.work__place { font-size: var(--t-sm); color: var(--poche); }
.filter { padding: 8px 14px; font-size: 15px; color: var(--poche); border: 1px solid transparent; }
.filter:hover { color: var(--ink); }
.filter.is-on { color: var(--ink); border-color: var(--ink); }

/* ---------- Plain pages: a project, 404 ---------- */
.plain { padding: calc(var(--top-h) + clamp(32px, 5vw, 72px)) 0 clamp(72px, 9vw, 120px); min-height: 70vh; }
.plain .block__lead { margin: 24px 0 32px; }
.project__back { display: inline-block; margin-bottom: clamp(24px, 4vw, 48px); color: var(--poche); }
.project__head { display: grid; gap: 20px; margin-bottom: clamp(32px, 5vw, 56px); }
.project__title { font-size: clamp(36px, 6vw, 88px); font-weight: 200; line-height: 1; letter-spacing: -.03em; max-width: 20ch; }
.project__head .dim { width: min(100%, 420px); }
.project__text { max-width: 62ch; font-size: var(--t-md); line-height: 1.55; font-weight: 300; margin-top: 8px; }
.project__gallery { columns: 2; column-gap: clamp(8px, 1.2vw, 16px); }
.project__shot, .project__plan { margin: 0; background: #E4E4DF; }
.project__shot { break-inside: avoid; margin-bottom: clamp(8px, 1.2vw, 16px); }
.project__shot img, .project__plan img { width: 100%; }
.project__empty { column-span: all; color: var(--poche); }
.project__sub { font-size: var(--t-lg); font-weight: 300; margin: clamp(56px, 8vw, 104px) 0 24px; padding-top: 24px; border-top: 1px solid var(--ink); }
.project__plans { display: grid; gap: 24px; }
.project__plan { background: #fff; }
.project__cta { margin-top: clamp(40px, 6vw, 72px); }

/* Service pages: prices drawn as dimension lines, text sections heading-left */
.svc-price__lead { color: var(--poche); max-width: 62ch; margin-bottom: 28px; }
.svc-price__rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.svc-price__row { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(110px, 1fr) minmax(0, 5fr); align-items: center; gap: 8px 24px; }
.svc-price__name { font-size: var(--t-md); font-weight: 400; }
.svc-price__rate { color: var(--poche); font-variant-numeric: tabular-nums; }
.svc-price__dim { width: calc(var(--w) * 100%); min-width: 120px; }
.svc-price__dim > span { font-size: var(--t-md); font-variant-numeric: tabular-nums; }
.svc-sec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px 48px; padding-top: 24px; margin-top: clamp(48px, 6vw, 80px); border-top: 1px solid var(--rule); }
.svc-sec__h { font-size: var(--t-lg); font-weight: 300; line-height: 1.15; }
.svc-sec p { max-width: 62ch; font-size: var(--t-md); line-height: 1.55; font-weight: 300; }
.service .chain { margin-top: 8px; }
@media (max-width: 700px) {
  .svc-price__row { grid-template-columns: 1fr auto; }
  .svc-price__dim { grid-column: 1 / -1; }
  .svc-sec { grid-template-columns: 1fr; }
}
@media (max-width: 600px) { .project__gallery { columns: 1; } }

/* ---------- Pricing ---------- */
.area-input { display: grid; grid-template-columns: auto auto; justify-content: start; align-items: center; gap: 12px 28px; margin-bottom: 36px; }
.area-input label { font-size: var(--t-md); }
.area-input__ctrl { display: flex; align-items: center; border-bottom: 1.5px solid var(--ink); }
.area-input__ctrl input {
  width: 3.2ch; font: 300 44px/1 var(--font); color: var(--ink); background: none; border: 0; text-align: right; padding: 4px 0;
  -moz-appearance: textfield; appearance: textfield;
}
.area-input__ctrl input::-webkit-outer-spin-button, .area-input__ctrl input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.area-input__ctrl input:focus { outline: none; }
.area-input__ctrl:focus-within { border-bottom-color: var(--blue); }
.area-input__unit { font-size: var(--t-md); margin: 0 10px 0 6px; }
.step-btn { width: 40px; height: 40px; font-size: 24px; color: var(--blue); }
.step-btn:hover { background: var(--blue-wash); }
.area-input input[type=range] { grid-column: 1 / -1; width: min(520px, 100%); accent-color: var(--blue); }

.pricing table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.pricing th, .pricing td { padding: 14px 16px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.pricing thead th { border-bottom: 1.5px solid var(--ink); padding-bottom: 20px; font-weight: 400; vertical-align: top; }
.pricing col.col-feature { width: 34%; }
.pricing .pkg-name { display: block; font-size: var(--t-lg); font-weight: 300; line-height: 1.1; }
.pricing .pkg-desc { display: block; color: var(--poche); font-size: var(--t-sm); margin-top: 6px; min-height: 2.6em; }
.pricing .pkg-rate { display: block; margin-top: 14px; font-size: var(--t-md); }
.pricing .pkg-rate small { color: var(--poche); font-size: var(--t-sm); }
.pricing tbody th { font-weight: 400; }
.pricing .yes { color: var(--blue); }
.pricing .yes::before { content: ''; display: inline-block; width: 16px; height: 8px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-4px) rotate(-45deg); margin-right: 8px; }
.pricing .no { color: #A6A9A4; }
.pricing .no::before { content: ''; display: inline-block; width: 14px; border-top: 1.5px solid var(--rule); vertical-align: middle; }
.pricing tfoot td { border-bottom: 0; padding-top: 24px; }
.pricing .total { font-size: var(--t-lg); font-weight: 300; line-height: 1; font-variant-numeric: tabular-nums; }
.pricing .total-label { display: block; color: var(--poche); font-size: var(--t-sm); margin: 6px 0 16px; }
.pricing .is-featured { background: color-mix(in srgb, var(--blue) 6%, transparent); }
.pricing tfoot .btn { width: 100%; }
.pricing__note { max-width: 70ch; margin-top: 20px; color: var(--poche); font-size: var(--t-sm); }

.pkg-cards { display: none; }

.extra { margin-top: clamp(48px, 6vw, 72px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px 48px; }
.extra ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.extra li { border-top: 1px solid var(--ink); padding-top: 12px; }

/* ---------- Process: a dimension chain, like on her drawings ---------- */
.chain { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.chain li { position: relative; padding-right: 16px; }
.chain__n { display: block; font-size: var(--t-lg); font-weight: 300; line-height: 1; color: var(--blue); margin-bottom: 14px; }
.chain h3 {
  position: relative; font-size: 18px; font-weight: 500; line-height: 1.3;
  min-height: calc(2.6em + 14px); padding: 0 16px 14px 0; margin: 0 -16px 14px 0; overflow-wrap: anywhere; hyphens: auto;
  border-bottom: 1px solid var(--blue);
}
.chain li:last-child h3 { margin-right: 0; }
/* oblique ticks at each boundary */
.chain h3::after, .chain li:last-child h3::before {
  content: ''; position: absolute; bottom: -7px; height: 13px; border-left: 1px solid var(--blue); transform: skewX(-40deg);
}
.chain h3::after { left: 0; }
.chain li:last-child h3::before { right: 0; }
.chain p { font-size: 15px; color: var(--poche); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.about__photo { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 25%; filter: grayscale(1); }
.about__text .h2 { margin-bottom: 24px; }
.about__text p { max-width: 56ch; margin-bottom: 16px; }
.about__first { font-size: var(--t-md); line-height: 1.45; }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px 48px; }
.faq__list details { border-top: 1px solid var(--rule); }
.faq__list details:last-child { border-bottom: 1px solid var(--rule); }
.faq__list summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative; font-size: var(--t-md); }
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after { content: '+'; position: absolute; right: 4px; top: 16px; font-size: 28px; font-weight: 300; color: var(--blue); transition: transform .25s var(--ease); }
.faq__list details[open] summary::after { transform: rotate(45deg); }
.faq__list p { padding: 0 40px 22px 0; max-width: 62ch; color: var(--poche); }

/* ---------- Contact / title block ---------- */
.contact { background: var(--green); color: var(--green-ink); padding: clamp(64px, 9vw, 120px) 0; }
.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.contact__intro .h2 { margin-bottom: 18px; }
.contact__intro p { max-width: 40ch; color: var(--green-muted); }
.contact__intro .contact__direct-label { margin-top: 36px; color: var(--green-ink); }
.direct { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: var(--t-md); }
.direct a { overflow-wrap: anywhere; text-decoration: none; border-bottom: 1px solid rgba(231, 236, 230, .3); }
.direct a:hover { border-bottom-color: currentColor; }
.direct .direct__row { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 10px; font-size: 16px; }

.stamp {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--sheet); color: var(--ink);
  border: 2px solid var(--ink);
}
.stamp__cell { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); min-width: 0; }
.stamp__cell > span:first-child { font-size: 13px; color: var(--poche); }
.stamp input, .stamp select, .stamp textarea {
  width: 100%; font: 400 18px/1.4 var(--font); color: var(--ink);
  background: transparent; border: 0; padding: 2px 0; border-radius: 0;
}
.stamp select { appearance: none; cursor: pointer; }
.stamp textarea { resize: vertical; min-height: 72px; }
.stamp input:focus, .stamp select:focus, .stamp textarea:focus { outline: none; }
.stamp__cell:focus-within { background: var(--blue-wash); }
.stamp__cell.is-invalid { background: rgba(170, 60, 40, .08); }
.stamp__cell.is-invalid > span:first-child { color: #A23C28; }
.stamp__cell--name { grid-column: span 2; }
.stamp__cell--contact { grid-column: span 2; border-right: 0; }
.stamp__cell--msg { grid-column: span 2; grid-row: span 2; border-right: 0; }
.stamp__cell--brand { flex-direction: row; align-items: center; gap: 10px; font-size: 14px; line-height: 1.2; }
.stamp__cell--brand small { color: var(--poche); }
.stamp__cell--sheet strong { font-weight: 400; font-size: 18px; }
.stamp__cell--send { grid-column: 1 / -1; border-right: 0; border-bottom: 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 16px 14px; }
.stamp__err { flex-basis: 100%; color: #A23C28; font-size: 15px; }

/* ---------- Footer ---------- */
.foot { background: var(--green); color: var(--green-muted); border-top: 1px solid rgba(231, 236, 230, .15); padding: 22px 0; font-size: var(--t-sm); }
.foot__row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot__nav { display: flex; gap: 8px 24px; flex-wrap: wrap; }
.foot a { color: inherit; text-underline-offset: 3px; }
.foot a:hover { color: var(--green-ink); }

/* ---------- Project viewer ---------- */
.viewer {
  width: min(1180px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px);
  padding: 0; border: 0; background: var(--paper); color: var(--ink);
  display: none; flex-direction: column;
}
.viewer[open] { display: flex; }
.viewer::backdrop { background: rgba(35, 39, 42, .82); }
.viewer__head { display: flex; align-items: center; gap: 16px 24px; padding: 18px 20px; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.viewer__head > div:first-child { margin-right: auto; }
.viewer__title { font-size: var(--t-md); font-weight: 400; }
.viewer__meta { font-size: var(--t-sm); color: var(--poche); }
.viewer__tabs { display: flex; gap: 4px; }
.viewer__tabs[hidden] { display: none; }
.viewer__close { font-size: 15px; text-decoration: underline; text-underline-offset: 4px; padding: 8px 4px; }
.viewer__stage { position: relative; flex: 1 1 auto; min-height: 0; height: min(64vh, 680px); background: #E4E4DF; display: flex; align-items: center; justify-content: center; }
.viewer__stage.is-plan { background: var(--sheet); }
.viewer__stage.is-plan img { filter: brightness(1.035); }
.viewer__stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer__stage.is-about { background: var(--paper); align-items: flex-start; overflow-y: auto; }
.viewer__about { max-width: 62ch; padding: clamp(24px, 4vw, 48px) 20px; font-size: var(--t-md); line-height: 1.55; font-weight: 300; }
.viewer__about[hidden], .viewer__stage img[hidden] { display: none; }
.viewer__nav { position: absolute; top: 0; bottom: 0; width: 22%; }
.viewer__nav--prev { left: 0; cursor: w-resize; }
.viewer__nav--next { right: 0; cursor: e-resize; }
.viewer__nav[hidden] { display: none; }
.viewer__empty { padding: 12px 20px 0; color: var(--poche); }
.viewer__foot { display: flex; align-items: center; gap: 16px; padding: 14px 20px; flex-shrink: 0; }
.viewer__count { font-size: var(--t-sm); color: var(--poche); font-variant-numeric: tabular-nums; min-width: 4.5em; }
.viewer__thumbs { flex: 1; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; padding: 2px; }
.viewer__thumbs button { flex: 0 0 56px; height: 56px; opacity: .55; }
.viewer__thumbs button[aria-current="true"] { opacity: 1; outline: 2px solid var(--blue); outline-offset: -2px; }
.viewer__thumbs img { width: 100%; height: 100%; object-fit: cover; }
body.is-locked { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .brief-sheet.is-turning { animation: none; }
  .is-drawn .plan__dot { animation: none; opacity: .9; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
}

/* =================== Responsive =================== */
@media (max-width: 1100px) {
  .chain { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 40px; }
  .chain li:nth-child(4) h3 { margin-right: 0; }
  .works { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menu { gap: 20px; }
}

@media (max-width: 900px) {
  :root { --top-h: 60px; }
  .menu-btn { display: block; }
  .menu {
    position: fixed; top: var(--top-h); left: 0; right: 0; height: calc(100dvh - var(--top-h));
    flex-direction: column; gap: 0; padding: 16px var(--gutter);
    background: var(--paper); transform: translateX(100%); visibility: hidden;
    transition: transform .35s var(--ease), visibility 0s .35s;
  }
  .menu.is-open { transform: none; visibility: visible; transition: transform .35s var(--ease); }
  .menu a { font-size: 28px; font-weight: 300; padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .top__row { gap: 12px; }

  .menu { color: var(--ink); }
  .about, .faq, .contact__grid, .extra, .block__head { grid-template-columns: 1fr; }

  .bp { min-height: 0; }
  .plan { max-width: none; min-width: 0; }
  .bp__foot { grid-template-columns: 1fr; }
  /* on small plans the corner is too tight: the plaque sits under the drawing */
  .plan-hint { top: calc(100% + 14px); bottom: auto; font-size: 14px; }
  .bp__stage { padding-bottom: 54px; }
  .plan__dot { width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; }
  .plan__room span { display: none; }

  .open-room { grid-template-columns: 1fr; grid-template-rows: 44svh minmax(0, 1fr); }
  .open-room__img { order: -1; }
  .open-room__text { padding: 16px var(--gutter) 12px; }
  .open-room__where { display: none; }
  .open-room__name { font-size: clamp(30px, min(9vw, 5svh), 52px); margin-bottom: 8px; }
  .room-plan-box { margin: 10px 0; }
  .open-room__list { gap: 2px 4px; margin-bottom: 4px; }
  .open-room__list button { font-size: 14px; padding: 3px 8px; }
  .open-room__nav { width: 40px; height: 40px; margin-top: -20px; }
  .open-room__nav--prev { left: 10px; } .open-room__nav--next { right: 10px; }
  .open-room__bar { padding: 28px 12px 10px; gap: 10px; }
  .open-room__thumbs button { flex-basis: 44px; height: 44px; }

  .feat__num { font-size: clamp(80px, 13vw, 150px); }

  .chain { grid-template-columns: 1fr; row-gap: 0; border-left: 1px solid var(--blue); margin-left: 6px; }
  .chain li { padding: 0 0 28px 24px; }
  .chain li::after { content: ''; position: absolute; left: -7px; top: 8px; width: 13px; border-top: 1px solid var(--blue); transform: skewY(-40deg); }
  .chain__n { font-size: 22px; margin-bottom: 4px; }
  .chain h3, .chain li:last-child h3, .chain li:nth-child(4) h3 { border: 0; min-height: 0; padding: 0; margin: 0 0 4px; }
  .chain h3::after, .chain li:last-child h3::before { display: none; }

  .extra ul { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .feat, .feat:nth-child(even) { grid-template-columns: 1fr; gap: 20px; }
  .feat:nth-child(even) .feat__img { order: 0; }
  .feat__num { font-size: clamp(88px, 26vw, 150px); }
  .pricing table { display: none; }
  .pkg-cards { display: grid; gap: 16px; }
  .pkg-card { border: 1px solid var(--rule); padding: 20px; }
  .pkg-card.is-featured { border: 1.5px solid var(--blue); }
  .pkg-card__name { font-size: var(--t-lg); font-weight: 300; line-height: 1.1; }
  .pkg-card__desc { color: var(--poche); font-size: var(--t-sm); margin: 4px 0 14px; }
  .pkg-card__price { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
  .pkg-card__price strong { font-size: var(--t-lg); font-weight: 300; font-variant-numeric: tabular-nums; }
  .pkg-card__price span { color: var(--poche); font-size: var(--t-sm); }
  .pkg-card ul { list-style: none; margin: 14px 0 18px; padding: 0; display: grid; gap: 8px; font-size: 15px; }
  .pkg-card li.no { color: #A6A9A4; text-decoration: line-through; text-decoration-color: var(--rule); }
  .pkg-card .btn { width: 100%; }
  .area-input { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .logo span { font-size: 13px; letter-spacing: .14em; }
  .direct { font-size: 18px; }
  .logo img { width: 28px; height: 28px; }
  .works { grid-template-columns: 1fr 1fr; gap: 24px 12px; }
  .work__title { font-size: 16px; }
  .feat__img { aspect-ratio: 4 / 4.2; }
  .bp__actions .btn { flex: 1 1 100%; }
  .stamp { grid-template-columns: 1fr 1fr; }
  .stamp__cell--name, .stamp__cell--contact, .stamp__cell--msg { grid-column: 1 / -1; border-right: 0; }
  .stamp__cell--msg { grid-row: auto; }
  .stamp__cell--pkg, .stamp__cell--sheet { border-right: 0; }
  .viewer { width: 100vw; max-height: 100dvh; height: 100dvh; }
  .viewer__stage { height: auto; flex: 1; }
  .viewer__foot { flex-wrap: wrap; }
  .viewer__thumbs { order: 3; flex-basis: 100%; }
  .viewer__foot .btn { margin-left: auto; min-height: 44px; padding: 0 16px; font-size: 15px; }
}

@media (max-width: 480px) {
  .top__row > .lang { display: none; }
  .lang--menu { display: flex; gap: 8px; margin-top: 24px; }
  .lang--menu a { font-size: 18px; font-weight: 400; padding: 8px 12px; border: 1px solid var(--rule); color: var(--poche); }
  .lang--menu a[aria-current] { color: var(--ink); border-color: var(--ink); text-decoration: none; }
}

/* =================== Brief questionnaire (/upitnik/) =================== */
/* Editorial layout: a light page like an interiors magazine spread.
   No boxes: each question is a row with its number, the question on the left and the answers on the right. */
.menu a[aria-current="page"] { border-bottom-color: currentColor; }
/* overall progress: a thin line along the bottom edge of the fixed header */
.brief-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: rgba(231, 236, 230, .1); pointer-events: none; }
.brief-progress span { display: block; height: 100%; width: 0; background: #AFC6E4; transition: width .5s var(--ease); }
.brief {
  /* the same blueprint as the home hero; the editorial layout is recoloured through the tokens */
  --ink: var(--bp-ink); --poche: var(--bp-muted); --rule: var(--bp-line); --paper: var(--bp); --sheet: rgba(231, 236, 230, .06);
  --blue: #AFC6E4; --blue-wash: rgba(175, 198, 228, .14);
  padding: calc(var(--top-h) + clamp(40px, 6vw, 88px)) 0 clamp(72px, 9vw, 120px); min-height: 100vh;
  background-color: var(--bp); color: var(--bp-ink);
  background-image: linear-gradient(var(--bp-grid) 1px, transparent 1px), linear-gradient(90deg, var(--bp-grid) 1px, transparent 1px);
  background-size: 32px 32px; background-position: -1px -1px;
}
.brief .btn--dark, .brief .btn--blue { background: var(--bp-ink); color: var(--bp); }
.brief .btn--dark:hover, .brief .btn--blue:hover { background: #fff; }
.brief .btn--line { border-color: var(--bp-line-strong); color: var(--bp-ink); }
.brief .btn--line:hover { background: var(--bp-ink); color: var(--bp); }
.brief .block__lead { color: var(--bp-muted); }
.brief__head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 48px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.brief__layout[hidden] { display: none; }

/* contents: a row of sections, like the table of contents of an issue */
.steps-nav { margin-bottom: clamp(48px, 7vw, 96px); border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--rule); }
.steps-nav ol { list-style: none; margin: 0; padding: 0; display: flex; }
.steps-nav li { flex: 1 1 0; min-width: 0; display: flex; } /* the button fills the cell, so its hover covers the whole cell */
.steps-nav li + li { border-left: 1px solid var(--rule); }
.steps-nav button {
  display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left;
  padding: 14px 14px 16px; color: var(--poche); position: relative;
  transition: color .2s, background-color .2s;
}
.steps-nav button:hover { color: var(--ink); background: rgba(231, 236, 230, .04); }
.steps-nav__n { font-size: 13px; font-variant-numeric: tabular-nums; }
.steps-nav__t { font-size: 15px; line-height: 1.25; }
.steps-nav button[aria-current="step"] { color: var(--ink); }
.steps-nav button[aria-current="step"]::after { content: ''; position: absolute; left: 0; right: 0; top: -1.5px; height: 4px; background: var(--blue); }
.steps-nav button.is-done .steps-nav__n::after { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--blue); margin-left: 8px; vertical-align: 2px; }

/* a section opens like a chapter: a big number and a title */
.brief-sheet.is-turning { animation: page-in .5s cubic-bezier(.2, .7, .2, 1); }
@keyframes page-in { from { opacity: 0; transform: translateY(16px); } }
.brief-sheet__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px clamp(24px, 4vw, 64px); align-items: end; padding-bottom: clamp(28px, 4vw, 48px); border-bottom: 1.5px solid var(--ink); }
.brief-sheet__no { font-size: clamp(96px, 15vw, 220px); font-weight: 200; line-height: .78; letter-spacing: -.05em; color: var(--blue); font-variant-numeric: lining-nums tabular-nums; }
.brief-sheet__title { font-size: clamp(40px, 5.4vw, 76px); font-weight: 200; line-height: 1; letter-spacing: -.03em; }
.brief-sheet__intro { color: var(--poche); max-width: 46ch; margin-top: 16px; font-size: 18px; }

/* question rows */
.brief-sheet__body { counter-reset: q; }
.bq {
  display: grid; grid-template-columns: 56px minmax(0, .85fr) minmax(0, 1.15fr); gap: 12px clamp(20px, 3vw, 48px);
  padding: clamp(26px, 3.5vw, 40px) 0; border-bottom: 1px solid var(--rule); counter-increment: q;
}
.bq[hidden] { display: none; }
.bq__n::before { content: counter(q, decimal-leading-zero); font-size: 15px; color: var(--blue); font-variant-numeric: tabular-nums; }
.bq__n { padding-top: 6px; }
.bq__q { font-size: clamp(21px, 2vw, 26px); font-weight: 300; line-height: 1.25; letter-spacing: -.005em; max-width: 26ch; }
.bq__hint { color: var(--poche); font-size: 15px; margin-top: 10px; max-width: 34ch; }
.bq__req { display: inline-block; margin-left: 10px; vertical-align: 4px; font-size: 12px; letter-spacing: .02em; color: var(--blue); border: 1px solid currentColor; padding: 1px 7px; }
.bq__err { margin-top: 10px; font-size: 15px; color: #F0A08E; }
.bq.is-invalid .field-line, .bq.is-invalid .field-num { border-bottom-color: #F0A08E; }
.bq.is-invalid .opt::before { border-color: #F0A08E; }
.bq__field { min-width: 0; }

/* answers as a printed list: circles for one choice, boxes for several */
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 24px; }
.opt {
  display: flex; align-items: baseline; gap: 12px; text-align: left;
  padding: 8px 0; font-size: 17px; line-height: 1.35; color: var(--ink-2, var(--ink));
  border-bottom: 1px solid transparent; transition: color .15s;
}
.opt::before {
  content: ''; flex: 0 0 14px; height: 14px; transform: translateY(2px);
  border: 1.3px solid var(--poche); border-radius: 50%; transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.opt--multi::before { border-radius: 2px; }
.opt:hover::before { border-color: var(--ink); }
.opt[aria-pressed="true"] { color: var(--ink); }
.opt[aria-pressed="true"]::before { border-color: var(--blue); background: var(--blue); box-shadow: inset 0 0 0 3px var(--paper); }
.opt--multi[aria-pressed="true"]::before {
  box-shadow: none;
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23fff' stroke-width='1.8'%3E%3Cpath d='M2.5 6.2 5 8.5l4.5-5'/%3E%3C/svg%3E") center / 10px no-repeat;
}
.opt[data-v="other"] { color: var(--poche); font-style: italic; }
.opt[data-v="other"][aria-pressed="true"] { color: var(--ink); }
.opt[hidden] { display: none; }
.opt--sm { font-size: 15px; padding: 5px 0; }
.kids .opts { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }

/* options drawn as plan symbols: no frames, just the drawing and a caption */
.opts--tiles { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 18px 16px; }
.opts--after { margin-top: 14px; }
.opt--tile { flex-direction: column; align-items: flex-start; gap: 10px; padding: 0; font-size: 15px; }
.opt--tile::before { display: none; }
.opt--tile svg {
  width: 100%; height: auto; aspect-ratio: 4 / 3; padding: 10px 14px; background: var(--sheet);
  fill: none; stroke: var(--ink); stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round;
  outline: 1px solid transparent; transition: stroke .15s, outline-color .15s, background-color .15s;
}
.opt--tile:hover svg { outline-color: var(--rule); }
.opt--tile[aria-pressed="true"] svg { stroke: var(--blue); stroke-width: 1.35; outline: 1.5px solid var(--blue); }
/* second pencil pass and hatching are lighter than the main line */
.opt--tile svg .sk2 { opacity: .45; stroke-width: .8; }
.opt--tile svg .sk3 { opacity: .55; stroke-width: .7; }
.opt--tile span { position: relative; padding-left: 20px; }
.opt--tile span::before {
  content: ''; position: absolute; left: 0; top: 4px; width: 12px; height: 12px;
  border: 1.3px solid var(--poche); border-radius: 50%;
}
.opt--multi.opt--tile span::before { border-radius: 2px; }
.opt--tile[aria-pressed="true"] span::before { border-color: var(--blue); background: var(--blue); box-shadow: inset 0 0 0 2.5px var(--paper); }

.field-line {
  display: block; width: 100%; margin-top: 4px; padding: 8px 0;
  font: 300 20px/1.45 var(--font); color: var(--ink); background: transparent;
  border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; resize: vertical;
}
.field-line::placeholder { color: rgba(231, 236, 230, .35); }
.field-line:focus { outline: none; border-bottom: 1.5px solid var(--blue); }
.field-line[hidden] { display: none; }
.opt-other { margin-top: 16px; font-size: 18px; border-bottom-style: dashed; }
.field-num { display: inline-flex; align-items: baseline; gap: 10px; border-bottom: 1px solid var(--ink); }
.field-num:focus-within { border-bottom-color: var(--blue); }
.field-num input { width: 5ch; font: 200 48px/1.1 var(--font); color: var(--ink); border: 0; background: none; padding: 0; -moz-appearance: textfield; appearance: textfield; }
.field-num input::-webkit-outer-spin-button, .field-num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field-num input:focus { outline: none; }
.field-num span { color: var(--poche); font-size: 18px; }
.kids__label { font-size: 14px; color: var(--poche); margin: 14px 0 2px; }
.kids > .kids__label:first-child { margin-top: 0; }
.kids__row { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rule); }
.picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; }
.pick { position: relative; text-align: left; font-size: 13px; line-height: 1.3; color: var(--poche); }
.pick img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 6px; outline: 2px solid transparent; outline-offset: -2px; filter: grayscale(.35); transition: outline-color .15s, filter .3s; }
.pick:hover img { filter: none; }
.pick[aria-pressed="true"] { color: var(--ink); }
.pick[aria-pressed="true"] img { outline: 3px solid var(--blue); filter: none; }
.pick[aria-pressed="true"]::after {
  content: ''; position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23fff' stroke-width='1.8'%3E%3Cpath d='M2.5 6.2 5 8.5l4.5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.brief-sheet__foot { display: flex; align-items: center; gap: 24px; padding: 32px 0 0; }
.brief-sheet__foot .link[hidden] { visibility: hidden; display: inline; }
.brief-sheet__count { margin-left: auto; color: var(--poche); font-size: 15px; font-variant-numeric: tabular-nums; }

/* the result: the brief, set like an article */
.brief-result[hidden] { display: none; }
.brief-result__bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; align-items: center; margin-bottom: 40px; padding-bottom: 28px; border-bottom: 1.5px solid var(--ink); }
.brief-result__lead { color: var(--poche); max-width: 52ch; }
.brief-result__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.brief-result__actions .btn { min-height: 44px; padding: 0 18px; font-size: 15px; }
.brief-result__actions .btn:disabled { opacity: .4; pointer-events: none; }
.brief-result__hint { grid-column: 2; justify-self: end; text-align: right; font-size: 14px; color: var(--poche); }
.brief-result__more { grid-column: 1 / -1; display: flex; gap: 24px; font-size: 15px; }
.brief-doc { color: var(--ink); }
.brief-doc__head { padding-bottom: 28px; margin-bottom: 8px; }
.brief-doc__title { font-size: clamp(40px, 5.4vw, 76px); font-weight: 200; line-height: 1; letter-spacing: -.03em; max-width: 16ch; }
.brief-doc__object { color: var(--poche); margin-top: 14px; font-size: 18px; }
.brief-doc__sec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 12px clamp(24px, 4vw, 64px); padding: 28px 0; border-top: 1px solid var(--ink); break-inside: avoid; }
.brief-doc__sec h3 { display: flex; gap: 14px; align-items: baseline; font-size: var(--t-md); font-weight: 300; }
.brief-doc__sec h3 span { color: var(--blue); font-size: 15px; font-variant-numeric: tabular-nums; }
.brief-doc dl { margin: 0; }
.brief-doc dl > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 4px 24px; padding: 9px 0; border-bottom: 1px solid var(--rule); break-inside: avoid; }
.brief-doc dl > div:last-child { border-bottom: 0; }
.brief-doc dt { color: var(--poche); font-size: 15px; }
.brief-doc dd { margin: 0; }
.brief-doc__stamp { display: flex; flex-wrap: wrap; gap: 8px 40px; align-items: center; margin-top: 8px; padding-top: 20px; border-top: 1.5px solid var(--ink); }
.brief-doc__stamp > div { display: flex; gap: 10px; align-items: baseline; }
.brief-doc__stamp span { font-size: 14px; color: var(--poche); }
.brief-doc__stamp strong { font-weight: 400; }
.brief-doc__brand { margin-left: auto; align-items: center !important; }
.brief-doc__brand span { color: var(--ink) !important; line-height: 1.2; }
.brief-doc__empty { color: var(--poche); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60;
  background: var(--ink); color: var(--paper); padding: 12px 18px; font-size: 15px; max-width: calc(100vw - 32px);
}
.toast[hidden] { display: none; }


@media (max-width: 900px) {
  .brief__head, .brief-result__bar { grid-template-columns: 1fr; }
  .brief-result__actions { justify-content: flex-start; }
  .brief-result__hint { grid-column: auto; justify-self: start; text-align: left; }
  /* contents become a row of tabs that scrolls sideways; the fade at the edge hints there is more */
  .steps-nav ol {
    overflow-x: auto; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent);
  }
  .steps-nav ol::-webkit-scrollbar { display: none; }
  .steps-nav li { flex: 0 0 auto; }
  .steps-nav li:last-child { padding-right: 15vw; }
  .steps-nav button { flex-direction: row; align-items: baseline; gap: 8px; padding: 12px 14px 13px; white-space: nowrap; }
  .brief-sheet__head { grid-template-columns: auto minmax(0, 1fr); }
  .bq { grid-template-columns: 40px minmax(0, 1fr); }
  .bq__field { grid-column: 2; }
  .brief-doc__sec { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .brief-sheet__head { grid-template-columns: 1fr; }
  .brief-sheet__no { font-size: 88px; }
  .bq { grid-template-columns: 1fr; gap: 8px; }
  .bq__field { grid-column: auto; margin-top: 6px; }
  .opts { grid-template-columns: 1fr; }
  .opts--tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
  .opt--tile { font-size: 14px; }
  .opt--tile svg { padding: 6px 8px; }
  .kids .opts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brief-doc dl > div { grid-template-columns: 1fr; }
  .brief-doc__brand { margin-left: 0; }
  .brief-result__actions .btn { flex: 1 1 100%; }
}

@media print {
  .top, .foot, .brief__head, .brief-result__bar, .toast, .skip { display: none !important; }
  body { background: #fff; }
  .brief { padding: 0; min-height: 0; background: #fff; color: #23272A; --ink: #23272A; --poche: #6E726D; --rule: #CDCFC9; --blue: #3B5A82; }
  .brief .wrap { max-width: none; padding: 0; }
}
