:root {
    color-scheme: light;
    --paper: #f4f5f1;
    --surface: #fff;
    --ink: #202b25;
    --muted: #56645c;
    --line: #dce3dc;
    --green: #254a3a;
    --moss: #e8efe8;
    --red: #922e2a;
    font-family: "Avenir Next", Avenir, system-ui, sans-serif;
    font-size: 100%;
    color: var(--ink);
    background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--green); text-underline-offset: .19em; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 3px solid #4b7d62; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.03; letter-spacing: -.055em; }
h2 { font-size: 1.22rem; letter-spacing: -.025em; }
h3 { font-size: 1.05rem; }
p { line-height: 1.58; }
small { display: block; color: var(--muted); font-size: .875rem; line-height: 1.35; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; font-weight: 700; color: var(--ink); white-space: nowrap; }
.brand-mark { display: grid; place-items: center; background: var(--green); color: white; border-radius: .58rem; width: 2.35rem; height: 2.35rem; letter-spacing: -.04em; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.nav-inner { margin: auto; width: min(100% - 3rem, 76rem); display: flex; align-items: center; gap: 2.25rem; min-height: 4.4rem; }
nav { display: flex; align-items: center; gap: .2rem; flex: 1; }
nav a { padding: .62rem .78rem; text-decoration: none; color: var(--muted); font-size: .92rem; font-weight: 600; white-space: nowrap; border-radius: .45rem; }
nav a:hover, nav a[aria-current] { color: var(--green); background: var(--moss); }
.quiet { border: 0; background: transparent; padding: .5rem 0; color: var(--muted); font-size: .875rem; white-space: nowrap; }
.wrap { width: min(100% - 3rem, 76rem); margin: 0 auto; padding: 2rem 0 3.5rem; }
.hero { min-height: 20rem; position: relative; overflow: hidden; display: flex; align-items: end; border-radius: 1rem; background: #374239; color: #fff; isolation: isolate; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 55% 58%; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(78deg, #17261feF 0%, #1a2923a6 45%, #20342915 88%); }
.hero-content { padding: clamp(1.35rem, 5vw, 3.25rem); }
.hero h1 { font-family: Georgia, serif; font-size: clamp(3.15rem, 8vw, 6rem); font-weight: 400; line-height: .95; letter-spacing: -.075em; margin: .45rem 0 1.3rem; }
.location { font-size: .89rem; font-weight: 650; letter-spacing: .06em; }
.actions, .record-meta { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.button { appearance: none; display: inline-flex; align-items: center; justify-content: center; min-height: 2.7rem; padding: .55rem .9rem; text-decoration: none; font-weight: 650; line-height: 1.2; font-size: .9rem; border-radius: .48rem; border: 1px solid var(--line); color: var(--green); background: var(--surface); }
.button:hover { background: var(--moss); }
.primary { background: var(--green); border-color: var(--green); color: #fff; }
.primary:hover { background: #33624d; }
.light { background: #fff; color: var(--green); }
.ghost { color: #fff; border-color: #ffffff91; background: #16291d52; }
.ghost:hover { background: #16291dcb; }
.danger { color: var(--red); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .85rem; margin: 1rem 0; }
.stat { padding: 1.05rem 1.2rem; display: grid; text-decoration: none; gap: .15rem; }
.stat strong { font-size: 1.85rem; line-height: 1; letter-spacing: -.07em; }
.stat span { color: var(--muted); font-size: .875rem; }
.stat, .panel, .reference-card { background: var(--surface); border: 1px solid var(--line); border-radius: .8rem; }
.panel { padding: clamp(1rem, 2.5vw, 1.5rem); min-width: 0; align-self: start; }
.dashboard-grid, .two-col, .detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
.dashboard-grid { grid-template-columns: 1.04fr .96fr; }
.detail-grid { grid-template-columns: 1.1fr .9fr; }
.section-heading, .page-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.section-heading { margin-bottom: .85rem; }
.section-heading a { white-space: nowrap; font-size: .875rem; font-weight: 650; }
.page-heading { margin-bottom: 1.5rem; }
.panel > h2, .panel > p { margin-bottom: .75rem; }
.record { display: flex; align-items: center; justify-content: space-between; gap: .65rem; border-top: 1px solid var(--line); min-height: 3.8rem; padding: .7rem 0; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.record small { margin-top: .18rem; }
a.record:hover { color: #395e48; }
.compact { min-height: 2.85rem; }
.pill { color: var(--green); background: var(--moss); border-radius: 2rem; padding: .27rem .58rem; font-size: .8rem; line-height: 1.2; font-weight: 650; white-space: nowrap; }
.reference { margin-top: 1.2rem; }
.reference-grid, .room-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; }
.reference-card { padding: .95rem; font-weight: 650; text-decoration: none; }
.stat:hover, .reference-card:hover, .room-card:hover { border-color: #7d9a87; }
.room-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.room-card { color: var(--ink); text-decoration: none; }
.room-card img { display: block; width: 100%; height: clamp(8rem, 19vw, 15rem); object-fit: cover; border-radius: .45rem; margin-bottom: .8rem; }
.room-card p { margin: .42rem 0 .65rem; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.stack { display: grid; gap: .9rem; }
.stack h2 { margin: 0; }
label { display: grid; gap: .3rem; align-content: start; color: var(--ink); font-size: .9rem; font-weight: 620; }
input:not([type=checkbox]), textarea, select { min-width: 0; width: 100%; padding: .58rem .65rem; min-height: 2.65rem; background: var(--surface); color: var(--ink); border: 1px solid #bdcbbf; border-radius: .4rem; font-size: 1rem; }
textarea { resize: vertical; }
input[readonly] { background: var(--paper); }
select { appearance: none; padding-right: 2rem; background-image: linear-gradient(45deg, transparent 50%, #587062 50%), linear-gradient(135deg, #587062 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.filters { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: .7rem; align-items: end; margin: 0 0 1.05rem; }
.muted { color: var(--muted); }
.back { display: inline-block; margin-bottom: .9rem; font-weight: 650; }
.editor { max-width: 52rem; }
.below { margin-top: 1rem; }
.shell { margin: 0; }
.shell canvas { display: block; width: 100%; height: auto; border: 1px solid #ccd8ce; border-radius: .55rem; background: #f3f7f3; }
.shell figcaption { display: flex; flex-wrap: wrap; gap: .45rem .85rem; justify-content: space-between; font-size: .87rem; margin: .65rem 0; }
.shell figcaption strong { color: var(--green); }
.measure { border-top: 1px solid var(--line); }
.measure summary { padding: .75rem 0; }
.measure summary strong, .measure summary small { display: inline-block; margin-left: .5rem; }
.measure-form { padding: .1rem 0 1rem; }
fieldset { margin: 0; padding: .4rem .7rem .65rem; border: 1px solid var(--line); border-radius: .4rem; min-width: 0; max-height: 18rem; overflow-y: auto; }
legend { color: var(--green); font-weight: 650; padding: 0 .3rem; }
.check { display: flex; gap: .55rem; align-items: start; padding: .38rem .15rem; }
.check input { accent-color: var(--green); width: 1.08rem; height: 1.08rem; flex: none; }
.created { margin-bottom: 1rem; border-color: #93b49d; }
.created p { margin-top: .6rem; }
.notice, .errors { padding: .7rem 1rem; margin-bottom: 1rem; border-radius: .55rem; background: var(--moss); }
.errors { color: #7c2723; background: #f9ebe8; }
.gate .wrap { min-height: 100svh; display: grid; align-content: center; justify-items: center; }
.gate-card, .gate .errors { width: min(100%, 27rem); }
.gate-card h1 { margin: 1rem 0; font-size: 2rem; }
.trade .wrap { width: min(100% - 3rem, 56rem); }
.trade-brand { margin-bottom: 1.35rem; }
.trade .page-heading { align-items: end; }
.trade .page-heading h1 { margin: .25rem 0 0; }
.trade-record { border-top: 1px solid var(--line); padding: .85rem 0; }
.trade-record > * + * { margin-top: .35rem; }
.dimensions { display: grid; grid-template-columns: 1fr 1fr; margin: .8rem 0 0; gap: .45rem .7rem; }
.dimensions dd { margin: 0; }
.multiline { white-space: pre-wrap; overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 760px) {
    .nav-inner { width: min(100% - 1.5rem, 76rem); flex-wrap: wrap; gap: .35rem .7rem; padding: .65rem 0 .4rem; justify-content: space-between; }
    .nav-inner nav { order: 3; width: 100%; flex: auto; overflow-x: auto; }
    nav a { padding: .55rem .55rem; font-size: .875rem; }
    .wrap, .trade .wrap { width: calc(100% - 1.5rem); padding-top: 1rem; }
    .hero { min-height: 17rem; }
    .hero::after { background: linear-gradient(22deg, #182920f0, #1a292377 75%, #20342920); }
    .dashboard-grid, .two-col, .detail-grid { grid-template-columns: minmax(0, 1fr); }
    .stats, .reference-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .page-heading { align-items: start; }
    .trade .page-heading { align-items: start; flex-direction: column; }
}
@media (max-width: 390px) {
    .fields, .room-grid, .dimensions { grid-template-columns: minmax(0, 1fr); }
    .dimensions dd { margin-bottom: .45rem; }
    .record { align-items: start; }
    .record-meta { justify-content: flex-end; }
}
@media print {
    :root { background: white; }
    .button, .topbar { display: none !important; }
    .wrap, .trade .wrap { width: 100%; padding: 0; }
    .trade { font-size: 10pt; }
    .trade-brand { margin-bottom: 4mm; }
    .trade-brand .brand-mark { color: #254a3a; border: 1px solid #b5c1b7; }
    .trade .page-heading { margin-bottom: 4mm; }
    .trade h1 { font-size: 25pt; }
    .trade h2, .trade h3 { break-after: avoid; }
    .trade h2 { font-size: 13pt; }
    .trade .panel { border: 0; border-top: 1px solid #b5c1b7; border-radius: 0; margin: 0; padding: 3mm 0; }
    .trade .panel h2 { margin-bottom: 2mm; }
    .trade .trade-record, .trade .record { min-height: 0; padding: 1mm 0 0; border: 0; break-inside: avoid; }
    .trade .dimensions { grid-template-columns: 1fr 1.3fr; gap: 1.5mm 4mm; }
    .trade .dimensions dd { break-inside: avoid; }
    .trade .trade-room.has-shell { display: grid; grid-template-columns: 79mm minmax(0, 1fr); gap: 2mm 5mm; align-items: start; }
    .trade-room.has-shell h2, .trade-room.has-shell p { grid-column: 1 / -1; }
    .trade-room.has-shell p { grid-row: 3; }
    .trade .trade-room.has-shell .dimensions { grid-column: 2; grid-row: 2; margin: 0; grid-template-columns: 1fr; gap: 0; }
    .trade .trade-room.has-shell dd { margin-bottom: 2mm; }
    .trade .trade-room.has-shell dt, .trade .trade-room.has-shell dd { break-after: avoid; }
    .trade .trade-room.has-shell dd:last-child { break-after: auto; }
    .shell { max-width: 100mm; break-inside: avoid; }
    .shell figcaption { font-size: 9pt; }
    a { color: black; }
}
.opening-fields { padding-top: .65rem; }
[hidden] { display: none !important; }
.separate-code { margin-top: .85rem; }
.separate-code .fields, .separate-code .actions { margin-top: .65rem; }

/* Soft depth and plan geometry in the Seabrook palette. */
:root {
    --panel-shine: linear-gradient(145deg, #ffffff 38%, #f4f8f3 100%);
    --panel-shadow: 0 1px 2px #203b2810, 0 12px 28px -22px #2946344d;
}
body { background: radial-gradient(ellipse at 81% 0%, #dce9dd 0, transparent 38rem), var(--paper); }
.topbar { background: linear-gradient(130deg, #fff, #f1f6f0); }
.nav-inner { gap: clamp(.8rem, 2vw, 1.6rem); }
nav { flex: none; border-radius: .75rem; padding: .2rem; background: #e3ece480; }
.nav-inner > form { margin-left: auto; }
nav a[aria-current] { background: linear-gradient(145deg, #fff, #edf4ec); box-shadow: 0 1px 3px #27453724; }
.brand-mark, .primary { background: linear-gradient(135deg, #39664d, #173c2e); box-shadow: inset 0 1px #ffffff30, 0 3px 7px #254a3a24; }
.project-context { width: min(100% - 3rem, 76rem); margin: auto; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-top: .9rem; }
.project-context a { font-size: .875rem; text-decoration: none; color: var(--green); font-weight: 650; }
.project-context a:last-child { color: var(--muted); }
.project-context a:hover { text-decoration: underline; }
.project-context + .wrap { padding-top: .9rem; }
.hero { min-height: 22rem; border-radius: 1.35rem; background: #193b2e; box-shadow: 0 18px 38px -25px #153a2d93; }
.hero img { left: auto; width: 75%; object-position: 60% 58%; }
.hero::after { background: linear-gradient(90deg, #16372a 4%, #16372af2 28%, #16372a64 59%, #16372a14 100%), linear-gradient(0deg, #122e2377 2%, transparent 52%); }
.hero::before {
    content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
    background: linear-gradient(90deg, #d7e7dc19 1px, transparent 1px), linear-gradient(#d7e7dc19 1px, transparent 1px);
    background-size: 2.5rem 2.5rem; mask-image: linear-gradient(100deg, #000, transparent 59%);
}
.hero-content { width: 100%; }
.hero h1 { max-width: 13ch; font-size: clamp(3.05rem, 7.5vw, 5.85rem); font-weight: 400; margin: 0 0 1.4rem; line-height: .98; }
.hero-without-photo { min-height: 17rem; }
.hero-without-photo::after { background: radial-gradient(ellipse at 95% 0%, #7da58782, transparent 65%), linear-gradient(125deg, #183d2f, #244e3b 65%, #1a3c2e); }
.panel, .stat, .reference-card { background: var(--panel-shine); box-shadow: var(--panel-shadow); border-radius: 1rem; }
.stat { position: relative; overflow: hidden; }
.stat::after, .project-card::after {
    content: ""; position: absolute; width: 6rem; aspect-ratio: 1; top: -3rem; right: -2rem;
    border: 1px solid #8fae963d; border-radius: 50%; box-shadow: 0 0 0 .75rem #a1bda51a, 0 0 0 1.5rem #a1bda515; pointer-events: none;
}
.stat:nth-child(even)::after { top: auto; bottom: -3.75rem; }
.stat:hover, .reference-card:hover, .room-card:hover, .project-card:hover { border-color: #7d9a87; box-shadow: 0 10px 25px -17px #234e3973; }
.project-costs {
    display: flex; align-items: center; flex-wrap: wrap; gap: .9rem 2rem; margin-top: 1rem;
    min-height: 5rem; padding: .95rem 1.2rem; border-radius: 1rem; border: 1px solid #c4d8c6;
    background: radial-gradient(ellipse at 95% 0%, #d7e9d6, transparent 62%), linear-gradient(130deg, #fbfdf9, #edf4ec);
    box-shadow: var(--panel-shadow);
}
.project-costs div { display: grid; gap: .17rem; }
.project-costs div > span { font-size: .875rem; color: var(--muted); }
.project-costs strong { color: var(--green); font-size: clamp(1.25rem, 3vw, 1.6rem); font-variant-numeric: tabular-nums; line-height: 1.15; }
.project-costs strong small { display: inline; font-weight: 500; }
.cost-missing { margin-left: auto; font-size: .875rem; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr)); gap: 1rem; }
.project-card { color: var(--ink); text-decoration: none; display: grid; min-height: 9rem; position: relative; overflow: hidden; }
.project-card-cost { display: flex; gap: 1.5rem; align-self: end; align-items: end; margin-top: .9rem; }
.project-card-cost strong { font-size: 1.3rem; color: var(--green); }
.gate .wrap { isolation: isolate; position: relative; }
.gate .wrap::after {
    content: ""; width: min(33rem, 90vw); aspect-ratio: 1; border: 1px solid #9bba9e5e; border-radius: 36%;
    position: absolute; z-index: -1; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(21deg);
    box-shadow: 0 0 0 1rem #719b721c, 0 0 0 2rem #719b7210; pointer-events: none;
}
.trade .page-heading { padding: 1.2rem 1.4rem; border-radius: 1rem; border: 1px solid #c7daca; background: radial-gradient(ellipse at 90% -15%, #d1e5d0, transparent 75%), linear-gradient(140deg, #fff, #ebf4ea); }
@media (max-width: 900px) {
    .nav-inner { flex-wrap: wrap; gap: .45rem .75rem; padding: .6rem 0; }
    .nav-inner nav { order: 3; width: 100%; flex: auto; overflow-x: auto; }
}
@media (max-width: 760px) {
    .project-context { width: calc(100% - 1.5rem); }
    .hero { min-height: 18rem; }
    .hero img { width: 100%; }
    .hero::after { background: linear-gradient(27deg, #15372bf7 6%, #173b2e9f 54%, #15372b24 100%); }
    .hero h1 { font-size: clamp(2.7rem, 10vw, 4.5rem); }
    .project-costs { gap: .7rem 1.2rem; }
    .cost-missing { margin-left: 0; }
    .trade .page-heading { padding: 1rem; }
}
@media print {
    body { background: white; }
    .trade .page-heading { background: none; border: 0; border-radius: 0; padding: 0; }
    .trade .panel, .trade .brand-mark { background: #fff; box-shadow: none; }
}

.project-context.context-overview { justify-content: flex-end; }
.hero::before { z-index: 0; }
.hero-content { position: relative; z-index: 1; }
@media (max-width: 760px) {
    .nav-inner nav { flex-wrap: wrap; overflow: visible; gap: .1rem; }
    .nav-inner nav a { min-height: 2.45rem; display: inline-flex; align-items: center; }
}
