/* Big Island Remodel: site and HomeBase styles.
   One system: system type, white and soft-gray surfaces, the logo's blue as
   the only accent, crisp corners (a subtle radius, never a pill), one scroll
   shell (#siteScroll) so the pinned header holds on iOS. Every class the 49
   content routes use is styled here. */
:root {
  --bg: #ffffff;
  --bg-2: #f5f5f7;
  --bg-3: #fbfbfd;
  --ink: #1d1d1f;
  --ink-2: #424245;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --line-2: #e8e8ed;
  --accent: #3e5fff;
  --accent-2: #2c49e6;
  --accent-soft: #eef1ff;
  --ok: #1a7f45;
  --ok-soft: #e7f6ed;
  --green: #1fbf62;
  --warn: #8a5a00;
  --warn-soft: #fff4d6;
  --night: #101114;
  --radius: 10px;
  --radius-sm: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 28px rgba(0, 0, 0, .06);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .05), 0 24px 60px rgba(0, 0, 0, .12);
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --header-h: 56px;
  /* Spacing: one 4px grid. */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px;
  --space-8: 32px; --space-10: 40px; --space-12: 48px; --space-16: 64px; --space-20: 80px; --space-24: 96px;
  /* Type scale: every font-size on the site is one of these. */
  --text-xs: .75rem;      /* 12 */
  --text-sm: .875rem;     /* 14 */
  --text-base: 1rem;      /* 16 */
  --text-body: 1.0625rem; /* 17, running copy */
  --text-lg: 1.25rem;     /* 20 */
  --text-xl: 1.5rem;      /* 24 */
  --text-lead: clamp(1.0625rem, 1.6vw, 1.25rem);
  --text-2xl: clamp(1.75rem, 3.6vw, 2.5rem);
  --text-3xl: clamp(2.25rem, 5vw, 3.5rem);
  --text-4xl: clamp(2.5rem, 6.4vw, 4.5rem);
  /* Layout: one container, one gutter; prose uses the reading width of the same container. */
  --container: 1120px;
  --container-text: 760px;
  --gutter: 16px;
  --target: 44px;
  /* Motion and focus. */
  --duration-fast: 120ms;
  --duration: 200ms;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --focus-ring: 3px solid rgba(62, 95, 255, .45);
  /* Roles that flip in the dark scheme. */
  --link: #2c49e6;
  --surface: #ffffff;
  --on-accent: #ffffff;
  --on-ink: #ffffff;
  --glass: rgba(255, 255, 255, .86);
  --glass-strong: rgba(255, 255, 255, .97);
  --hairline: rgba(0, 0, 0, .08);
  color-scheme: light dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html { background: var(--bg); }
body { overflow: hidden; background: var(--bg); color: var(--ink); font: var(--text-body)/1.55 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
#siteScroll { height: 100%; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; position: relative; scroll-padding-top: calc(var(--header-h) + 12px); }
img, video { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: var(--focus-ring); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); line-height: 1.1; letter-spacing: -.02em; margin: var(--space-12) 0 var(--space-3); font-weight: 700; }
h1 { font-size: var(--text-3xl); letter-spacing: -.035em; margin-top: var(--space-1); line-height: 1.05; }
h2 { font-size: var(--text-2xl); letter-spacing: -.028em; }
h3 { font-size: var(--text-lg); letter-spacing: -.015em; margin-top: var(--space-8); margin-bottom: var(--space-2); }
h4 { font-size: var(--text-body); letter-spacing: -.01em; }
p { margin: 0 0 var(--space-4); }
.wrap { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 60; background: var(--ink); color: var(--on-ink); padding: 8px 16px; border-radius: var(--radius-sm); }
.skip:focus { left: 8px; }
main:focus { outline: none; }
.eyebrow { font-size: var(--text-sm); font-weight: 600; letter-spacing: .02em; color: var(--link); margin: 0 0 var(--space-2); }
.muted { color: var(--muted); }
.small { font-size: var(--text-sm); }
.center { justify-content: center; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; min-height: calc(var(--header-h) + 1px); background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--hairline); }
.bar { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); width: min(var(--container), 100% - 2 * var(--gutter)); }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); font: 600 var(--text-base) var(--display); letter-spacing: -.01em; min-height: 44px; white-space: nowrap; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand img { width: 26px; height: 34px; object-fit: contain; }
.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0; align-items: center; }
.nav-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: var(--ink-2); font-size: var(--text-sm); font-weight: 500; border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap; }
.nav-link:hover { color: var(--ink); text-decoration: none; }
.nav-link[aria-current="page"] { color: var(--ink); font-weight: 600; }
summary.nav-link { list-style: none; }
summary.nav-link::-webkit-details-marker { display: none; }
summary.nav-link::after { content: ''; width: 6px; height: 6px; margin-left: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .7; }
.has-sub { position: relative; }
.has-sub .sub { position: absolute; top: calc(100% + 6px); left: -8px; display: block; list-style: none; margin: 0; background: var(--glass-strong); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 8px; min-width: 250px; box-shadow: var(--shadow-lg); }
.has-sub .sub .nav-link { display: flex; width: 100%; font-size: var(--text-sm); color: var(--ink); }
.has-sub .sub .nav-link:hover { background: var(--bg-2); }
.reach-btns { display: flex; gap: 8px; align-items: center; margin-left: 8px; }
.head-phone { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: var(--ink-2); font-size: var(--text-sm); font-weight: 500; white-space: nowrap; }
.menu-btn { display: none; width: 44px; height: 44px; border: 0; border-radius: var(--radius-sm); background: transparent; padding: 16px 12px; flex-direction: column; justify-content: space-between; cursor: pointer; }
.menu-btn span { display: block; height: 1.5px; background: var(--ink); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.site-header.open .menu-btn span:nth-child(1) { transform: translateY(6.75px) rotate(45deg); }
.site-header.open .menu-btn span:nth-child(2) { opacity: 0; }
.site-header.open .menu-btn span:nth-child(3) { transform: translateY(-6.75px) rotate(-45deg); }
.nav-sheet-reach { display: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: var(--radius-sm); background: var(--accent); color: var(--on-accent); font: 600 var(--text-base) var(--sans); letter-spacing: -.005em; border: 1.5px solid var(--accent); cursor: pointer; transition: background .2s ease, border-color .2s ease, color .2s ease, transform .1s ease; }
.btn svg { width: 18px; height: 18px; }
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-ghost { background: transparent; color: var(--link); border-color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--link); border-color: var(--accent-2); }
.btn-quiet { background: var(--bg-2); color: var(--ink); border-color: var(--bg-2); }
.btn-quiet:hover { background: var(--line-2); border-color: var(--line-2); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn-dark:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn-sm { min-height: 42px; padding: 0 16px; font-size: var(--text-sm); }
.btn-xs { min-height: 38px; padding: 0 12px; font-size: var(--text-sm); }
.btn-xs svg { width: 16px; height: 16px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; align-items: center; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; font-weight: 600; color: var(--link); }
.text-link.chev::after { content: ''; width: 7px; height: 7px; margin-left: 8px; border-right: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(45deg); }
.crumb { margin: 0; }
.card-link { margin: 4px 0 0; }

/* ---------- home: hero ---------- */
.hero { position: relative; min-height: min(88vh, 820px); display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: var(--night); }
.hero-media { position: absolute; inset: 0; }
.hero-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity 1.4s ease, transform 7s ease; }
.hero-slide.on { opacity: 1; transform: scale(1); }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .18) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .55) 72%, rgba(0, 0, 0, .78) 100%); }
.hero-copy { position: relative; z-index: 1; padding: 72px 0 64px; }
.hero .eyebrow { color: rgba(255, 255, 255, .85); }
.hero h1 { color: #fff; max-width: 14ch; font-size: var(--text-4xl); }
.hero .lead { color: rgba(255, 255, 255, .88); max-width: 46ch; font-size: var(--text-lead); line-height: 1.45; }
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .85); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .14); color: #fff; }

/* ---------- bands ---------- */
.band { padding: 96px 0; }
.band.alt { background: var(--bg-2); }
.band.dark { background: var(--night); color: #f5f5f7; }
.band.dark h2, .band.dark h3 { color: #fff; }
.band.dark .sub, .band.dark .muted { color: #a1a1a6; }
.band-head { max-width: 760px; margin-bottom: 40px; }
.band-head.center { margin-inline: auto; text-align: center; }
.band-head h2 { margin-top: 0; }
.sub { color: var(--muted); margin-top: -4px; font-size: var(--text-body); line-height: 1.45; }
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.value { background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 24px; }
.value h3 { margin-top: 0; font-size: var(--text-body); }
.value p { color: var(--ink-2); margin: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin: 16px 0; }
.card { background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 24px; }
.band.alt .card, .band.alt .value { border-color: transparent; }
.card > img { border-radius: var(--radius-sm); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; margin-bottom: 16px; }
.card h2, .card h3 { margin-top: 0; }
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0; }
.work-grid img { aspect-ratio: 1; object-fit: cover; width: 100%; border-radius: var(--radius-sm); background: var(--bg-2); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.steps li { background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 24px; }
.band.alt .steps li { border-color: transparent; }
.steps .n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--link); font-weight: 700; font-size: var(--text-base); }
.steps h3 { margin: 16px 0 8px; font-size: var(--text-body); }
.steps p { margin: 0; color: var(--ink-2); font-size: var(--text-base); }

/* home: service tiles */
.tiles { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.tile { position: relative; grid-column: span 4; border-radius: var(--radius-lg); overflow: hidden; background: var(--night); color: #fff; min-height: 340px; display: flex; align-items: flex-end; }
.tile.wide { grid-column: span 6; min-height: 400px; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, .7) 100%); }
.tile-copy { position: relative; z-index: 1; padding: 24px; }
.tile h3 { color: #fff; margin: 0 0 4px; font-size: var(--text-xl); }
.tile p { margin: 0; color: rgba(255, 255, 255, .85); font-size: var(--text-base); }
.tile:hover { text-decoration: none; }
.tile:hover img { transform: scale(1.03); }

/* home: HomeBase showcase */
.hb-show { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hb-show h2 { font-size: var(--text-3xl); margin: 0 0 var(--space-1); }
.feature-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; }
.feature-list li { display: grid; grid-template-columns: 40px 1fr; gap: 16px; align-items: start; }
.feature-list .ico { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--link); display: grid; place-items: center; }
.feature-list .ico svg { width: 20px; height: 20px; }
.feature-list h3 { margin: 0 0 4px; font-size: var(--text-body); }
.feature-list p { margin: 0; color: var(--muted); font-size: var(--text-base); }
.band.dark .feature-list .ico { background: rgba(62, 95, 255, .22); color: #aebcff; }
.band.dark .feature-list p { color: #a1a1a6; }

/* a phone drawn in CSS around a live-looking HomeBase screen */
.device { position: relative; width: min(340px, 100%); margin-inline: auto; aspect-ratio: 9 / 18.6; border-radius: 40px; background: #0b0b0d; padding: 12px; box-shadow: 0 0 0 1.5px #2a2a2e inset, var(--shadow-lg); }
.device::before { content: ''; position: absolute; top: 22px; left: 50%; width: 96px; height: 26px; transform: translateX(-50%); background: #0b0b0d; border-radius: 20px; z-index: 2; }
.device-screen { position: relative; height: 100%; border-radius: 30px; overflow: hidden; background: var(--bg-2); color: var(--ink); font-size: var(--text-sm); line-height: 1.35; }
.ds-top { padding: 56px 16px 8px; }
.ds-top .ds-k { font-size: var(--text-xs); font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.ds-top .ds-h { font: 700 var(--text-xl)/1.1 var(--display); letter-spacing: -.02em; margin-top: 4px; }
.ds-card { margin: 8px 16px; background: var(--surface); border-radius: var(--radius-sm); padding: 12px 16px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.ds-card .ds-t { font-weight: 600; font-size: var(--text-sm); }
.ds-card .ds-m { color: var(--muted); font-size: var(--text-xs); }
.ds-photo { width: 100%; height: 96px; object-fit: cover; border-radius: 6px; margin-bottom: 8px; }
.ds-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.ds-row:first-of-type { border-top: 0; }
.ds-pill { font-size: var(--text-xs); font-weight: 600; padding: 4px 8px; border-radius: 5px; background: var(--accent-soft); color: var(--link); white-space: nowrap; }
.ds-pill.ok { background: var(--ok-soft); color: var(--ok); }
.ds-tabs { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; padding: 8px 8px 16px; background: var(--glass); border-top: 1px solid var(--line-2); font-size: var(--text-xs); color: var(--muted); }
.ds-tabs span { display: grid; justify-items: center; gap: 4px; }
.ds-tabs span::before { content: ''; width: 18px; height: 18px; border-radius: 5px; background: currentColor; opacity: .35; }
.ds-tabs .on { color: var(--link); }
.ds-tabs .on::before { opacity: 1; }
.example-note { text-align: center; color: var(--muted); font-size: var(--text-sm); margin-top: 16px; }

/* home: guides and places */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.guide { display: block; background: var(--bg); border-radius: var(--radius); padding: 24px; color: var(--ink); border: 1px solid var(--line-2); transition: box-shadow .2s ease, transform .2s ease; }
.band.alt .guide { border-color: transparent; }
.guide:hover { text-decoration: none; box-shadow: var(--shadow); transform: translateY(-2px); }
.guide h3 { margin: 0 0 8px; font-size: var(--text-body); }
.guide p { margin: 0; color: var(--muted); font-size: var(--text-base); }
.guide .text-link { margin-top: 8px; min-height: 0; }
.places { display: flex; flex-wrap: wrap; gap: 8px; }
.place { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: var(--text-base); }
.place:hover { border-color: var(--ink); text-decoration: none; }
.cta-band { text-align: center; }
.cta-band h2 { font-size: var(--text-3xl); margin-top: 0; }
.cta-band .cta-row { justify-content: center; }

/* ---------- content pages ---------- */
.page { padding: 48px 0 88px; }
.prose .wrap { width: min(var(--container-text), 100% - 2 * var(--gutter)); }
.prose h2 { margin-top: var(--space-8); }
.prose ul, .prose ol { padding-left: var(--space-6); }
.prose li { margin: var(--space-2) 0; }
.lead { font-size: var(--text-lg); line-height: 1.5; color: var(--ink-2); }
.figure img { border-radius: var(--radius); margin: 16px 0; }
.gallery-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; margin: 24px 0; }
.gallery-strip img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; border-radius: var(--radius-sm); }
.callout-k { font-weight: 700; color: var(--link); margin-bottom: 0; }
.faq-q { font-family: var(--sans); font-size: var(--text-body); margin-bottom: var(--space-1); letter-spacing: -.01em; }
.reach { background: var(--bg-2); color: var(--ink); border-radius: var(--radius-lg); padding: 32px; margin: 40px 0; }
.reach h2, .reach h3 { color: var(--ink); margin-top: 0; }
.reach a:not(.btn) { color: var(--link); }
.reach .cta-row { margin-bottom: 0; }
.draft-flag { background: var(--warn-soft); border: 1px solid #ecd28c; border-radius: var(--radius-sm); padding: 16px 16px; }
.artmeta { color: var(--muted); font-size: var(--text-sm); text-transform: none; }
.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { background: var(--bg-2); border-radius: 6px; padding: 4px 12px; font-size: var(--text-sm); }
.note { color: var(--muted); font-size: var(--text-base); }

/* pending marks: a fact Kurt has not given yet (none remain on the site) */
.pending { display: inline-block; background: var(--warn-soft); color: #6b4a00; border: 1px dashed #c9a23a; border-radius: 6px; padding: 4px 8px; font-size: var(--text-sm); font-weight: 600; line-height: 1.5; }
.pending-row { margin: 16px 0; }
.site-footer .pending { background: transparent; color: var(--muted); border-color: var(--line); }

.link-list, .prose .link-list { list-style: none; padding: 0; margin: 8px 0 16px; }
.link-list li { margin: 0; border-top: 1px solid var(--line-2); }
.link-list li:last-child { border-bottom: 1px solid var(--line-2); }
.sources { border-left: 3px solid var(--accent); background: var(--bg-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 16px 20px; margin: 24px 0; }
.sources ul { list-style: none; padding: 0; margin: 4px 0 0; }
.sources .verify { margin: 0 0 8px; font-weight: 600; color: var(--ink); }
.sources .callout-k { color: var(--muted); font-size: var(--text-sm); }
.plain-steps { padding-left: 24px; }
.plain-steps li { margin: 8px 0; }
.services .card h2 { font-size: var(--text-lg); margin: 0 0 8px; }
.ba-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 16px 0; }
.ba-item { margin: 0; }
.ba-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); background: var(--bg-2); }
.ba-item figcaption { margin-top: 8px; }
.facts { background: var(--bg-2); border-radius: var(--radius); padding: 8px 24px 20px; }
.facts dl { margin: 0; }
.facts dt { font-weight: 600; color: var(--ink); margin-top: 16px; }
.facts dd { margin: 4px 0 0; color: var(--ink-2); }

/* contact + bid */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: start; }
.form-card { background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow); }
.form-card h2 { margin-top: 0; }
.contact-side h3 { margin: 16px 0 4px; font-size: var(--text-body); }
.contact-side p { margin: 4px 0; }
.contact-side .reach { margin-top: 0; }
[data-cloud-form] input, [data-cloud-form] select, [data-cloud-form] textarea { width: 100%; min-height: 46px; font: inherit; font-size: var(--text-base); padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); }
[data-cloud-form] input:focus, [data-cloud-form] select:focus, [data-cloud-form] textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(62, 95, 255, .15); }
[data-cloud-form] button { min-height: 46px; padding: 0 20px; border-radius: var(--radius-sm); background: var(--accent); color: var(--on-accent); border: 0; font: 600 var(--text-base) var(--sans); cursor: pointer; margin-top: 8px; }
[data-cloud-form] label, [data-cloud-form] legend { display: block; font-size: var(--text-sm); font-weight: 600; color: var(--ink); margin: 16px 0 8px; padding: 0; }
[data-cloud-form] textarea { min-height: 150px; resize: vertical; }
[data-cloud-form] fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
[data-cloud-form] fieldset > label { display: inline-flex; align-items: center; min-height: 44px; margin: 0 20px 0 0; font-weight: 500; font-size: var(--text-base); cursor: pointer; }
[data-cloud-form] input[type="checkbox"], [data-cloud-form] input[type="radio"] { width: 22px; height: 22px; min-height: 0; padding: 0; margin: 0 8px 0 0; border-radius: 5px; accent-color: var(--accent); flex-shrink: 0; -webkit-appearance: auto; appearance: auto; }
.bid-page-flow { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 20px 0 32px; }
.plain-form summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }

/* gallery */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 24px; }
.chip { min-height: 42px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 600 var(--text-sm) var(--sans); cursor: pointer; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.g-item { margin: 0; }
.g-item img, .g-item video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); background: var(--bg-2); }

/* library */
.lib-toc { background: var(--bg-2); border-radius: var(--radius); padding: 8px 24px 16px; }
.lib-toc ul { padding-left: 16px; margin: 0; }
.lib-article { border-top: 1px solid var(--line-2); margin-top: 44px; padding-top: 8px; }
.lib-article blockquote { border-left: 3px solid var(--accent); margin: 24px 0; padding: 4px 16px; font-size: var(--text-lg); line-height: 1.45; color: var(--ink); }
.lib-article .figures { background: var(--bg-2); border-radius: var(--radius); padding: 16px 20px; }
.lib-article .ai-note { border: 1px dashed var(--line); border-radius: var(--radius); padding: 12px 16px; color: var(--muted); font-size: var(--text-base); }
.lib-article .ain-k { font-weight: 700; }
.lib-article .sub { margin-top: 0; }
.lib-article .cta .btn, .lib-article .cta a { margin: 8px 0; }
.lib-article .cta a { display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border-radius: var(--radius-sm); background: var(--accent); color: var(--on-accent); font-weight: 600; }

/* ---------- footer ---------- */
.site-footer { background: var(--bg-2); color: var(--ink-2); padding: 56px 0 40px; font-size: var(--text-sm); border-top: 1px solid var(--line-2); }
.site-footer a { color: var(--ink-2); display: inline-flex; align-items: center; min-height: 36px; }
.site-footer a:hover { color: var(--ink); }
.foot-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 32px; }
.foot-brand img { width: 30px; height: 40px; object-fit: contain; margin-bottom: 12px; }
.foot-brand p { color: var(--muted); max-width: 40ch; }
.foot-h { font-family: var(--sans); font-size: var(--text-xs); letter-spacing: .04em; text-transform: uppercase; color: var(--ink); margin: 0 0 8px; font-weight: 600; }
.site-footer .foot-h + ul { margin-bottom: 24px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.hours li { min-height: 0; }
.foot-k { font-weight: 600; color: var(--ink); margin-top: 16px; }
.foot-base { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 16px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; color: var(--muted); }
.foot-base p { margin: 0; }
.social a { margin-right: 16px; }
.site-footer [data-cloud-form] { max-width: 380px; }
.float-reach { display: none; }

/* ---------- HomeBase app ---------- */
.hb { background: var(--bg-2); min-height: calc(100vh - var(--header-h)); padding: 28px 0 120px; }
.hb-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; }
.hb-head h1 { margin: 0; font-size: var(--text-2xl); }
.hb-head .eyebrow { margin-bottom: var(--space-1); }
.hb-who { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: var(--text-sm); min-height: 44px; padding: 4px 8px 4px 4px; border-radius: var(--radius-sm); }
.hb-who:hover { background: rgba(0, 0, 0, .04); text-decoration: none; }
.hb-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 700; font-size: var(--text-base); object-fit: cover; flex-shrink: 0; }
.hb-layout { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; }
.hb-side { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 4px; }
.hb-tab { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: var(--radius-sm); color: var(--ink); font-weight: 500; font-size: var(--text-base); border: 0; background: transparent; cursor: pointer; text-align: left; width: 100%; font-family: inherit; }
.hb-tab svg { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }
.hb-tab:hover { background: rgba(0, 0, 0, .04); text-decoration: none; }
.hb-tab[aria-current="page"] { background: var(--bg); box-shadow: 0 1px 2px rgba(0, 0, 0, .06); font-weight: 600; }
.hb-tab[aria-current="page"] svg { color: var(--link); }
.hb-tab .count { margin-left: auto; font-size: var(--text-xs); color: var(--muted); font-weight: 600; }
.hb-tab .dot { margin-left: auto; }
.hb-main { min-width: 0; display: grid; gap: 16px; }
.panel { background: var(--bg); border-radius: var(--radius-lg); padding: 24px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.panel h2 { font-size: var(--text-lg); margin: 0 0 4px; letter-spacing: -.02em; }
.panel h3 { font-size: var(--text-body); margin: 0 0 4px; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head p { margin: 0; color: var(--muted); font-size: var(--text-base); }
.panel-head .r { display: flex; gap: 8px; align-items: center; }
.group-h { margin: 16px 0 4px; font-size: var(--text-base); }
.group-h a { color: var(--muted); }
.hb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.prop-card { display: block; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; color: var(--ink); transition: box-shadow .2s ease, transform .2s ease; }
.prop-card:hover { text-decoration: none; box-shadow: var(--shadow); transform: translateY(-2px); }
.prop-card h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.prop-card .card-body { padding: 16px 16px 16px; display: grid; gap: 4px; }
.prop-card .meta { color: var(--muted); font-size: var(--text-sm); }
.card-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg-2); }
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; color: var(--muted); font-weight: 600; font-size: var(--text-sm); }
.back svg { width: 18px; height: 18px; }
.back:hover { color: var(--ink); text-decoration: none; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line-2); }
.list > li:first-child { border-top: 0; }
.list .t { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.list .m { color: var(--muted); font-size: var(--text-sm); }
.list .r { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.row-link { display: block; color: var(--ink); min-width: 0; }
.row-link:hover { text-decoration: none; }
.row-link:hover .t { color: var(--link); }
.pill { display: inline-flex; align-items: center; min-height: 26px; padding: 0 8px; border-radius: 6px; font-size: var(--text-xs); font-weight: 600; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; }
.pill.blue { background: var(--accent-soft); color: var(--link); }
.pill.green { background: var(--ok-soft); color: var(--ok); }
.pill.amber { background: var(--warn-soft); color: var(--warn); }
.tag { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 5px; font-size: var(--text-xs); font-weight: 700; letter-spacing: .02em; text-transform: uppercase; background: var(--bg-2); color: var(--muted); margin-right: 4px; }
.tag.project { background: var(--accent-soft); color: var(--link); }
.dot { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--green); color: #fff; font-size: var(--text-xs); font-weight: 700; line-height: 1; }
.dot.empty { min-width: 10px; width: 10px; height: 10px; padding: 0; }
.dot-sm { position: absolute; top: 6px; right: 18px; width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty h3 { color: var(--ink); margin: 0 0 8px; }
.empty .cta-row { justify-content: center; margin-bottom: 0; }
.ok-mark { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); margin-bottom: 12px; }
.ok-mark svg { width: 28px; height: 28px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat { background: var(--bg); border-radius: var(--radius); padding: 16px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.stat .k { color: var(--muted); font-size: var(--text-sm); font-weight: 500; }
.stat .v { font: 700 var(--text-xl)/1.1 var(--display); letter-spacing: -.02em; margin-top: 4px; }
.next-step { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; background: var(--ink); color: var(--on-ink); border-radius: var(--radius-lg); padding: 24px 24px; }
.next-step h2 { color: var(--on-ink); margin: 0 0 4px; font-size: var(--text-lg); }
.next-step p { margin: 0; color: var(--on-ink); opacity: .78; }
.next-step .btn { background: var(--on-ink); border-color: var(--on-ink); color: var(--ink); }
.send-box { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; background: var(--accent); color: var(--on-accent); border-radius: var(--radius-lg); padding: 20px 24px; }
.send-box h3 { color: #fff; margin: 0 0 4px; }
.send-box p { margin: 0; color: rgba(255, 255, 255, .85); font-size: var(--text-base); }
.send-box > .btn { background: #fff; border-color: #fff; color: #2c49e6; }
.send-box.done { background: var(--ok-soft); color: var(--ink); }
.send-box.done h3 { color: var(--ok); }
.send-box.done p { color: var(--ink-2); }
.reach-form { flex-basis: 100%; background: rgba(255, 255, 255, .12); border-radius: var(--radius); padding: 16px 16px 4px; }
.reach-form label { color: #fff; }
.reach-form .btn { background: #fff; border-color: #fff; color: #2c49e6; }
.notice { border-radius: var(--radius-sm); padding: 16px 16px; font-size: var(--text-base); background: var(--accent-soft); color: var(--ink); }
.notice.ok { background: var(--ok-soft); }
.notice.warn { background: var(--warn-soft); }
.notice p { margin: 0; }
.notice p + p { margin-top: 8px; }

/* forms inside HomeBase */
.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field label, .field .lbl { font-size: var(--text-sm); font-weight: 600; color: var(--ink); }
.field .hint { font-size: var(--text-sm); color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-height: 46px; font: inherit; font-size: var(--text-base); padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); -webkit-appearance: none; appearance: none; }
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 20px, calc(100% - 15px) 20px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(62, 95, 255, .15); }
/* inline editing: quiet until you point at it */
.field.inline input, .field.inline select, .field.inline textarea { border-color: transparent; background: var(--bg-2); transition: border-color .15s ease, background .15s ease; }
.field.inline input:hover, .field.inline select:hover, .field.inline textarea:hover { border-color: var(--line); }
.field.inline input:focus, .field.inline select:focus, .field.inline textarea:focus { background: var(--bg); border-color: var(--accent); }
.field.inline label { color: var(--muted); font-size: var(--text-sm); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.edit-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: start; }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--bg-2); border-radius: var(--radius-sm); padding: 4px; gap: 4px; }
.seg button { min-height: 40px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; font: 500 var(--text-sm) var(--sans); color: var(--ink); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--bg); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); font-weight: 600; }
.form-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 8px; }

/* address suggestions and the map tile */
.addr { position: relative; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% - 22px); z-index: 20; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); overflow: hidden; }
.suggest[hidden] { display: none; }
.sg { display: grid; grid-template-columns: 1fr; gap: 1px; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 16px; font: inherit; color: var(--ink); cursor: pointer; border-top: 1px solid var(--line-2); }
.sg:first-child { border-top: 0; }
.sg:hover, .sg:focus-visible { background: var(--accent-soft); outline: none; }
.sg-l { font-weight: 600; font-size: var(--text-base); }
.sg-d { color: var(--muted); font-size: var(--text-sm); }
.map-tile { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-2); background: var(--bg-2); }
.map-view { position: relative; height: 240px; overflow: hidden; }
.map-stage { position: absolute; left: 50%; top: 50%; width: 768px; height: 768px; }
.map-pin { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.map-pin::after { content: ''; position: absolute; inset: -14px; border-radius: 50%; background: rgba(62, 95, 255, .18); }
.map-foot { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px; font-size: var(--text-xs); color: var(--muted); background: var(--bg); }
.map-credit { opacity: .8; }
.map-empty { border: 1px dashed var(--line); border-radius: var(--radius); padding: 24px; color: var(--muted); font-size: var(--text-sm); min-height: 120px; display: grid; place-items: center; text-align: center; }
.map-empty p { margin: 0; }
.map-slot { margin: -4px 0 16px; }
.map-slot:empty { display: none; }

/* photos */
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.ph { position: relative; margin: 0; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-2); }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph-wait { width: 100%; height: 100%; background: linear-gradient(90deg, var(--bg-2), var(--line-2), var(--bg-2)); }
.ph-x { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border: 0; border-radius: 6px; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .15s ease; }
.ph-x svg { width: 14px; height: 14px; }
.ph:hover .ph-x, .ph-x:focus-visible, .ph-x.armed { opacity: 1; }
.ph-x.armed { background: #c0392b; }
.ph-status:empty { display: none; }
.ph-status { color: var(--muted); font-size: var(--text-sm); margin-top: 8px; }

/* activity feed */
.feed { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.feed .event { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: var(--text-sm); padding: 4px 0; }
.feed .event time { color: var(--line); }
.feed .post { display: grid; gap: 4px; justify-items: start; max-width: 78%; }
.feed .post.mine { justify-self: end; justify-items: end; }
.bubble { background: var(--bg-2); border-radius: var(--radius); padding: 8px 16px; }
.post.mine .bubble { background: var(--accent); color: var(--on-accent); }
.bubble p { margin: 0; white-space: pre-wrap; }
.post-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 8px; }
.post-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.post-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.post-files .file { display: inline-flex; align-items: center; gap: 8px; font-size: var(--text-sm); padding: 4px 8px; background: rgba(0, 0, 0, .06); border-radius: 6px; }
.post-files .file svg { width: 14px; height: 14px; }
.feed .by { color: var(--muted); font-size: var(--text-xs); }
.composer { display: grid; gap: 8px; border-top: 1px solid var(--line-2); padding-top: 16px; }
.composer textarea { width: 100%; min-height: 56px; font: inherit; font-size: var(--text-base); padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); resize: vertical; }
.composer textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(62, 95, 255, .15); }
.composer-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.composer-acts input[type=file] { max-width: 100%; }
.composer-acts label { min-width: 0; max-width: 100%; }
.composer-note { overflow-wrap: anywhere; margin-left: auto; color: var(--muted); font-size: var(--text-sm); }
.composer label.btn { cursor: pointer; }

/* billing */
.bill-empty { text-align: center; padding: 36px 16px 20px; color: var(--muted); }
.bill-empty h3 { color: var(--ink); margin: 8px 0 8px; }
.bill-mark { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: var(--radius); background: var(--accent-soft); color: var(--link); }
.bill-mark svg { width: 24px; height: 24px; }

/* profile */
.profile-head { display: grid; grid-template-columns: 112px 1fr; gap: 24px; align-items: start; }
.avatar-pick { position: relative; width: 112px; height: 112px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font: 700 var(--text-xl) var(--display); cursor: pointer; overflow: hidden; }
.avatar-pick img { width: 100%; height: 100%; object-fit: cover; }
.avatar-pick::after { content: 'Change'; position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, .55); color: #fff; font: 600 var(--text-xs) var(--sans); text-align: center; padding: 4px 0 8px; opacity: 0; transition: opacity .15s ease; }
.avatar-pick:hover::after { opacity: 1; }

/* toast */
.toast-host { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; pointer-events: none; }
.toast { display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: var(--on-ink); padding: 12px 16px; border-radius: var(--radius); font-weight: 600; font-size: var(--text-base); box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(10px); transition: opacity .2s ease, transform .2s ease; }
.toast.on { opacity: 1; transform: none; }
.toast.ok { background: var(--ok); }
.toast.warn { background: #8a2a1d; }
.toast svg { width: 18px; height: 18px; }

/* the free-bid pane: floating, no overlay, the page stays usable */
.bid-pane { position: fixed; right: 20px; bottom: 20px; z-index: 80; width: min(480px, calc(100vw - 32px)); max-height: min(86vh, 880px); overflow-y: auto; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 20px 24px 24px; animation: rise .28s cubic-bezier(.2, .8, .2, 1); }
.bid-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.bid-head h2 { margin: 0; font-size: var(--text-lg); letter-spacing: -.02em; }
.bid-head .eyebrow { margin-bottom: var(--space-1); }
.bid-form section { padding-top: 8px; }
.bid-form h3 { font-size: var(--text-base); color: var(--muted); margin: 8px 0 8px; font-weight: 600; letter-spacing: 0; }
.bid-form .field { margin-bottom: 8px; }
.bid-note { color: var(--muted); font-size: var(--text-sm); margin: 8px 0 0; }
.bid-done { text-align: center; padding: 16px 4px 4px; }
.bid-done .cta-row { justify-content: center; margin-bottom: 0; }
.icon-btn { width: 40px; height: 40px; border-radius: var(--radius-sm); border: 0; background: var(--bg-2); color: var(--ink); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.icon-btn svg { width: 18px; height: 18px; }

/* sheet: a bottom sheet on phones, a centered card on desktop (kept for legacy routes) */
.sheet-back { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .32); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .2s ease; }
.sheet { width: min(560px, 100%); max-height: min(88vh, 860px); overflow-y: auto; background: var(--bg); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-lg); animation: rise .28s cubic-bezier(.2, .8, .2, 1); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sheet-head h2 { margin: 0; font-size: var(--text-lg); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* HomeBase landing (signed-out, empty) */
.hb-welcome { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; padding: 24px 0 8px; }
.hb-welcome h1 { font-size: var(--text-4xl); margin-bottom: var(--space-1); }
.hb-welcome .lead { max-width: 40ch; }
.door-cards { display: grid; gap: 12px; margin-top: 24px; max-width: 520px; }
.door { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; background: var(--bg); border-radius: var(--radius); padding: 16px 20px; box-shadow: 0 1px 2px rgba(0, 0, 0, .05); border: 1px solid transparent; }
.door h3 { margin: 0; font-size: var(--text-body); }
.door p { margin: 0; color: var(--muted); font-size: var(--text-sm); grid-column: 1; }
.door .btn { grid-row: 1 / span 2; grid-column: 2; }
.hb-faq { margin-top: 56px; }
.hb-faq h2 { font-size: var(--text-xl); }
.hb-faq details { background: var(--bg); border-radius: var(--radius-sm); padding: 0 20px; margin: 8px 0; }
.hb-faq summary { min-height: 56px; display: flex; align-items: center; font-weight: 600; cursor: pointer; list-style: none; }
.hb-faq summary::-webkit-details-marker { display: none; }
.hb-faq summary::after { content: '+'; margin-left: auto; font-size: var(--text-lg); color: var(--muted); font-weight: 400; }
.hb-faq details[open] summary::after { content: '\2212'; }
.hb-faq details p { color: var(--ink-2); padding-bottom: 16px; margin: 0; }
.hb-tabbar { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .menu-btn { display: inline-flex; }
  .head-phone, .reach-btns .btn-ghost { display: none; }
  .nav { position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; background: var(--glass-strong); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); display: none; padding: 12px 24px 40px; overflow-y: auto; }
  .site-header.open .nav { display: block; animation: fade .18s ease; }
  .nav ul { flex-direction: column; align-items: stretch; }
  .nav > ul > li > .nav-link, .nav summary.nav-link { font-size: var(--text-xl); font-weight: 600; color: var(--ink); min-height: 52px; padding: 0; letter-spacing: -.02em; }
  .nav-link { width: 100%; }
  summary.nav-link::after { margin-left: auto; }
  .has-sub .sub { position: static; box-shadow: none; border: 0; padding: 0 0 12px; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; min-width: 0; }
  .has-sub .sub .nav-link { font-size: var(--text-base); color: var(--ink-2); padding: 0; }
  .has-sub .sub .nav-link:hover { background: transparent; }
  .nav-sheet-reach { display: flex; gap: 8px; margin-top: 28px; }
  .nav-sheet-reach .btn { flex: 1; }
  .reach-btns { margin-left: auto; }
  .nav { margin-left: 0; }
}
@media (max-width: 900px) {
  .hb-show, .hb-welcome { grid-template-columns: 1fr; gap: 36px; }
  .tile, .tile.wide { grid-column: span 12; min-height: 300px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .hb-layout { grid-template-columns: 1fr; }
  .hb-side { display: none; }
  .hb { padding-bottom: 140px; }
  .edit-grid { grid-template-columns: 1fr; }
  .hb-tabbar { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 45; justify-content: space-around; background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border: 1px solid rgba(0, 0, 0, .06); border-radius: var(--radius-lg); padding: 4px; box-shadow: var(--shadow); }
  .hb-tabbar a { position: relative; flex: 1; display: grid; justify-items: center; gap: 4px; min-height: 52px; padding: 8px 4px; border-radius: var(--radius-sm); font-size: var(--text-xs); font-weight: 600; color: var(--muted); }
  .hb-tabbar a svg { width: 22px; height: 22px; }
  .hb-tabbar a[aria-current="page"] { color: var(--link); }
  .hb-tabbar a:hover { text-decoration: none; }
  .float-reach { display: flex; position: fixed; right: 12px; bottom: 12px; z-index: 30; gap: 8px; background: var(--glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); padding: 4px; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgba(0, 0, 0, .06); }
  .float-reach .btn { min-height: 44px; padding: 0 16px; font-size: var(--text-sm); }
  .float-reach.hide { display: none; }
  .site-footer { padding-bottom: 104px; }
  .bid-pane { right: 0; left: 0; bottom: 0; width: 100%; max-height: 92vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; animation: up .3s cubic-bezier(.2, .8, .2, 1); }
  .toast-host { bottom: 84px; }
}
@media (max-width: 760px) {
  body { font-size: var(--text-base); }
  .brand span { display: none; }
  .band { padding: 64px 0; }
  .hero { min-height: 82vh; }
  .hero-copy { padding: 40px 0 88px; }
  .contact-grid, .field-row { grid-template-columns: 1fr; }
  .work-grid, .gallery-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .stat-row .stat:last-child { grid-column: 1 / -1; }
  .panel { padding: 16px; }
  .sheet-back { align-items: flex-end; padding: 0; }
  .sheet { border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 92vh; padding: 20px 16px 32px; animation: up .3s cubic-bezier(.2, .8, .2, 1); }
  .page li a:not(.btn):not(.text-link), .page dd a:not(.btn):not(.text-link) { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
  .site-footer a { min-height: 44px; min-width: 44px; }
  .reach { padding: 24px; }
  .door { grid-template-columns: 1fr; }
  .door .btn { grid-row: auto; grid-column: 1; justify-self: start; margin-top: 8px; }
  .list > li { grid-template-columns: 1fr; }
  .list .r { justify-content: flex-start; }
  .feed .post { max-width: 92%; }
  .profile-head { grid-template-columns: 1fr; justify-items: center; }
  .profile-head > div { width: 100%; }
}
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-slide { transform: none; }
}

/* Touch targets: every control is at least 44px tall (WCAG 2.5.5). Inline
   links inside running prose are exempt by the inline-text rule. */
.nav-link, .site-footer li > a, .link-list a, .crumb a, .card-link a, .chip, .head-phone, .social a, .lib-toc a, .foot-base a { min-height: var(--target); display: inline-flex; align-items: center; }
.btn-sm { min-height: var(--target); }
.menu-btn { min-width: var(--target); min-height: var(--target); }
.site-footer li { margin: 0; }
.nav-link, .site-footer li > a, .foot-base a, .social a { min-width: var(--target); }
.nav-link { justify-content: center; }
.skip { min-height: var(--target); display: inline-flex; align-items: center; }
.brand { min-height: var(--target); min-width: var(--target); }
.icon-btn { min-width: var(--target); min-height: var(--target); padding: 0; }
[data-cloud-form] label:has(> input[type="checkbox"]), [data-cloud-form] label:has(> input[type="radio"]) { min-height: var(--target); display: flex; align-items: center; }
/* A link inside running text stays inline (WCAG 2.5.8 inline exception), so
   the line keeps its rhythm. A link that is the whole paragraph or list item
   keeps the 44px target. */
.prose p > .text-link { display: inline; min-height: 0; min-width: 0; }
.prose p.card-link > .text-link, .prose p.crumb > .text-link, .prose .cta-row > .text-link { display: inline-flex; min-height: var(--target); }
/* Lists sit on the grid instead of the browser's 1em default. */
ul, ol { margin-block: 0 var(--space-4); }

/* Dark scheme: the same system with the surfaces and ink swapped. The accent
   stays the fill colour (white text on it passes contrast); links use --link,
   a lighter blue that passes on the dark surface. Photos, the hero, the dark
   bands and the device mockup are dark in both schemes. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0f11;
    --bg-2: #17181b;
    --bg-3: #131417;
    --ink: #f5f5f7;
    --ink-2: #d2d2d7;
    --muted: #a1a1a6;
    --line: #3a3a3f;
    --line-2: #26272b;
    --accent-soft: #1a2142;
    --ok: #4cc27e;
    --ok-soft: #12291c;
    --warn: #f0c060;
    --warn-soft: #2b2310;
    --link: #93a6ff;
    --surface: #1b1c1f;
    --on-ink: #0e0f11;
    --glass: rgba(20, 21, 24, .86);
    --glass-strong: rgba(20, 21, 24, .97);
    --hairline: rgba(255, 255, 255, .1);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 28px rgba(0, 0, 0, .35);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .45), 0 24px 60px rgba(0, 0, 0, .55);
  }
  .site-header { border-bottom-color: var(--hairline); }
  img { color-scheme: normal; }
}
