/* Layout: left-aligned signage. Navy enamel address plates carry the idea of "your own address";
   everything around them is quiet type on a pale cool ground. Illustrated agent faces are the only playful colour. */
:root {
  --ground: #EDF1F7;
  --surface: #FFFFFF;
  --ink: #0F1B36;
  --muted: #4F5B77;
  --line: #C9D3E4;
  --enamel: #1A3A8F;
  --enamel-deep: #132C6E;
  --on-enamel: #FFFFFF;
  --on-enamel-muted: #C9D6F5;
  --signal: #D4213D;
  --on-signal: #FFFFFF;
  --focus: #0B57D0;
  --good: #1E7B4F;
  --av-sun: #F6C445;
  --av-mint: #8FD9B6;
  --av-lilac: #C3B1F0;
  --av-coral: #F79A86;
  --av-sky: #9CCBF5;
  --av-sand: #E7CFA0;
  --av-ink: #1B2238;
  --font: 'Signika', 'Segoe UI', 'Trebuchet MS', system-ui, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.7rem;
  --step-3: clamp(1.9rem, 3.6vw, 2.6rem);
  --step-4: clamp(2.3rem, 5.4vw, 3.9rem);
  --gutter: 20px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0B1326; --surface: #121D38; --ink: #E8EDF8; --muted: #A3B0CC; --line: #2A3A5C;
    --enamel: #2449B0; --enamel-deep: #1A3A8F; --on-enamel: #FFFFFF; --on-enamel-muted: #C9D6F5;
    --signal: #FF6379; --on-signal: #23060C; --focus: #8AB4FF; --good: #5FD39A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #0B1326; --surface: #121D38; --ink: #E8EDF8; --muted: #A3B0CC; --line: #2A3A5C;
  --enamel: #2449B0; --enamel-deep: #1A3A8F; --on-enamel: #FFFFFF; --on-enamel-muted: #C9D6F5;
  --signal: #FF6379; --on-signal: #23060C; --focus: #8AB4FF; --good: #5FD39A;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { text-wrap: balance; line-height: 1.12; letter-spacing: -0.01em; }
h1 { font-size: var(--step-4); font-weight: 700; }
h2 { font-size: var(--step-3); font-weight: 700; }
h3 { font-size: var(--step-1); font-weight: 600; }
a { color: inherit; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.on-enamel :focus-visible { outline-color: var(--av-sun); }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap { max-width: 1120px; margin-inline: auto; padding-inline: var(--gutter); }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack--lg { gap: 1.75rem; }
.prose { max-width: 62ch; }

/* ---------- plate: the enamel address sign ---------- */
.plate {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  background: var(--enamel);
  color: var(--on-enamel);
  border: 3px solid var(--on-enamel);
  outline: 3px solid var(--enamel);
  border-radius: 12px;
  overflow: hidden;
  max-width: 100%;
}
.plate__strip {
  background: var(--signal);
  color: var(--on-signal);
  font-size: var(--step--1);
  font-weight: 600;
  padding: 0.2rem 1.9rem;
}
.plate__body {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  padding: 0.55rem 1.9rem 0.7rem;
  font-weight: 600;
  font-size: clamp(1.25rem, 5.2vw, 2.3rem);
  line-height: 1.2;
  min-width: 0;
}
.plate__body::before, .plate__body::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 8px; height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--on-enamel-muted);
  opacity: 0.75;
}
.plate__body::before { left: 0.6rem; }
.plate__body::after { right: 0.6rem; }
.plate__host { color: var(--on-enamel-muted); }
.plate__slug { color: var(--on-enamel); overflow-wrap: anywhere; }
.plate input.plate__input {
  background: transparent;
  border: 0;
  border-bottom: 2px dashed var(--on-enamel-muted);
  color: var(--on-enamel);
  font-weight: 600;
  padding: 0;
  width: 9ch;
  min-width: 0;
  max-width: 100%;
}
.plate input.plate__input::placeholder { color: var(--on-enamel-muted); opacity: 0.8; }
.plate input.plate__input:focus-visible { outline: none; border-bottom-style: solid; border-bottom-color: var(--av-sun); }
.plate--md .plate__body { font-size: clamp(1.15rem, 2.5vw, 1.65rem); }
.plate--sm .plate__body { font-size: 1.05rem; padding: 0.25rem 1.5rem 0.3rem; }
.plate--sm .plate__body::before, .plate--sm .plate__body::after { width: 5px; height: 5px; margin-top: -2.5px; }
.plate--sm { border-width: 2px; outline-width: 2px; border-radius: 9px; }
a.plate { text-decoration: none; }

/* ---------- header ---------- */
.site-header { padding-block: 1.1rem; }
.site-header .wrap { display: flex; align-items: center; gap: 1rem 1.5rem; flex-wrap: wrap; }
.site-nav { display: flex; gap: 1.4rem; margin-left: auto; }
.site-nav a { text-decoration: none; font-weight: 500; }
.site-nav a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
.header-tools { display: flex; align-items: center; gap: 0.75rem; }
@media (max-width: 860px) {
  .site-nav { display: none; }
  .header-tools { margin-left: auto; }
}
.lang {
  background: none;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.lang:hover { border-color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--enamel);
  color: var(--on-enamel);
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.35rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
.btn:hover { background: var(--enamel-deep); }
.btn--sm { padding: 0.45rem 1rem; font-size: var(--step--1); }
.btn--quiet { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn--quiet:hover { background: transparent; border-color: var(--ink); }
.btn--light { background: var(--on-enamel); color: var(--enamel-deep); }
.btn--light:hover { background: var(--on-enamel-muted); }

.demo-banner {
  background: var(--signal);
  color: var(--on-signal);
  font-size: var(--step--1);
  font-weight: 500;
  padding-block: 0.45rem;
}

/* ---------- landing: hero ---------- */
.hero { padding-block: clamp(1.5rem, 5vw, 4rem) clamp(2.5rem, 6vw, 5rem); }
.hero__grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 920px) { .hero__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 3.5rem; } }
.hero__copy { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; align-items: flex-start; }
.hero__lead { font-size: var(--step-1); line-height: 1.45; max-width: 34em; }
.claim { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; }

.browser {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem 1.25rem 1.5rem;
  display: flex; flex-direction: column; gap: 1.25rem;
  min-width: 0;
}
.browser__bar {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--ground);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: var(--step--1);
  color: var(--muted);
  min-width: 0;
}
.browser__bar b { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.tag {
  display: inline-block;
  font-size: 0.78rem; font-weight: 600;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0.05rem 0.6rem;
  color: var(--muted);
  white-space: nowrap;
}
.tag--ai { border-color: var(--signal); color: var(--signal); }
.tag--public { border-color: var(--good); color: var(--good); }
.who { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.who__name { font-size: var(--step-2); font-weight: 700; line-height: 1.1; }
.who__meta { display: flex; flex-wrap: wrap; gap: 0.4rem 0.6rem; align-items: center; color: var(--muted); font-size: var(--step--1); }
.avatar { display: inline-flex; flex: none; width: 72px; height: 72px; }
.avatar svg { width: 100%; height: 100%; display: block; }
.avatar--lg { width: 112px; height: 112px; }
.avatar--sm { width: 48px; height: 48px; }
.bubble {
  background: var(--ground);
  border-radius: 4px 16px 16px 16px;
  padding: 0.7rem 0.95rem;
  max-width: 34em;
  align-self: flex-start;
}
.bubble--me {
  background: var(--enamel); color: var(--on-enamel);
  border-radius: 16px 4px 16px 16px;
  align-self: flex-end;
}

/* ---------- landing: sections ---------- */
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section + .section { border-top: 1px solid var(--line); }
.section__head { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 2rem; max-width: 46rem; }

.steps { display: grid; gap: 2rem; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.steps li::before {
  content: counter(step);
  font-size: var(--step-4); font-weight: 700; line-height: 1;
  color: var(--enamel);
}
:root[data-theme="dark"] .steps li::before { color: var(--on-enamel-muted); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .steps li::before { color: var(--on-enamel-muted); } }

.day { display: grid; gap: 0; max-width: 46rem; }
.day__row { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); gap: 1.25rem; }
.day__time { font-weight: 700; font-variant-numeric: tabular-nums; padding-block: 0.9rem; }
.day__what { border-left: 2px solid var(--line); padding: 0.9rem 0 0.9rem 1.25rem; position: relative; min-width: 0; }
.day__what::before {
  content: ""; position: absolute; left: -7px; top: 1.35rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--ground); border: 3px solid var(--enamel);
}
.day__what strong { font-weight: 600; display: block; }

.can { display: grid; gap: 2.5rem; }
@media (min-width: 860px) { .can { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 3.5rem; } }
.can h3 { margin-bottom: 1rem; }
.can ul { display: grid; gap: 0.55rem 2rem; }
@media (min-width: 560px) { .can__now ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.can li { display: grid; grid-template-columns: 0.9rem minmax(0, 1fr); gap: 0.6rem; align-items: baseline; }
.can li.wide { grid-column: 1 / -1; }
.can li::before { content: ""; width: 0.6rem; height: 0.6rem; border-radius: 2px; background: var(--enamel); transform: translateY(-1px); }
.can__later li::before { background: transparent; border: 2px solid var(--muted); }
.can__later { color: var(--muted); }
.can__later h3 { color: var(--ink); }

.doors { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .doors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.door { display: flex; flex-direction: column; gap: 0.75rem; align-items: flex-start; min-width: 0; }
.door .plate__body { font-size: clamp(1.05rem, 3.6vw, 1.45rem); }

.rules { max-width: 52rem; border-top: 1px solid var(--line); }
.rules > div { display: grid; gap: 0.25rem 2rem; padding-block: 1rem; border-bottom: 1px solid var(--line); }
@media (min-width: 760px) { .rules > div { grid-template-columns: 17rem minmax(0, 1fr); align-items: baseline; } }
.rules dt { font-weight: 700; font-size: var(--step-1); }
.rules dd { color: var(--muted); }

.table-scroll { overflow-x: auto; position: relative; }
table { border-collapse: collapse; width: 100%; min-width: 34rem; }
th, td { text-align: left; padding: 0.7rem 1rem 0.7rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: var(--step-1); font-weight: 700; border-bottom: 2px solid var(--ink); }
tbody th { font-weight: 500; color: var(--muted); }
.price { font-size: var(--step-2); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 640px) {
  table.fit { min-width: 0; table-layout: fixed; font-size: var(--step--1); }
  table.fit th:first-child { width: 27%; }
  table.fit th, table.fit td { padding-right: 0.5rem; overflow-wrap: anywhere; }
  table.fit thead th { font-size: var(--step-0); }
  .price { font-size: 1.05rem; }
}

td { font-variant-numeric: tabular-nums; }
tfoot th, tfoot td { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 0; }
table.wide { min-width: 44rem; }
table.wide td:last-child { white-space: nowrap; text-align: right; padding-right: 0; }
table.wide thead th { font-size: var(--step-0); }
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1.25rem 2rem; border-block: 1px solid var(--line); padding-block: 1.25rem; }
.figures div { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.figures dt { color: var(--muted); font-size: var(--step--1); }
.figures dd { font-size: var(--step-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.legal > * { max-width: 44rem; }
.legal h2 { font-size: var(--step-1); }
.bullets { list-style: disc; padding-left: 1.3rem; display: grid; gap: 0.3rem; }
mark { background: var(--av-sun); color: var(--av-ink); padding: 0 0.25em; border-radius: 3px; }

.faq { max-width: 46rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding-block: 0.9rem; font-weight: 600; font-size: var(--step-1); }
.faq details p { padding-bottom: 1rem; color: var(--muted); max-width: 60ch; }

.band { background: var(--enamel); color: var(--on-enamel); padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.band__grid { display: grid; gap: 2rem; }
@media (min-width: 860px) { .band__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; align-items: start; } }
.band p { color: var(--on-enamel-muted); }
.form { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.field label, .field .label { font-weight: 600; }
.input {
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 10px;
  padding: 0.65rem 0.8rem; width: 100%; min-width: 0;
}
.band .input { border-color: transparent; }
.input-group { display: flex; align-items: stretch; min-width: 0; }
.input-group span {
  display: flex; align-items: center;
  background: var(--enamel-deep); color: var(--on-enamel-muted);
  border-radius: 10px 0 0 10px; padding-inline: 0.8rem; font-weight: 500; white-space: nowrap;
}
.input-group .input { border-radius: 0 10px 10px 0; }
.check { display: grid; grid-template-columns: 1.3rem minmax(0, 1fr); gap: 0.6rem; align-items: start; }
.check input { width: 1.2rem; height: 1.2rem; margin: 0.2rem 0 0; accent-color: var(--av-sun); }
.form__msg { font-weight: 600; min-height: 1.5em; }
.band .form__msg { color: var(--on-enamel); }

.site-footer { padding-block: 2rem 3rem; color: var(--muted); font-size: var(--step--1); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }

/* ---------- account page ---------- */
.profile { padding-block: clamp(1.5rem, 4vw, 3rem); }
.profile__grid { display: grid; gap: 2.5rem; }
@media (min-width: 920px) { .profile__grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 3.5rem; align-items: start; } }
.profile__id { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; align-items: flex-start; }
.profile__id h1 { font-size: var(--step-4); }
.listing { border-top: 1px solid var(--line); width: 100%; }
.listing li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; padding-block: 0.6rem; border-bottom: 1px solid var(--line); }

.chat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  display: flex; flex-direction: column;
  min-width: 0;
}
.chat__head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line); }
.chat__log { display: flex; flex-direction: column; gap: 0.7rem; padding: 1.1rem; min-height: 16rem; max-height: 26rem; overflow-y: auto; }
.chat__chips { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0 1.1rem 1rem; }
.chip {
  background: transparent; border: 1.5px solid var(--line); border-radius: 999px;
  padding: 0.35rem 0.85rem; cursor: pointer; text-align: left; font-size: var(--step--1); font-weight: 500;
}
.chip:hover { border-color: var(--enamel); }
.chat__form { display: flex; gap: 0.6rem; padding: 0.9rem 1.1rem; border-top: 1px solid var(--line); }
.chat__form .input { flex: 1; }

/* ---------- owner's panel ---------- */
.panel { padding-block: 1.5rem 4rem; }
.panel__grid { display: grid; gap: 1.5rem; }
.panel__grid > * { min-width: 0; }
@media (min-width: 920px) { .panel__grid { grid-template-columns: 15rem minmax(0, 1fr); gap: 3rem; align-items: start; } }
.tabs { display: flex; gap: 0.25rem; overflow-x: auto; }
@media (min-width: 920px) { .tabs { flex-direction: column; overflow: visible; } }
.tab {
  background: transparent; border: 0; border-radius: 10px;
  padding: 0.6rem 0.9rem; text-align: left; font-weight: 500; cursor: pointer; white-space: nowrap;
  color: var(--muted);
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: inset 0 0 0 1px var(--line); }
.pane { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.pane > header { display: flex; flex-direction: column; gap: 0.4rem; }
.rows { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 1rem; padding-block: 0.9rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.row__main { flex: 1 1 14rem; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.row__main strong { font-weight: 600; }
.row__side { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }

.builder { display: grid; gap: 2rem; }
@media (min-width: 1040px) { .builder { grid-template-columns: minmax(0, 1fr) 19rem; gap: 2.5rem; align-items: start; } }
.builder fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.builder legend { font-size: var(--step-1); font-weight: 700; padding: 0; margin-bottom: 0.6rem; }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.6rem; }
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice span {
  display: block; height: 100%;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px;
  padding: 0.6rem 0.8rem; font-weight: 500; cursor: pointer;
}
.choice input:checked + span { border-color: var(--enamel); box-shadow: inset 0 0 0 1.5px var(--enamel); font-weight: 700; }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.faces { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.faces .choice span { padding: 0.35rem; border-radius: 16px; line-height: 0; }
.range-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.75rem; align-items: center; }
.range-row input { width: 100%; accent-color: var(--enamel); }
.preview { position: sticky; top: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; min-width: 0; }

.switch { position: relative; display: inline-flex; flex: none; width: 2.9rem; height: 1.65rem; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.switch span { flex: 1; border-radius: 999px; background: var(--line); transition: background 0.15s; position: relative; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: calc(1.65rem - 6px); height: calc(1.65rem - 6px); border-radius: 50%; background: var(--surface); transition: transform 0.15s; }
.switch input:checked + span { background: var(--enamel); }
.switch input:checked + span::after { transform: translateX(1.25rem); }
.switch input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.usage { display: grid; gap: 1.25rem; max-width: 34rem; }
.usage__row { display: flex; flex-direction: column; gap: 0.4rem; }
.usage__label { display: flex; justify-content: space-between; gap: 1rem; font-weight: 500; }
.usage__label span:last-child { font-variant-numeric: tabular-nums; color: var(--muted); }
.bar { height: 0.6rem; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--enamel); border-radius: 999px; }

.toast {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  margin-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  background: var(--ink); color: var(--ground);
  padding: 0.7rem 1.1rem; border-radius: 12px; font-weight: 600;
  max-width: calc(100% - 2 * var(--gutter)); z-index: 10;
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
