/* Shore runtime — component styles. Reads only the tokens in theme.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums;
}
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--heading-weight);
  letter-spacing: var(--heading-tracking);
  line-height: 1.12;
  margin: 0;
}
p { margin: 0 0 .75em; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }

.icon { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ——— shell ——— */
.shell { min-height: 100vh; display: flex; flex-direction: column; overflow-x: clip; }
.main { flex: 1; width: 100%; max-width: var(--max-width); margin: 0 auto; padding: calc(28px * var(--space)) 20px calc(64px * var(--space)); outline: none; }
.site-header { background: var(--surface); border-bottom: var(--border); position: sticky; top: 0; z-index: 10; }
.site-header-inner { max-width: var(--max-width); margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--font-display); font-weight: var(--heading-weight); font-size: 1.1rem; letter-spacing: var(--heading-tracking); }
.brand-mark { width: 32px; height: 32px; border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 1rem; }
.nav-panel { display: flex; align-items: center; gap: 20px; flex: 1; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-account { display: flex; align-items: center; gap: 8px; }
.nav-link { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: var(--radius); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.nav-link > span { display: inline-flex; align-items: center; gap: 6px; }
.nav-link:hover { color: var(--ink); background: var(--surface-2); }
.nav-link[aria-current='page'] { color: var(--ink); background: var(--surface-2); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; color: var(--ink); padding: 8px; border-radius: var(--radius); }
.nav-toggle .icon { width: 24px; height: 24px; }
.seal-link { text-decoration: none; color: inherit; }
.seal { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--positive); padding: 3px 10px 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--positive) 10%, transparent); }
.seal svg { width: 14px; height: 14px; }
.seal-link:hover .seal { background: color-mix(in srgb, var(--positive) 16%, transparent); }
.seal-lg { font-size: 1rem; padding: 6px 14px 6px 12px; font-family: var(--font-body); letter-spacing: 0; text-transform: none; }
.seal-lg svg { width: 18px; height: 18px; }
.proofs-lede { max-width: 46em; color: var(--muted); line-height: 1.6; margin: 0 0 20px; }
.proofs-lede strong { color: var(--ink); }
.proofs-body { display: grid; gap: 14px; }
.proofs-feature { font-size: 1rem; margin: 0 0 10px; font-family: var(--font-body); letter-spacing: 0; text-transform: none; }
.proofs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.proofs-list li { display: flex; gap: 8px; font-size: .925rem; line-height: 1.45; }
.proofs-list svg { flex: none; width: 16px; height: 16px; color: var(--positive); margin-top: 2px; }
.proofs-foot { font-size: .85rem; margin: 6px 0 0; }
.site-footer { border-top: var(--border); padding: 20px; display: flex; gap: 12px; justify-content: center; font-size: .875rem; flex-wrap: wrap; }

/* side navigation (tools) */
html[data-nav='side'] .shell { display: grid; grid-template-columns: 248px 1fr; grid-template-rows: 1fr auto; }
html[data-nav='side'] .site-header { grid-row: 1 / span 2; position: sticky; top: 0; height: 100vh; border-bottom: 0; border-right: var(--border); }
html[data-nav='side'] .site-header-inner { flex-direction: column; align-items: stretch; height: 100%; padding: 20px 14px; gap: 28px; }
html[data-nav='side'] .nav-panel { flex-direction: column; align-items: stretch; }
html[data-nav='side'] .nav-links { flex-direction: column; }
html[data-nav='side'] .nav-account { flex-direction: column; align-items: stretch; margin-top: auto; }
html[data-nav='side'] .main { margin: 0; max-width: var(--max-width); padding-left: 40px; padding-right: 40px; }
html[data-nav='side'] .site-footer { justify-content: flex-start; padding-left: 40px; }

@media (max-width: 860px) {
  html[data-nav='side'] .shell { display: flex; }
  html[data-nav='side'] .site-header { height: auto; border-right: 0; border-bottom: var(--border); }
  html[data-nav='side'] .site-header-inner { flex-direction: row; align-items: center; padding: 12px 16px; }
  html[data-nav='side'] .main { padding-left: 16px; padding-right: 16px; }
  .nav-toggle { display: inline-flex; }
  .nav-panel, html[data-nav='side'] .nav-panel { display: none; }
  .site-header.open .nav-panel { display: flex; flex-direction: column; align-items: stretch; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: var(--border); padding: 12px 16px 16px; gap: 8px; }
  .site-header.open .nav-links { flex-direction: column; }
  .site-header.open .nav-account { flex-direction: column; align-items: stretch; }
  .site-header-inner { padding: 10px 16px; position: relative; }
  .main { padding: 20px 16px 48px; }
}

/* ——— buttons ——— */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; line-height: 1;
  padding: 12px 18px; min-height: 44px;
  border-radius: var(--radius); border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink);
  text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease;
}
.button:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: .6; cursor: progress; }
.button.busy { position: relative; color: transparent; }
.button.busy::after { content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--accent-ink); border-right-color: transparent; animation: spin .7s linear infinite; }
.button-small { padding: 8px 12px; min-height: 36px; font-size: .9rem; }
.button-large { padding: 15px 24px; font-size: 1.05rem; }
.button-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.button-ghost:hover { background: var(--surface-2); }
.button-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.button-block { width: 100%; }
.icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius); border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-button:hover { background: var(--surface-2); color: var(--ink); }
.icon-danger:hover { color: var(--danger); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ——— hero ——— */
.hero { margin: calc(-28px * var(--space)) calc(50% - 50vw) calc(40px * var(--space)); padding: calc(72px * var(--space)) max(20px, calc(50vw - var(--max-width) / 2 + 20px)); }
.hero-inner { max-width: 760px; }
@media (max-width: 860px) { .hero { margin-top: -20px; padding-left: 16px; padding-right: 16px; } }
.hero-title { font-size: clamp(2.2rem, 5vw + 1rem, calc(3.6rem * var(--scale) / 1.25)); text-transform: var(--heading-case); }
.hero-subtitle { font-size: 1.2rem; color: var(--muted); margin: 20px 0 0; max-width: 620px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
html[data-hero='band'] .hero { background: var(--accent); color: var(--accent-ink); }
html[data-hero='band'] .hero-subtitle { color: color-mix(in srgb, var(--accent-ink) 80%, transparent); }
html[data-hero='band'] .hero-title { color: var(--accent-ink); }
html[data-hero='band'] .hero .button:first-child { background: var(--highlight); border-color: var(--highlight); color: var(--ink); }
html[data-hero='band'] .hero .button-ghost { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent-ink) 40%, transparent); }
html[data-hero='band'] .hero .button-ghost:hover { background: color-mix(in srgb, var(--accent-ink) 12%, transparent); }
html[data-hero='centered'] .hero { text-align: center; border-bottom: var(--border); }
html[data-hero='centered'] .hero-inner { margin: 0 auto; }
html[data-hero='centered'] .hero-subtitle { margin-left: auto; margin-right: auto; }
html[data-hero='centered'] .hero-actions { justify-content: center; }
html[data-hero='plain'] .hero { padding-top: calc(48px * var(--space)); padding-bottom: calc(24px * var(--space)); }
html[data-nav='side'] .hero { margin-left: -40px; margin-right: -40px; padding-left: 40px; padding-right: 40px; }
@media (max-width: 860px) { html[data-nav='side'] .hero { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; } }

/* ——— sections ——— */
.section { margin-bottom: calc(48px * var(--space)); }
.section-narrow { max-width: 640px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-title { font-size: calc(1.5rem * var(--scale) / 1.25); text-transform: var(--heading-case); }
.section-head .section-title { margin: 0; }
.section > .section-title { margin-bottom: 16px; }
.section-intro { color: var(--muted); margin: -6px 0 16px; }
.prose { max-width: 680px; }
.prose h2 { margin-bottom: 12px; }

.card { background: var(--surface); border: var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card-pad { padding: calc(24px * var(--space)); }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: var(--border); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow); }
.stat-label { color: var(--muted); font-size: .875rem; font-weight: 500; }
.stat-value { font-family: var(--font-display); font-weight: var(--heading-weight); font-size: 2.1rem; line-height: 1.1; margin-top: 6px; font-variant-numeric: lining-nums tabular-nums; }

/* tables */
.table-wrap { background: var(--surface); border: var(--border); border-radius: var(--radius-lg); overflow-x: auto; box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; padding: 12px 16px; border-bottom: var(--border); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table td .badge-sample { margin-left: 6px; padding: 1px 7px; font-size: .68rem; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.table th.num { text-align: right; }
.table td.nowrap { white-space: nowrap; }
.th-actions, .td-actions { width: 1%; white-space: nowrap; }
.td-actions .row-actions { flex-wrap: nowrap; }

@media (max-width: 640px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; }
  .table td::before { content: attr(data-label); color: var(--muted); font-size: .85rem; }
  .table td.num { text-align: left; }
  .td-actions { width: 100%; }
  .td-actions .row-actions { justify-content: flex-start; padding-top: 8px; }
}

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.item-card { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.item-head { display: flex; align-items: baseline; gap: 12px; }
.item-head .item-title { flex: 1; min-width: 0; }
.item-title { font-family: var(--font-display); font-weight: var(--heading-weight); font-size: 1.15rem; letter-spacing: var(--heading-tracking); line-height: 1.25; }
.item-lead { flex: none; font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.item-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.item-tags .badge-sample { margin-left: 0; }
.tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 500; background: var(--surface-2); color: var(--ink); border: var(--border); }
.tag-on { background: color-mix(in srgb, var(--positive) 12%, var(--surface)); color: var(--positive); border-color: transparent; }
.tag-off { color: var(--muted); background: transparent; }
.item-prose { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.item-meta { margin: 0; display: grid; gap: 6px; padding-top: 10px; border-top: var(--border); }
.item-meta > div { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: 12px; font-size: .9rem; }
.item-meta dt { color: var(--muted); }
.item-meta dd { margin: 0; overflow-wrap: anywhere; }
.item-card .row-actions { margin-top: auto; }

/* list */
.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.list-item { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-main { flex: 1; min-width: 0; }
.list-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 4px; font-size: .9rem; }
@media (max-width: 640px) { .list-item { flex-direction: column; align-items: stretch; } }

.row-actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--ink); }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge-positive { background: color-mix(in srgb, var(--positive) 14%, var(--surface)); color: var(--positive); }
.badge-warning { background: color-mix(in srgb, var(--warning) 14%, var(--surface)); color: var(--warning); }
.badge-danger { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); }

.badge-sample { margin-left: 8px; background: transparent; border: 1px dashed var(--muted); color: var(--muted); font-weight: 500; font-family: var(--font-body); font-size: .72rem; vertical-align: middle; text-transform: none; letter-spacing: 0; }
.badge-sample::before { display: none; }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius-lg); padding: 36px 24px; text-align: center; color: var(--muted); }
.empty p { margin: 0; }
.gate { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 28px; }
.gate p { margin: 0; }

/* ——— forms ——— */
.form { display: grid; gap: 18px; }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .field-longtext, .form-grid .field-boolean { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; align-content: start; }
.field-label { font-weight: 600; font-size: .925rem; }
.req { color: var(--danger); }
.field input:not([type='checkbox']), .field select, .field textarea, .row-actions select, td select {
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 11px 12px; min-height: 44px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
td select { width: auto; min-height: 36px; padding: 6px 10px; }
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.field-help { font-size: .85rem; color: var(--muted); }
.field-msg { font-size: .85rem; color: var(--danger); min-height: 0; }
.field-msg:empty { display: none; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger) !important; }
.field-check { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.switch { appearance: none; width: 42px; height: 24px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(18px); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.form-error { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: var(--danger); border-radius: var(--radius); padding: 12px 14px; font-weight: 500; }
.form-error[hidden] { display: none; }

.auth { display: grid; place-items: center; padding: 24px 0; }
.auth-card { width: 100%; max-width: 420px; }
.auth-title { font-size: 1.9rem; margin-bottom: 6px; text-transform: var(--heading-case); }
.auth-card .form { margin-top: 20px; }
.auth-switch { margin: 18px 0 0; text-align: center; color: var(--muted); font-size: .925rem; }
.secret { font-family: var(--font-mono); font-size: 1.15rem; background: var(--surface-2); padding: 12px 14px; border-radius: var(--radius); user-select: all; }

/* ——— dialog & toasts ——— */
.dialog { border: 0; border-radius: var(--radius-lg); padding: 0; width: min(620px, calc(100vw - 24px)); max-height: calc(100vh - 48px); background: var(--surface); color: var(--ink); box-shadow: 0 24px 64px rgba(0,0,0,.25); }
.dialog::backdrop { background: rgba(10, 12, 16, .45); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: var(--border); }
.dialog-head h2 { font-size: 1.2rem; }
.dialog-body { padding: 22px; }
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 50; width: min(440px, calc(100vw - 24px)); }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.2); font-weight: 500; animation: rise .2s ease; transition: opacity .3s, transform .3s; }
.toast-error { background: var(--danger); color: #fff; }
.toast.leaving { opacity: 0; transform: translateY(6px); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ——— loading ——— */
.skeleton { background: linear-gradient(90deg, var(--surface-2), color-mix(in srgb, var(--surface-2) 50%, var(--surface)), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); }
.skeleton-group { display: grid; gap: 10px; }
.skeleton-cards { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.skeleton-block { height: 52px; }
.skeleton-cards .skeleton-block { height: 150px; }
.skeleton-num { display: inline-block; width: 56px; height: 32px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.boot-error { padding: 48px 20px; text-align: center; }

/* ——— Studio inspector ——— */
.shore-inspecting .shore-inspectable { cursor: crosshair; outline: 2px dashed transparent; outline-offset: 4px; transition: outline-color .1s; }
.shore-inspecting .shore-inspectable:hover { outline-color: #FF6B4A; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ——— records: detail, links, files ——— */
.link-button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 30%, transparent); text-underline-offset: 3px; }
.link-button:hover { text-decoration-color: currentColor; color: var(--accent); }
.dialog.dialog-wide { width: min(760px, calc(100vw - 24px)); }
.detail { display: grid; gap: 20px; }
.detail-meta > div { padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.detail-meta > div:last-child { border-bottom: 0; }
.detail-owner { margin: -8px 0 0; font-size: .875rem; }
.detail .row-actions { justify-content: flex-start; }
.detail-images { display: flex; gap: 12px; flex-wrap: wrap; }
.detail-images figure { margin: 0; display: grid; gap: 4px; font-size: .8rem; }
.detail-image { max-width: 100%; max-height: 280px; border-radius: var(--radius); border: var(--border); object-fit: cover; }
.calc-tag { margin-left: 8px; font-size: .72rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; }
.child { border-top: var(--border); padding-top: 16px; }
.child-title { font-size: 1.05rem; }
.child .table-wrap { box-shadow: none; }
.table-compact td, .table-compact th { padding: 8px 12px; }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: calc(var(--radius) / 1.5); border: var(--border); vertical-align: middle; background: var(--surface-2); }
.thumb-lg { width: 96px; height: 96px; }
.card-image { width: calc(100% + 40px); margin: -20px -20px 0; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-lg) var(--radius-lg) 0 0; border-bottom: var(--border); background: var(--surface-2); }
.file-link { display: inline-flex; align-items: center; gap: 6px; }
.file-field { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.file-preview { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: .925rem; }
.file-picker { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-picker:focus-visible + .file-button { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }

/* ——— chart ——— */
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 30%) 1fr auto; align-items: center; gap: 12px; font-size: .925rem; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.bar-value { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 3ch; text-align: right; }
@media (max-width: 560px) { .bar-row { grid-template-columns: 1fr auto; } .bar-track { grid-column: 1 / -1; grid-row: 2; } }

/* ——— calendar ——— */
.calendar { background: var(--surface); border: var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: var(--border); }
.cal-title { font-size: 1.1rem; text-transform: none; }
.cal-nav { display: flex; align-items: center; gap: 4px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-weekday { padding: 8px 10px; font-size: .78rem; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); }
.cal-day { min-height: 104px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-day:nth-child(7n + 14) { border-right: 0; }
.cal-day.is-outside { background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); }
.cal-day.is-outside .cal-num { opacity: .45; }
.cal-num { font-size: .8rem; font-variant-numeric: tabular-nums; color: var(--muted); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cal-day.is-today .cal-num { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.cal-chip { font: inherit; font-size: .78rem; line-height: 1.25; text-align: left; display: flex; gap: 5px; align-items: baseline; width: 100%; padding: 3px 6px; border: 0; border-left: 3px solid var(--accent); border-radius: 4px; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--ink); cursor: pointer; min-width: 0; }
.cal-chip:hover { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); }
.cal-chip-cont { opacity: .75; }
.cal-chip.tone-positive { border-left-color: var(--positive); background: color-mix(in srgb, var(--positive) 10%, var(--surface)); }
.cal-chip.tone-warning { border-left-color: var(--warning); background: color-mix(in srgb, var(--warning) 10%, var(--surface)); }
.cal-chip.tone-danger { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--danger) 60%, transparent); }
.cal-time { font-variant-numeric: tabular-nums; font-weight: 600; flex: none; }
.cal-chip-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cal-more { font-size: .75rem; color: var(--muted); padding-left: 6px; }
.cal-agenda { display: none; list-style: none; margin: 0; padding: 0; }
.cal-agenda-day { padding: 12px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.cal-agenda-day:last-child { border-bottom: 0; }
.cal-agenda-date { font-weight: 600; font-size: .9rem; }
.cal-agenda-day.is-today .cal-agenda-date { color: var(--accent); }
.cal-agenda-items { display: grid; gap: 4px; }
.cal-agenda-items .cal-chip { font-size: .9rem; padding: 8px 10px; }
.cal-agenda-empty { padding: 20px 16px; }
@media (max-width: 720px) {
  .cal-grid { display: none; }
  .cal-agenda { display: block; }
}

.email-body { white-space: pre-wrap; margin: 8px 0 0; color: var(--muted); font-size: .9rem; max-width: 60ch; }
details summary { cursor: pointer; }

.account-password { margin-top: 24px; padding-top: 20px; border-top: var(--border); }
.account-subtitle { font-size: 1.05rem; }

/* ——— calendar subscription ——— */
.section-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.stack { display: grid; gap: 14px; }
.copy-row { display: flex; gap: 8px; }
.copy-row .input { flex: 1; min-width: 0; font-size: .85rem; }
.help-list { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; font-size: .95rem; }

/* ——— brand & hero image ——— */
.brand-logo { height: 34px; width: auto; max-width: 140px; object-fit: contain; display: block; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: calc(40px * var(--space)); align-items: center; }
.hero-with-image .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.hero-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow); display: block; }
html[data-hero='centered'] .hero-with-image .hero-grid { grid-template-columns: minmax(0, 1fr); }
html[data-hero='centered'] .hero-media { max-width: 760px; margin: 0 auto; width: 100%; }
@media (max-width: 860px) { .hero-with-image .hero-grid { grid-template-columns: minmax(0, 1fr); } }

/* ——— presentation sections ——— */
.section-intro { color: var(--muted); max-width: 640px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: calc(20px * var(--space)); margin-top: 20px; }
.feature { background: var(--surface); border: var(--border); border-radius: var(--radius-lg); padding: calc(22px * var(--space)); box-shadow: var(--shadow); }
.feature-icon { width: 40px; height: 40px; border-radius: var(--radius); display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent); margin-bottom: 14px; }
.feature-icon .icon { width: 20px; height: 20px; }
.feature-title { font-size: 1.08rem; margin-bottom: 6px; }
.feature-text { color: var(--muted); margin: 0; }
.steps { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: calc(20px * var(--space)); counter-reset: none; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step-num { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-family: var(--font-display); font-weight: var(--heading-weight); }
.step-title { font-size: 1.05rem; margin: 6px 0 4px; }
.step-text { color: var(--muted); margin: 0; }
.faq { display: grid; gap: 10px; margin-top: 16px; }
.faq-item { background: var(--surface); border: var(--border); border-radius: var(--radius-lg); padding: 0 18px; box-shadow: var(--shadow); }
.faq-q { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after { content: '+'; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.faq-item[open] .faq-q::after { content: '–'; }
.faq-a { color: var(--muted); padding-bottom: 16px; margin: 0; white-space: pre-line; }
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: calc(20px * var(--space)); margin-top: 20px; }
.quote { margin: 0; padding: calc(22px * var(--space)); display: grid; gap: 18px; align-content: space-between; }
.quote blockquote { margin: 0; font-size: 1.05rem; line-height: 1.6; }
.quote figcaption { display: flex; gap: 12px; align-items: center; }
.quote figcaption > span:last-child { display: grid; font-size: .92rem; }
.quote-photo, .quote-initial { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex: none; }
.quote-initial { display: grid; place-items: center; background: var(--surface-2); color: var(--accent); font-weight: 700; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: calc(20px * var(--space)); margin-top: 20px; align-items: stretch; }
.plan { padding: calc(24px * var(--space)); display: flex; flex-direction: column; gap: 10px; }
.plan-highlight { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.plan-name { font-size: 1.1rem; }
.plan-price { font-family: var(--font-display); font-size: 2rem; font-weight: var(--heading-weight); letter-spacing: var(--heading-tracking); }
.plan-detail { margin: 0; font-size: .92rem; }
.plan-features { list-style: none; margin: 6px 0 auto; padding: 0; display: grid; gap: 8px; }
.plan-features li { display: flex; gap: 8px; align-items: flex-start; }
.plan-features .icon { color: var(--accent); margin-top: 3px; }
.plan .button { margin-top: 12px; justify-content: center; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 16px; }
.gallery-item { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-full { max-width: 100%; max-height: 75vh; display: block; margin: 0 auto; border-radius: var(--radius); }
.dialog-wide { width: min(1100px, calc(100vw - 32px)); }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: calc(32px * var(--space)); border-radius: var(--radius-lg); background: var(--accent); color: var(--accent-ink); }
.cta-title { color: var(--accent-ink); font-size: calc(1.6rem * var(--scale) / 1.25); text-transform: var(--heading-case); }
.cta-text { margin: 8px 0 0; color: color-mix(in srgb, var(--accent-ink) 82%, transparent); }
.cta .button { background: var(--highlight); border-color: var(--highlight); color: var(--ink); }
.contact { list-style: none; margin: 16px 0 0; display: grid; gap: 16px; }
.contact li { display: flex; gap: 14px; align-items: flex-start; }
.contact-icon { width: 36px; height: 36px; border-radius: var(--radius); display: grid; place-items: center; background: var(--surface-2); color: var(--accent); flex: none; }
.contact-label { display: block; font-size: .85rem; }
.contact a { color: var(--ink); text-decoration: none; font-weight: 500; }
.contact a:hover { color: var(--accent); }

/* ——— editing in place (inside Shore Studio only) ——— */
html.shore-editing [data-edit] { outline: 1.5px dashed color-mix(in srgb, #2563EB 55%, transparent); outline-offset: 3px; border-radius: 3px; cursor: text; }
html.shore-editing [data-edit]:hover { outline-color: #2563EB; background: color-mix(in srgb, #2563EB 6%, transparent); }
html.shore-editing [data-edit][contenteditable='true'] { outline: 2px solid #2563EB; background: color-mix(in srgb, #2563EB 8%, transparent); }
html.shore-editing [data-edit-image] { outline: 2px dashed #2563EB; outline-offset: -2px; cursor: pointer; }
html.shore-editing .gallery-item, html.shore-editing .hero-media { position: relative; }
.edit-placeholder { display: none; }
html.shore-editing .edit-placeholder { display: grid; place-items: center; min-height: 160px; border: 2px dashed #2563EB; border-radius: var(--radius-lg); background: color-mix(in srgb, #2563EB 6%, transparent); color: #2563EB; font: 600 .95rem/1 var(--font-body); cursor: pointer; aspect-ratio: auto; }
html.shore-editing .gallery-item.edit-placeholder { aspect-ratio: 1; min-height: 0; }

/* ——— fields filled in by AI ——— */
.ai-status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-style: italic; }
.ai-status .icon { width: 14px; height: 14px; flex: none; }
.ai-pending { color: var(--accent); }
.ai-pending .icon { animation: ai-pulse 1.2s ease-in-out infinite; }
@keyframes ai-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .ai-pending .icon { animation: none; } }

/* ——— sign in with Google ——— */
.auth-google { display: grid; gap: 14px; margin: 18px 0 4px; }
.google-button { gap: 10px; justify-content: center; text-decoration: none; background: #fff; color: #1f1f1f; border: 1px solid #747775; font-weight: 500; }
.google-button:hover { background: #f8f9fa; }
.google-button[disabled] { opacity: .55; cursor: not-allowed; }
.google-mark { width: 18px; height: 18px; flex: none; }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line, rgba(0,0,0,.12)); }

/* ——— presence: the hero without a photo, and the finish of everyday parts ———
   Still only tokens: every colour below is mixed from the direction's own. */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero-title, .section-title, .cta-title { text-wrap: balance; }
.hero-art { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-art::before, .hero-art::after { content: ''; position: absolute; }

/* band: a pitch seen from above (centre circle, a ball, three bold slashes) */
html[data-hero='band'] .hero {
  padding-top: calc(104px * var(--space)); padding-bottom: calc(112px * var(--space));
  background: linear-gradient(118deg, color-mix(in srgb, var(--accent) 82%, #000) 0%, var(--accent) 58%, color-mix(in srgb, var(--accent) 84%, var(--highlight)) 100%);
}
html[data-hero='band'] .hero-art { background: radial-gradient(circle at 73% 70%, var(--highlight) 0 20px, transparent 21px); }
html[data-hero='band'] .hero-art::before {
  right: -5%; top: 50%; width: min(50vw, 620px); aspect-ratio: 1; transform: translateY(-50%); border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--accent-ink) 34%, transparent);
  box-shadow: 0 0 0 72px color-mix(in srgb, var(--accent-ink) 5%, transparent), inset 0 0 0 96px color-mix(in srgb, var(--highlight) 12%, transparent);
}
html[data-hero='band'] .hero-art::after {
  right: 12%; top: -25%; width: 14px; height: 150%; transform: rotate(18deg); background: var(--highlight);
  box-shadow: 46px 0 0 color-mix(in srgb, var(--highlight) 46%, transparent), 92px 0 0 color-mix(in srgb, var(--highlight) 18%, transparent);
}
html[data-hero='band'] .hero-title { max-width: 12em; }
html[data-hero='band'] .hero-subtitle { color: color-mix(in srgb, var(--accent-ink) 86%, transparent); }

/* centred: quiet arches either side and a small mark above the title */
html[data-hero='centered'] .hero {
  padding-top: calc(68px * var(--space)); padding-bottom: calc(76px * var(--space));
  background: radial-gradient(70% 100% at 50% 0%, color-mix(in srgb, var(--highlight) 42%, transparent), transparent 72%);
}
html[data-hero='centered'] .hero-art::before, html[data-hero='centered'] .hero-art::after {
  bottom: -330px; width: 560px; aspect-ratio: 1; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
  outline: 1px solid color-mix(in srgb, var(--accent) 18%, transparent); outline-offset: 26px;
}
html[data-hero='centered'] .hero-art::before { left: -210px; }
html[data-hero='centered'] .hero-art::after { right: -210px; }
html[data-hero='centered'] .hero-inner::before {
  content: '✦'; display: block; margin-bottom: calc(22px * var(--space)); text-align: center; font-size: .9rem; line-height: 1; color: var(--accent);
  background: linear-gradient(var(--accent), var(--accent)) calc(50% - 40px) 50% / 44px 1px no-repeat, linear-gradient(var(--accent), var(--accent)) calc(50% + 40px) 50% / 44px 1px no-repeat;
}
html[data-hero='centered'] .hero-inner { max-width: 900px; }
html[data-hero='centered'] .hero-title { font-size: clamp(2.4rem, 5vw + 1rem, calc(4.2rem * var(--scale) / 1.25)); }

/* plain: a wash of the highlight and a field of dots */
html[data-hero='plain'] .hero {
  padding-top: calc(56px * var(--space)); padding-bottom: calc(48px * var(--space)); border-bottom: var(--border);
  background: radial-gradient(55% 130% at 100% 0%, color-mix(in srgb, var(--highlight) 70%, transparent), transparent 72%);
}
html[data-hero='plain'] .hero-art::before {
  right: 4%; top: 16%; width: 280px; height: 68%;
  background-image: radial-gradient(color-mix(in srgb, var(--accent) 42%, transparent) 1.5px, transparent 2px); background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(to left, #000, transparent); mask-image: linear-gradient(to left, #000, transparent);
}
@media (max-width: 860px) {
  html[data-hero='band'] .hero { padding-top: 56px; padding-bottom: 64px; }
  html[data-hero='band'] .hero-art { background: none; opacity: .55; }
  html[data-hero='band'] .hero-art::before { right: -48%; width: 110vw; }
  html[data-hero='band'] .hero-art::after { right: 4%; width: 9px; box-shadow: 26px 0 0 color-mix(in srgb, var(--highlight) 46%, transparent); }
  html[data-hero='centered'] .hero { padding-top: 56px; padding-bottom: 56px; }
  html[data-hero='centered'] .hero-art::before, html[data-hero='centered'] .hero-art::after { width: 320px; bottom: -220px; }
  html[data-hero='centered'] .hero-art::before { left: -200px; }
  html[data-hero='centered'] .hero-art::after { right: -200px; }
  html[data-hero='plain'] .hero-art::before { opacity: .5; width: 140px; }
}

.section { margin-bottom: calc(60px * var(--space)); }
.section-title { font-size: calc(1.7rem * var(--scale) / 1.25); }

/* stat tiles: the number leads, a dot says which state it counts */
.stats { gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat { padding: 20px 22px 22px; }
.stat-label { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.stat[class*='tone-'] .stat-label::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.stat.tone-positive .stat-label::before { color: var(--positive); }
.stat.tone-warning .stat-label::before { color: var(--warning); }
.stat.tone-danger .stat-label::before { color: var(--danger); }
.stat-value { font-size: 2.5rem; margin-top: 10px; }

/* tables */
.table th { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); padding-top: 11px; padding-bottom: 11px; }
.table td { padding-top: 14px; padding-bottom: 14px; }
.table td:first-child { font-weight: 600; }
.table td:first-child .link-button { text-decoration: none; }
.table td:first-child .link-button:hover { text-decoration: underline; }

/* cards */
.cards { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: calc(20px * var(--space)); }
.item-card { overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.item-card.has-image:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px color-mix(in srgb, var(--ink) 55%, transparent); }
.card-image { aspect-ratio: 16 / 10; border-radius: 0; }
.item-title .link-button { text-decoration: none; }
.item-title .link-button:hover { text-decoration: underline; }
.item-lead { color: var(--accent); font-size: 1.1rem; }
.list-item { padding: 18px 22px; }
@media (max-width: 640px) { .list-item { gap: 10px; padding: 16px 18px; } .list-item .row-actions { justify-content: flex-start; } }

/* presentation sections */
.feature { transition: transform .18s ease; }
.feature-icon { width: 44px; height: 44px; border-radius: 50%; }
.steps { gap: calc(16px * var(--space)); }
.step { background: var(--surface); border: var(--border); border-radius: var(--radius-lg); padding: calc(20px * var(--space)); box-shadow: var(--shadow); }
.step-num { width: 40px; height: 40px; }
.cta { position: relative; overflow: hidden; isolation: isolate; padding: calc(44px * var(--space)); }
.cta::after {
  content: ''; position: absolute; z-index: -1; right: -90px; top: 50%; width: 320px; aspect-ratio: 1; transform: translateY(-50%); border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--accent-ink) 26%, transparent); box-shadow: 0 0 0 44px color-mix(in srgb, var(--accent-ink) 6%, transparent);
}
@media (min-width: 620px) { .contact { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.site-footer { background: var(--surface); padding: 26px 20px; align-items: center; }
