:root {
  --bg: #f3f3f1;
  --surface: #faf9f6;
  --ink: #5b5852;
  --text: #54514b;
  --muted: #b9b9b3;
  --line: rgba(91, 88, 82, 0.14);
  --panel: #111111;
  --panel-soft: #171717;
  --card: #f7f5ef;
  --shadow: 0 24px 60px rgba(25, 25, 25, 0.08);
  --font-main: "Farabee Straight", "Arial Narrow", Arial, sans-serif;
}

@font-face {
  font-family: "Farabee Straight";
  src:
    local("Farabee Straight Regular"),
    local("Farabee Straight"),
    url("./assets/fonts/Farabee font/Farabee Straight Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Farabee Straight";
  src:
    local("Farabee Straight Bold"),
    url("./assets/fonts/Farabee font/Farabee Straight Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html.is-booting {
  scroll-behavior: auto;
}

html.is-booting body {
  opacity: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
}

body.services-open {
  overflow: hidden;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.page {
  width: 100%;
  padding-bottom: 36px;
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.services-open .page {
  transform: translateX(-100vw);
}

.hero {
  --page-gutter: 24px;
  --nav-height: 84px;
  --hero-copy-width: 390px;
  --hero-brand-width: 348px;
  --hero-gap: 158px;
  --hero-copy-size: 0.96rem;
  --hero-title-size: 4.45rem;
  --top-offset: 24px;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 100vh;
  padding: 0 var(--page-gutter);
}

.hero-overlay {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  width: 100%;
  height: 0;
  padding: var(--top-offset) var(--page-gutter) 0;
  color: #ffffff;
  mix-blend-mode: difference;
  pointer-events: none;
}

.hero-overlay::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 78px;
  background: rgba(243, 243, 241, 0.94);
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}

.hero-overlay.has-surface {
  color: var(--ink);
  mix-blend-mode: normal;
}

.hero-overlay.has-surface::before {
  opacity: 1;
}

.hero-overlay.has-surface .site-logo,
.hero-overlay.has-surface .contact-phone {
  color: var(--ink);
  opacity: 0.9;
}

.site-header,
.hero-main {
  width: min(100%, 1280px);
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.site-logo,
.contact-link,
.contact-phone,
.service-link,
.service-panel-link,
.scroll-top {
  color: inherit;
  transition:
    opacity 240ms ease,
    transform 240ms ease;
}

.site-logo,
.contact-link,
.contact-phone {
  pointer-events: auto;
}

.site-logo {
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.site-contacts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 18px;
  max-width: 760px;
}

.contact-link,
.contact-phone {
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.contact-link {
  opacity: 0.9;
}

.contact-phone {
  font-weight: 700;
}

.hero-main {
  position: fixed;
  top: 52.5%;
  left: 50%;
  z-index: 8;
  display: grid;
  grid-template-columns: var(--hero-copy-width) var(--hero-brand-width);
  justify-content: center;
  align-items: center;
  column-gap: var(--hero-gap);
  width: min(calc(100% - (var(--page-gutter) * 2)), 1280px);
  margin: 0 auto;
  transform: translate(-50%, -50%);
  will-change: opacity;
  transition: opacity 220ms ease;
}

.hero-copy {
  color: inherit;
  font-size: var(--hero-copy-size);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: 0.01em;
  text-align: right;
  text-transform: uppercase;
}

.hero-copy p {
  margin: 0;
}

.hero-copy p + p {
  margin-top: 20px;
}

.hero-line {
  display: block;
  white-space: nowrap;
}

.hero-brand {
  display: flex;
  justify-content: flex-end;
}

.brand-title {
  margin: 0;
  color: inherit;
  font-size: var(--hero-title-size);
  font-weight: 700;
  line-height: 0.84;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.service-nav {
  --row-opacity: 1;
  --service-chip-bg: transparent;
  position: fixed;
  left: 50%;
  top: calc(100vh - var(--nav-height) - 24px);
  z-index: 42;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: var(--nav-height);
  padding: 0 24px;
  color: var(--ink);
  transform: translateX(-50%);
  background: transparent;
  will-change: transform, opacity;
}

.service-nav-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: center;
  width: min(calc(100% - 48px), 1280px);
  opacity: var(--row-opacity);
  transition: opacity 220ms ease;
}

.service-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: calc(var(--nav-height) - 20px);
  width: max-content;
  margin: 0 auto;
  padding: 0 12px;
  position: relative;
  background: var(--service-chip-bg);
  opacity: 0.86;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  will-change: transform, opacity;
}

.service-link-services {
  gap: 8px;
}

.service-link-arrow {
  display: inline-block;
  font-size: 0.96em;
  line-height: 1;
  transform: translateY(-1px);
}

.service-link:nth-child(1) { z-index: 6; }
.service-link:nth-child(2) { z-index: 5; }
.service-link:nth-child(3) { z-index: 4; }
.service-link:nth-child(4) { z-index: 3; }
.service-link:nth-child(5) { z-index: 2; }
.service-link:nth-child(6) { z-index: 1; }

.service-flyout {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 43;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.service-flyout.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.service-flyout-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  cursor: pointer;
  transition: color 180ms ease;
}

.service-flyout.is-dark .service-flyout-toggle {
  color: #f4f4f1;
}

.service-flyout-toggle span {
  display: block;
  width: 18px;
  height: 1.8px;
  border-radius: 999px;
  background: currentColor;
}

.service-nav-panel {
  position: absolute;
  top: calc(100% + 16px);
  right: -10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 248px;
  padding: 10px 0;
  border-radius: 20px;
  background: rgba(12, 12, 12, 0.94);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.service-flyout.is-open .service-nav-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.service-panel-link {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.service-link:hover,
.service-link:focus-visible,
.service-panel-link:hover,
.service-panel-link:focus-visible,
.site-logo:hover,
.site-logo:focus-visible,
.contact-link:hover,
.contact-link:focus-visible,
.contact-phone:hover,
.contact-phone:focus-visible {
  opacity: 1;
}

.scroll-top {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  mix-blend-mode: difference;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -14px);
}

body.services-open .scroll-top {
  opacity: 0;
  pointer-events: none;
}

.scroll-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.scroll-top-arrow {
  width: 12px;
  height: 12px;
  border-top: 1.8px solid currentColor;
  border-left: 1.8px solid currentColor;
  transform: rotate(45deg) translate(2px, 2px);
}

.portfolio {
  --portfolio-frame-x: clamp(24px, 2.6vw, 36px);
  --portfolio-frame-top: clamp(34px, 4vw, 58px);
  position: relative;
  min-height: 220vh;
  background: var(--panel);
}

.portfolio-stage {
  position: sticky;
  top: 0;
  z-index: 18;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: var(--panel);
}

.portfolio-media {
  position: absolute;
  inset: var(--portfolio-frame-top) var(--portfolio-frame-x) 0;
  overflow: hidden;
  z-index: 1;
}

.portfolio-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.portfolio-background {
  background:
    url("./assets/hero-pencil.webp") center / cover no-repeat;
  transform: scale(1.02);
  will-change: transform;
}

.portfolio-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(180deg, rgba(10, 10, 10, 0.12), rgba(10, 10, 10, 0.48)),
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.08), transparent 48%);
}

.portfolio-aside {
  display: none;
}

.portfolio-copy {
  position: absolute;
  inset: var(--portfolio-frame-top) var(--portfolio-frame-x) 0;
  z-index: 4;
  pointer-events: none;
  padding: clamp(72px, 8vw, 126px) clamp(28px, 7vw, 92px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  opacity: 0;
  will-change: transform, opacity;
}

.portfolio-index {
  display: inline-block;
  margin: 0 0 10px;
  color: rgba(244, 244, 241, 0.58);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portfolio-title {
  margin: 0;
  max-width: 11ch;
  color: rgba(244, 244, 241, 0.82);
  font-size: clamp(4rem, 8vw, 8.5rem);
  font-weight: 400;
  line-height: 0.86;
  letter-spacing: -0.02em;
  text-transform: none;
  white-space: nowrap;
  opacity: 0;
  will-change: transform, opacity;
}

.portfolio-tags {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 34px;
  align-items: flex-start;
}

.portfolio-tag {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(244, 244, 241, 0.24);
  border-radius: 999px;
  color: rgba(244, 244, 241, 0.58);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  opacity: 0;
  will-change: transform, opacity;
}

.workflow {
  position: relative;
  z-index: 6;
  min-height: 220vh;
  background: #0f0f0f;
  color: #f4f4f1;
}

.workflow-stage {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: 88px 24px 42px;
}

.workflow-head {
  width: min(100%, 1280px);
  margin: 0 auto 38px;
  text-align: center;
}

.workflow-kicker {
  margin: 0 0 14px;
  color: #daab7f;
  font-size: 0.88rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.workflow-title {
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 5.9rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  width: min(100%, 1280px);
  margin: 0 auto;
}

.workflow-card {
  --workflow-y: 140px;
  --workflow-opacity: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  container-type: inline-size;
  min-height: 420px;
  padding: 34px 32px 36px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #121212;
  color: rgba(244, 244, 241, 0.76);
  text-align: center;
  overflow: hidden;
  opacity: var(--workflow-opacity);
  transform: translate3d(0, var(--workflow-y), 0);
  transition:
    border-color 220ms ease,
    background-color 220ms ease,
    color 220ms ease,
    transform 220ms ease,
    opacity 220ms ease;
  will-change: transform, opacity;
}

.workflow-card::before,
.workflow-card::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: rgba(255, 255, 255, 0.82);
  border-style: solid;
}

.workflow-card::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.workflow-card::after {
  top: -1px;
  right: -1px;
  border-width: 2px 2px 0 0;
}

.workflow-card h3 {
  margin: 0 0 14px;
  color: #f4f4f1;
  font-size: clamp(0.92rem, 14cqw, 2.05rem);
  font-weight: 700;
  line-height: 0.96;
  text-transform: uppercase;
  white-space: nowrap;
}

.workflow-card-project {
  padding-left: 24px;
  padding-right: 24px;
}

.workflow-card-project h3 {
  font-size: clamp(0.82rem, 11.8cqw, 1.78rem);
  letter-spacing: 0.005em;
}

.workflow-card p {
  margin: 0 auto;
  max-width: 20ch;
  width: 100%;
  font-size: clamp(0.84rem, 5.2cqw, 1.04rem);
  line-height: 1.32;
  overflow-wrap: anywhere;
  word-break: normal;
}

.workflow-card:hover,
.workflow-card:focus-within,
.workflow-card-accent {
  border-color: rgba(218, 171, 127, 0.82);
  background: #1c1611;
  color: #daab7f;
  transform: translateY(-4px);
}

.workflow-card:hover h3,
.workflow-card:focus-within h3,
.workflow-card-accent h3 {
  color: #daab7f;
}

.workflow-card:hover::before,
.workflow-card:hover::after,
.workflow-card:focus-within::before,
.workflow-card:focus-within::after,
.workflow-card-accent::before,
.workflow-card-accent::after {
  border-color: #daab7f;
}

.workflow-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 132px;
  margin-bottom: 30px;
}

.workflow-icon-svg {
  display: block;
  width: 54px;
  height: 54px;
  color: currentColor;
  fill: currentColor;
  overflow: visible;
}

.workflow-card-accent .workflow-icon-svg {
  width: 56px;
  height: 56px;
}

.workflow-icon span {
  position: relative;
  display: block;
}

.icon-bulb {
  width: 24px;
  height: 24px;
  border: 3px solid currentColor;
  border-radius: 50%;
}

.icon-bulb::before,
.icon-bulb::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.icon-bulb::before {
  bottom: -9px;
  width: 8px;
  height: 10px;
  border: 3px solid currentColor;
  border-top: 0;
  border-radius: 0 0 8px 8px;
}

.icon-bulb::after {
  top: -10px;
  width: 44px;
  height: 44px;
  border: 2px dashed rgba(255, 255, 255, 0.16);
  border-radius: 50%;
}

.icon-pencil {
  width: 24px;
  height: 44px;
  border: 3px solid currentColor;
  border-radius: 14px;
}

.icon-pencil::before {
  content: "";
  position: absolute;
  top: 10px;
  right: -7px;
  width: 16px;
  height: 16px;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  transform: rotate(45deg);
}

.icon-draft {
  width: 34px;
  height: 40px;
  border: 3px solid currentColor;
  border-radius: 2px;
}

.icon-draft::before,
.icon-draft::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  height: 3px;
  background: currentColor;
}

.icon-draft::before {
  top: 10px;
}

.icon-draft::after {
  top: 22px;
}

.icon-cup {
  width: 32px;
  height: 22px;
  border: 3px solid currentColor;
  border-radius: 0 0 12px 12px;
}

.icon-cup::before,
.icon-cup::after {
  content: "";
  position: absolute;
}

.icon-cup::before {
  top: 4px;
  right: -12px;
  width: 12px;
  height: 12px;
  border: 3px solid currentColor;
  border-left: 0;
  border-radius: 0 8px 8px 0;
}

.icon-cup::after {
  left: 50%;
  bottom: -12px;
  width: 18px;
  height: 3px;
  background: currentColor;
  transform: translateX(-50%);
}

.gallery {
  --gallery-rail: clamp(210px, 16vw, 248px);
  position: relative;
  z-index: 5;
  padding: 110px 12px 0;
  background:
    linear-gradient(180deg, rgba(243, 243, 241, 0.96), rgba(243, 243, 241, 1)),
    var(--bg);
}

.partners-marquee {
  position: relative;
  z-index: 6;
  overflow: hidden;
  margin: 84px 0 -164px;
  padding: 28px 0 26px;
  background: var(--bg);
}

.partners-marquee::before,
.partners-marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 10vw;
  z-index: 2;
  pointer-events: none;
}

.partners-marquee::before {
  left: 0;
  background: linear-gradient(90deg, rgba(243, 243, 241, 1), rgba(243, 243, 241, 0));
}

.partners-marquee::after {
  right: 0;
  background: linear-gradient(270deg, rgba(243, 243, 241, 1), rgba(243, 243, 241, 0));
}

.partners-marquee-inner {
  display: flex;
  width: max-content;
  animation: partners-scroll 56s linear infinite;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  will-change: transform;
}

.partners-track {
  display: flex;
  align-items: center;
  gap: 34px;
  padding-right: 34px;
}

.partner-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 52px;
  padding: 0 10px;
  white-space: nowrap;
  color: rgba(28, 28, 28, 0.88);
}

.partner-logo img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 34px;
  width: auto;
  object-fit: contain;
  filter: grayscale(1) contrast(1.05);
  opacity: 0.9;
}

.partner-logo-wide {
  min-width: 176px;
}

.partner-logo-square {
  min-width: 92px;
}

.partner-logo-square img {
  max-height: 46px;
}

.partner-logo-vert img {
  transform: translateY(-4px);
}

@keyframes partners-scroll {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-50%, 0, 0);
  }
}

.gallery-header {
  position: sticky;
  top: 92px;
  z-index: 20;
  width: min(100%, 1660px);
  height: 210px;
  margin: 0 auto 26px;
  padding-left: var(--gallery-rail);
  pointer-events: none;
}

.gallery-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.92;
  transition: opacity 220ms ease, transform 220ms ease;
}

.gallery-filters {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  height: calc(100% - 26px);
  padding-top: 34px;
  pointer-events: none;
}

.gallery-filter {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(91, 88, 82, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition:
    background-color 220ms ease,
    color 220ms ease,
    border-color 220ms ease,
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
  white-space: nowrap;
  will-change: transform;
  pointer-events: auto;
}

.gallery-filter.is-active,
.gallery-filter:hover,
.gallery-filter:focus-visible {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}

.gallery-header.is-collapsed .gallery-kicker {
  opacity: 0.2;
  transform: translateY(-6px);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
  width: min(100%, 1660px);
  margin: 0 auto;
  padding-left: var(--gallery-rail);
}

.gallery-card {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --tilt-scale: 1;
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid rgba(91, 88, 82, 0.1);
  background: var(--card);
  box-shadow: var(--shadow);
  transform:
    perspective(1200px)
    rotateX(var(--tilt-x))
    rotateY(var(--tilt-y))
    scale(var(--tilt-scale))
    translate3d(0, 0, 0);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  contain: paint;
  transition:
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 220ms ease,
    filter 220ms ease;
}

.gallery-card.is-hovered {
  --tilt-scale: 1.012;
  will-change: transform;
}

.gallery-card.is-hidden {
  display: none;
}

.gallery-card-wide {
  grid-column: span 8;
}

.gallery-card-tall {
  min-height: 700px;
}

.gallery-card-media {
  position: relative;
  flex: 1 1 auto;
  min-height: 380px;
  background-color: #d8d4cc;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  filter: grayscale(1) saturate(0.86);
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  transition: filter 220ms ease;
}

.gallery-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.18)),
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.24), transparent 42%);
}

.media-pencil-a {
  background-image: url("./assets/hero-pencil.webp");
  background-position: 50% 40%;
}

.media-pencil-b {
  background-image: url("./assets/hero-pencil.webp");
  background-position: 35% 55%;
}

.media-wave {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.32), transparent 34%),
    linear-gradient(135deg, #c9c4bb, #8f8a81 54%, #6d675f);
}

.media-glow {
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 233, 184, 0.52), transparent 28%),
    linear-gradient(160deg, #4f4a44, #1e1d1a 58%, #0d0d0c);
}

.media-grid {
  background:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(135deg, #726c64, #3a3631);
  background-size: 38px 38px, 38px 38px, cover;
}

.media-panel {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.12), transparent 40%),
    linear-gradient(180deg, #9d988f, #5d5952 58%, #302d29);
}

.media-ai {
  background:
    radial-gradient(circle at 20% 20%, rgba(190, 223, 255, 0.34), transparent 32%),
    linear-gradient(130deg, #3a454d, #181d22 62%, #101114);
}

.media-surface {
  background:
    radial-gradient(circle at 75% 25%, rgba(255, 255, 255, 0.22), transparent 30%),
    linear-gradient(135deg, #807a71, #4d4943 52%, #292723);
}

.media-geometry {
  background:
    conic-gradient(from 160deg at 50% 50%, #8a857d, #58544e, #35322f, #8a857d);
}

.media-monitor {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%) -20px 0 / 40px 40px,
    linear-gradient(225deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%) -20px 0 / 40px 40px,
    linear-gradient(315deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%) 0 0 / 40px 40px,
    linear-gradient(45deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%) 0 0 / 40px 40px,
    linear-gradient(130deg, #4c4f54, #191a1d 58%, #0f1012);
}

.gallery-card-body {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  padding: 26px 26px 28px;
  background: rgba(247, 245, 239, 0.96);
}

.gallery-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.gallery-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: rgba(91, 88, 82, 0.68);
  flex: 0 0 auto;
}

.gallery-card-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery-card:hover .gallery-card-media,
.gallery-card:focus-within .gallery-card-media,
.gallery-card.is-hovered .gallery-card-media {
  filter: grayscale(0) saturate(1);
}

.gallery-card-type {
  display: inline-block;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gallery-card h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: clamp(2rem, 2.8vw, 3.3rem);
  font-weight: 700;
  line-height: 0.96;
  text-transform: uppercase;
}

.gallery-card p {
  margin: 0;
  max-width: 40ch;
  color: rgba(84, 81, 75, 0.88);
  font-size: 1.12rem;
  line-height: 1.42;
}

.gallery-card-stages {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  padding-top: 18px;
}

.gallery-stage {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid rgba(91, 88, 82, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  color: rgba(91, 88, 82, 0.72);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.gallery-stage.is-active {
  border-color: rgba(218, 171, 127, 0.44);
  background: rgba(218, 171, 127, 0.18);
  color: #8f6842;
}

.services-view {
  position: fixed;
  inset: 0;
  z-index: 90;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 420ms ease;
}

body.services-open .services-view {
  opacity: 1;
  pointer-events: auto;
}

.services-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 12, 0.02);
}

.services-panel {
  --services-back-rail: 100px;
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 22px 28px 24px var(--services-back-rail);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(18, 18, 18, 0.985), rgba(10, 10, 10, 0.99)),
    var(--panel);
  color: #f4f4f1;
  box-shadow: none;
  transform: translateX(100vw);
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.services-open .services-panel {
  transform: translateX(0);
}

.services-close {
  position: absolute;
  top: 28px;
  right: 30px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f4f4f1;
  cursor: pointer;
}

.services-back-arrow {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 100px;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(244, 244, 241, 0.92);
  cursor: pointer;
  z-index: 2;
  transform: none;
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.services-back-arrow span {
  display: block;
  margin-left: 42px;
  width: 16px;
  height: 16px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.services-back-arrow:hover,
.services-back-arrow:focus-visible {
  opacity: 1;
  transform: translateX(-3px);
}

.services-close span {
  position: absolute;
  top: 17px;
  left: 6px;
  width: 24px;
  height: 1.8px;
  border-radius: 999px;
  background: currentColor;
}

.services-close span:first-child {
  transform: rotate(45deg);
}

.services-close span:last-child {
  transform: rotate(-45deg);
}

.services-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  max-width: 1120px;
  padding-right: 56px;
}

.services-tab {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(244, 244, 241, 0.18);
  border-radius: 999px;
  background: transparent;
  color: rgba(244, 244, 241, 0.62);
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    color 220ms ease;
}

.services-tab.is-active,
.services-tab:hover,
.services-tab:focus-visible {
  background: #f4f4f1;
  border-color: #f4f4f1;
  color: #101010;
}

.services-stage {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.services-panel.is-compact-mode,
.services-view.is-quotes-mode .services-panel {
  gap: 12px;
  padding-top: 14px;
}

.services-view.is-quotes-mode .services-tabs {
  max-width: none;
}

.services-stage > .services-detail {
  display: none !important;
  width: 100%;
  max-width: none;
  min-height: 0;
  text-align: left;
}

.services-stage > .services-detail[hidden] {
  display: none !important;
}

.services-stage > .services-detail.is-active {
  display: flex !important;
  flex: 1 1 auto;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding-right: 8px;
}

.services-stage > .services-detail.services-detail-viewer {
  max-width: none;
}

.services-stage > .services-detail.services-detail-quotes {
  max-width: none;
}

.services-stage > .services-detail.services-detail-address {
  max-width: none;
}

.services-stage > .services-detail.services-detail-nest {
  max-width: none;
}

.services-stage > .services-detail.services-detail-viewer.is-active {
  overflow: visible;
  padding-right: 0;
}

.services-stage > .services-detail.services-detail-quotes.is-active {
  overflow: hidden;
  padding-right: 0;
}

.services-stage > .services-detail.services-detail-address.is-active {
  overflow: visible;
  padding-right: 0;
}

.services-stage > .services-detail.services-detail-nest.is-active {
  overflow: hidden;
  padding-right: 0;
}

.services-detail-viewer {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  height: 100%;
  text-align: left;
}

.services-detail-address {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  height: 100%;
  text-align: left;
}

.services-detail-nest {
  display: grid;
  gap: 20px;
  align-content: start;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding-bottom: 0;
}

.services-detail-nest .services-detail-kicker {
  position: static;
  width: auto;
  margin: 0;
}

.services-detail-nest .services-detail-lead {
  max-width: 84ch;
}

.nest-shell {
  display: grid;
  gap: 14px;
  width: 100%;
  height: 100%;
  min-height: 0;
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

.nest-topbar,
.nest-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nest-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.nest-action {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(218, 171, 127, 0.28);
  background: rgba(218, 171, 127, 0.08);
  color: #f4f4f1;
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nest-action-soft {
  border-color: rgba(244, 244, 241, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(244, 244, 241, 0.82);
}

.nest-dropzone {
  display: grid;
  gap: 6px;
  width: 100%;
  min-height: 94px;
  padding: 18px 20px;
  border: 1px dashed rgba(218, 171, 127, 0.42);
  background:
    linear-gradient(135deg, rgba(218, 171, 127, 0.12), rgba(255,255,255,0.025)),
    rgba(255,255,255,0.025);
  color: rgba(244, 244, 241, 0.78);
  text-align: left;
  cursor: pointer;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.nest-dropzone strong {
  color: #f4f4f1;
  font-size: 1.05rem;
  line-height: 1.18;
}

.nest-dropzone span {
  max-width: 78ch;
  font-size: 0.82rem;
  line-height: 1.35;
}

.nest-dropzone-kicker {
  color: rgba(218, 171, 127, 0.84);
  font-size: 0.68rem !important;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nest-shell.has-parts .nest-dropzone {
  min-height: 54px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.nest-shell.has-parts .nest-dropzone strong {
  font-size: 0.9rem;
}

.nest-shell.has-parts .nest-dropzone > span:last-child {
  display: none;
}

.nest-dropzone.is-dragover,
.nest-dropzone:hover,
.nest-dropzone:focus-visible {
  border-color: rgba(218, 171, 127, 0.86);
  background-color: rgba(218, 171, 127, 0.12);
  transform: translateY(-1px);
}

.nest-control,
.nest-toggle {
  display: grid;
  gap: 8px;
  min-width: 148px;
  padding: 12px 14px;
  border: 1px solid rgba(244, 244, 241, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.nest-control span,
.nest-toggle span {
  color: rgba(244, 244, 241, 0.48);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.nest-control input {
  width: 100%;
  border: 0;
  background: transparent;
  color: #f4f4f1;
  font: inherit;
  font-size: 0.96rem;
  outline: none;
}

.nest-toggle {
  display: flex;
  align-items: center;
  align-content: center;
  gap: 10px;
  min-height: 68px;
}

.nest-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #daab7f;
}

.nest-rotation-settings {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(244, 244, 241, 0.1);
  background: rgba(255, 255, 255, 0.025);
  min-width: 0;
}

.nest-rotation-head {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #f4f4f1;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nest-rotation-icon {
  color: rgba(218, 171, 127, 0.9);
  font-size: 0.9rem;
}

.nest-rotation-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.nest-rotation-option {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-height: 46px;
  padding: 7px;
  border: 1px solid rgba(244, 244, 241, 0.1);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
}

.nest-rotation-option input,
.nest-fixed-mode input,
.nest-angle-grid input {
  accent-color: #daab7f;
}

.nest-rotation-option input {
  order: 3;
  margin: 0;
}

.nest-rotation-option.is-active {
  border-color: rgba(218, 171, 127, 0.86);
  background: rgba(218, 171, 127, 0.12);
}

.nest-rotation-glyph {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(244, 244, 241, 0.12);
  color: rgba(218, 171, 127, 0.9);
  font-size: 0.82rem;
  line-height: 1;
}

.nest-rotation-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.nest-rotation-copy strong {
  color: #f4f4f1;
  font-size: 0.7rem;
  line-height: 1.15;
}

.nest-rotation-copy small {
  color: rgba(244, 244, 241, 0.52);
  font-size: 0.62rem;
  line-height: 1.18;
}

.nest-rotation-advanced {
  border-top: 1px solid rgba(244, 244, 241, 0.1);
  padding-top: 6px;
}

.nest-rotation-advanced summary {
  cursor: pointer;
  color: rgba(244, 244, 241, 0.78);
  font-size: 0.68rem;
  font-weight: 700;
}

.nest-fixed-mode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  color: rgba(244, 244, 241, 0.74);
  font-size: 0.68rem;
  font-weight: 700;
}

.nest-fixed-mode.is-active {
  color: #f4f4f1;
}

.nest-angle-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nest-angle-grid label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 7px;
  border: 1px solid rgba(244, 244, 241, 0.12);
  background: rgba(255, 255, 255, 0.025);
  color: rgba(244, 244, 241, 0.76);
  font-size: 0.66rem;
  font-weight: 700;
  cursor: pointer;
}

.nest-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 380px);
  gap: 14px;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.nest-stage,
.nest-card {
  border: 1px solid rgba(244, 244, 241, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.nest-stage {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.nest-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(244, 244, 241, 0.08);
}

.nest-stage-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.nest-status,
.nest-scale {
  color: rgba(244, 244, 241, 0.52);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nest-stage-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 360px;
}

.nest-stage-metric {
  display: grid;
  gap: 3px;
  min-width: 82px;
  padding: 8px 10px;
  border: 1px solid rgba(244, 244, 241, 0.08);
  background: rgba(255,255,255,0.025);
}

.nest-stage-metric span {
  color: rgba(244, 244, 241, 0.42);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nest-stage-metric strong {
  color: #f4f4f1;
  font-size: 0.9rem;
  line-height: 1;
}

.nest-busy {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(218, 171, 127, 0.22);
  background: rgba(218, 171, 127, 0.12);
  color: rgba(244, 244, 241, 0.78);
}

.nest-busy[hidden] {
  display: none;
}

.nest-busy strong {
  color: #f4f4f1;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nest-busy [data-nest-busy-detail] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.76rem;
}

.nest-busy-cancel {
  height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(244, 244, 241, 0.18);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(244, 244, 241, 0.84);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.nest-busy-cancel:hover,
.nest-busy-cancel:focus-visible {
  border-color: rgba(218, 171, 127, 0.65);
  color: #f4f4f1;
}

.nest-busy-spinner {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid rgba(244, 244, 241, 0.22);
  border-top-color: #daab7f;
  border-radius: 50%;
  animation: nest-busy-spin 760ms linear infinite;
}

.nest-busy-progress {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(244, 244, 241, 0.12);
}

.nest-busy-progress span {
  display: block;
  width: var(--nest-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #daab7f, #f4f4f1);
  transition: width 180ms ease;
}

@keyframes nest-busy-spin {
  to {
    transform: rotate(360deg);
  }
}

.nest-canvas {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)),
    #171717;
}

.nest-svg {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.nest-grid {
  opacity: 0.35;
}

.nest-sheet {
  fill: rgba(224, 213, 202, 0.04);
  stroke: rgba(218, 171, 127, 0.48);
  stroke-width: 2;
}

.nest-sheet-label {
  fill: rgba(244, 244, 241, 0.42);
  font-family: var(--font-main);
  font-size: 22px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nest-part {
  cursor: grab;
}

.nest-part:active {
  cursor: grabbing;
}

.nest-part-hitbox {
  fill: transparent;
  stroke: none;
  pointer-events: all;
}

.nest-part.is-selected .nest-part-outline {
  stroke: #f4f4f1;
  stroke-width: 3;
  opacity: 1;
}

.nest-part-outline {
  fill: none;
  stroke: rgba(218, 171, 127, 0.24);
  stroke-width: 2;
  opacity: 0;
}

.nest-part.is-queued .nest-part-outline {
  stroke: rgba(244, 244, 241, 0.22);
  stroke-dasharray: 16 10;
  opacity: 1;
}

.nest-part-label {
  display: none;
}

.nest-part-filetype {
  display: none;
}

.nest-part-preview path,
.nest-part-preview line,
.nest-part-preview polyline,
.nest-part-preview polygon,
.nest-part-preview circle,
.nest-part-preview ellipse,
.nest-part-preview rect {
  fill: none;
  stroke: rgba(244, 244, 241, 0.72);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.nest-part-preview text {
  display: none;
}

.nest-canvas {
  cursor: grab;
}

.nest-canvas:active {
  cursor: grabbing;
}

.nest-side {
  display: grid;
  gap: 12px;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}

.nest-card {
  padding: 16px;
  min-width: 0;
}

.nest-card h3 {
  margin: 0 0 12px;
  color: #f4f4f1;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nest-card-accent {
  border-color: rgba(218, 171, 127, 0.44);
  background: rgba(218, 171, 127, 0.06);
}

.nest-side .nest-card-accent {
  display: grid;
  grid-column: 1 / -1;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.nest-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.nest-stat {
  padding: 12px 14px;
  border: 1px solid rgba(244, 244, 241, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.nest-stat span {
  display: block;
  margin-bottom: 6px;
  color: rgba(244, 244, 241, 0.48);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nest-stat strong {
  color: #f4f4f1;
  font-size: 1rem;
  font-weight: 700;
}

.nest-parts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  max-height: none;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
  min-width: 0;
}

.nest-parts-empty {
  margin: 0;
  color: rgba(244, 244, 241, 0.54);
  font-size: 0.88rem;
  line-height: 1.35;
}

.nest-part-item {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  flex: 0 0 auto;
  padding: 12px 14px;
  border: 1px solid rgba(244, 244, 241, 0.08);
  background: rgba(255,255,255,0.02);
  min-width: 0;
  overflow: hidden;
  contain: layout paint;
}

.nest-part-thumb {
  display: grid;
  place-items: center;
  width: 86px;
  aspect-ratio: 1;
  border: 1px solid rgba(244, 244, 241, 0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012)),
    rgba(0,0,0,0.12);
  overflow: hidden;
}

.nest-part-thumb svg {
  width: calc(100% - 14px);
  height: calc(100% - 14px);
  overflow: hidden;
}

.nest-part-thumb-preview path,
.nest-part-thumb-preview line,
.nest-part-thumb-preview polyline,
.nest-part-thumb-preview polygon,
.nest-part-thumb-preview circle,
.nest-part-thumb-preview ellipse,
.nest-part-thumb-preview rect,
.nest-part-thumb-box,
.nest-part-thumb-diagonal {
  fill: none;
  stroke: rgba(244, 244, 241, 0.82);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.nest-part-thumb-preview text {
  display: none;
}

.nest-part-thumb.is-queued {
  border-style: dashed;
}

.nest-part-thumb.is-queued .nest-part-thumb-box,
.nest-part-thumb.is-queued .nest-part-thumb-diagonal {
  stroke: rgba(218, 171, 127, 0.68);
  stroke-dasharray: 10 8;
}

.nest-part-content {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.nest-part-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.nest-part-name {
  color: #f4f4f1;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.nest-part-meta {
  color: rgba(244, 244, 241, 0.52);
  font-size: 0.76rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.nest-part-state {
  color: rgba(218, 171, 127, 0.82);
}

.nest-part-angle {
  color: rgba(244, 244, 241, 0.72);
}

.nest-part-controls {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.nest-part-qty-field {
  display: grid;
  grid-template-columns: auto minmax(56px, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.nest-part-qty-field span {
  color: rgba(244, 244, 241, 0.48);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nest-part-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.nest-part-qty {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid rgba(244, 244, 241, 0.12);
  background: rgba(255,255,255,0.02);
  color: #f4f4f1;
  font: inherit;
  outline: none;
}

.nest-part-button {
  flex: 1 1 58px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(244, 244, 241, 0.12);
  background: transparent;
  color: rgba(244,244,241,0.82);
  cursor: pointer;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nest-part-button.is-danger {
  border-color: rgba(255, 120, 120, 0.22);
  color: rgba(255, 180, 180, 0.88);
}

.nest-part-button:hover,
.nest-part-button:focus-visible,
.nest-action:hover,
.nest-action:focus-visible,
.nest-action-soft:hover,
.nest-action-soft:focus-visible {
  border-color: rgba(218, 171, 127, 0.58);
  background: rgba(218, 171, 127, 0.12);
  color: #f4f4f1;
}

.nest-part-qty:focus,
.nest-control input:focus {
  outline: 1px solid rgba(218, 171, 127, 0.52);
  outline-offset: 0;
}

.services-detail-viewer h2 {
  display: none;
}

.services-detail-viewer .services-detail-kicker,
.services-detail-viewer .services-detail-lead {
  display: none;
}

.services-stage > .services-detail > .services-detail-kicker,
.services-stage > .services-detail > h2,
.services-stage > .services-detail > .services-detail-lead {
  display: none !important;
}

.services-detail-kicker {
  position: absolute;
  top: -132px;
  right: 78px;
  display: grid;
  gap: 4px;
  width: 248px;
  margin: 0;
  color: rgba(244, 244, 241, 0.46);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-align: left;
  line-height: 1.1;
  text-transform: uppercase;
  z-index: 2;
}

.services-detail h2 {
  margin: 0 0 24px;
  font-size: clamp(2.4rem, 5vw, 5.2rem);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.services-detail p {
  margin: 0;
  max-width: 48ch;
  color: rgba(244, 244, 241, 0.82);
  font-size: 0.96rem;
  line-height: 1.34;
}

.services-detail-viewer .services-detail-lead {
  position: absolute;
  top: -108px;
  right: 78px;
  width: 248px;
  margin: 0;
  max-width: 248px;
  color: rgba(244, 244, 241, 0.72);
  font-size: 0.8rem;
  line-height: 1.22;
  z-index: 2;
}

.services-viewer {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: 160px minmax(0, 1fr) 280px;
  gap: 16px;
  align-items: stretch;
  min-height: 0;
  height: min(680px, calc(100vh - 176px));
  max-height: calc(100vh - 176px);
}

.services-viewer-tools,
.services-viewer-stage,
.services-side-card {
  border: 1px solid rgba(244, 244, 241, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.services-viewer-tools {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  padding: 14px;
}

.services-viewer-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.services-tool {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(244, 244, 241, 0.12);
  background: transparent;
  color: rgba(244, 244, 241, 0.72);
  text-align: left;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.services-tool-summary {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(244, 244, 241, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.services-tool-summary-label,
.services-tool-summary-value {
  display: block;
  text-transform: uppercase;
}

.services-tool-summary-label {
  color: rgba(244, 244, 241, 0.48);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.services-tool-summary-value {
  color: #f4f4f1;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}

.services-tool.is-active,
.services-tool:hover,
.services-tool:focus-visible {
  border-color: rgba(218, 171, 127, 0.58);
  background: rgba(218, 171, 127, 0.12);
  color: #f4f4f1;
}

.services-viewer-stage {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.services-viewer-stage.is-split-mode .measure-outline {
  stroke: rgba(218, 171, 127, 0.42);
}

.services-viewer-stage.is-split-mode .measure-label {
  fill: rgba(244, 244, 241, 0.74);
}

.services-viewer-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid rgba(244, 244, 241, 0.08);
}

.services-viewer-meta,
.services-viewer-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.services-viewer-actions {
  margin-left: auto;
  justify-content: flex-end;
}

.services-viewer-hint {
  color: rgba(244, 244, 241, 0.44);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.services-viewer-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(244, 244, 241, 0.12);
  border-radius: 999px;
  color: rgba(244, 244, 241, 0.64);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.services-viewer-meta .services-viewer-pill:last-of-type {
  display: none;
}

.services-viewer-unit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(244, 244, 241, 0.12);
  border-radius: 999px;
}

.services-viewer-unit-label {
  color: rgba(244, 244, 241, 0.48);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.services-viewer-unit-select {
  border: 0;
  background: transparent;
  color: rgba(244, 244, 241, 0.84);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  outline: none;
}

.services-viewer-unit-select option {
  color: #101010;
}

.services-viewer-action {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(244, 244, 241, 0.12);
  background: transparent;
  color: rgba(244, 244, 241, 0.74);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.services-viewer-action-reset {
  min-width: 74px;
}

.services-viewer-action:not(.services-viewer-action-reset) {
  display: none;
}

.services-viewer-action:hover,
.services-viewer-action:focus-visible {
  border-color: rgba(218, 171, 127, 0.58);
  background: rgba(218, 171, 127, 0.12);
  color: #f4f4f1;
}

.services-canvas {
  position: relative;
  flex: 1 1 auto;
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: none;
  background:
    radial-gradient(circle at 50% 100%, rgba(218, 171, 127, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}

.services-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.18;
  pointer-events: none;
}

.services-canvas-hud {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  color: rgba(244, 244, 241, 0.52);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.services-drawing {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.services-upload-layer {
  opacity: 0.88;
}

.services-upload-layer * {
  vector-effect: non-scaling-stroke;
}

.services-viewer.has-uploaded-drawing [data-viewer-base-art] {
  display: none;
}

.services-viewer.has-uploaded-drawing .services-upload-layer {
  opacity: 1;
}

.measure-outline {
  fill: rgba(255, 255, 255, 0.02);
  stroke: rgba(244, 244, 241, 0.18);
  stroke-width: 1.5;
  pointer-events: none;
}

.measure-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 28;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: stroke;
}

.measure-segment,
.measure-curve {
  fill: none;
  stroke: rgba(218, 171, 127, 0.72);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 180ms ease, stroke-width 180ms ease;
}

.measure-label {
  fill: rgba(244, 244, 241, 0.42);
  font-family: var(--font-main);
  font-size: 14px;
  letter-spacing: 0.08em;
  dominant-baseline: middle;
  text-transform: uppercase;
  pointer-events: none;
  transition: fill 180ms ease, opacity 180ms ease;
}

.measure-label-vertical {
  letter-spacing: 0.06em;
}

.measure-radius-line {
  fill: none;
  stroke: rgba(244, 244, 241, 0.34);
  stroke-width: 1.6;
  stroke-linecap: round;
}

.measure-radius-node {
  fill: #daab7f;
  opacity: 0.92;
  pointer-events: none;
}

.measure-group:hover .measure-segment,
.measure-group:hover .measure-curve {
  stroke: #f4f4f1;
  stroke-width: 3;
}

.measure-group:hover .measure-label,
.measure-radius:hover .measure-label {
  fill: #f4f4f1;
}

.measure-node circle {
  fill: #daab7f;
  opacity: 0.9;
  pointer-events: none;
}

.ruler-overlay {
  pointer-events: none;
}

.ruler-line {
  fill: none;
  stroke: #f4f4f1;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 6 6;
}

.ruler-point {
  fill: #daab7f;
  stroke: #0f0f0f;
  stroke-width: 2;
  pointer-events: all;
}

.ruler-label {
  fill: #f4f4f1;
  font-family: var(--font-main);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-anchor: middle;
}

.services-viewer-side {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
}

.services-side-card {
  padding: 16px;
}

.services-side-card h3 {
  margin: 0 0 12px;
  color: #f4f4f1;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.services-side-card p {
  margin: 0;
  max-width: none;
  color: rgba(244, 244, 241, 0.76);
  font-size: 0.94rem;
  line-height: 1.4;
}

.services-side-card-accent {
  border-color: rgba(218, 171, 127, 0.44);
  background: rgba(218, 171, 127, 0.08);
}

.services-side-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.services-side-list li {
  color: rgba(244, 244, 241, 0.76);
  font-size: 0.92rem;
  line-height: 1.34;
}

.services-tool-transfer {
  order: 99;
  border-color: rgba(218, 171, 127, 0.36);
  color: rgba(244, 244, 241, 0.9);
}

.address-tool {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 270px;
  gap: 16px;
  align-items: stretch;
  min-height: 0;
  height: min(700px, calc(100vh - 176px));
  max-height: calc(100vh - 176px);
}

.address-sidebar,
.address-side-info {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 0;
}

.address-card,
.address-preview-shell {
  border: 1px solid rgba(244, 244, 241, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.address-card {
  padding: 16px;
}

.address-card h3,
.address-preview-head h3 {
  margin: 0 0 12px;
  color: #f4f4f1;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.address-card p {
  max-width: none;
  color: rgba(244, 244, 241, 0.76);
  font-size: 0.92rem;
  line-height: 1.42;
}

.address-card-accent {
  border-color: rgba(218, 171, 127, 0.42);
  background: rgba(218, 171, 127, 0.08);
}

.address-fields,
.address-actions,
.address-stats,
.address-toggles {
  display: grid;
  gap: 10px;
}

.address-fields-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.address-field span,
.address-stat span,
.address-preview-kicker {
  display: block;
  margin-bottom: 7px;
  color: rgba(244, 244, 241, 0.48);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.address-field input {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(244, 244, 241, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: #f4f4f1;
  font: inherit;
  outline: none;
}

.address-field input:focus {
  border-color: rgba(218, 171, 127, 0.52);
}

.address-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(244, 244, 241, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(244, 244, 241, 0.84);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.address-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #daab7f;
}

.address-action {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(218, 171, 127, 0.34);
  background: rgba(218, 171, 127, 0.1);
  color: #f4f4f1;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.address-action-soft {
  border-color: rgba(244, 244, 241, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(244, 244, 241, 0.82);
}

.address-action:hover,
.address-action:focus-visible {
  border-color: rgba(218, 171, 127, 0.58);
  background: rgba(218, 171, 127, 0.16);
  color: #f4f4f1;
}

.address-preview-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.address-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  padding: 16px 18px 0;
}

.address-preview-head h3 {
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.address-preview-kicker {
  margin-bottom: 10px;
}

.address-status {
  max-width: 280px;
  color: rgba(244, 244, 241, 0.72);
  font-size: 0.8rem;
  line-height: 1.4;
}

.address-preview-stage {
  position: relative;
  min-height: 0;
  padding: 16px 18px 18px;
}

.address-preview-stage::before {
  content: "";
  position: absolute;
  inset: 16px 18px 18px;
  background:
    radial-gradient(circle at 50% 100%, rgba(218, 171, 127, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  pointer-events: none;
}

.address-preview-stage::after {
  content: "";
  position: absolute;
  inset: 16px 18px 18px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.18;
  pointer-events: none;
}

.address-preview {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.address-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.address-stat {
  padding: 12px 14px;
  border: 1px solid rgba(244, 244, 241, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.address-stat strong {
  color: #f4f4f1;
  font-size: 1rem;
  font-weight: 700;
}

.address-svg-base {
  fill: rgba(255, 255, 255, 0.03);
  stroke: rgba(244, 244, 241, 0.5);
  stroke-width: 2;
}

.address-svg-street-plate {
  fill: rgba(217, 108, 80, 0.08);
  stroke: rgba(255, 116, 82, 0.92);
  stroke-width: 2;
}

.address-svg-number,
.address-svg-street,
.address-svg-prefix {
  fill: none;
  stroke: rgba(255, 116, 82, 0.96);
  stroke-width: 1.8;
  paint-order: stroke;
}

.address-svg-number {
  stroke-width: 2.2;
}

.address-svg-prefix {
  stroke-width: 1.4;
  opacity: 0.92;
}

.address-svg-bridge {
  fill: rgba(217, 108, 80, 0.14);
  stroke: rgba(107, 186, 255, 0.92);
  stroke-width: 1.2;
}

.address-svg-hole {
  fill: rgba(15, 15, 15, 0.96);
}

.address-svg-hole-guide {
  fill: none;
  stroke: rgba(244, 244, 241, 0.28);
  stroke-width: 1;
  stroke-dasharray: 6 5;
}

.address-svg-mount {
  fill: rgba(15, 15, 15, 0.96);
}

.address-svg-mount-ring {
  fill: none;
  stroke: rgba(244, 244, 241, 0.26);
  stroke-width: 1;
}

.address-svg-handle {
  fill: transparent;
  cursor: grab;
}

.address-svg-handle.is-dragging {
  cursor: grabbing;
}

.address-svg-legend {
  fill: rgba(244, 244, 241, 0.48);
  font-family: var(--font-main);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.address-svg-guide {
  fill: none;
  stroke: rgba(244, 244, 241, 0.1);
  stroke-width: 1;
  stroke-dasharray: 8 8;
}

@media (max-width: 1380px) {
  .address-tool {
    grid-template-columns: 260px minmax(0, 1fr);
    height: auto;
    max-height: none;
  }

  .address-side-info {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .address-preview-shell {
    min-height: 520px;
  }
}

@media (max-width: 980px) {
  .address-tool {
    grid-template-columns: 1fr;
  }

  .address-sidebar,
  .address-side-info {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .address-preview-shell,
  .address-side-info {
    grid-column: auto;
  }
}

@media (max-width: 700px) {
  .address-sidebar,
  .address-side-info,
  .address-fields-compact,
  .address-stats {
    grid-template-columns: 1fr;
  }

  .address-preview-head {
    flex-direction: column;
  }

  .address-status {
    max-width: none;
  }

  .address-preview-shell {
    min-height: 420px;
  }
}

.quotes-fit-shell {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.quotes-calculator {
  display: grid;
  grid-template-columns: minmax(272px, 292px) minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  transform: none;
}

.quotes-rail,
.quotes-body,
.quotes-main,
.quotes-side {
  min-width: 0;
  min-height: 0;
}

.quotes-rail {
  display: grid;
  grid-template-rows: auto auto auto auto;
  gap: 12px;
  align-content: start;
  overflow: auto;
  padding-right: 2px;
}

.quotes-body {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
}

.quotes-toolbar,
.quotes-meta,
.quotes-metrics,
.quotes-coeffs,
.quotes-summary {
  display: grid;
  gap: 10px;
}

.quotes-toolbar {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  min-height: 0;
  padding: 12px 14px;
  border: 1px solid rgba(244, 244, 241, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.02);
}

.quotes-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.quotes-toolbar-copy {
  display: none;
}

.quotes-toolbar-copy p {
  max-width: none;
  color: rgba(244, 244, 241, 0.74);
  font-size: 0.78rem;
  line-height: 1.25;
  margin: 0;
}

.quotes-scenarios {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: start;
  padding: 12px;
  border: 1px solid rgba(244, 244, 241, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.quotes-scenario {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(244, 244, 241, 0.12);
  border-radius: 999px;
  background: transparent;
  color: rgba(244, 244, 241, 0.68);
  cursor: pointer;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

.quotes-scenario.is-active,
.quotes-scenario:hover,
.quotes-scenario:focus-visible {
  border-color: rgba(218, 171, 127, 0.52);
  background: rgba(218, 171, 127, 0.12);
  color: #f4f4f1;
}

.quotes-apply {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(218, 171, 127, 0.32);
  background: rgba(218, 171, 127, 0.1);
  color: #f4f4f1;
  font: inherit;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.quotes-apply-soft {
  border-color: rgba(244, 244, 241, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(244, 244, 241, 0.82);
}

.quotes-import-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.quotes-metrics,
.quotes-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.quotes-coeffs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
}

.quotes-meta {
  grid-template-columns: 1fr;
  align-content: start;
}

.quotes-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.quotes-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.quotes-metric-card,
.quotes-meta-field,
.quotes-coeff,
.quotes-summary-card {
  padding: 10px 11px;
  border: 1px solid rgba(244, 244, 241, 0.08);
  background: rgba(255, 255, 255, 0.025);
  min-height: 0;
  transition:
    border-color 180ms ease,
    background-color 180ms ease;
}

.quotes-meta-field:focus-within,
.quotes-coeff:focus-within,
.quotes-summary-card:hover,
.quotes-metric-card:hover,
.quotes-option:hover {
  border-color: rgba(218, 171, 127, 0.22);
  background: rgba(255, 255, 255, 0.04);
}

.quotes-metric-label,
.quotes-meta-field span,
.quotes-coeff span,
.quotes-summary-card span {
  display: block;
  margin-bottom: 6px;
  color: rgba(244, 244, 241, 0.48);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.quotes-coeff {
  display: grid;
  align-content: space-between;
  gap: 8px;
  min-height: 88px;
}

.quotes-coeff span {
  margin-bottom: 0;
  font-size: 0.54rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
  word-break: normal;
  text-wrap: balance;
}

.quotes-coeff input {
  min-width: 0;
  line-height: 1;
}

.quotes-metric-value,
.quotes-summary-card strong {
  color: #f4f4f1;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.quotes-metric-card-accent {
  border-color: rgba(218, 171, 127, 0.22);
  background: rgba(218, 171, 127, 0.08);
}

.quotes-metric-card-accent .quotes-metric-value {
  color: #f2c79f;
}

.quotes-meta-field input {
  width: 100%;
  min-height: 28px;
  border: 0;
  background: transparent;
  color: #f4f4f1;
  font: inherit;
  font-size: 0.8rem;
  outline: none;
}

.quotes-coeff input {
  width: 100%;
  border: 0;
  background: transparent;
  color: #f4f4f1;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
  outline: none;
}

.quotes-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(244, 244, 241, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(244, 244, 241, 0.84);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition:
    border-color 180ms ease,
    background-color 180ms ease;
}

.quotes-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #daab7f;
}

.quotes-main-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 0 2px;
}

.quotes-main-tab {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(244, 244, 241, 0.12);
  background: transparent;
  color: rgba(244, 244, 241, 0.72);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.quotes-main-tab.is-active,
.quotes-main-tab:hover,
.quotes-main-tab:focus-visible {
  border-color: rgba(218, 171, 127, 0.52);
  background: rgba(218, 171, 127, 0.12);
  color: #f4f4f1;
}

.quotes-grid {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.quotes-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(250px, 0.7fr);
  gap: 12px;
  align-items: start;
  min-height: 0;
  overflow: hidden;
}

.quotes-main {
  display: grid;
  gap: 12px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.quotes-side {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
}

.quotes-side-tabs {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.quotes-side-tab {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(244, 244, 241, 0.12);
  background: transparent;
  color: rgba(244, 244, 241, 0.72);
  font: inherit;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.quotes-side-tab.is-active,
.quotes-side-tab:hover,
.quotes-side-tab:focus-visible {
  border-color: rgba(218, 171, 127, 0.52);
  background: rgba(218, 171, 127, 0.12);
  color: #f4f4f1;
}

.quotes-section {
  display: none;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(244, 244, 241, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.quotes-section.is-active {
  display: grid;
}

.quotes-section-head {
  padding: 10px 10px 0;
}

.quotes-section-head h3 {
  margin: 0;
  color: #f4f4f1;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quotes-section-head p {
  display: none;
  margin-top: 6px;
  max-width: none;
  color: rgba(244, 244, 241, 0.62);
  font-size: 0.72rem;
  line-height: 1.32;
}

.quotes-table-wrap {
  min-height: 0;
  overflow: auto;
  padding: 8px 10px 10px;
}

.quotes-table-actions {
  display: flex;
  justify-content: flex-start;
  padding: 0 10px 10px;
}

.quotes-table-add,
.quotes-table-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(244, 244, 241, 0.14);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(244, 244, 241, 0.82);
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

.quotes-table-add:hover,
.quotes-table-add:focus-visible,
.quotes-table-remove:hover,
.quotes-table-remove:focus-visible {
  border-color: rgba(218, 171, 127, 0.42);
  background: rgba(218, 171, 127, 0.08);
  color: #f4f4f1;
}

.quotes-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 754px;
}

.quotes-table th:nth-child(1),
.quotes-table td:nth-child(1) { width: 34px; }
.quotes-table th:nth-child(2),
.quotes-table td:nth-child(2) { width: 21%; }
.quotes-table th:nth-child(3),
.quotes-table td:nth-child(3) { width: 21%; }
.quotes-table th:nth-child(4),
.quotes-table td:nth-child(4) { width: 9%; }
.quotes-table th:nth-child(5),
.quotes-table td:nth-child(5) { width: 8%; }
.quotes-table th:nth-child(6),
.quotes-table td:nth-child(6) { width: 10%; }
.quotes-table th:nth-child(7),
.quotes-table td:nth-child(7) { width: 12%; }
.quotes-table th:nth-child(8),
.quotes-table td:nth-child(8) { width: 9%; }
.quotes-table th:nth-child(9),
.quotes-table td:nth-child(9) { width: 9%; }

.quotes-table th,
.quotes-table td {
  padding: 4px 5px;
  border-bottom: 1px solid rgba(244, 244, 241, 0.08);
  text-align: left;
  vertical-align: middle;
}

.quotes-table th {
  color: rgba(244, 244, 241, 0.46);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: sticky;
  top: 0;
  z-index: 1;
  background: #151515;
}

.quotes-table td {
  color: rgba(244, 244, 241, 0.86);
  font-size: 0.68rem;
  line-height: 1.18;
}

.quotes-table-action-col,
.quotes-table td:first-child {
  text-align: center;
}

.quotes-table td:nth-child(2),
.quotes-table td:nth-child(3) {
  word-break: break-word;
}

.quotes-table tbody tr:last-child td {
  border-bottom: 0;
}

.quotes-table input {
  width: 100%;
  min-height: 26px;
  padding: 0 6px;
  border: 1px solid rgba(244, 244, 241, 0.12);
  background: rgba(255, 255, 255, 0.02);
  color: #f4f4f1;
  font: inherit;
  outline: none;
}

.services-detail-quotes input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.services-detail-quotes input[type="number"]::-webkit-outer-spin-button,
.services-detail-quotes input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.quotes-table .is-number {
  text-align: right;
}

.quotes-market {
  overflow: hidden;
}

.quotes-market-grid,
.quotes-insight-list,
.quotes-version-list {
  display: grid;
  gap: 10px;
  padding: 8px 10px 10px;
  min-height: 0;
  overflow: auto;
}

.quotes-market-grid {
  grid-template-columns: 1fr;
}

.quotes-market-card,
.quotes-insight-card {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(244, 244, 241, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.quotes-market-top,
.quotes-market-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.quotes-market-name,
.quotes-insight-value {
  color: #f4f4f1;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.quotes-market-unit,
.quotes-market-range,
.quotes-insight-label,
.quotes-insight-text {
  color: rgba(244, 244, 241, 0.54);
}

.quotes-market-unit,
.quotes-insight-label {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.quotes-market-price {
  color: #daab7f;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.quotes-market-range,
.quotes-insight-text {
  font-size: 0.64rem;
  line-height: 1.28;
}

.quotes-market-note {
  margin: 0;
  color: rgba(244, 244, 241, 0.74);
  font-size: 0.64rem;
  line-height: 1.28;
}

.quotes-market-apply {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(218, 171, 127, 0.28);
  background: rgba(218, 171, 127, 0.08);
  color: #f4f4f1;
  font: inherit;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.quotes-market-apply:hover,
.quotes-market-apply:focus-visible {
  background: rgba(218, 171, 127, 0.16);
}

.quotes-insight-card {
  gap: 6px;
}

.quotes-version-actions {
  padding: 8px 10px 0;
}

.quotes-summary {
  align-self: end;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.quotes-version-item {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(244, 244, 241, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.quotes-version-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.quotes-version-title {
  color: #f4f4f1;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.quotes-version-meta,
.quotes-version-empty {
  color: rgba(244, 244, 241, 0.56);
  font-size: 0.62rem;
  line-height: 1.24;
}

.quotes-version-load {
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid rgba(244, 244, 241, 0.12);
  background: transparent;
  color: rgba(244, 244, 241, 0.82);
  font: inherit;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

@media (max-width: 1540px) {
  .services-view.is-quotes-mode .services-panel,
  .services-panel.is-compact-mode {
    padding-right: 22px;
  }

  .quotes-calculator {
    grid-template-columns: 248px minmax(0, 1fr);
  }

  .quotes-layout {
    grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.72fr);
  }
}

.services-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: min(100%, 920px);
  margin: 34px auto 0;
  padding: 0;
  list-style: none;
}

.services-points li {
  min-height: 132px;
  padding: 18px 18px 20px;
  border: 1px solid rgba(244, 244, 241, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(244, 244, 241, 0.86);
  font-size: 0.96rem;
  line-height: 1.28;
}

.services-detail-specs,
.services-detail-assembly {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.specs-shell,
.assembly-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.specs-toolbar,
.assembly-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(244, 244, 241, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.specs-toolbar-copy p,
.assembly-toolbar-copy p {
  margin: 0;
  color: rgba(244, 244, 241, 0.74);
  font-size: 0.78rem;
  line-height: 1.28;
}

.specs-toolbar-actions,
.assembly-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.specs-metrics,
.assembly-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.specs-metric-card,
.assembly-metric-card {
  padding: 10px 11px;
  border: 1px solid rgba(244, 244, 241, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.specs-metric-card span,
.assembly-metric-card span,
.specs-meta-field span,
.assembly-meta-field span {
  display: block;
  margin-bottom: 6px;
  color: rgba(244, 244, 241, 0.48);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.specs-metric-card strong,
.assembly-metric-card strong {
  color: #f4f4f1;
  font-size: 0.96rem;
  font-weight: 700;
}

.specs-metric-card-accent,
.assembly-metric-card-accent {
  border-color: rgba(218, 171, 127, 0.22);
  background: rgba(218, 171, 127, 0.08);
}

.specs-layout,
.assembly-layout {
  display: grid;
  grid-template-columns: minmax(230px, 260px) minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  overflow: hidden;
}

.specs-side,
.assembly-side {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 0;
  overflow: auto;
}

.specs-card,
.assembly-card,
.specs-main,
.assembly-main {
  border: 1px solid rgba(244, 244, 241, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.specs-card,
.assembly-card {
  padding: 14px;
}

.specs-card h3,
.assembly-card h3 {
  margin: 0 0 12px;
  color: #f4f4f1;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.specs-meta,
.assembly-meta {
  display: grid;
  gap: 10px;
}

.specs-meta-field,
.assembly-meta-field {
  padding: 10px 11px;
  border: 1px solid rgba(244, 244, 241, 0.08);
  background: rgba(255, 255, 255, 0.025);
}

.specs-meta-field input,
.assembly-meta-field input,
.assembly-meta-field textarea {
  width: 100%;
  min-height: 28px;
  border: 0;
  background: transparent;
  color: #f4f4f1;
  font: inherit;
  font-size: 0.8rem;
  outline: none;
  resize: vertical;
}

.specs-main,
.assembly-main {
  min-height: 0;
  overflow: hidden;
}

.specs-table-wrap,
.assembly-table-wrap {
  height: 100%;
  min-height: 0;
  overflow: auto;
  padding: 10px;
}

.specs-table,
.assembly-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 920px;
}

.specs-table th,
.specs-table td,
.assembly-table th,
.assembly-table td {
  padding: 6px 6px;
  border-bottom: 1px solid rgba(244, 244, 241, 0.08);
  text-align: left;
  vertical-align: middle;
}

.specs-table th,
.assembly-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #151515;
  color: rgba(244, 244, 241, 0.46);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.specs-table td,
.assembly-table td {
  color: rgba(244, 244, 241, 0.86);
  font-size: 0.68rem;
  line-height: 1.18;
}

.specs-table input,
.specs-table select,
.assembly-table input,
.assembly-table select {
  width: 100%;
  min-height: 28px;
  padding: 0 6px;
  border: 1px solid rgba(244, 244, 241, 0.12);
  background: rgba(255, 255, 255, 0.02);
  color: #f4f4f1;
  font: inherit;
  outline: none;
}

.assembly-table select option,
.specs-table select option {
  color: #111;
}

.specs-table-action,
.assembly-table-action {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(244, 244, 241, 0.12);
  background: transparent;
  color: rgba(244, 244, 241, 0.82);
  cursor: pointer;
  font: inherit;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.specs-table-action:hover,
.specs-table-action:focus-visible,
.assembly-table-action:hover,
.assembly-table-action:focus-visible {
  border-color: rgba(218, 171, 127, 0.58);
  background: rgba(218, 171, 127, 0.12);
  color: #f4f4f1;
}

.admin-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(91, 88, 82, 0.16);
  border-radius: 999px;
  background: rgba(250, 249, 246, 0.94);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 18px 40px rgba(17, 17, 17, 0.12);
}

.admin-panel {
  position: fixed;
  inset: 0;
  z-index: 140;
  opacity: 0;
  pointer-events: none;
}

body.admin-open .admin-panel {
  opacity: 1;
  pointer-events: auto;
}

.admin-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(12, 12, 12, 0.28);
}

.admin-sheet {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(100%, 1080px);
  height: 100%;
  padding: 22px;
  overflow: hidden;
  background: rgba(243, 243, 241, 0.98);
  color: var(--ink);
  transform: translateX(100%);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: -24px 0 60px rgba(12, 12, 12, 0.18);
}

body.admin-open .admin-sheet {
  transform: translateX(0);
}

.admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.admin-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  line-height: 0.94;
  text-transform: uppercase;
}

.admin-close {
  min-width: 38px;
  min-height: 38px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
}

.admin-head-badge {
  margin: 0;
  padding: 0 12px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(91, 88, 82, 0.14);
  background: rgba(255, 255, 255, 0.76);
  color: rgba(91, 88, 82, 0.82);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-logout[hidden] {
  display: none;
}

.admin-auth {
  display: grid;
  place-items: center;
  flex: 1 1 auto;
  min-height: 0;
}

.admin-auth[hidden],
.admin-editor[hidden] {
  display: none;
}

.admin-auth-card {
  width: min(100%, 460px);
  padding: 24px;
  border: 1px solid rgba(91, 88, 82, 0.12);
  background: rgba(250, 249, 246, 0.92);
}

.admin-auth-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 0.96;
  text-transform: uppercase;
}

.admin-auth-copy {
  margin: 12px 0 0;
  color: rgba(91, 88, 82, 0.72);
  font-size: 0.9rem;
  line-height: 1.4;
}

.admin-auth-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.admin-editor {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}

.admin-layout {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  min-height: 0;
  overflow: hidden;
}

.admin-sidebar,
.admin-form {
  border: 1px solid rgba(91, 88, 82, 0.12);
  background: rgba(250, 249, 246, 0.86);
  min-height: 0;
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.admin-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(91, 88, 82, 0.08);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-sidebar-action,
.admin-action {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  background: var(--ink);
  color: var(--surface);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-sidebar-action {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.72rem;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.admin-list-item {
  width: 100%;
  padding: 12px 12px 11px;
  border: 1px solid rgba(91, 88, 82, 0.1);
  background: rgba(255, 255, 255, 0.52);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.admin-list-item.is-active {
  border-color: rgba(218, 171, 127, 0.54);
  background: rgba(218, 171, 127, 0.16);
}

.admin-list-item strong,
.admin-list-item span {
  display: block;
}

.admin-list-item strong {
  font-size: 0.96rem;
  line-height: 1;
  text-transform: uppercase;
}

.admin-list-item span {
  margin-top: 6px;
  color: rgba(91, 88, 82, 0.7);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-form {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-field {
  display: grid;
  gap: 8px;
}

.admin-field span,
.admin-stages legend {
  color: rgba(91, 88, 82, 0.72);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-field input,
.admin-field select,
.admin-field textarea {
  width: 100%;
  border: 1px solid rgba(91, 88, 82, 0.14);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font: inherit;
  padding: 12px 13px;
}

.admin-field textarea {
  resize: vertical;
  min-height: 110px;
}

.admin-preview {
  display: grid;
  place-items: center;
  min-height: 132px;
  border: 1px dashed rgba(91, 88, 82, 0.2);
  background: rgba(255, 255, 255, 0.58);
  color: rgba(91, 88, 82, 0.58);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background-size: cover;
  background-position: center;
}

.admin-preview.has-image {
  color: transparent;
}

.admin-stages {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(91, 88, 82, 0.12);
}

.admin-stages label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 0.9rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-action-soft {
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  border: 1px solid rgba(91, 88, 82, 0.14);
}

.admin-form [data-admin-export] {
  width: 100%;
  justify-content: center;
}

.admin-status {
  min-height: 18px;
  margin: 0;
  color: rgba(91, 88, 82, 0.72);
  font-size: 0.8rem;
}

@media (max-width: 1280px) {
  .hero {
    --hero-copy-width: 350px;
    --hero-brand-width: 318px;
    --hero-gap: 124px;
    --hero-copy-size: 0.86rem;
    --hero-title-size: 4rem;
  }

  .service-link {
    font-size: 0.92rem;
  }

  .portfolio-copy {
    padding: 78px 54px;
  }

  .portfolio-title {
    max-width: 11ch;
    font-size: clamp(3.8rem, 7vw, 7rem);
  }

  .services-viewer {
    grid-template-columns: 160px minmax(0, 1fr) 270px;
    height: min(620px, calc(100vh - 168px));
    max-height: calc(100vh - 168px);
  }

  .services-detail-kicker,
  .services-detail-viewer .services-detail-lead {
    width: 236px;
    max-width: 236px;
    right: 74px;
  }

  .services-detail-kicker {
    top: -126px;
  }

  .services-detail-viewer .services-detail-lead {
    top: -102px;
    font-size: 0.78rem;
    line-height: 1.2;
  }

  .services-viewer-topbar {
    padding-right: 292px;
  }

  .quotes-calculator {
    grid-template-columns: 228px minmax(0, 1fr);
  }

  .quotes-layout {
    grid-template-columns: minmax(0, 1fr) 240px;
  }

  .quotes-table {
    min-width: 660px;
  }
}

@media (max-width: 1100px) {
  .gallery {
    --gallery-rail: 188px;
  }

  .hero {
    --hero-copy-width: 296px;
    --hero-brand-width: 286px;
    --hero-gap: 92px;
    --hero-copy-size: 0.75rem;
    --hero-title-size: 3.45rem;
  }

  .service-nav-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 4px;
  }

  .service-link {
    min-height: 28px;
    font-size: 0.78rem;
  }

  .portfolio-copy {
    padding: 68px 38px;
  }

  .portfolio-title {
    max-width: 11ch;
    font-size: clamp(3.3rem, 7vw, 6rem);
  }

  .portfolio-tag {
    min-height: 34px;
    font-size: 0.78rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-card,
  .gallery-card-wide {
    grid-column: span 1;
  }

  .services-panel {
    gap: 14px;
    padding: 18px 20px 22px var(--services-back-rail);
  }

  .services-viewer {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    max-height: none;
  }

  .services-detail-kicker,
  .services-detail-viewer .services-detail-lead {
    position: static;
    width: auto;
    max-width: 74ch;
  }

  .services-detail-viewer .services-detail-lead {
    margin: 0 0 12px;
    font-size: 0.9rem;
    line-height: 1.32;
  }

  .services-viewer-topbar {
    padding-right: 14px;
  }

  .services-viewer-tools {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .services-tool {
    flex: 1 1 180px;
  }

  .services-viewer-stage {
    min-height: 420px;
  }

  .services-viewer-side {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nest-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .nest-stage-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .nest-stage-metrics {
    justify-content: flex-start;
    min-width: 0;
    width: 100%;
  }

  .nest-stage {
    min-height: 600px;
  }

  .nest-rotation-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nest-side {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(360px, 1fr);
    align-items: start;
    min-height: 620px;
  }

  .partner-logo {
    min-height: 46px;
    min-width: 72px;
    padding: 0 10px;
    font-size: 0.96rem;
  }

  .quotes-calculator {
    grid-template-columns: 214px minmax(0, 1fr);
  }

  .quotes-layout {
    grid-template-columns: 1fr;
  }

  .quotes-side {
    grid-template-rows: auto minmax(220px, 1fr);
  }

  .specs-layout,
  .assembly-layout {
    grid-template-columns: 1fr;
  }

  .specs-side,
  .assembly-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .nest-topbar,
  .nest-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nest-shell.has-parts .nest-dropzone {
    grid-template-columns: 1fr;
  }

  .nest-action,
  .nest-control,
  .nest-toggle {
    min-width: 0;
    width: 100%;
  }

  .nest-side {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(320px, 1fr);
    min-height: 560px;
  }
}

@media (max-width: 700px) {
  .gallery {
    --gallery-rail: 0px;
  }

  .hero {
    --page-gutter: 18px;
    --nav-height: 76px;
    --hero-copy-width: 100%;
    --hero-brand-width: 100%;
    --hero-gap: 32px;
    --hero-copy-size: 0.82rem;
    --hero-title-size: 3.3rem;
  }

  .hero-overlay {
    padding-top: 18px;
  }

  .site-header {
    gap: 18px;
  }

  .site-logo,
  .contact-link,
  .contact-phone {
    font-size: 0.78rem;
  }

  .hero-main {
    grid-template-columns: 1fr;
    row-gap: 26px;
    width: min(calc(100% - (var(--page-gutter) * 2)), 520px);
  }

  .hero-copy,
  .brand-title {
    text-align: center;
  }

  .hero-line {
    white-space: normal;
  }

  .hero-brand {
    justify-content: center;
  }

  .service-nav {
    padding-left: 18px;
    padding-right: 18px;
  }

  .service-nav-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-copy {
    padding: 54px 26px;
  }

  .portfolio-title {
    max-width: 11ch;
    font-size: clamp(2.9rem, 9vw, 4.9rem);
  }

  .portfolio-tags {
    gap: 8px;
    margin-top: 24px;
  }

  .portfolio-tag {
    min-height: 32px;
    padding: 0 13px;
    font-size: 0.72rem;
  }

  .gallery {
    padding-left: 18px;
    padding-right: 18px;
  }

  .gallery-header {
    position: relative;
    top: auto;
    height: auto;
    margin-bottom: 24px;
    pointer-events: auto;
  }

  .gallery-kicker {
    margin-bottom: 14px;
  }

  .gallery-filters {
    flex-wrap: wrap;
    justify-content: flex-start;
    height: auto;
    padding-top: 0;
  }

  .workflow-grid {
    grid-template-columns: 1fr;
  }

  .workflow-card {
    min-height: 0;
    padding: 28px 24px 30px;
  }

  .workflow-icon {
    height: 90px;
    margin-bottom: 20px;
  }

  .partners-track {
    gap: 24px;
    padding-right: 24px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-card,
  .gallery-card-wide {
    grid-column: span 1;
    min-height: 0;
  }

  .services-panel {
    padding: 72px 20px 28px;
  }

  .services-points {
    grid-template-columns: 1fr;
  }

  .quotes-metrics,
  .quotes-meta,
  .quotes-coeffs,
  .quotes-summary,
  .quotes-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quotes-toolbar-actions {
    justify-content: flex-start;
  }

  .quotes-calculator {
    width: 100%;
    height: 100%;
    grid-template-columns: 1fr;
  }

  .quotes-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
  }

  .quotes-layout {
    grid-template-columns: 1fr;
  }

  .quotes-side {
    grid-template-rows: auto minmax(240px, 1fr);
  }

  .services-detail h2 {
    font-size: clamp(2rem, 9vw, 3.4rem);
  }

  .services-detail-viewer .services-detail-lead {
    max-width: none;
    margin-bottom: 20px;
  }

  .services-viewer-tools {
    padding: 12px;
  }

  .quotes-metrics,
  .quotes-meta,
  .quotes-coeffs,
  .quotes-summary,
  .quotes-options {
    grid-template-columns: 1fr;
  }

  .quotes-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quotes-scenarios {
    gap: 8px;
  }

  .quotes-scenario {
    width: auto;
    justify-content: center;
  }

  .specs-metrics,
  .assembly-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .specs-side,
  .assembly-side {
    grid-template-columns: 1fr;
  }

  .services-tool {
    min-height: 38px;
    font-size: 0.72rem;
  }

  .services-viewer-stage {
    min-height: 320px;
  }

  .services-viewer-side {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .page {
    padding-bottom: 18px;
    transition: none;
  }

  .workflow {
    min-height: auto;
  }

  .workflow-stage {
    position: relative;
    min-height: auto;
    padding: 52px 18px 28px;
  }

  .gallery-header {
    height: auto;
    pointer-events: auto;
  }

  .gallery-filters {
    flex-wrap: wrap;
    justify-content: flex-start;
    height: auto;
    padding-top: 0;
  }

  .workflow-card {
    --workflow-y: 0px;
    --workflow-opacity: 1;
  }

  body.services-open .page {
    transform: none;
  }

  .hero {
    min-height: auto;
    padding: 18px 18px 0;
  }

  .hero-overlay {
    position: relative;
    height: auto;
    padding: 0;
    color: var(--ink);
    mix-blend-mode: normal;
    pointer-events: auto;
  }

  .site-header,
  .hero-main {
    width: 100%;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-contacts {
    justify-content: flex-start;
  }

  .hero-main {
    position: relative;
    top: auto;
    left: auto;
    z-index: auto;
    margin-top: 42px;
    transform: none;
  }

  .service-nav {
    position: relative;
    left: auto;
    top: auto;
    z-index: auto;
    width: 100%;
    justify-content: flex-start;
    color: var(--ink);
    padding: 34px 0 12px;
    transform: none;
    background: transparent;
  }

  .service-nav-row {
    grid-template-columns: 1fr;
    row-gap: 0;
    opacity: 1;
  }

  .service-flyout,
  .service-nav-panel {
    display: none;
  }

  .scroll-top {
    color: var(--ink);
    mix-blend-mode: normal;
  }

  .portfolio {
    min-height: auto;
  }

  .portfolio-stage {
    position: relative;
    height: auto;
  }

  .portfolio-media {
    inset: 22px 14px 0;
    min-height: 78vh;
  }

  .portfolio-copy {
    inset: 22px 14px 0;
    padding: 42px 18px 28px;
  }

  .portfolio-title {
    max-width: 11ch;
    font-size: clamp(2.6rem, 11vw, 3.8rem);
  }

  .portfolio-tags {
    margin-top: 18px;
  }

  .services-panel {
    width: 100vw;
    height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .partners-marquee {
    padding: 20px 0 18px;
  }

  .partners-marquee-inner {
    animation-duration: 58s;
  }

  .partner-logo {
    min-height: 40px;
    min-width: 58px;
    padding: 0 8px;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
  }

  .partner-logo span {
    min-width: 34px;
    min-height: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .page,
  .hero-main,
  .service-link,
  .workflow-card,
  .services-panel,
  .scroll-top {
    transition: none;
  }

  .partners-marquee-inner {
    animation-duration: 96s;
  }
}
