@font-face {
  font-family: Manrope;
  src: url("/cabinet-assets/manrope-cyrillic.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

@font-face {
  font-family: Manrope;
  src: url("/cabinet-assets/manrope-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

.couple-shell {
  --paper: #f5f1ea;
  --ink: #2d2620;
  --muted: #60564c;
  --line: #d7ccc0;
  --accent: #65493b;
  --surface: #fbf8f2;
  --gutter: clamp(22px, 5.4vw, 108px);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  padding-inline: env(safe-area-inset-left, 0px) env(safe-area-inset-right, 0px);
  background: var(--paper);
  color: var(--ink);
  font: 500 15px/1.5 Manrope, "Helvetica Neue", Arial, sans-serif;
}
.couple-shell[hidden], .couple-shell [hidden] { display: none !important; }
.couple-shell :focus-visible { outline: 2px solid #795748; outline-offset: 4px; }
.couple-shell :is(button, a) { touch-action: manipulation; }
.couple-shell h1 { font-family: inherit; font-weight: 500; }
.cabinet-skip {
  position: fixed;
  z-index: 10;
  inset: 10px auto auto 12px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}
.cabinet-skip:not(:focus) { clip-path: inset(50%); }

.cabinet-top {
  display: grid;
  grid-template-columns: minmax(108px, 1fr) auto minmax(44px, 1fr);
  align-items: center;
  gap: 18px;
  position: relative;
  z-index: 4;
  padding: calc(21px + env(safe-area-inset-top, 0px)) var(--gutter) 11px;
}
.cabinet-brand {
  display: grid;
  place-items: center start;
  min-height: 44px;
  width: 109px;
}
.cabinet-brand img { display: block; width: 100%; height: auto; filter: brightness(0); opacity: .86; }
.cabinet-nav {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  gap: 1px;
  padding: 3px;
  border: 1px solid rgb(255 253 248 / 86%);
  border-radius: 100px;
  background: rgb(251 248 242 / 67%);
  box-shadow: 0 2px 8px rgb(64 54 46 / 7%);
  backdrop-filter: blur(12px);
}
.couple-shell:not([data-page="home"]) .cabinet-nav { backdrop-filter: none; }
.cabinet-nav a {
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 44px;
  min-width: 48px;
  padding-inline: clamp(9px, 1.1vw, 15px);
  border-radius: 100px;
  color: #554c43;
  font-size: 13px;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
}
.cabinet-nav a[aria-current="page"] { color: #261f19; font-weight: 700; }
.cabinet-nav:not([data-lens="ready"]) a[aria-current="page"] { background: #fffdf8; }
.cabinet-lens {
  position: absolute;
  z-index: 0;
  inset: 0 auto auto 0;
  width: var(--lens-width, 0px);
  height: var(--lens-height, 0px);
  transform: translate(var(--lens-x, 0px), var(--lens-y, 0px));
  transform-origin: left top;
  border-radius: 100px;
  background: rgb(255 253 248 / 91%);
  box-shadow: 0 0 0 1px rgb(115 91 73 / 8%), 0 2px 5px rgb(60 48 37 / 11%);
  pointer-events: none;
}
@media (hover: hover) {
  .cabinet-nav a:hover { background: rgba(94,65,47,.065); }
}
.cabinet-account { position: relative; grid-column: 3; grid-row: 1; justify-self: end; }
.cabinet-account summary {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  list-style: none;
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 50%;
  background: rgba(255,251,245,.52);
  color: #4d4239;
}
.cabinet-account summary::-webkit-details-marker { display: none; }
.cabinet-account summary svg { width: 17px; height: 17px; }
.cabinet-account[open] summary { margin: 0; background: #fbf6ef; }
.cabinet-account-menu {
  position: absolute;
  z-index: 5;
  inset: calc(100% + 7px) 0 auto auto;
  width: min(233px, calc(100vw - 30px));
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid #e9e0d6;
  border-radius: 15px;
  background: #fffcf7;
  box-shadow: 0 10px 34px rgba(52,42,35,.11);
  transform-origin: top right;
}
.cabinet-account-menu :is(a,button) {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 9px;
  background: none;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  text-align: start;
}
.cabinet-account-menu :is(a,button):hover,
.cabinet-account-menu a[aria-current="page"] { background: #f0e9de; }
.cabinet-account-menu a[aria-current="page"] { font-weight: 700; }
.cabinet-project { display: grid; gap: 3px; padding: 7px; font-size: 13px; }
.cabinet-project select { width: 100%; min-height: 44px; }

.cabinet-main {
  width: min(100%, 1360px);
  min-width: 0;
  margin: 0 auto;
  padding: clamp(24px, 4.3vw, 62px) var(--gutter) 70px;
}
.cabinet-main:focus { outline: none; }
.cabinet-main :is(.couple-screen__title, .collection-heading h1, .pagehead h1) {
  font-size: clamp(2.375rem, 5vw, 3.625rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -.058em;
}
.cabinet-footer { position: relative; padding: 10px var(--gutter) calc(17px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 12px; }
.couple-shell[data-page="home"] .cabinet-footer { color: #3d332a; }
.couple-shell[data-page="home"] .cabinet-main {
  display: grid;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}
.couple-shell[data-page="home"]::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(180deg, rgb(248 242 233 / 83%) 0%, rgb(248 242 233 / 25%) 31%, transparent 55%, transparent 88%, var(--paper) 100%),
    url("/cabinet-assets/lake.jpg") 42% 55% / cover no-repeat;
}
.home-scene {
  --home-glass: rgb(251 246 237 / 75%);
  --home-glass-edge: rgb(255 252 247 / 71%);
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  grid-template-rows: auto auto;
  align-content: space-between;
  gap: 34px 24px;
  min-height: 443px;
  padding: clamp(47px, 8svh, 92px) var(--gutter) clamp(34px, 5.8svh, 70px);
  color: #272622;
}
.home-lead { grid-column: 1 / -1; }
.home-lead h1 {
  max-width: 12.5ch;
  font-size: clamp(54px, min(7.25vw, 13svh), 110px);
  line-height: .96;
  letter-spacing: -.061em;
  font-weight: 400;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.home-name-tail {
  display: inline-block;
  max-inline-size: 100%;
}
.home-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
  margin-top: 18px;
  color: #40372e;
  font-size: 14px;
}
.home-facts strong { font-variant-numeric: tabular-nums; color: #272622; }
.home-city::before {
  content: "·";
  margin-inline-end: 12px;
  color: #655448;
}
.home-count {
  display: inline-flex;
  align-items: baseline;
  gap: .27em;
  padding-inline-start: 12px;
  border-inline-start: 1px solid rgb(79 59 45 / 26%);
}
.home-stages { position: relative; grid-column: 1; grid-row: 2; align-self: start; justify-self: start; min-width: 0; }
.home-stages > p { margin-bottom: 9px; font-size: 13px; font-weight: 680; }
.home-stages:has(.home-stage-preview[data-side="above"]:not([hidden])) > p { visibility: hidden; }
.home-stage-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  width: fit-content;
  padding: 4px;
  border: 1px solid var(--home-glass-edge);
  border-radius: 100px;
  background: var(--home-glass);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 29%), 0 3px 12px rgb(58 46 37 / 13%);
  backdrop-filter: blur(12px);
}
.home-stage-buttons button, .home-chat-pill, .home-attention-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 5px 15px;
  border: 1px solid var(--home-glass-edge);
  border-radius: 100px;
  background: var(--home-glass);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 23%), 0 2px 8px rgb(43 37 37 / 10%);
  backdrop-filter: blur(10px);
  color: #28292b;
  font: 650 13px/1.35 Manrope, "Helvetica Neue", Arial, sans-serif;
  text-decoration: none;
  white-space: nowrap;
}
.home-stage-buttons button[aria-current="step"], .home-stage-buttons button[aria-expanded="true"], .home-chat-pill[aria-expanded="true"] { background: rgb(255 253 249 / 87%); }
.home-stage-buttons button:not([aria-current="step"],[aria-expanded="true"]) { border-color: transparent; background: transparent; box-shadow: none; }
.home-stage-buttons button { min-width: 74px; padding-inline: 13px; backdrop-filter: none; }
.home-stage-buttons button[aria-current="step"]::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #775e4e;
}
@media (hover: hover) {
  .home-stage-buttons button:not([aria-current="step"],[aria-expanded="true"]):hover { background: rgb(255 253 249 / 53%); }
  .home-stage-buttons button:hover, .home-chat-pill:hover, .home-attention-pill:hover { background: rgba(255,253,249,.72); }
}
.home-stage-preview {
  position: absolute;
  z-index: 2;
  inset-inline-start: var(--bubble-x, 0px);
  inset-block-start: var(--bubble-y, auto);
  width: min(402px, calc(100vw - 28px));
}
.home-stage-preview::after {
  content: "";
  position: absolute;
  inset: 100% 0 auto;
  height: 9px;
}
.home-stage-preview[data-side="below"]::after { inset: auto 0 100%; }
.home-stage-surface, .home-chat-note {
  border: 1px solid rgb(255 253 249 / 84%);
  border-radius: 15px;
  background: rgb(249 243 233 / 83%);
  box-shadow: 0 7px 25px rgb(48 43 41 / 14%);
  backdrop-filter: blur(13px);
  color: #292623;
}
.home-stage-surface {
  position: relative;
  transform-origin: var(--bubble-point, 40px) 100%;
  padding: 12px 14px 5px;
}
.home-stage-preview:is([data-side="below"],[data-side="inline"]) .home-stage-surface { transform-origin: var(--bubble-point, 40px) top; }
.home-stage-surface::after {
  content: "";
  position: absolute;
  inset: 100% auto auto var(--bubble-point, 40px);
  width: 14px;
  height: 7px;
  transform: translateX(-50%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: rgb(249 243 233 / 85%);
  pointer-events: none;
}
.home-stage-preview:is([data-side="below"],[data-side="inline"]) .home-stage-surface::after {
  inset: auto auto 100% var(--bubble-point, 40px);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.home-stage-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 3px 12px; }
.home-stage-surface h2 { font-size: 15px; font-weight: 700; letter-spacing: -.015em; }
.home-stage-progress { color: #554b42; font-size: 12px; font-weight: 650; }
.home-stage-surface ul {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 3px 16px;
  margin: 7px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}
.home-stage-surface li { display: grid; grid-template-columns: 12px minmax(0,1fr); gap: 6px; align-items: baseline; }
.home-stage-mark { text-align: center; font-size: 12px; }
.home-stage-mark::before { content: "·"; }
.home-stage-task--done { color: #24553f; font-weight: 680; }
.home-stage-task--done .home-stage-mark::before { content: "✓"; }
.cabinet-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
.home-stage-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  font-size: 12px;
  font-weight: 700;
}
.home-actions {
  display: grid;
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  justify-self: end;
  justify-items: end;
  min-width: 0;
  gap: 12px;
}
.home-participation { max-width: min(100%, 390px); }
.home-participation h2 {
  margin-bottom: 9px;
  color: #28292b;
  font-size: 13px;
  font-weight: 680;
  letter-spacing: -.015em;
  text-align: end;
}
.home-participation ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.home-participation li { min-inline-size: 0; }
.home-attention-pill {
  max-width: 100%;
  border-radius: 11px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.home-attention-pill > [aria-hidden="true"] { flex: none; font-size: 13px; }
.home-participation .home-signature-actions {
  flex-direction: column;
  align-items: flex-end;
}
.home-signature-actions + .home-collection-actions { margin-top: 7px; }
.home-signature-pill {
  justify-content: space-between;
  gap: 13px;
  padding: 8px 14px;
  border-color: rgb(255 246 218 / 93%);
  background: rgb(249 231 188 / 93%);
  color: #5b3d13;
  text-align: start;
}
.home-signature-copy { display: grid; gap: 1px; }
.home-signature-copy bdi { font-size: 12px; font-weight: 580; }
@media (hover: hover) {
  .home-signature-pill:hover { background: #fae8b8; }
}
.home-chat { position: relative; }
.home-chat-pill { background: rgb(246 242 232 / 69%); }
.home-chat-pill svg { width: 15px; height: 15px; flex: none; }
.home-chat-note {
  position: absolute;
  width: max-content;
  max-width: min(225px, calc(100vw - 40px));
  inset: auto 0 calc(100% + 8px) auto;
  padding: 8px 12px;
  transform-origin: right bottom;
  font-size: 12px;
}
.home-actions:has(.home-participation) .home-chat-note {
  inset: auto calc(100% + 8px) 0 auto;
  transform-origin: right center;
}

@media (max-width: 920px) {
  .cabinet-top { grid-template-columns: 88px auto 44px; justify-content: space-between; gap: 9px; }
  .cabinet-brand { width: 88px; }
  .cabinet-nav a { padding-inline: 10px; }
}
@media (max-width: 760px) {
  .cabinet-top { grid-template-columns: 1fr 44px; padding-block: calc(11px + env(safe-area-inset-top, 0px)) 9px; }
  .cabinet-nav { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .cabinet-account { grid-column: 2; grid-row: 1; }
  .cabinet-main { padding-bottom: 46px; }
  .home-scene { min-height: 455px; padding-top: clamp(32px, 7svh, 64px); padding-bottom: 28px; }
  .home-facts { font-size: 13px; }
}
@media (max-width: 595px) {
  .cabinet-nav {
    display: grid;
    grid-template-columns: repeat(8, minmax(0,1fr));
    width: 100%;
    border-radius: 22px;
  }
  .cabinet-nav a { grid-column: span 2; min-width: 0; padding-inline: 0; font-size: clamp(10.5px,2.8vw,13px); }
  .cabinet-nav a:nth-of-type(5) { grid-column: 2 / span 2; }
  .couple-shell { --gutter: clamp(16px, 4.6vw, 22px); }
  .home-scene {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    align-content: start;
    min-height: 420px;
    gap: 25px;
    padding-top: clamp(32px, 5.4svh, 52px);
  }
  .home-actions { grid-row: 3; grid-column: 1; justify-self: start; justify-items: start; }
  .home-stages { grid-row: 2; justify-self: stretch; }
  .home-stage-preview {
    position: relative;
    inset: auto;
    width: 100%;
    margin-block-start: 12px;
  }
  .home-stage-preview::after { display: none; }
  .home-stage-surface {
    background-color: rgb(252 248 240 / 81%);
    border-color: rgb(255 253 248 / 82%);
    box-shadow: 0 3px 16px rgb(48 43 41 / 9%);
  }
  .home-stage-surface::after { background-color: rgb(252 248 240 / 86%); }
  .home-participation h2 { text-align: start; }
  .home-participation ul { justify-content: flex-start; }
  .home-participation .home-signature-actions { align-items: flex-start; }
  .home-chat-note,
  .home-actions:has(.home-participation) .home-chat-note {
    position: relative;
    inset: auto;
    margin-block-start: 7px;
    transform-origin: left top;
  }
  .home-lead h1 { font-size: clamp(41px, 12.3vw, 67px); }
  .home-lead .home-facts { gap: 5px 9px; margin-top: 16px; }
  .home-city::before { margin-inline-end: 9px; }
  .home-count { flex-basis: 100%; padding-inline-start: 0; border: 0; }
  .home-stage-buttons button { padding-inline: 12px; }
  .couple-shell[data-page="home"]::before {
    inset-block-end: auto;
    height: 100svh;
    background:
      linear-gradient(180deg, rgb(248 242 233 / 87%) 0%, rgb(248 242 233 / 58%) 29%, rgb(248 242 233 / 16%) 51%, transparent 75%, var(--paper) 100%),
      url("/cabinet-assets/lake.jpg") 42% center / cover no-repeat;
  }
}
@media (max-width: 360px) {
  .home-stage-surface ul { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 596px) {
  .home-stages > p {
    position: relative;
    isolation: isolate;
    width: fit-content;
  }
  .home-stages > p::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -10px -16px;
    background: radial-gradient(ellipse, rgb(251 244 231 / 62%) 40%, rgb(251 244 231 / 46%) 68%, transparent 87%);
    pointer-events: none;
  }
}

/* Route and control feedback use the Motion Design System timings. */
:where(.couple-shell, .layout) {
  --motion-press: 120ms;
  --motion-quick: 160ms;
  --motion-base: 220ms;
  --press-scale: .97;
}
.cabinet-nav a { font-weight: 620; }
.cabinet-nav a[aria-current="page"] { font-weight: 620; }
.couple-shell :is(a, button, summary) { -webkit-tap-highlight-color: transparent; }
.collection-media img { -webkit-user-drag: none; }

@media (prefers-reduced-motion: no-preference) {
  .couple-shell :is(.home-stage-buttons button, .home-chat-pill, .home-attention-pill, .collection-step, .collection-choice__submit, .couple-button),
  .layout :is(.action, .secondary, .nav-link) {
    transition: transform var(--motion-press) cubic-bezier(.23, 1, .32, 1), background-color var(--motion-quick) ease-out;
  }
  .couple-shell :is(.home-stage-buttons button, .home-chat-pill, .home-attention-pill, .collection-step, .collection-choice__submit, .couple-button):active,
  .layout :is(.action, .secondary):active {
    transform: scale(var(--press-scale));
  }
  .home-chat-pill svg, .home-attention-pill > [aria-hidden="true"], .couple-chevron { transition: transform var(--motion-base) var(--ease-out); }
  #toast:not([hidden]) { animation: cabinet-soft-open 160ms cubic-bezier(.23, 1, .32, 1); }
}
@media (max-width: 720px) {
  #app:has(.couple-shell) + #toast { bottom: max(14px, env(safe-area-inset-bottom, 0px)); right: max(18px, env(safe-area-inset-right, 0px)); }
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .home-chat-pill:hover svg { transform: translateY(-2px) rotate(-7deg); }
  .home-attention-pill:hover > [aria-hidden="true"] { transform: translate(2px,-2px); }
}

@supports selector(details::details-content) and (interpolate-size: allow-keywords) {
  @media (prefers-reduced-motion: no-preference) {
    .couple-plan__stage {
      interpolate-size: allow-keywords;
    }
    .couple-plan__stage::details-content {
      block-size: 0;
      overflow: clip;
      opacity: 0;
      transition:
        block-size var(--motion-base) var(--ease-out),
        opacity var(--motion-quick) var(--ease-out),
        content-visibility var(--motion-base) allow-discrete;
    }
    .couple-plan__stage[open]::details-content {
      block-size: auto;
      opacity: 1;
    }
  }
}

@keyframes cabinet-soft-open {
  from { opacity: .18; transform: translateY(5px) scale(.985); }
  to { opacity: 1; transform: none; }
}

.cabinet-main .panel { border-radius: 16px; background: var(--surface); }
.couple-shell[data-page="ideas"] .grid h3 { overflow-wrap: anywhere; }
.cabinet-main .material-group a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.cabinet-main .material-group summary { min-height: 44px; }

.document-list {
  display: grid;
  gap: 12px;
}
.document-upload { margin-bottom: 20px; }
.document-group {
  min-width: 0;
  padding: clamp(14px, 2.35vw, 25px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface, #fff);
}
.document-group:has(> [data-needs-signature]) {
  background: #fbf4e3;
  border-color: #deca9d;
}
.couple-shell .document-group:has(> .document-card h3:focus-visible) {
  outline: 2px solid #795748;
  outline-offset: 2px;
}
.couple-shell .document-group > .document-card h3:focus-visible { outline: none; }
.document-card__row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 12px 20px;
}
.document-card__info { min-width: 0; overflow-wrap: anywhere; }
.document-card__info h3 { font-size: clamp(16px, 2.1vw, 19px); }
.document-card__info .meta { margin-top: 3px; }
.document-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 14px;
}
.document-card__actions :is(a,button), .document-sign-dialog a, .document-sign-dialog button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.document-card__actions a { color: var(--accent); font-size: 14px; font-weight: 650; }
.document-signature-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 25px;
  margin-bottom: 7px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f3e3ba;
  color: #634411;
  font-size: 12px;
  font-weight: 700;
}
.document-signature-badge::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}
.document-group > details {
  margin-top: 9px;
  border-top: 1px solid var(--line);
}
.document-group summary {
  display: list-item;
  min-height: 44px;
  font-size: 14px;
}
.document-group > details .document-card { padding: 8px 0; }
.document-group > details .document-card + .document-card {
  border-top: 1px solid var(--line);
}
.couple-shell[data-page="documents"] .pagehead { margin-block-end: clamp(20px, 3vw, 32px); }
.couple-shell[data-page="documents"] .document-list {
  gap: 0;
  border-block-start: 1px solid var(--line);
}
.couple-shell[data-page="documents"] .document-group {
  padding-block: clamp(16px, 2.1vw, 25px);
  border: 0;
  border-block-end: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.couple-shell[data-page="documents"] .document-group:has(> [data-needs-signature]) {
  background: #f7edd9;
  box-shadow: inset 2px 0 #b99558;
}
.couple-shell[data-page="documents"] .document-signature-badge {
  min-height: 0;
  margin-block-end: 5px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}
.couple-shell[data-page="documents"] .document-card__actions .action { border-radius: 100px; }
.staff-document-controls {
  display: grid;
  border-top: 1px solid var(--line);
  margin-top: 7px;
}
.staff-document-controls .linkbutton { min-height: 44px; }
.document-signers {
  display: grid;
  gap: 6px;
  margin-top: 0;
  padding-inline-start: 18px;
  font-size: 14px;
}
.document-signers li { overflow-wrap: anywhere; }
.document-signers time { margin-inline-start: 10px; color: var(--muted); }

.document-sign-dialog {
  --sign-inline-gap: max(16px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  width: min(460px, calc(100vw - 2 * var(--sign-inline-gap)));
  max-height: calc(100dvh - max(16px, env(safe-area-inset-top, 0px))
    - max(16px, env(safe-area-inset-bottom, 0px)));
  padding: clamp(16px, 5vw, 28px);
  color: var(--ink);
  border: 1px solid #daccc0;
  border-radius: 18px;
  background: #fffcf7;
}
.document-sign-dialog::backdrop { background: rgba(48,43,38,.37); }
.document-sign-dialog h2 { font-size: clamp(21px, 5vw, 26px); }
.document-sign-dialog__name {
  margin: 8px 0 2px;
  font-size: 16px;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.document-sign-dialog a { font-size: 14px; }
.document-sign-consent {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  border-top: 1px solid var(--line);
  margin-top: 3px;
  padding: 9px 0;
  font-size: 14px;
  cursor: pointer;
}
.document-sign-consent input { width: 17px; height: 17px; margin: 0; flex: none; }
.document-sign-dialog__error {
  color: #963636;
  margin: 4px 0;
  font-size: 13px;
}
.document-sign-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 13px;
}

@media (max-width: 580px) {
  .document-card__row { grid-template-columns: 1fr; gap: 5px; }
}
