/* REAOS app styles. Phone first (390 x 844), desktop from 1024px.
   Tokens live in tokens.css. No inline styles in markup; the only style the
   client sets at runtime is the dashboard panel height while splitting Home. */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* The body size is set on body, not html, so 1rem stays 16px. */
body { font-size: var(--text-body); overflow: hidden; overscroll-behavior: none; }

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection { background: var(--accent-wash); color: var(--ink); }
input,
textarea { caret-color: var(--accent); }
::placeholder { color: var(--ink-3); opacity: 1; }
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
  box-shadow: 0 0 0 1000px var(--surface-solid) inset;
  transition: background-color 9999s ease-out;
}
html { scrollbar-color: var(--ink-3) transparent; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.noscript { padding: var(--space-5); }

/* Text that came from stored data: wrap anything, keep line breaks. */
.data { overflow-wrap: anywhere; white-space: pre-wrap; }

/* ---------------------------------------------------------------- app frame */

.app { height: 100%; }

.splash {
  height: 100%;
  display: grid;
  place-items: center;
}
.splash-mark { width: 56px; height: 56px; border-radius: var(--radius); }

.shell {
  position: relative;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
}

.main {
  grid-row: 2;
  grid-column: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
.main[data-view="home"] { overflow: hidden; }

/* ---------------------------------------------------------------- tab bar and rail
   Phone: a flat white bar with a top hairline, the blue AI button raised above
   it. From 1024px the same nav is a 96px rail on the left. */

.tabbar {
  grid-row: 3;
  grid-column: 1;
  position: relative;
  z-index: var(--z-tabbar);
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  padding: 6px env(safe-area-inset-right) calc(6px + env(safe-area-inset-bottom)) env(safe-area-inset-left);
  background: var(--surface-solid);
  border-top: 1px solid var(--hairline);
}
.shell[data-keyboard="open"] .tabbar { display: none; }

.tab {
  flex: 1 1 0;
  min-width: var(--tap);
  min-height: 52px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  padding: 5px 0;
  border-radius: 18px;
  color: var(--ink-2);
  font-size: 11.5px;
  text-decoration: none;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 300ms var(--ease-out), color 300ms var(--ease-out);
}
.tab svg { width: 22px; height: 22px; stroke-width: 1.8; }
.tab[data-tab="home"] svg { stroke-width: 3.4; }
.tab-label { font-size: 11.5px; font-weight: 400; letter-spacing: 0; }
.tab[aria-current="page"] { color: var(--accent-ink); font-weight: 700; }
.tab[aria-current="page"] .tab-label { color: var(--accent-ink); font-weight: 700; }

.badge {
  position: absolute;
  top: 2px;
  left: calc(50% + 6px);
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--bronze);
  color: var(--on-bronze);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--surface-solid);
}

/* The AI button: a 54px blue circle with a white ring. Raised on a phone. */
.tab-ai { flex: 0 0 64px; min-width: 64px; min-height: 0; padding: 0; background: none; }
.tab-ai-dot {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-top: -24px;
  border-radius: 50%;
  color: #FFFFFF;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: var(--tint-glass);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 0 0 4px #FFFFFF, 0 10px 24px rgba(0, 122, 255, 0.4);
  transition: transform 420ms var(--ease-glide), box-shadow 300ms var(--ease-out);
}
.tab-ai:active .tab-ai-dot { transform: scale(0.94); }
.tab-ai[aria-current="page"] .tab-ai-dot,
.tab-ai[data-open="true"] .tab-ai-dot { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 0 0 4px var(--accent-wash), 0 10px 24px rgba(0, 122, 255, 0.5); }
.tab-ai[aria-current="page"], .tab-ai[data-open="true"] { background: none; }

/* ---------------------------------------------------------------- pages */

.page {
  margin: 0;
  padding: var(--space-4) var(--space-4) var(--space-6);
}

.page-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 52px;
  margin-bottom: var(--space-3);
}
.page-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--text-large-title);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.page-sub { color: var(--ink-2); font-size: var(--text-md); margin-bottom: var(--space-4); }
.section-title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--ink-2);
  margin: var(--space-5) 0 var(--space-2);
}

.brand-rule {
  height: 1px;
  background: var(--bronze);
  border: 0;
  margin: var(--space-4) 0;
  opacity: 0.6;
}

/* Inset grouped list */
.group {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.group > li + li,
.group > .row + .row { border-top: 1px solid var(--line); }

.row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 56px;
  padding: var(--space-2) var(--space-4);
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  text-decoration: none;
  color: var(--ink);
}
a.row:active,
button.row:active { background: var(--surface-2); }
.row-main { flex: 1 1 auto; min-width: 0; }
.row-title { display: block; font-weight: 500; overflow-wrap: anywhere; }
.row-sub { display: block; color: var(--ink-2); font-size: var(--text-sm); overflow-wrap: anywhere; }
.row-end { color: var(--ink-2); font-size: var(--text-sm); flex: 0 0 auto; }
.row svg.chev-right { width: 18px; height: 18px; color: var(--ink-3); flex: 0 0 auto; }

.empty {
  padding: var(--space-5) var(--space-4);
  color: var(--ink-2);
  font-size: var(--text-md);
}

.detail-list { display: grid; gap: var(--space-1); }
.detail {
  display: grid;
  grid-template-columns: minmax(6.5em, 30%) minmax(0, 1fr);
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
}
.detail + .detail { border-top: 1px solid var(--line); }
.detail dt { color: var(--ink-2); font-size: var(--text-md); }
.detail dd { margin: 0; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--tap);
  min-width: var(--tap);
  padding: 0 var(--space-4);
  border: 0;
  border-radius: var(--radius);
  font-size: var(--text-body);
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn svg { width: 20px; height: 20px; }

/* Labels on an accent fill are large text: 19px at 600 or more. */
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--text-accent-label);
  font-weight: 600;
  min-height: 48px;
}
.btn-primary:active { background: var(--accent-pressed); }
.btn-secondary { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.btn-quiet {
  background: none;
  color: var(--accent-ink);
  padding: 0 var(--space-2);
}
.btn-danger { background: none; color: var(--err-ink); padding: 0 var(--space-2); }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  flex: 0 0 auto;
  border: 0;
  border-radius: var(--radius);
  background: none;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:active { background: var(--surface-2); }
.icon-btn svg { width: 22px; height: 22px; }

.actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.actions > .btn { flex: 1 1 auto; white-space: nowrap; }

/* ---------------------------------------------------------------- forms */

.form { display: grid; gap: var(--space-4); }
.field { display: grid; gap: var(--space-1); }
.field label,
.field .label { font-size: var(--text-sm); font-weight: 600; color: var(--ink-2); }
.hint { font-size: var(--text-sm); color: var(--ink-2); }

.input,
.textarea,
.select {
  width: 100%;
  min-height: var(--tap);
  padding: 10px var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: var(--text-body);
  line-height: 1.35;
}
.textarea { min-height: 96px; resize: vertical; }
.input:focus-visible,
.textarea:focus-visible,
.select:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.input[aria-invalid="true"],
.textarea[aria-invalid="true"] { border-color: var(--err-ink); }
.field-error { color: var(--err-ink); font-size: var(--text-sm); }

.notice {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  font-size: var(--text-md);
  background: var(--surface-2);
  color: var(--ink);
}
.notice-error { background: var(--err-bg); color: var(--err-ink); }
.notice-ok { background: var(--ok-bg); color: var(--ok-ink); }
.notice-warn { background: var(--warn-bg); color: var(--warn-ink); }

.choices { display: grid; gap: var(--space-2); }
.choice {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  width: 100%;
  min-height: 56px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
}
.choice[aria-checked="true"] { background: var(--accent-wash); border-color: var(--accent); }
.choice-mark {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 11px;
  border: 1.5px solid var(--ink-3);
  display: grid;
  place-items: center;
}
.choice[aria-checked="true"] .choice-mark { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.choice-mark svg { width: 14px; height: 14px; opacity: 0; }
.choice[aria-checked="true"] .choice-mark svg { opacity: 1; }
.choice-text { display: grid; gap: 2px; }
.choice-title { font-weight: 600; }
.segmented .btn { flex: 0 0 auto; color: var(--ink-2); }
.segmented .btn[aria-pressed="true"] { background: var(--accent-wash); color: var(--ink); }
.choice-sub { font-size: var(--text-sm); color: var(--ink-2); }

/* ---------------------------------------------------------------- auth */

.auth {
  min-height: 100%;
  display: grid;
  align-content: center;
  padding: var(--space-6) var(--space-4) calc(var(--space-6) + env(safe-area-inset-bottom));
}
.auth-card { width: 100%; max-width: 420px; margin: 0 auto; display: grid; gap: var(--space-4); }
.auth-brand { display: grid; justify-items: center; margin-bottom: var(--space-4); }
.auth-logo { height: 35px; width: auto; }
.auth-mark { width: 72px; height: 72px; border-radius: 16px; }
.divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--ink-2);
  font-size: var(--text-sm);
}
.divider::before,
.divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-card .page-title { text-align: center; flex: none; font-size: clamp(2.2rem, 9vw, 3rem); font-weight: 700; line-height: 1.06; letter-spacing: -0.055em; }
.auth-card .page-sub { text-align: center; margin-inline: auto; }
/* The sign-in family is a white page, like the landing page. */
html:has(.auth), body:has(.auth), .auth { background: #fff; }
.auth-card .btn-block { min-height: 56px; }
.auth-switch { text-align: center; font-size: var(--text-md); color: var(--ink-2); }
/* S1: footer links to the public pages under the sign-in and sign-up cards. */
.auth-legal { display: flex; flex-wrap: wrap; justify-content: center; column-gap: var(--space-1); }
.auth-legal .btn { font-size: var(--text-sm); }
/* Slice R: the "Forgot password?" control and the two reset steps. */
.auth-forgot,
.reset-more { display: flex; justify-content: center; }
.reset-back { justify-self: center; }
.reset-form input[name="code"] { letter-spacing: 0.12em; text-transform: uppercase; }

/* ---------------------------------------------------------------- cards */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
  box-shadow: var(--shadow-soft);
  min-width: 0;
}
.card-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  min-height: 28px;
}
.card-title { flex: 1 1 auto; font-size: var(--text-body); font-weight: 600; }
.count {
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 13px;
  background: var(--bronze);
  color: var(--on-bronze);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 26px;
  text-align: center;
}
.card-rule { height: 1px; background: var(--bronze); opacity: 0.45; margin: 0 0 var(--space-3); }
.card-foot { display: flex; justify-content: flex-end; margin-top: var(--space-1); }
.card .empty { padding: var(--space-2) 0; }

.tile {
  display: grid;
  align-content: start;
  gap: var(--space-1);
  min-height: 88px;
  text-decoration: none;
  color: var(--ink);
}
.tile-label { display: flex; align-items: center; gap: var(--space-2); font-weight: 600; }
.tile-label svg { width: 20px; height: 20px; color: var(--ink-2); }
.tile-count { font-size: var(--text-large-title); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.tile-sub { font-size: var(--text-sm); color: var(--ink-2); }
a.tile:active { background: var(--surface-2); }

/* ---------------------------------------------------------------- approval cards and receipts */

.approval { display: grid; gap: var(--space-3); }
.approval + .approval { border-top: 1px solid var(--line); padding-top: var(--space-3); }
.approval-title { font-weight: 600; }
.approval-target { color: var(--ink-2); font-size: var(--text-md); overflow-wrap: anywhere; }
.diff { display: grid; gap: 2px; font-size: var(--text-md); }
.diff-line { overflow-wrap: anywhere; white-space: pre-wrap; }
/* K1: the chat campaign card. */
.send-facts { display: grid; gap: var(--space-2); margin: 0; }
.send-row { display: grid; grid-template-columns: 7.5rem 1fr; gap: var(--space-2); }
.send-row dt { color: var(--ink-2); }
.send-row dd { margin: 0; overflow-wrap: anywhere; }
.send-label { color: var(--ink-2); }
.send-body { white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: 8px; padding: var(--space-3); max-height: 24rem; overflow-y: auto; }
.send-permission-label { display: flex; gap: var(--space-2); align-items: flex-start; min-height: var(--tap); }
.send-permission-label input { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 2px; }
@media (max-width: 420px) { .send-row { grid-template-columns: 1fr; gap: 2px; } }
.diff-field { color: var(--ink-2); }
.reasons { font-size: var(--text-sm); color: var(--ink-2); }
.decided { font-size: var(--text-md); font-weight: 600; }
.decided-ok { color: var(--ok-ink); }
.decided-no { color: var(--ink-2); }

.receipts { display: grid; }
.receipt {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 52px;
  padding: var(--space-1) 0;
}
.receipt + .receipt { border-top: 1px solid var(--line); }
.receipt-open {
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--tap);
  border: 0;
  background: none;
  padding: var(--space-1) 0;
  text-align: left;
  display: grid;
  gap: 2px;
}
.receipt-text { font-size: var(--text-md); overflow-wrap: anywhere; white-space: pre-wrap; }
.receipt-meta { font-size: var(--text-sm); color: var(--ink-2); }
.receipt-state { font-size: var(--text-sm); color: var(--ink-2); padding: 0 var(--space-2); }
.receipt-state-done { color: var(--ok-ink); }

/* ---------------------------------------------------------------- tasks */

.task {
  display: flex;
  align-items: flex-start;
  gap: var(--space-1);
  min-height: 52px;
}
.task + .task { border-top: 1px solid var(--line); }
.task-main { flex: 1 1 auto; min-width: 0; padding: 11px 0; }
.task-title { overflow-wrap: anywhere; }
.task-due { font-size: var(--text-sm); color: var(--ink-2); }
.task-due-late { color: var(--err-ink); }
.check {
  flex: 0 0 auto;
  width: var(--tap);
  height: var(--tap);
  margin-left: -10px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  -webkit-tap-highlight-color: transparent;
}
.check-box {
  width: 22px;
  height: 22px;
  border-radius: 11px;
  border: 1.5px solid var(--ink-3);
  display: grid;
  place-items: center;
  color: var(--on-accent);
}
.check-box svg { width: 14px; height: 14px; opacity: 0; }
.check[aria-checked="true"] .check-box { background: var(--ok-ink); border-color: var(--ok-ink); }
.check[aria-checked="true"] .check-box svg { opacity: 1; }
.task-done .task-title { color: var(--ink-2); text-decoration: line-through; }

/* ---------------------------------------------------------------- Home: split view */

.home {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.panel { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.panel-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }

.panel-head {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  min-height: 52px;
  padding: var(--space-1) var(--space-2) var(--space-1) var(--space-4);
  flex: 0 0 auto;
}
.panel-toggle {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  display: flex;
  align-items: center;
  padding: 0;
  font: inherit;
}
.panel-name {
  font-size: var(--text-title);
  font-weight: 700;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel-dash { flex: 1 1 auto; background: transparent; }
.panel-dash .panel-body { overflow-y: auto; overscroll-behavior: contain; }

.dash {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4) var(--space-4);
}
.dash > .span-2 { grid-column: 1 / -1; }
.dash-top:empty { display: none; }
.dash-top { padding: var(--space-3) var(--space-4) 0; }

.dash-item {
  position: relative;
  min-width: 0;
  touch-action: pan-y;
  -webkit-touch-callout: none;
}
.dash-item[data-size="full"] { grid-column: 1 / -1; }
.dash-card,
.dash-card > .card { height: 100%; }

/* Cards that open a sheet: a transparent button over the whole card. */
.card-tap { position: relative; }
.card-open {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: var(--radius);
  background: none;
  -webkit-tap-highlight-color: transparent;
}
.card-open:active { background: var(--accent-wash); opacity: 0.5; }
.card-open:focus-visible { border-radius: var(--radius); outline-offset: -2px; }
.card-figure { font-size: var(--text-large-title); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: var(--space-2); }
.mini-list { display: grid; gap: var(--space-2); }
.mini-row { display: grid; gap: 2px; min-width: 0; }
.mini-main { font-size: var(--text-md); font-weight: 500; overflow-wrap: anywhere; }
.mini-sub { font-size: var(--text-sm); color: var(--ink-2); overflow-wrap: anywhere; }
.mini-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); min-width: 0; }
.mini-score { font-size: var(--text-sm); white-space: nowrap; }
.mini-note { margin-top: var(--space-2); font-size: var(--text-xs); color: var(--warn-ink); }
.clamp-2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.empty.quiet { color: var(--ink-2); }

/* Edit mode: wiggle, remove badge, inert contents. The wiggle uses the
   rotate property so the drag and FLIP animations can use transform. */
.dash-item[data-editing="true"] {
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
  animation: wiggle 0.26s ease-in-out infinite alternate;
}
.dash-item[data-editing="true"]:nth-child(2n) { animation-duration: 0.3s; animation-delay: -0.11s; }
.dash-item[data-editing="true"]:nth-child(3n) { animation-delay: -0.19s; }
@keyframes wiggle { from { rotate: -0.6deg; } to { rotate: 0.6deg; } }
.dash-item[data-editing="true"] .dash-card { pointer-events: none; }
.dash-item[data-editing="true"]:focus-visible { outline-offset: 3px; border-radius: var(--radius); }
.dash-item.holding .card { transform: scale(0.98); }
.dash-item.dragging,
.dash-item[data-picked="true"] { animation: none; rotate: 0deg; }
.dash-item.dragging { z-index: var(--z-drag); cursor: grabbing; }
.dash-item.dragging .card,
.dash-item[data-picked="true"] .card { box-shadow: var(--shadow-lift); }
.dash-item[data-picked="true"] .card { border-color: var(--accent); }
.dash-remove {
  position: absolute;
  top: -12px;
  left: -12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border: 0;
  background: none;
  -webkit-tap-highlight-color: transparent;
}
.dash-remove-dot {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--danger-fill);
}
.dash-remove-dot::before {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  top: 11px;
  height: 2px;
  border-radius: 1px;
  background: var(--on-danger);
}
.dash-edit,
.dash-done { font-weight: 600; }
@media (prefers-reduced-motion: reduce) {
  .dash-item[data-editing="true"] {
    animation: none;
    outline-width: 2px;
    outline-style: dashed;
    outline-color: var(--ink-3);
    outline-offset: 2px;
    border-radius: var(--radius);
  }
}

/* The chat pane. It is a child of the shell (see main.js), laid over the page
   cell: a full screen on a phone, a pane that slides in from the right from
   1024px. Closed, it is hidden and inert. */
.panel-chat {
  grid-row: 2;
  grid-column: 1;
  z-index: 8;
  background: var(--im-bg);
  color: var(--ink);
  /* Room for the raised AI button, which overlaps the pane's lower edge. */
  padding-bottom: 30px;
  visibility: hidden;
  transform: translateX(105%);
}
.shell[data-ready] .panel-chat { transition: transform 450ms var(--ease-glide), visibility 0s linear 450ms; }
.shell[data-chat="open"] .panel-chat {
  visibility: visible;
  transform: none;
}
.shell[data-ready][data-chat="open"] .panel-chat { transition: transform 450ms var(--ease-glide), visibility 0s; }
.shell[data-keyboard="open"] .panel-chat { padding-bottom: 0; }
/* iMessage header: a white bar, a hairline and the title. */
.panel-chat .panel-head {
  background: var(--im-bar);
  border-bottom: 1px solid var(--line-2);
  padding: 8px 8px 8px 18px;
}
.panel-chat .panel-name { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
/* A phone leaves the chat from the tab bar. */
.chat-close { display: none; }

/* ---------------------------------------------------------------- chat */

.chat { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; position: relative; }

.banner {
  margin: 0 var(--space-3) var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--warn-bg);
  color: var(--warn-ink);
  font-size: var(--text-sm);
}

.stream {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-2) 14px var(--space-3);
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* Time stamps and grouping (iMessage): 8px between runs, 2px inside a run. */
.stamp {
  align-self: center;
  margin: var(--space-3) 0 var(--space-1);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--ink-2);
  text-align: center;
}
.msg { display: flex; flex-direction: column; gap: var(--space-2); max-width: 100%; margin-top: var(--space-2); }
.msg[data-group="cont"],
.typing[data-group="cont"] { margin-top: 2px; }
.stream > :first-child,
.stamp + .msg,
.stamp + .typing { margin-top: 0; }
.msg-user { align-items: flex-end; }
.msg-assistant { align-items: flex-start; }

.bubble {
  position: relative;
  isolation: isolate;
  max-width: 75%;
  padding: 8px 14px 9px;
  border-radius: var(--radius-bubble);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
/* Received: light gray, dark text. */
.msg-assistant .bubble { background: var(--im-received); color: var(--im-text); }
/* Sent: solid iMessage blue. The sent bubble is an accent fill, so its text is
   large: 19px at 600 (white on the blue is 4.02:1), which is larger and
   bolder than stock iMessage. */
.msg-user .bubble {
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--text-accent-label);
  font-weight: 600;
  line-height: 1.3;
}
.msg-outside .bubble {
  background: var(--bg);
  color: var(--ink);
  font-size: var(--text-body);
  font-weight: 400;
  border: 1px solid var(--warn-ink);
}
.outside-tag { font-size: var(--text-xs); font-weight: 600; color: var(--warn-ink); }

/* The tail: two pseudo-elements on the last bubble of a run. The first is
   a blob in the bubble color, the second cuts it back with the chat
   background. */
.msg[data-tail="true"] > .bubble::before,
.msg[data-tail="true"] > .bubble::after,
.typing[data-tail="true"]::before,
.typing[data-tail="true"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  height: 20px;
  z-index: -1;
}
.msg-user[data-tail="true"] > .bubble::before { right: -8px; width: 20px; background: var(--accent); border-bottom-left-radius: 15px; }
.msg-user[data-tail="true"] > .bubble::after { right: -10px; width: 10px; background: var(--bg); border-bottom-left-radius: 10px; }
.msg-assistant[data-tail="true"] > .bubble::before,
.typing[data-tail="true"]::before { left: -8px; width: 20px; background: var(--im-received); border-bottom-right-radius: 15px; }
.msg-assistant[data-tail="true"] > .bubble::after,
.typing[data-tail="true"]::after { left: -10px; width: 10px; background: var(--bg); border-bottom-right-radius: 10px; }
.msg-outside > .bubble::before,
.msg-outside > .bubble::after { display: none; }

.msg-items { width: 100%; max-width: 560px; display: grid; gap: var(--space-2); }
.msg-items .card { padding: var(--space-3) var(--space-4); }
/* E1: the email draft card. */
.email-draft { display: grid; gap: var(--space-2); }
.draft-fields { display: grid; grid-template-columns: auto 1fr; gap: 2px var(--space-2); margin: 0; }
.draft-fields dt { font-weight: 600; }
.draft-fields dd { margin: 0; overflow-wrap: anywhere; }
.draft-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.draft-note, .draft-foot { color: var(--ink-2); font-size: var(--text-sm); margin: 0; }
.email-draft .actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* Typing: iMessage's three gray dots in a received bubble. */
.typing {
  position: relative;
  isolation: isolate;
  align-self: flex-start;
  display: inline-flex;
  gap: 5px;
  margin-top: var(--space-2);
  padding: 14px 16px;
  border-radius: var(--radius-bubble);
  background: var(--im-received);
}
.typing span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--im-text-2);
  animation: typing 1.2s infinite var(--ease-out);
}
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing {
  0%, 60%, 100% { opacity: 0.35; transform: none; }
  30% { opacity: 1; transform: translateY(-2px); }
}
@media (prefers-reduced-motion: reduce) {
  .typing span { animation: none; opacity: 0.8; }
}

.chat-empty { margin: auto 0 0; display: grid; gap: var(--space-3); padding: var(--space-3) 0; }
.chat-empty-title { font-size: var(--text-title); font-weight: 700; letter-spacing: -0.01em; }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip {
  min-height: var(--tap);
  padding: 0 var(--space-4);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  font-size: var(--text-md);
  text-align: left;
}
.chip:active { background: var(--surface-2); }

.chat-error { align-self: stretch; margin-top: var(--space-2); }

.composer {
  flex: 0 0 auto;
  display: grid;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3) var(--space-3);
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.composer-row { display: flex; align-items: flex-end; gap: var(--space-1); }
.pill { position: relative; flex: 1 1 auto; min-width: 0; }
.composer-input {
  display: block;
  width: 100%;
  min-height: var(--tap);
  max-height: 160px;
  padding: 10px 52px 10px 16px;
  border: 1px solid var(--im-input-line);
  border-radius: 22px;
  background: var(--bg);
  color: var(--ink);
  font-size: var(--text-body);
  line-height: 1.35;
  resize: none;
}
.composer-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.composer[data-paste="true"] .composer-input { border-color: var(--warn-ink); }
.paste-tag {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--warn-ink);
}
.paste-tag-text { flex: 1 1 auto; font-weight: 600; }

/* The send button: a 44px hit area around a 30px blue circle with a white
   up arrow, inside the right end of the pill. Dimmed, never gray, when there
   is nothing to send. */
.send {
  position: absolute;
  right: 0;
  bottom: 0;
  width: var(--tap);
  height: var(--tap);
  padding: 7px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  background-clip: content-box;
  color: var(--on-accent);
  display: grid;
  place-items: center;
  -webkit-tap-highlight-color: transparent;
}
.send:active:not(:disabled) { background-color: var(--accent-pressed); }
.send:disabled { opacity: 0.4; cursor: default; }
.send svg { width: 18px; height: 18px; stroke-width: 2.5; }
.send:focus-visible { border-radius: 50%; }

/* The plus-style attach button: a gray circle (paste from someone else). */
.composer .attach {
  padding: 6px;
  border-radius: 50%;
  background: var(--im-plus);
  background-clip: content-box;
  color: var(--ink);
}
.composer .attach:active { background: var(--im-plus); background-clip: content-box; opacity: 0.7; }
.composer .attach[aria-pressed="true"] { background: var(--warn-bg); background-clip: content-box; color: var(--warn-ink); }
.composer .attach svg { width: 18px; height: 18px; stroke-width: 2.25; }

/* ---------------------------------------------------------------- overlays */

.slideover,
.sheet {
  border: 0;
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  max-width: 100vw;
}
.slideover::backdrop,
.sheet::backdrop { background: var(--scrim); }

.slideover {
  margin: 0;
  width: min(360px, 88vw);
  height: 100dvh;
  max-height: 100dvh;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}
.slideover[open] { display: flex; flex-direction: column; }
.slideover.chat-theme { background: var(--bg); }
.section-gap { height: var(--space-3); }
.slideover-body { flex: 1 1 auto; overflow-y: auto; padding: 0 var(--space-3) var(--space-4); }

.sheet {
  margin: auto 0 0;
  width: 100vw;
  max-height: 85dvh;
  border-radius: 16px 16px 0 0;
  padding: var(--space-2) var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom));
}
.sheet[open] { display: grid; gap: var(--space-3); align-content: start; overflow-y: auto; }
.sheet-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto; }
.sheet-list { display: grid; gap: var(--space-3); }
.add-cards { display: grid; gap: var(--space-3); }
.piece { display: grid; gap: var(--space-3); justify-items: start; }
.piece .btn-block { justify-self: stretch; }
.piece-text { font-size: var(--text-body); line-height: 1.45; }
.copy-status:empty { display: none; }
.copy-status { justify-self: stretch; }
.overlay-head { display: flex; align-items: center; gap: var(--space-2); min-height: 52px; }
.slideover-head { padding: 0 var(--space-2) 0 var(--space-4); }
.overlay-title { flex: 1 1 auto; font-size: var(--text-title); font-weight: 700; }

.conv { display: flex; align-items: center; gap: var(--space-1); min-height: 52px; }
.conv + .conv { border-top: 1px solid var(--line); }
.conv-open {
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--tap);
  padding: var(--space-1) var(--space-2);
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  text-align: left;
}
.conv-open[aria-current="true"] { background: var(--accent-wash); }
.conv-title { display: block; overflow-wrap: anywhere; }
.conv-meta { display: block; font-size: var(--text-sm); color: var(--ink-2); }
.conv-edit { flex: 1 1 auto; display: flex; gap: var(--space-2); align-items: center; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: var(--z-toast);
  max-width: calc(100vw - 32px);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  background: var(--toast-bg);
  color: var(--toast-ink);
  font-size: var(--text-md);
  box-shadow: var(--shadow-toast);
}

/* ---------------------------------------------------------------- desktop */

@media (min-width: 1024px) {
  .shell {
    grid-template-columns: var(--rail-w) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
  /* The rail: pale, 96px, hairline on its right, items centered. */
  .tabbar {
    grid-row: 1 / -1;
    grid-column: 1;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 12px 8px;
    background: var(--rail);
    border-top: 0;
    border-right: 1px solid var(--hairline);
  }
  .tab { flex: 0 0 auto; min-height: 0; padding: 9px 2px; }
  .tab[aria-current="page"] { background: var(--surface-solid); }
  .tab-ai { flex: 0 0 auto; min-width: 0; padding: 4px 0; }
  .tab-ai-dot { margin-top: 0; }
  .fwd-slot, .main, .main[data-view="home"] { grid-column: 2; }
  /* Pages use the full width. */
  .main { padding-bottom: 0; }
  /* The chat slides in over the page from the right: min(46%, 430px). */
  .panel-chat {
    grid-column: 2;
    justify-self: end;
    width: min(46%, 430px);
    padding-bottom: 0;
    border-left: 1px solid var(--hairline);
    box-shadow: -18px 0 40px -24px rgba(40, 60, 110, 0.35);
  }
  .chat-close { display: inline-grid; }
  .panel-chat .panel-head { padding: 12px 12px 12px 18px; }

  .dash {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    padding: var(--space-3) var(--space-5) var(--space-5);
    gap: var(--space-3);
    align-items: start;
  }
  .dash-item { grid-column: span 3; }
  .dash > .skeleton { grid-column: span 3; }
  .dash-top { padding: var(--space-3) var(--space-5) 0; }
  .panel-head { padding: 20px clamp(14px, 2.4vw, 28px) var(--space-2); }
  .page { padding: 20px clamp(14px, 2.4vw, 28px) var(--space-6); }
  .sheet { width: min(560px, 100vw); margin: auto; border-radius: var(--radius-lg); }
  .toast { bottom: 24px; }
}

/* ---------------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .btn:active { transform: none; }
}

/* ---------------------------------------------------------------- Add to Home Screen card */

.a2hs-body { display: flex; gap: var(--space-3); align-items: flex-start; }
.a2hs-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--accent-wash);
  color: var(--accent-ink);
}
.a2hs-icon svg { width: 20px; height: 20px; }
.a2hs-text { display: grid; gap: var(--space-1); min-width: 0; }
.a2hs-copy { font-size: var(--text-md); color: var(--ink-2); }

/* ---------------------------------------------------------------- Verify your email (Slice V) */

.verify-slot:empty { display: none; }
.verify-slot { padding: 0 var(--space-4) var(--space-3); }
.verify-strip {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
  border: 1px solid var(--line);
  border-left: 3px solid var(--warn-ink);
  border-radius: var(--radius);
  background: var(--surface);
}
.verify-strip-text { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.verify-strip-title { font-size: var(--text-md); font-weight: 600; }
.verify-strip-copy { font-size: var(--text-sm); color: var(--ink-2); }
.verify-strip .btn { flex: 0 0 auto; }
.verify-panel { display: grid; gap: var(--space-4); }
.verify-copy { font-size: var(--text-md); color: var(--ink-2); }
.verify-form .input { letter-spacing: 0.2em; font-variant-numeric: tabular-nums; }
.verify-more { display: flex; justify-content: center; }
@media (min-width: 1024px) {
  .verify-slot { padding: 0 var(--space-5) var(--space-4); }
}

/* The offline page (static, shows no data). */
.offline-card { justify-items: center; text-align: center; }
.offline-title { font-size: var(--text-large-title); font-weight: 700; letter-spacing: -0.02em; }
.offline-text { color: var(--ink-2); font-size: var(--text-md); max-width: 32ch; }

/* ---------------------------------------------------------------- polish pass (Phase D2) */

.signed-in { margin-top: var(--space-3); text-align: center; }
.page-sub { max-width: 46ch; }
.card { box-shadow: var(--shadow-card); }
.card-foot { margin-top: 0; }
.approval-title { font-size: var(--text-body); }
.empty { line-height: 1.4; }
.tab[aria-current="page"] svg { stroke-width: 2; }
.row-title { font-weight: 500; letter-spacing: -0.005em; }

/* Loading: quiet placeholder cards while the dashboard fetches. */
.skeleton {
  min-height: 112px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.skeleton.span-2 { min-height: 168px; }
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--surface-2), transparent);
  transform: translateX(-100%);
  animation: sweep 1.4s var(--ease-out) infinite;
}
@keyframes sweep { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .skeleton::after { animation: none; } }

@media (min-width: 1024px) {
  .dash > .skeleton.span-2 { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------- applications */

.app-score { display: grid; justify-items: end; gap: 2px; }
.app-score-num { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.app-status { color: var(--ink-2); font-size: var(--text-xs); }
.app-points { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.app-statements { display: grid; gap: var(--space-2); margin: var(--space-3) 0 var(--space-4); padding-left: var(--space-4); list-style: disc; color: var(--ink-2); }
.app-consent .btn-block { margin-top: var(--space-2); }
.app-scan { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.app-score-figure { margin-top: var(--space-2); }
.app-ratio { margin-top: var(--space-1); }
.app-rubric,
.app-flags .group { margin-top: var(--space-3); }
.app-flags { margin-top: var(--space-4); }
.app-summary { white-space: pre-wrap; }
.app-facts .detail dd { display: grid; gap: 2px; }
.app-messages { display: grid; gap: var(--space-3); }
.app-message summary { display: grid; gap: 2px; cursor: pointer; min-height: var(--tap); align-content: center; }
.app-body { white-space: pre-wrap; margin-top: var(--space-3); overflow-wrap: anywhere; }
[data-page="application-detail"] section { margin-top: var(--space-4); }
.app-summary + .hint { margin-top: var(--space-2); }

/* ---------------------------------------------------------------- contract fill (S5) */

.contract-banners { display: grid; gap: var(--space-2); margin-bottom: var(--space-4); }
.contract-status { margin-bottom: var(--space-3); }
.contract-templates { list-style: none; }
.contract-template { display: grid; gap: var(--space-3); padding: var(--space-3) var(--space-4); }
.contract-template + .contract-template { border-top: 1px solid var(--line); }
.contract-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.contract-actions .btn-primary { flex: 1 1 auto; }
.contract-armed { display: inline-flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.contract-upload-wrap { display: grid; gap: var(--space-2); }
.contract-notes-status,
.contract-copy-status,
.contract-extract-result { display: grid; gap: var(--space-2); margin: var(--space-3) 0; }
.contract-proposals { display: grid; gap: var(--space-3); }
.proposal { display: grid; gap: var(--space-2); }
.proposal-label { font-weight: 600; }
.proposal-value { font-size: var(--text-title); font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.proposal-quote {
  margin: 0;
  padding: var(--space-2) var(--space-3);
  border-left: 3px solid var(--bronze);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.proposal-context summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; color: var(--accent-ink); font-size: var(--text-sm); }
.proposal-context-text { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); font-size: var(--text-sm); }
.contract-groups { display: grid; gap: var(--space-3); }
.contract-group > summary { display: grid; gap: 2px; cursor: pointer; min-height: var(--tap); align-content: center; }
.contract-group-title { font-weight: 600; }
.contract-group-form { margin-top: var(--space-4); }
.contract-instruction { display: grid; gap: var(--space-3); padding-top: var(--space-2); border-top: 1px solid var(--line); }
.contract-instruction .section-title { margin: var(--space-2) 0 0; }
.contract-copy-info { margin-bottom: var(--space-2); }
[data-section="copy"] .btn-block + .btn-block { margin-top: var(--space-2); }
[data-section="copy"] .contract-copy-info + .notice { margin-bottom: var(--space-3); }
.contract-footer { margin-top: var(--space-6); display: flex; justify-content: center; }

/* ---------------------------------------------------------------- S3: More > Account */

.account-section { display: grid; gap: var(--space-3); }
.account-section + .account-section { margin-top: var(--space-4); }
.account-body { display: grid; gap: var(--space-2); }
.account-plan { font-size: var(--text-body); font-weight: 600; }
.account-usage { color: var(--ink-2); font-size: var(--text-md); }
.account-copy { color: var(--ink-2); font-size: var(--text-md); max-width: 60ch; }
.plan-choose { display: grid; gap: var(--space-2); }
.plan-choose .section-title { margin: var(--space-2) 0 0; }
.plan-choice:disabled { opacity: 0.5; }
.plan-details { justify-self: start; }
.manage { display: grid; gap: var(--space-2); }
.gmail-actions,
.gmail-armed { display: grid; gap: var(--space-3); }
.gmail-manual { display: grid; gap: var(--space-2); }
.gmail-manage-url { overflow-wrap: anywhere; font-weight: 600; }
.no-plan-link { margin-top: var(--space-2); }
/* A destructive action: the error colours on their own soft fill, which keep
   their contrast in both themes (the same pair as .notice-error). */
.btn-danger-solid {
  background: var(--err-bg);
  color: var(--err-ink);
  border: 1px solid var(--err-ink);
  font-size: var(--text-accent-label);
  min-height: 48px;
}
.account-danger { border-color: var(--err-ink); }
.delete-form { margin-top: var(--space-2); }

/* ================================================================ SOLID SURFACES (reskin 2026-11-03)
   Replaces the liquid glass layer. Solid white cards on the pale page, no blur,
   no sheen, no wallpaper: cards are radius 20px with the soft card shadow and
   no border. Layout and behavior stay in the rules above. */

html, body { background: var(--bg); }
body { position: relative; }

.card,
.group,
.skeleton,
.verify-strip {
  background: var(--surface-solid);
  border: 0;
  box-shadow: var(--shadow-card);
  position: relative;
}
.card-open { z-index: 1; }
.card, .group { border-radius: var(--radius); }

.card, .btn, .chip, .tab, .icon-btn { transition: transform 200ms var(--ease-out), background-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out); }
a.tile:active, a.row:active, button.row:active { background: var(--accent-wash); }
.card-tap:active { transform: scale(0.985); }
.card-open:active { background: none; opacity: 1; }

/* ------------------------------------------------ buttons */
.btn { border-radius: 999px; }
.btn-primary {
  background: var(--accent);
  box-shadow: none;
  text-shadow: none;
}
.btn-primary:hover { background: var(--accent-pressed); }
.btn-primary:active { background: var(--accent-pressed); transform: scale(0.98); }
.btn-secondary {
  background: var(--surface-solid);
  border: 0;
  color: var(--accent-ink);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.btn-secondary:hover { background: var(--accent-wash); }
.btn:active { transform: scale(0.97); }
.icon-btn { border-radius: 50%; }

/* ------------------------------------------------ inputs */
.input, .textarea, .select {
  background: var(--surface-solid);
  border: 0;
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1px var(--input-line);
}
.input:focus-visible, .textarea:focus-visible, .select:focus-visible {
  outline: 0;
  box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px var(--accent-wash);
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--err-ink); }
.chip {
  background: var(--surface-solid);
  border: 0;
  box-shadow: inset 0 0 0 1px var(--line);
}
.chip:active { background: var(--accent-wash); transform: scale(0.97); }
.choice { background: var(--surface-solid); border: 0; box-shadow: inset 0 0 0 1px var(--line); }
.choice[aria-checked="true"] { box-shadow: inset 0 0 0 1.5px var(--accent); }
.notice { border-radius: var(--radius); box-shadow: none; }
.notice-error { background: var(--err-bg); }
.notice-ok { background: var(--ok-bg); }
.notice-warn { background: var(--warn-bg); }

/* ------------------------------------------------ type */
.page-title { font-size: 2rem; font-weight: 800; letter-spacing: -0.035em; }
.panel-name { letter-spacing: -0.025em; }
.section-title { letter-spacing: 0.01em; padding-left: var(--space-3); }
.tile-count, .card-figure { letter-spacing: -0.03em; font-weight: 700; }

/* ------------------------------------------------ home panels */
.composer {
  background: var(--im-bar);
  border-top: 0;
}
.composer-input {
  background: var(--surface-solid);
  border: 0;
  border-radius: 24px;
  box-shadow: inset 0 0 0 1px var(--im-input-line);
}
.composer-input:focus-visible { outline: 0; box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px var(--accent-wash); }
.send { background: var(--tint-glass); background-clip: content-box; transition: transform 420ms var(--ease-glide); }
.send:active:not(:disabled) { transform: scale(0.9); }

/* ------------------------------------------------ overlays */
.sheet, .slideover {
  background: var(--surface-solid);
  box-shadow: 0 -20px 60px var(--glass-shadow);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.slideover { border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
.slideover.chat-theme { background: var(--im-bg); }
.sheet::backdrop, .slideover::backdrop {
  background: var(--scrim);
}
.sheet-grab { background: var(--ink-3); opacity: 0.4; }
.sheet[open] { animation: sheet-in 460ms var(--ease-glide); }
@keyframes sheet-in { from { transform: translateY(40px) scale(0.98); opacity: 0; } }
.toast {
  background: var(--surface-solid);
  color: var(--ink);
  border-radius: 999px;
  bottom: calc(var(--tabbar-h) + 32px + env(safe-area-inset-bottom));
  box-shadow: 0 0 0 1px var(--line), var(--shadow-toast);
}

/* ------------------------------------------------ auth screen */
.auth-mark { border-radius: 22px; }
.auth-card {
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: transparent;
  box-shadow: none;
}

/* The chat panel is solid iMessage white: its chips and cards get a
   solid tinted fill. */
.chat-theme .chip,
.chat-theme .card,
.chat-theme .group,
.chat-theme .input,
.chat-theme .textarea {
  background: var(--im-card);
  box-shadow: inset 0 0 0 1px var(--line);
}

/* ------------------------------------------------ the demo look (Overview and pages)
   Taken from the landing page's app demo (.ad-*): solid white cards, radius 20,
   a soft shadow, 12px uppercase tile headings, hairline rows, score pills. */
.panel-name, .page-title { font-size: clamp(1.3rem, 2vw, 1.6rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
.panel-dash .panel-head { padding-top: 20px; }
.panel-head, .page { padding-left: clamp(14px, 2.4vw, 28px); padding-right: clamp(14px, 2.4vw, 28px); }
.hero-slot:empty { display: none; }
.hero-slot { padding: var(--space-2) clamp(14px, 2.4vw, 28px) 0; }
.hero-card {
  position: relative; display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface-solid); box-shadow: var(--shadow-card);
}
.hero-copy { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.hero-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--accent-wash); color: var(--accent-ink); font-size: 11.5px; font-weight: 700; }
.hero-title { font-size: clamp(1.1rem, 1.7vw, 1.35rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; }
.hero-sub { font-size: 12.5px; color: var(--ink-2); }
.hero-stats { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.hero-stat { display: grid; gap: 2px; font-size: 12px; color: var(--ink-2); }
.hero-num { font-size: 1.15rem; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }

/* Tile headings: 12px bold uppercase, status colors stay. */
.card-title, .section-title { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.dash-item .card-title { display: flex; align-items: center; gap: 6px; }
.card[data-tile="today"] .card-title { color: var(--accent-ink); }
.card[data-tile="contracts"] .card-title { color: var(--tile-contracts); }
.card[data-tile="marketing"] .card-title { color: var(--tile-marketing); }
.card[data-tile="applications"] .card-title { color: var(--tile-applications); }
.card[data-tile="needs"] .card-title { color: var(--warn-ink); }
.card[data-tile="changes"] .card-title { color: var(--ink-2); }
.dash { padding-left: clamp(14px, 2.4vw, 28px); padding-right: clamp(14px, 2.4vw, 28px); }
.dash-top { padding-left: clamp(14px, 2.4vw, 28px); padding-right: clamp(14px, 2.4vw, 28px); }
.verify-slot { padding-left: clamp(14px, 2.4vw, 28px); padding-right: clamp(14px, 2.4vw, 28px); }
.card { padding: 14px 16px; }
.mini-row + .mini-row { padding-top: var(--space-2); border-top: 1px solid var(--line-2); }
.mini-main { font-weight: 400; }
.mini-sub, .row-sub, .task-due { font-size: 12.5px; }

/* Score pills: green, or amber for a lower score. */
.mini-score, .app-score-num {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: var(--ok-bg); color: var(--ok-ink); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.mini-score.score-mid, .app-score-num.score-mid { background: var(--warn-bg); color: var(--warn-ink); }
.mini-head { align-items: center; }

/* Rows: hairline separators inside one white card. */
.group { padding: 6px 8px; }
.group > li + li, .group > .row + .row { border-top: 1px solid var(--line-2); }
.row { padding: 9px 8px; border-radius: 12px; }
.row-title { font-weight: 400; }
a.row:active, button.row:active, .row[aria-current="true"] { background: var(--accent-wash); }
.page-sub { max-width: 60ch; }
.form { max-width: 640px; }
.section-title { margin-top: var(--space-4); padding-left: 0; }
.card-rule { display: none; }

/* The Overview: a phone stacks the tiles. */
.tab[data-tab="home"] svg { stroke-width: 3.4; }
.dash-edit { min-height: 36px; padding: 0 16px; border-radius: 999px; background: var(--accent-wash); color: var(--accent-ink); box-shadow: none; }
@media (max-width: 1023px) {
  .main { padding-bottom: 28px; }
  .main[data-view="home"] { padding-bottom: 0; }
  .dash { grid-template-columns: minmax(0, 1fr); padding-bottom: 40px; }
  .dash-item, .dash > .skeleton { grid-column: 1 / -1; }
  .profile-btn { width: 40px; }
}

/* ---------------------------------------------------------------- Gmail forwarding (Slice G2) */

/* The banner is a row of the shell above the main area, so it never covers
   the composer or the tab bar. Solid error colors from the tokens (about 5:1);
   no new colors. */
.fwd-slot { grid-row: 1; min-width: 0; z-index: 1; }
.fwd-slot:empty { display: none; }
.fwd-slot:not(:empty) + .main { padding-top: 0; }
.fwd-banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: calc(var(--space-3) + env(safe-area-inset-top)) calc(var(--space-4) + env(safe-area-inset-right)) var(--space-3) calc(var(--space-4) + env(safe-area-inset-left));
  background: var(--err-bg);
  color: var(--err-ink);
  border-bottom: 2px solid var(--danger-fill);
}
.fwd-text { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.fwd-title { font-size: var(--text-md); font-weight: 700; }
.fwd-body { font-size: var(--text-sm); }
.fwd-button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 var(--space-4);
  border-radius: 999px;
  background: var(--err-ink);
  background-image: none;
  color: var(--err-bg);
  font-weight: 600;
  box-shadow: none;
}
.row[hidden] { display: none; }
.fwd-panel { display: grid; gap: var(--space-3); }
.fwd-copy { font-size: var(--text-md); color: var(--ink-2); }
.fwd-steps { margin: 0; padding-left: var(--space-5); display: grid; gap: var(--space-3); font-size: var(--text-md); color: var(--ink); }
.fwd-step::marker { font-weight: 600; }
.fwd-link { color: var(--accent-ink); font-weight: 600; }

/* ---------------------------------------------------------------- listing photos
   A listing's gallery: the first photo runs full width and the rest sit two up,
   so the agent sees which photo leads. The pill is the real order. Tapping a tile
   selects it and shows the one action bar below the grid. */
.photos { display: grid; gap: var(--space-3); margin-top: var(--space-5); }
.photos-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.photos-head .section-title { margin: 0; }
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.photos-empty { grid-column: 1 / -1; }
.photo-tile {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  -webkit-tap-highlight-color: transparent;
}
.photo-tile:first-child { grid-column: 1 / -1; border-radius: var(--radius); }
.photo-tile-on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.photo-media { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-order {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 var(--space-2);
  border-radius: 999px;
  background: var(--glass-strong);
  color: var(--ink);
  font-size: var(--text-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.photo-tile-busy .photo-media { opacity: 0.55; }
.photo-bar > .btn { flex: 1 1 0; padding: 0 var(--space-2); gap: var(--space-1); font-size: var(--text-sm); }
.photo-bar > .btn svg { flex: 0 0 auto; width: 18px; height: 18px; }
.photo-bar > .photo-delete { flex: 0 0 auto; padding: 0 var(--space-3); }
.photo-message:empty { display: none; }

/* ---------------------------------------------------------------- listing post
   The slides are the page: a strip that snaps one slide at a time, with the next
   one showing at the edge so it reads as swipeable. Everything else sits under it,
   in the order the agent uses it. */
.post-page { display: block; }
.post-body { display: grid; gap: var(--space-3); min-width: 0; }
.post-strip {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  margin: 0 calc(var(--space-4) * -1);
  padding: 0 var(--space-4);
  scroll-padding: 0 var(--space-4);
}
.post-strip::-webkit-scrollbar { display: none; }
.post-slide { flex: 0 0 86%; max-width: 440px; scroll-snap-align: start; }
.post-slide:only-child { flex-basis: 100%; }
.post-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.post-under { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: var(--tap); }
.post-under:empty { display: none; }
.post-count { margin: 0; }
.post-save-slide { margin-left: auto; }
.post-status:empty { display: none; }
.post-asof { margin: 0; }
.post-caption { display: grid; gap: var(--space-2); }
.post-caption .section-title { margin: var(--space-3) 0 0; }
.post-caption-text { max-height: 40vh; overflow-y: auto; }
.receipt .open-post { flex: 0 0 auto; }
@media (min-width: 1024px) {
  .post-slide { flex-basis: 440px; }
}

/* Marketing Studio. */
.studio-intro { margin: 0 0 var(--space-4); padding: 0; color: var(--ink-2); font-size: var(--text-sm); }
.studio-tile {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--accent-ink);
}
.studio-tile svg { width: 20px; height: 20px; }
.studio-soon { opacity: 0.72; }
.studio-soon .studio-tile { color: var(--ink-2); }
.studio-see-all { display: flex; justify-content: flex-end; padding: var(--space-2) var(--space-3) 0; }
.profile-btn { color: var(--ink); text-decoration: none; }
@media (max-width: 359px) {
  .profile-btn { width: 36px; }
  .tab-label { font-size: 10px; white-space: nowrap; }
}

/* Contact dates: a month picker and a day picker under one label. */
.month-day { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-2); }

/* ---------------------------------------------------------------- print flyer
   The canvas is the page. On paper nothing else prints: every element that is not
   the canvas or holds it is hidden, and the canvas fills one letter sheet. */
.flyer-page { display: block; }
.flyer-body { display: grid; gap: var(--space-3); min-width: 0; }
.flyer-sheet { max-width: 440px; margin: 0 auto; width: 100%; }
.flyer-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2550 / 3300;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.flyer-actions { display: grid; gap: var(--space-2); }
@page { size: letter; margin: 0; }
@media print {
  html, body, .shell, .main { display: block; height: auto; min-height: 0; overflow: visible; background: #fff; margin: 0; padding: 0; }
  body *:not(.flyer-canvas):not(:has(.flyer-canvas)) { display: none !important; }
  .flyer-sheet, .flyer-body, .flyer-page { display: block; max-width: none; width: 100%; margin: 0; padding: 0; }
  .flyer-canvas { width: 100%; height: auto; border-radius: 0; break-inside: avoid; }
}

/* ---------------------------------------------------------------- brand color field (B1) */

.brand-row { display: flex; align-items: center; gap: var(--space-2); }
.brand-picker {
  flex: none;
  width: var(--tap);
  height: var(--tap);
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}
.brand-picker:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.brand-hex { flex: 1 1 auto; min-width: 0; font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.brand-clear { flex: none; }

/* P1b-1: Deleted items in Settings (More). */
.bin { margin-top: var(--space-4); }
.bin-sub { padding: 0 var(--space-3); margin: 0 0 var(--space-2); }
.bin-row .bin-restore { flex: 0 0 auto; }
.bin-row-status .notice { margin-top: var(--space-2); }
.bin-list > .empty { padding: var(--space-3) var(--space-4); }

/* N1: the notices bell (Overview header), the notices list and the phone
   alerts switch in Settings. */
.notice-bell { position: relative; color: var(--ink); text-decoration: none; }
.notice-bell .notice-badge { top: 0; left: auto; right: -4px; }
.notices-mark-all { margin: 0 var(--space-3) var(--space-2); }
.notice-row .notice-open { color: inherit; text-decoration: none; }
.notice-row.is-read .notice-title { color: var(--ink-2); font-weight: 400; }
.notice-row .notice-mark { flex: 0 0 auto; }
.notices-list > .empty { padding: var(--space-3) var(--space-4); }
.phone-alerts { margin-top: var(--space-4); }
.phone-alerts .hint { padding: 0 var(--space-3); margin: 0 0 var(--space-2); }
.switch {
  position: relative;
  flex: 0 0 auto;
  width: 51px;
  height: 31px;
  border: 0;
  border-radius: 16px;
  background: var(--line);
  cursor: pointer;
  transition: background 0.2s;
}
.switch .switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"] .switch-knob { transform: translateX(20px); }
.switch:disabled { opacity: 0.6; }

/* C1: Google Calendar in Account. Imported events are plain read-only text. */
.calendar-pick-list { display: grid; gap: 4px; margin: 8px 0; }
.calendar-pick { display: flex; gap: 8px; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.calendar-events { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.calendar-event { overflow-wrap: anywhere; }
.calendar-event-when { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- listing import (LI1)
   New listing: one lookup box, then a quiet "Add manually" disclosure that holds
   the existing form. A found lookup opens the form prefilled; the photo sits in
   the same 3:2 frame as the gallery, above Save. The detail page leads with the
   first photo, and the first list rows carry a small cover. */
.listing-lookup { margin-bottom: var(--space-2); }
.lookup-message:empty,
.lookup-photo-message:empty { display: none; }
.lookup-manual { max-width: 640px; }
.lookup-manual > summary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: var(--tap);
  cursor: pointer;
  list-style: none;
  color: var(--accent-ink);
  font-size: var(--text-sm);
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}
.lookup-manual > summary::-webkit-details-marker { display: none; }
.lookup-manual > summary[hidden] { display: none; }
.lookup-manual > summary svg { width: 18px; height: 18px; transition: transform var(--dur) var(--ease-out); }
.lookup-manual[open] > summary svg { transform: rotate(180deg); }
.lookup-manual[open] > summary { margin-bottom: var(--space-3); }
.lookup-photo-block { display: grid; gap: var(--space-3); }
.lookup-rights { display: flex; gap: var(--space-2); align-items: flex-start; min-height: var(--tap); font-size: var(--text-md); }
.lookup-rights input { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 2px; accent-color: var(--accent); }
.lookup-photo {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.lookup-photo[hidden] { display: none; }
.lookup-photo-off { opacity: 0.45; }
.listing-hero {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-2);
  margin-bottom: var(--space-4);
}
.listing-hero[hidden] { display: none; }
.row-thumb {
  flex: 0 0 auto;
  width: 48px;
  height: 36px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-2);
}

/* LM1: the map on the Listings page. Pins are status dots; the card is a
   solid surface with one hairline border and only the facts that exist. */
.map-slot:empty { display: none; }
.listing-map { position: relative; margin: 0 0 var(--space-4); }
.listing-map-canvas {
  height: 300px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  isolation: isolate;
}
@media (min-width: 900px) { .listing-map-canvas { height: 420px; } }
.listing-map-note { margin: var(--space-2) 2px 0; }
.listing-map .leaflet-container { font: inherit; background: var(--surface-2); }
.listing-map .leaflet-control-attribution { font-size: 10px; background: rgba(255, 255, 255, 0.85); }
.listing-map .leaflet-bar a { color: var(--ink); }

.map-pin {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  background: var(--ink-3);
  transition: transform var(--dur, 160ms) var(--ease-out, ease-out);
}
.map-pin:hover, .map-pin:focus-visible { transform: scale(1.25); }
.map-pin.tone-ok { background: #2f8a4c; }
.map-pin.tone-info { background: var(--accent); }
.map-pin.tone-warn { background: #c98a12; }
.map-pin.tone-muted { background: #8a8986; }

.map-float {
  position: absolute;
  z-index: 1100;
  cursor: pointer;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-solid, #fff);
  color: var(--ink);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  white-space: normal;
  overflow: hidden;
}
.map-card { width: 232px; font-size: var(--text-sm); line-height: 1.45; }
.map-card-photo { height: 120px; background: var(--surface-2); }
.map-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.map-card-body { padding: 10px 12px 12px; }
.map-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.map-card-price { font-size: var(--text-md, 15px); font-weight: 600; letter-spacing: -0.01em; }
.map-card-status {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--surface-2);
  color: var(--ink-2);
}
.map-card-status.tone-ok { background: var(--ok-bg); color: var(--ok-ink); }
.map-card-status.tone-warn { background: var(--warn-bg); color: var(--warn-ink); }
.map-card-status.tone-info { background: var(--accent-wash); color: var(--accent-ink); }
.map-card-address { font-weight: 500; }
.map-card-place, .map-card-facts { color: var(--ink-2); }
.map-card-lines { list-style: none; margin: 8px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line); color: var(--ink-2); }
.map-card-lines li + li { margin-top: 2px; }

/* LM2: archive controls on a listing. */
.archived-notice { display: flex; flex-direction: column; gap: var(--space-2); margin: 0 0 var(--space-3); }
.archived-notice .btn { align-self: flex-start; }
.archive-foot { margin-top: var(--space-5); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.archive-foot .btn { padding-left: 0; color: var(--ink-2); }
.archived-toggle { margin-top: var(--space-3); }
.archive-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.archive-foot .btn-danger { padding-left: 0; }
.archive-foot .btn-danger.armed { font-weight: 600; }
.archive-foot .hint + .hint { margin-top: var(--space-1); }
