/* Arvsro — one stylesheet for the public site and the app.
   Layout: a centred column (max 1120px public, 880px app) with a 20px gutter on phones. */
@font-face { font-family: "Work Sans"; src: url("../fonts/work-sans-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("../fonts/work-sans-400-italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("../fonts/work-sans-700.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-grotesque-700.woff") format("woff"); font-weight: 700 800; font-style: normal; font-display: swap; }

:root {
  --mist: #F4F6F5;
  --paper: #FFFFFF;
  --ink: #16201C;
  --ink-soft: #3E4B45;
  --muted: #56645E;
  --line: #D3DCD7;
  --green: #1E4B42;
  --green-deep: #163A33;
  --green-tint: #E2ECE8;
  --gold: #F3C531;
  --gold-tint: #FBF0C9;
  --red: #A3362B;
  --red-tint: #F8E3E0;
  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Work Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 16px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--mist); color: var(--ink);
  font-family: var(--font-body); font-size: 18px; line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0; text-wrap: balance; letter-spacing: -0.015em; line-height: 1.15; }
p { margin: 0; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-deep); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--paper); padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 20px; }
.wrap-app { max-width: 880px; }
.stack { display: grid; gap: 16px; align-content: start; }
.stack-lg { display: grid; gap: 28px; align-content: start; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.between { justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.tiny { font-size: 13px; }
.center { text-align: center; }

/* Header and footer */
.top { padding-block: 18px; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-family: var(--font-display); font-size: 23px; font-weight: 700; letter-spacing: -0.02em; }
.nav { display: flex; align-items: center; gap: 22px; font-size: 16px; }
.nav a { text-decoration: none; color: var(--ink-soft); }
.nav a:hover { color: var(--green); }
.nav .nav-link { display: none; }
@media (min-width: 860px) { .nav .nav-link { display: inline; } }
.nav form { margin: 0; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-soft); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--green); }
/* Removing something is red, so it never looks like one more link in a list of things. */
.linkbtn-danger, .linkbtn-danger:hover { color: var(--red); }
.danger-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding-top: 18px; border-top: 1px solid var(--line); }

.foot { border-top: 1px solid var(--line); padding-block: 32px 40px; font-size: 15px; color: var(--muted); margin-top: 48px; }
.foot-grid { display: grid; gap: 24px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.foot h2 { font-size: 16px; font-family: var(--font-body); color: var(--ink); margin-bottom: 6px; letter-spacing: 0; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.foot a { color: var(--ink-soft); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 22px; border-radius: 14px; cursor: pointer;
  font-family: var(--font-body); font-size: 17px; font-weight: 700; line-height: 1.2; text-decoration: none; text-align: center;
  border: 2px solid var(--green); background: var(--green); color: #FFFFFF;
}
.btn:hover { background: var(--green-deep); border-color: var(--green-deep); color: #FFFFFF; }
.btn-ghost { background: transparent; color: var(--green); }
.btn-ghost:hover { background: var(--green-tint); color: var(--green-deep); }
.btn-light { background: #FFFFFF; color: var(--green); border-color: #FFFFFF; }
.btn-light:hover { background: var(--green-tint); border-color: var(--green-tint); color: var(--green-deep); }
.btn-danger { background: var(--paper); color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: var(--red-tint); color: var(--red); border-color: var(--red); }
.btn-small { min-height: 40px; padding: 0 14px; font-size: 15px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.inline { display: inline; margin: 0; }

/* Public: hero */
.hero { padding-block: 20px 56px; }
.hero .wrap { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; } }
.hero-text { display: grid; gap: 22px; min-width: 0; }
.chip {
  justify-self: start; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line);
  font-size: 14px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--green);
}
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px var(--gold-tint); }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); line-height: 1.02; letter-spacing: -0.03em; }
.hero h1 span { display: block; color: var(--green); }
.lede { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--ink-soft); max-width: 36ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.note { font-size: 16px; color: var(--muted); }

.phones { container-type: inline-size; min-width: 0; }
.fan { display: flex; justify-content: center; align-items: flex-end; padding-block: 12px 8px; }
.phone { flex: none; margin: 0; padding: 7px; border-radius: 30px; background: var(--ink); box-shadow: 0 24px 48px -20px rgba(22, 32, 28, 0.45); }
.phone img { display: block; width: 100%; height: auto; border-radius: 23px; }
.phone-mid { width: 40cqi; position: relative; z-index: 2; }
.phone-side { width: 32cqi; position: relative; z-index: 1; transform-origin: 50% 100%; }
.phone-left { transform: rotate(-6deg); margin-right: -7cqi; }
.phone-right { transform: rotate(6deg); margin-left: -7cqi; }
@container (min-width: 480px) {
  .phone-mid { width: min(44cqi, 280px); }
  .phone-side { width: min(37cqi, 236px); }
  .phone-left { margin-right: -9cqi; }
  .phone-right { margin-left: -9cqi; }
}

/* Public: sections */
.section { padding-block: 60px; }
.section-head { display: grid; gap: 12px; max-width: 62ch; margin-bottom: 32px; }
.section-head h2, .page-head h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); line-height: 1.1; }
.section-head p { color: var(--ink-soft); }
.page-head { padding-block: 24px 8px; display: grid; gap: 14px; max-width: 64ch; }
.page-head p { color: var(--ink-soft); font-size: 1.15rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .steps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.step { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: grid; gap: 10px; align-content: start; }
.step-no {
  width: 40px; height: 40px; border-radius: 50%; background: var(--green-tint); color: var(--green);
  display: grid; place-items: center; font-family: var(--font-display); font-size: 20px; font-weight: 700;
}
.step h3 { font-size: 1.25rem; }
.step p { color: var(--ink-soft); font-size: 17px; }

.band { background: var(--paper); border-block: 1px solid var(--line); }
.value-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 32px; }
@media (min-width: 860px) { .value-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 56px; } }
@media (min-width: 860px) { .value-list-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; } }
.value { display: grid; gap: 10px; align-content: start; }
.value svg { width: 32px; height: 32px; color: var(--green); }
.value h3 { font-size: 1.25rem; }
.value p { color: var(--ink-soft); font-size: 17px; }
.value-tag { display: inline-block; font-weight: 700; font-size: 15px; background: var(--gold); color: #2A2100; border-radius: 6px; padding: 0 7px; margin-inline: 2px; white-space: nowrap; }

.panel-green {
  background: var(--green); color: #FFFFFF; border-radius: 24px;
  padding: clamp(28px, 5vw, 56px); display: grid; gap: 20px; align-items: center;
}
@media (min-width: 860px) { .panel-green { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; } }
.panel-green h2 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); line-height: 1.1; }
.panel-green p { color: #DCE8E3; max-width: 52ch; }
.panel-green a:not(.btn) { color: #FFFFFF; }
.panel-text { display: grid; gap: 14px; min-width: 0; }
.panel-action { display: grid; gap: 10px; justify-items: start; min-width: 0; }
.panel-action small { color: #BFD3CB; font-size: 15px; }

/* Public: phases on the how-it-works page */
.phase-block { display: grid; gap: 24px; padding-block: 36px; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .phase-block { grid-template-columns: 300px minmax(0, 1fr); gap: 48px; } }
.phase-block h2 { font-size: 1.7rem; }
.phase-shot { max-width: 240px; }
/* The round 1 screenshot is blank below its buttons: show only the top so the next part follows right after */
.phase-shot-top { aspect-ratio: 780 / 1380; object-fit: cover; object-position: top; }
.numbered { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: n 0; }
.numbered li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; counter-increment: n; }
.numbered li::before {
  content: counter(n); width: 36px; height: 36px; border-radius: 50%; background: var(--green-tint); color: var(--green);
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700;
}
.numbered h3 { font-size: 1.12rem; font-family: var(--font-body); letter-spacing: 0; margin-bottom: 2px; }
.numbered p { color: var(--ink-soft); font-size: 17px; }

/* Public: pricing */
.price-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .price-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.price-card { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: grid; gap: 8px; align-content: start; }
.price-card.featured { border: 2px solid var(--green); }
.price { font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; line-height: 1.1; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checks li { padding-left: 32px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 14px; height: 8px; border-left: 3px solid var(--green); border-bottom: 3px solid var(--green); transform: rotate(-45deg); }

/* Public: FAQ and prose */
.faq { display: grid; gap: 12px; max-width: 760px; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 4px 20px; }
.faq summary { cursor: pointer; font-weight: 700; padding-block: 14px; list-style-position: outside; }
.faq details p { padding-bottom: 16px; color: var(--ink-soft); }
.prose { max-width: 68ch; display: grid; gap: 16px; }
.prose h2 { font-size: 1.6rem; margin-top: 18px; }
.prose h3 { font-size: 1.2rem; margin-top: 8px; }
.prose ul, .prose ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 16px; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--green-tint); }
.table-scroll { overflow-x: auto; }
.callout { background: var(--gold-tint); border-left: 4px solid var(--gold); padding: 14px 18px; border-radius: 0 12px 12px 0; }
.crumbs { font-size: 15px; color: var(--muted); }
.crumbs a { color: var(--muted); }

/* Guides: table of contents, worked examples, checklists, the closing box and the cards that link them */
.article h2[id] { scroll-margin-top: 24px; }
.toc { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; }
.prose .toc h2 { font-size: 1rem; margin: 0 0 8px; }
.toc ol { gap: 4px; }
.example { border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 0 12px 12px 0; padding: 16px 20px; display: grid; gap: 10px; }
.prose .example h3 { margin-top: 0; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--green); }
.prose .checklist { list-style: none; padding-left: 0; }
.checklist li { position: relative; padding-left: 32px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 0.2em; width: 18px; height: 18px; border: 2px solid var(--green); border-radius: 5px; }
.two-lists { display: grid; gap: 20px; }
@media (min-width: 700px) { .two-lists { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.two-lists > div { display: grid; gap: 10px; align-content: start; }
.prose .two-lists h3 { margin-top: 0; }
.guide-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 760px) { .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.guide-card { gap: 8px; }
.guide-card h2, .guide-card h3 { font-size: 1.2rem; line-height: 1.25; }
.guide-card a { color: var(--ink); text-decoration-color: var(--green); text-underline-offset: 3px; }
.guide-card a:hover { color: var(--green); }
.guide-card p { color: var(--ink-soft); }
.guide-card-first { border: 2px solid var(--green); }
.guide-grid-hub { margin-top: 32px; }
.guide-grid-hub .guide-card-first { grid-column: 1 / -1; }
.guides-note { max-width: 68ch; margin-top: 32px; }
.related { padding-top: 0; }
.related h2 { font-size: 1.6rem; margin-bottom: 20px; }

/* App: layout pieces */
.app-main { padding-block: 8px 24px; }
.estate-head { display: grid; gap: 12px; margin-bottom: 18px; }
.estate-head h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); }
.eyebrow { font-size: 14px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--green); }
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.stepper li { height: 6px; border-radius: 3px; background: var(--line); }
.stepper li.done { background: var(--green); }
.stepper li.now { background: var(--gold); }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-inline: -4px; padding-inline: 4px; scrollbar-width: thin; }
.tabs a { flex: none; padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--ink-soft); font-size: 15px; font-weight: 700; border: 1px solid var(--line); background: var(--paper); }
.tabs a[aria-current="page"] { background: var(--green); color: #FFFFFF; border-color: var(--green); }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.card h2 { font-size: 1.35rem; }
.card h3 { font-size: 1.1rem; }
.card-next { border: 2px solid var(--green); }
.card-quiet { background: transparent; }
.grid-2 { display: grid; gap: 16px; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* How it works: examples of how turns are shared out, folded under the step until opened, one chip per turn */
.phase-steps { display: grid; gap: 22px; align-content: start; }
@media (min-width: 640px) { .phase-steps > .turns { margin-left: 54px; } }
.turns-cards { display: grid; gap: 14px; }
details.turns { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
details.turns > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; padding: 16px 20px; }
details.turns > summary::-webkit-details-marker { display: none; }
details.turns > summary::after { content: ""; grid-column: 2; grid-row: 1 / span 2; align-self: center; width: 10px; height: 10px; border-right: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.15s; }
details.turns[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
details.turns > summary:hover .turns-title { color: var(--green); }
.turns-title { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; line-height: 1.25; }
.turns-sub { display: block; color: var(--muted); font-size: 15px; margin-top: 4px; }
.turns-body { padding: 0 22px 24px; display: grid; gap: 16px; }
.turns-intro { color: var(--ink-soft); max-width: 62ch; }
.turns .card { gap: 12px; background: var(--mist); }
.turns .card p { color: var(--ink-soft); }
.turn-row { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.turn { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; padding: 3px 10px 3px 3px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); }
.turn span { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 50%; font-size: 12px; background: var(--paper); border: 1px solid var(--line); }
.turn-a { background: var(--green-tint); border-color: var(--green-tint); }
.turn-b { background: var(--gold-tint); border-color: var(--gold-tint); }
@media (max-width: 480px) {
  .turn-row { gap: 4px; }
  .turn { font-size: 13px; gap: 4px; padding: 2px 7px 2px 2px; }
  .turn span { min-width: 19px; height: 19px; font-size: 11px; }
  details.turns > summary { padding: 16px 16px; }
  .turns-body { padding: 0 12px 18px; }
  .turns .card { padding: 16px 14px; }
}
@media (max-width: 375px) {
  .turns-body { padding: 0 8px 16px; }
  .turns .card { padding: 14px 10px; }
  .turn-row { gap: 3px; }
  .turn { font-size: 12.5px; gap: 3px; padding-right: 6px; }
}
.turn-rounds { display: grid; gap: 10px; }
.turn-round { display: grid; gap: 4px; }
.turns .card .turn-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.turns-qa { max-width: 68ch; display: grid; gap: 8px; margin-top: 32px; }
.turns-qa h3 { font-size: 1.12rem; margin-top: 12px; }
.turns-qa p { color: var(--ink-soft); }

.flash { padding: 12px 16px; border-radius: 12px; font-weight: 700; font-size: 16px; }
.flash-ok { background: var(--green-tint); color: var(--green-deep); }
.flash-error { background: var(--red-tint); color: var(--red); }
.flashes { display: grid; gap: 8px; margin-bottom: 16px; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--mist); color: var(--muted); white-space: nowrap; }
.badge-ok { background: var(--green-tint); color: var(--green-deep); }
.badge-wait { background: var(--gold-tint); color: #6B5200; }
.badge-bad { background: var(--red-tint); color: var(--red); }

.list { list-style: none; margin: 0; padding: 0; display: grid; }
.list > li { padding-block: 12px; border-bottom: 1px solid var(--line); min-width: 0; }
.list > li:not(.list-row) > * + * { margin-top: 8px; }
.list > li:last-child { border-bottom: 0; }
.list-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.list-row > :first-child { min-width: 0; overflow-wrap: anywhere; }

progress { display: block; width: 100%; height: 10px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 5px; background: var(--green-tint); overflow: hidden; color: var(--green); }
progress::-webkit-progress-bar { background: var(--green-tint); border-radius: 5px; }
progress::-webkit-progress-value { background: var(--green); border-radius: 5px; }
progress::-moz-progress-bar { background: var(--green); border-radius: 5px; }

/* Forms */
form { margin: 0; }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .label { font-weight: 700; font-size: 16px; }
.hint { font-size: 14px; color: var(--muted); }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="search"], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid #B9C6C0;
  background: var(--paper); color: var(--ink); font: inherit; font-size: 17px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-tint); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--green); flex: none; }
.radio-cards { display: grid; gap: 10px; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--paper); cursor: pointer; }
.radio-card input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--green); flex: none; }
.radio-card:has(input:checked) { border-color: var(--green); background: var(--green-tint); }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .span-2 { grid-column: span 2; } }
.filters { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.filters > :first-child, .filters > button { grid-column: span 2; }
@media (min-width: 640px) { .filters > :first-child, .filters > button { grid-column: auto; } }
@media (min-width: 640px) { .filters { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; } }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 700; padding: 0; margin-bottom: 8px; }
details.more > summary { cursor: pointer; font-weight: 700; color: var(--green); }
details.more[open] > summary { margin-bottom: 12px; }

/* Photos and items */
.thumbs { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.thumb { position: relative; display: grid; gap: 6px; font-size: 14px; }
.thumb img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; border-radius: 12px; background: var(--green-tint); display: block; }
.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.item-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 14px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px; text-decoration: none; color: var(--ink); }
.item-row:hover { border-color: var(--green); color: var(--ink); }
.item-row img, .item-row .noimg { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; background: var(--green-tint); display: block; }
.item-row strong { display: block; overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; }
.item-meta { font-size: 14px; color: var(--muted); }
.item-value { font-weight: 700; white-space: nowrap; text-align: right; font-size: 16px; }
.room-head { font-size: 1.05rem; font-family: var(--font-body); letter-spacing: 0; color: var(--muted); margin: 14px 0 4px; }
.item-photo { width: 100%; border-radius: 16px; background: var(--green-tint); display: block; }
.comment { padding: 12px 14px; background: var(--mist); border-radius: 12px; display: grid; gap: 4px; }

/* Round 1 card flow */
.choose { max-width: 520px; margin-inline: auto; display: grid; gap: 16px; }
.choose-card { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; display: grid; }
.choose-card img, .choose-card .noimg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--green-tint); }
.choose-body { padding: 18px 20px 20px; display: grid; gap: 6px; }
.choose-body h2 { font-size: 1.6rem; }
.choose-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choose-buttons .btn { min-height: 60px; font-size: 18px; }
.answer-yes { color: var(--green-deep); font-weight: 700; }
.answer-no { color: var(--muted); }

/* Round 2 ranking */
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: r; }
.rank li { display: grid; grid-template-columns: 24px 56px minmax(0, 1fr) auto; gap: 10px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px; counter-increment: r; }
.rank li::before { content: counter(r); font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--green); text-align: center; }
.rank img, .rank .noimg { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; background: var(--green-tint); display: block; }
.rank-moves { display: flex; gap: 6px; }
.rank-moves .btn { min-width: 44px; padding: 0; }

/* Result */
.result-me { background: var(--green); color: #FFFFFF; border-radius: 22px; padding: 24px; display: grid; gap: 8px; }
.result-me h2 { font-size: 1.5rem; }
.result-me p { color: #DCE8E3; }
.big-number { font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; line-height: 1.1; color: #FFFFFF; }
.money { font-weight: 700; white-space: nowrap; }
.money-plus { color: var(--green-deep); }
.money-minus { color: var(--red); }
.table { width: 100%; border-collapse: collapse; font-size: 16px; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 14px; color: var(--muted); font-weight: 700; }
.table .num { text-align: right; white-space: nowrap; }

/* Error pages */
.error-page { padding-block: 64px; display: grid; gap: 16px; justify-items: start; max-width: 60ch; }
.error-page h1 { font-size: clamp(2rem, 5vw, 3rem); }

/* Noscript and progressive enhancement */
.js-only { display: none; }
.has-js .js-only { display: block; }
.upload-status { font-weight: 700; color: var(--green); }
.upload-status.is-error { color: var(--red); }
.start-6 { counter-reset: n 6; }
.start-8 { counter-reset: n 8; }
.start-12 { counter-reset: n 12; }
.prose .page-title { font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.08; }
.prose .lede { max-width: none; }
.prose code { font-size: 0.9em; background: var(--green-tint); padding: 1px 6px; border-radius: 6px; }
.price-card .label { font-size: 1.15rem; font-family: var(--font-body); letter-spacing: 0; }
.nav .btn, .nav .btn:hover { color: #FFFFFF; }
.more-link { margin-top: 20px; }

.top .wrap-app .nav { gap: 16px; }
.nav a, .nav .linkbtn { white-space: nowrap; }
@media (max-width: 479px) { .nav .wide-only { display: none; } }
.settle li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.times { color: var(--muted); font-size: 14px; }
.item-meta { display: block; }
.rank strong { display: block; overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; }
figure.thumb { margin: 0; }
input[type="file"] { width: 100%; font: inherit; font-size: 16px; padding: 10px; border: 1.5px dashed #B9C6C0; border-radius: 12px; background: var(--paper); color: var(--muted); }
input[type="file"]::file-selector-button { font: inherit; font-weight: 700; border: 2px solid var(--green); background: var(--green-tint); color: var(--green); border-radius: 10px; padding: 8px 14px; margin-right: 12px; cursor: pointer; }
.flash-warn { background: var(--gold-tint); color: #5C4700; }
.item-value.value-info { font-weight: 400; color: var(--muted); }

/* Language switch: globe + short code on phones, the full name on wide screens */
.lang-switch, .lang-foot { display: inline-flex; align-items: center; gap: 5px; }
.lang-switch svg, .lang-foot svg { flex: none; }
.lang-switch .lang-long, .lang-foot .lang-short { display: none; }
@media (min-width: 860px) { .lang-switch .lang-long { display: inline; } .lang-switch .lang-short { display: none; } }
@media (max-width: 420px) { .nav { gap: 12px; } .brand { gap: 8px; } .brand-name { font-size: 21px; }
  .lang-switch .lang-short { display: none; } .nav .btn-small { padding-inline: 14px; } }

/* A photo directly on an item */
.noimg-box { aspect-ratio: 4 / 3; display: grid; place-items: center; margin: 0; background: var(--green-tint); border-radius: 14px; }
.photo-form { display: grid; gap: 10px; }

/* AI estimates, history and the "who sees what" list */
.badge-ai { background: var(--gold-tint); color: #5C4700; }
.ai-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 6px; font-size: 12px; font-weight: 700; line-height: 20px; vertical-align: 1px; background: var(--gold-tint); color: #5C4700; }
.ai-note { background: var(--gold-tint); border-radius: 12px; padding: 12px 14px; display: grid; gap: 10px; }
.ai-note p { margin: 0; }
.history > li { display: grid; gap: 4px; }
.history-lines { margin: 0; padding-left: 18px; color: var(--muted); }
.access-list li { display: block; }

/* What others changed since you last looked */
.badge-new { background: var(--green); color: #fff; }
.tab-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--gold); color: var(--ink); font-size: 12px; font-weight: 700; line-height: 1; }
.news .row { align-items: center; }
.news form { display: inline; }

/* Item page: what it is, what it is worth, what the others think; rare actions last */
.item-layout { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) {
  /* Like a product page: the photo on the left; name, description and value beside it at their own height.
     Below, comments | other actions on the same column edges. The second row is 1fr so that the photo,
     which spans both, never stretches the space between the name and the value card. */
  .item-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    grid-template-areas: "media intro" "media value" "comments more";
    gap: 24px 32px;
  }
  .item-intro { grid-area: intro; }
  .item-media { grid-area: media; }
  .item-media .item-photo, .item-media .noimg-box { aspect-ratio: 4 / 3; height: auto; object-fit: cover; }
  .value-card { grid-area: value; }
  .item-comments { grid-area: comments; margin-top: 8px; }
  .more-list { grid-area: more; margin-top: 8px; }
  .item-intro .item-title { font-size: clamp(1.8rem, 1.2rem + 1vw, 2.2rem); }
}
.value-card { display: flex; flex-direction: column; }
.value-bottom { margin-top: auto; display: grid; gap: 10px; }
.value-amount.value-none { font-family: var(--font-body); font-size: 1.15rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.item-head { display: grid; gap: 4px; }
.item-head p { margin: 0; }
.item-title { font-size: clamp(1.8rem, 1.5rem + 1.2vw, 2.5rem); line-height: 1.1; overflow-wrap: anywhere; }
.media-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; }
.media-actions details[open] { flex-basis: 100%; }
.value-card .label { font-family: var(--font-body); font-size: 13px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.value-card p { margin: 0; }
.value-amount { font-family: var(--font-display); font-weight: 700; font-size: 2.2rem; line-height: 1.05; letter-spacing: -0.015em; }
.value-counts { display: inline-flex; gap: 6px; align-items: center; color: var(--green-deep); font-weight: 600; }
.proposal { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--mist); border-radius: 12px; padding: 10px 14px; color: var(--ink); text-decoration: none; font-size: 15px; }
.proposal:hover { background: var(--green-tint); color: var(--ink); }
.proposal-go { color: var(--green); font-weight: 700; white-space: nowrap; }
.value-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.value-actions form { display: grid; }
.value-card .btn { white-space: nowrap; padding-inline: 8px; }
.btn-quiet { background: transparent; color: var(--green); border-color: var(--line); }
.btn-quiet:hover { background: var(--green-tint); border-color: var(--green-tint); color: var(--green-deep); }
.value-card .appraisal-note { background: var(--gold-tint); border-radius: 10px; padding: 10px 12px; }
.appraise > summary { font-size: 14px; padding-block: 4px; }
.appraise .form { margin-top: 6px; }
.pending-list { margin: 6px 0 0; padding-left: 1.2em; }
.appraisal-warn { background: var(--gold-tint); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; margin-bottom: 12px; }
.appraisal-warn p { margin: 0; }
.card.appraisal-card { background: var(--gold-tint); border-color: var(--gold-tint); }
.notice-warn { margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--gold-tint); color: #5C4700; font-size: 16px; }
.ready-note { margin: 0; background: var(--green-tint); color: var(--green-deep); border-radius: 10px; padding: 10px 12px; font-size: 15px; }
/* An item decided in advance (a will, an agreement, not the estate's): it skips the rounds, so say so plainly. */
.decided-banner { background: var(--green-tint); color: var(--green-deep); border-radius: 12px; padding: 14px 16px; display: grid; gap: 6px; font-size: 16px; }
.decided-banner p { margin: 0; }
.decided-banner a { color: var(--green-deep); }
.badge-decided { background: var(--green-tint); color: var(--green-deep); }
.decided-note { background: var(--green-tint); color: var(--green-deep); border-radius: 12px; padding: 12px 14px; font-size: 15px; }
.dup-banner { background: var(--gold-tint); color: #5C4700; border-radius: 12px; padding: 14px 16px; display: grid; gap: 6px; font-size: 16px; }
.dup-banner p { margin: 0; }
.dup-banner .list > li { border-color: rgba(92, 71, 0, 0.18); padding-block: 8px; }
.dup-banner a { color: #5C4700; }
.comment-send { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 12px; }
.comment-send .propose { flex: 1 1 160px; }
.propose > summary { cursor: pointer; list-style: none; color: var(--green); font-weight: 700; font-size: 15px; padding-block: 10px; }
.propose > summary::-webkit-details-marker { display: none; }
.propose[open] > summary { margin-bottom: 4px; }
.more-list { padding: 0; gap: 0; overflow: hidden; }
.more-row { border-bottom: 1px solid var(--line); margin: 0; }
.more-row:last-child { border-bottom: 0; }
.more-row > summary, .more-button { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 54px; box-sizing: border-box; padding: 12px 20px; cursor: pointer; list-style: none; font-weight: 400; color: var(--ink); }
.more-row > summary::-webkit-details-marker { display: none; }
.more-row > summary::after, .more-button::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); }
.more-row[open] > summary { border-bottom: 1px solid var(--line); }
.more-row[open] > summary::after { transform: rotate(45deg); }
.more-row > summary:hover, .more-button:hover { background: var(--mist); }
.more-body { padding: 16px 20px 20px; }
.more-button { width: 100%; background: none; border: 0; font: inherit; text-align: left; color: var(--red); }
.more-button::after { border-color: var(--red); }

/* Photo picker in the page's language (see the file_pick macro). Without JavaScript the browser's own shows. */
.file-pick { position: relative; }
.file-button, .file-name { display: none; }
.has-js .file-pick { display: flex; align-items: center; gap: 12px; min-width: 0; max-width: 100%; min-height: 56px; padding: 6px 8px; box-sizing: border-box; border: 1.5px dashed #B9C6C0; border-radius: 12px; background: var(--paper); }
.has-js .file-pick input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.has-js .file-button { display: inline-block; flex: none; font-weight: 700; border: 2px solid var(--green); background: var(--green-tint); color: var(--green); border-radius: 10px; padding: 6px 14px; }
/* width 0 + flex 1: a long camera file name takes the space that is left and never widens the page. */
.has-js .file-name { display: block; flex: 1 1 0; width: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.has-js .file-pick.is-chosen .file-name { color: var(--ink); }
.has-js .file-pick:hover .file-button, .has-js .file-pick.is-over .file-button { background: var(--green); color: #fff; }
.has-js .file-pick.is-over { border-color: var(--green); background: var(--green-tint); }
.has-js .file-pick:focus-within { outline: 3px solid var(--green); outline-offset: 2px; }

/* Rooms: rename one on the photos page, move a photo to another on the photo page. Folded until asked for. */
.room-head-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; }
.room-head-row > :first-child { min-width: 0; overflow-wrap: anywhere; }
.room-edit > summary { cursor: pointer; list-style: none; color: var(--green); font-weight: 700; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; padding-block: 6px; }
.room-edit > summary::-webkit-details-marker { display: none; }
.room-edit[open] { flex-basis: 100%; }
.room-edit[open] > summary { margin-bottom: 4px; }
.room-edit-form { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.room-edit-form label { font-weight: 700; font-size: 15px; }
.room-edit-row { display: flex; gap: 8px; flex-wrap: wrap; }
.room-edit-row input { flex: 1 1 12em; min-width: 0; }
.room-edit-form .hint { margin: 0; }

/* Photos page: the check of the chosen photos (blurry or dark), right under the photo picker. */
.photo-check { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--gold-tint); border: 1px solid #E6D08A; }
.photo-check.is-checking { background: none; border-color: transparent; padding: 0; color: var(--muted); font-size: 15px; }
.photo-check > * + * { margin-top: 6px; }
.photo-check-title { font-weight: 700; }
.photo-check-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.photo-check-list li { display: flex; align-items: center; gap: 12px; }
.photo-check-list li > div { display: grid; gap: 2px; justify-items: start; min-width: 0; }
.photo-check-list img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex: none; background: var(--line); }
.photo-check-list span { font-weight: 600; }

/* Photos page: the rooms already added, as buttons above the room field. Without JavaScript the field's list suggests them. */
.room-picks { display: none; }
.has-js .room-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.room-pick { font: inherit; font-size: 15px; font-weight: 600; min-height: 40px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.room-pick:hover { border-color: var(--green); }
.room-pick[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.room-pick:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

/* Photos page: rooms with few photos sit side by side on wide screens instead of one under the other. */
.section-intro { display: grid; gap: 4px; }
.upload-foot { margin: 0; }
@media (min-width: 640px) {
  .photo-rooms { display: flex; flex-wrap: wrap; gap: 4px 28px; align-items: flex-start; }
  .photo-room { flex: 0 1 100%; min-width: 0; display: grid; gap: 8px; align-content: start; }
  .photo-room .thumbs { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .photo-room.room-size-1 { flex-basis: 170px; }
  .photo-room.room-size-2 { flex-basis: 350px; }
  .photo-room.room-size-3 { flex-basis: 530px; }
  .photo-room.room-size-4 { flex-basis: 710px; }
}
.photo-room { display: grid; gap: 8px; align-content: start; }
.check-hint { margin: -6px 0 0 32px; }

/* Funeral-home page: the pilot date and the film */
.pilot-badge { justify-self: start; margin: 4px 0 0; background: var(--gold); color: var(--green-deep); font-family: var(--font-display); font-weight: 700; font-size: clamp(1.15rem, 0.9rem + 1vw, 1.5rem); line-height: 1.2; padding: 10px 22px; border-radius: 999px; }
.page-head .pilot-badge { color: var(--green-deep); }
.film { margin: 0; display: grid; gap: 10px; }
.film video { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: var(--radius); background: var(--green-deep); box-shadow: 0 18px 40px rgba(22, 32, 28, 0.16); display: block; }
.section > h2 + .faq { margin-top: 16px; }

/* Demo: Birgitta's estate, with the app's own cards and buttons on a public page */
.demo { max-width: 600px; margin-inline: auto; display: grid; gap: 24px; padding-block: 20px 56px; }
.demo h1 { font-size: clamp(1.8rem, 4.5vw, 2.4rem); line-height: 1.1; }
.demo .lede { max-width: none; }
.demo-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font-size: 15px; color: var(--muted); }
.demo-bar .badge { background: var(--gold-tint); color: #5C4700; }
.demo-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; counter-reset: s; }
.demo-steps li { counter-increment: s; border-top: 4px solid var(--line); padding-top: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.demo-steps li::before { content: counter(s) ". "; }
.demo-steps li[aria-current] { border-color: var(--green); color: var(--green); }
.demo-art { display: grid; place-items: center; background: #EAEFEC; }
.demo-art svg { width: 100%; height: 100%; display: block; }
.choose-card .demo-art { aspect-ratio: 4 / 3; padding: 8% 14%; }
.choose-body h1 { font-size: 1.6rem; }
.item-row .demo-art { width: 72px; height: 72px; border-radius: 10px; padding: 8px; }
.rank .demo-art { width: 56px; height: 56px; border-radius: 10px; padding: 6px; }
.demo-value { font-weight: 700; font-size: 15px; white-space: nowrap; text-align: right; }
.demo-value.muted { font-weight: 400; font-size: 14px; }
.rank-moves .is-off { opacity: 0.35; cursor: default; }
.rank-moves .is-off:hover { background: transparent; color: var(--green); }
.demo-next { justify-items: start; }
.demo .choose { width: 100%; }
/* Pricing: three short questions right under the prices */
.price-faq { margin: -24px 0 48px; }
.demo-turns .is-you strong { color: var(--green); }
.demo .panel-green { margin: 0; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.demo .panel-green h2 { font-size: 1.6rem; }
@media (max-width: 420px) {
  .demo .item-row { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; }
  .demo .item-row .demo-art { width: 56px; height: 56px; padding: 6px; }
  .demo-steps li { font-size: 12px; }
}
