/*
 * The portal shell, built to the CRM's pattern: a 15rem left rail on large
 * screens, collapsing to a top bar with a drawer under 1024px.
 */

#app { min-height: 100dvh; }

.layout { min-height: 100dvh; }

@media (min-width: 1024px) {
  .layout {
    display: grid;
    grid-template-columns: var(--rail-w) 1fr;
    height: 100dvh;
    overflow: hidden;
  }
}

/* ------------------------------------------------------------- mobile bar */

.mobilebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.mobilebar img { height: 1.75rem; width: auto; }
.mobilebar .spacer { flex: 1; }
@media (min-width: 1024px) { .mobilebar { display: none; } }

.menu-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.25rem; height: 2.25rem;
  margin-left: -0.375rem;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color 150ms var(--ease-out-expo), color 150ms var(--ease-out-expo);
}
.menu-toggle svg { width: 20px; height: 20px; }
@media (hover: hover) and (pointer: fine) {
  .menu-toggle:hover { background: #f1efe9; color: var(--ink); }
}

/* ------------------------------------------------------------------ rail */

.rail {
  background: var(--panel);
  border-color: var(--line);
  display: none;
  flex-direction: column;
}
.rail[data-open='true'] { display: flex; border-bottom: 1px solid var(--line); }

@media (min-width: 1024px) {
  .rail {
    display: flex;
    position: sticky;
    top: 0;
    height: 100dvh;
    border-right: 1px solid var(--line);
  }
}

.rail-brand { display: none; flex: none; padding: 1.5rem 1.25rem 1rem; }
.rail-brand img { display: block; margin-inline: auto; width: 8.5rem; height: auto; }
@media (min-width: 1024px) { .rail-brand { display: block; } }

.rail-nav {
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 0.5rem 0.625rem;
  overflow-y: auto;
  list-style: none;
  margin: 0;
}
@media (min-width: 1024px) { .rail-nav { flex: 1; min-height: 0; } }

.rail-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.4375rem 0.625rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: background-color 150ms var(--ease-out-expo), color 150ms var(--ease-out-expo);
}
.rail-link svg { width: 16px; height: 16px; flex: none; color: var(--ink-3); }
.rail-link[aria-current='page'] {
  background: var(--rail-active);
  color: var(--ink);
  font-weight: 600;
}
.rail-link[aria-current='page'] svg { color: var(--accent); }
.rail-link[aria-current='page']::before {
  content: '';
  position: absolute;
  left: -0.625rem;
  top: 0.375rem;
  bottom: 0.375rem;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}
@media (hover: hover) and (pointer: fine) {
  .rail-link:not([aria-current='page']):hover { background: var(--rail-hover); color: var(--ink); }
}

.rail-user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex: none;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--line);
  background: transparent;
  border-left: 0; border-right: 0; border-bottom: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background-color 150ms var(--ease-out-expo);
}
.rail-user:hover { background: var(--rail-hover); }
.rail-user-name { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--ink); }
.rail-user-role { display: block; font-size: 0.6875rem; color: var(--ink-3); text-transform: capitalize; }

.avatar {
  display: grid;
  place-items: center;
  width: 2rem; height: 2rem;
  border-radius: 999px;
  background: var(--accent-wash);
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 700;
  flex: none;
}

.menu {
  position: absolute;
  left: 0.625rem;
  right: 0.625rem;
  bottom: calc(100% + 0.25rem);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-float);
  padding: 0.25rem;
  z-index: 50;
  transform-origin: bottom center;
  opacity: 1;
  transform: scale(1);
  transition: transform 160ms var(--ease-out-expo), opacity 140ms var(--ease-out-expo);
}
@starting-style { .menu { transform: scale(0.98); opacity: 0; } }
.menu-head { padding: 0.5rem 0.625rem; border-bottom: 1px solid var(--line); margin-bottom: 0.25rem; }
.menu-head strong { display: block; font-size: 0.8125rem; font-weight: 600; }
.menu-head span { font-size: 0.75rem; color: var(--ink-3); word-break: break-all; }
.menu button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.625rem;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--ink-2);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background-color 150ms var(--ease-out-expo), color 150ms var(--ease-out-expo);
}
.menu button svg { width: 16px; height: 16px; color: var(--ink-3); }
@media (hover: hover) and (pointer: fine) {
  .menu button:hover { background: var(--rail-hover); color: var(--ink); }
}

.account { position: relative; margin-top: auto; }

/* ------------------------------------------------------------------- page */

main { min-width: 0; }
@media (min-width: 1024px) { main { height: 100dvh; overflow-y: auto; } }

.page { width: min(100% - 2rem, var(--shell)); margin-inline: auto; padding: 1.5rem 0 3rem; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.page-head h1 { font-size: 1.75rem; line-height: 1.2; font-weight: 600; }
.page-head p { color: var(--ink-2); font-size: 0.875rem; margin-top: 0.25rem; }
.page-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}
.back-link svg { width: 14px; height: 14px; }
@media (hover: hover) and (pointer: fine) {
  .back-link:hover { color: var(--accent); }
}

/* ------------------------------------------------------------------ login */

.login-wrap {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  background: var(--bg);
}
.login { width: min(100%, 24rem); display: grid; gap: 1.5rem; }
.login-brand { display: grid; justify-items: center; gap: 0.75rem; text-align: center; }
.login-brand img { width: 11rem; height: auto; }
.login-brand p { font-size: 0.8125rem; color: var(--ink-2); }
.login form { display: grid; gap: 0.875rem; }
.login .card { padding: 1.5rem; }

/* --------------------------------------------------------- wedding list */

.wed-list { display: grid; }
.wed-row {
  display: grid;
  grid-template-columns: 4rem 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background-color 150ms var(--ease-out-expo);
}
.wed-row:last-child { border-bottom: 0; }
@media (hover: hover) and (pointer: fine) {
  .wed-row:hover { background: #fbfaf7; }
}

.wed-date {
  display: grid;
  justify-items: center;
  gap: 0;
  padding: 0.375rem 0.25rem;
  border-radius: 6px;
  background: var(--rail);
  font-variant-numeric: tabular-nums;
}
.wed-date .d { font-size: 1.125rem; font-weight: 600; line-height: 1.2; }
.wed-date .m { font-size: 0.625rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.wed-date .y { font-size: 0.625rem; color: var(--ink-3); }

.wed-main { min-width: 0; }
.wed-main h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wed-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.125rem;
  font-size: 0.8125rem;
  color: var(--ink-2);
}
.wed-side { display: grid; justify-items: end; gap: 0.375rem; }

/* Separators ride on the FOLLOWING item so one never dangles at a line end. */
.wed-meta > .dot,
.wed-hero-meta > .dot,
.plan-meta > .dot { display: none; }
.wed-meta > span:not(:first-child):not(.badge):not(.venue-name)::before,
.wed-hero-meta > span:not(:first-child):not(.badge):not(.venue-name)::before {
  content: '\00b7';
  margin-right: 0.5rem;
  opacity: 0.45;
}

.venue-name { display: inline-flex; align-items: center; }

@media (max-width: 640px) {
  .wed-row { grid-template-columns: 3.25rem 1fr; gap: 0.75rem; }
  .wed-side { grid-column: 2; justify-items: start; }
}

/* ----------------------------------------------------------------- meter */

.meter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.meter-track {
  width: 4.5rem;
  height: 4px;
  border-radius: 999px;
  background: var(--series-track);
  overflow: hidden;
}
.meter-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 400ms var(--ease-out-expo);
}
.meter-fill[data-full='true'] { background: var(--success); }

/* ------------------------------------------------------------------ tabs */

.tabs {
  display: flex;
  width: fit-content;
  max-width: 100%;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: 0 0 auto;
  min-width: max-content;
  padding: 0.5rem 0.75rem;
  margin-bottom: -1px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--ink-2);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color 150ms var(--ease-out-expo), border-color 150ms var(--ease-out-expo);
}
.tabs button[aria-selected='true'] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
@media (hover: hover) and (pointer: fine) {
  .tabs button:not([aria-selected='true']):hover { color: var(--ink); }
}

/* ----------------------------------------------------- wedding dashboard */

.wed-hero { min-width: 0; }
.wed-hero h1 { font-size: 1.75rem; line-height: 1.2; font-weight: 600; }
.wed-hero-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.375rem;
  font-size: 0.875rem;
  color: var(--ink-2);
}

.split { display: grid; gap: 1rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 20rem; } }

.stack { display: grid; gap: 1rem; }

.link-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.375rem 0.375rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}
.link-field code {
  flex: 1;
  min-width: 0;
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wa-preview {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 0.75rem 0.875rem;
  font-size: 0.875rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--ink);
}
.wa-preview b { font-weight: 700; }

/* ----------------------------------------------------------- plan editor */

.editor-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.625rem 0;
  margin-bottom: 0.25rem;
  background: linear-gradient(var(--bg) 70%, transparent);
}
.editor-status {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--ink-2);
}
.editor-status svg { width: 14px; height: 14px; }
.editor-status[data-state='saving'] { color: var(--warning); }
.editor-status[data-state='saved'] { color: var(--success); }
.editor-status[data-state='error'] { color: var(--danger); }

.sec-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.sec-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.625rem;
  border-bottom: 1px solid var(--line);
}
.sec-title {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.3125rem 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.015em;
  transition: background-color 150ms var(--ease-out-expo), border-color 150ms var(--ease-out-expo);
}
.sec-title::placeholder { font-weight: 400; color: var(--ink-3); }
.sec-title:hover { background: var(--rail-hover); }
.sec-title:focus { background: var(--panel); border-color: var(--accent); }

.sec-type {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--rail);
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  flex: none;
}
.sec-tools { display: flex; gap: 1px; flex: none; }
.sec-body { padding: 0.875rem; display: grid; gap: 0.5rem; }

.ed-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 0.5rem; align-items: center; }
.ed-row--kv { grid-template-columns: auto minmax(7.5rem, 0.6fr) 1fr auto auto; }
.ed-row--link { grid-template-columns: auto minmax(8rem, 0.75fr) 1fr auto; }
.ed-grip {
  display: grid;
  place-items: center;
  width: 1.25rem;
  color: #b5ad9c;
  cursor: grab;
  touch-action: none;
}
.ed-grip svg { width: 14px; height: 14px; }
.ed-grip:active { cursor: grabbing; }
.ed-row[data-dragging='true'] { opacity: 0.45; }
@media (hover: hover) and (pointer: fine) {
  .ed-row:hover .ed-grip,
  .ed-entry:hover > .ed-entry-head > .ed-grip { color: var(--ink-3); }
}

.status-pick {
  appearance: none;
  height: 2rem;
  padding: 0 1.5rem 0 0.625rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23756f65' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.375rem center;
  background-size: 12px;
  flex: none;
}
.status-pick[data-status='booked'] { color: var(--success); background-color: var(--success-wash); border-color: transparent; }
.status-pick[data-status='tbc'] { color: var(--warning); background-color: var(--warning-wash); border-color: transparent; }
.status-pick[data-status='important'] { color: var(--accent); background-color: var(--accent-wash); border-color: transparent; }

.ed-add {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4375rem 0.625rem;
  background: transparent;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  width: fit-content;
  transition: color 150ms var(--ease-out-expo), border-color 150ms var(--ease-out-expo), background-color 150ms var(--ease-out-expo);
}
.ed-add svg { width: 14px; height: 14px; }
@media (hover: hover) and (pointer: fine) {
  .ed-add:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-wash); }
}

.ed-entry {
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: 0.625rem;
  display: grid;
  gap: 0.5rem;
  background: var(--bg);
}
.ed-entry-head { display: grid; grid-template-columns: auto 6rem 6rem 1fr auto; gap: 0.5rem; align-items: center; }
.ed-entry-head .input { height: 2rem; font-size: 0.8125rem; }
.ed-sub { padding-left: 1rem; display: grid; gap: 0.4375rem; border-left: 1px solid var(--line); margin-left: 0.4375rem; }

.add-section-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.25rem; }

.preset-grid { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); }
.preset {
  display: grid;
  gap: 0.0625rem;
  padding: 0.625rem 0.75rem;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  cursor: pointer;
  transition: border-color 150ms var(--ease-out-expo), background-color 150ms var(--ease-out-expo);
}
.preset strong { font-size: 0.8125rem; font-weight: 600; }
.preset span { font-size: 0.6875rem; color: var(--ink-3); }
@media (hover: hover) and (pointer: fine) {
  .preset:hover { border-color: var(--accent); background: var(--accent-wash); }
}

/* On a phone the row stacks: the text gets the full width, the controls sit
   under it rather than squeezing the input to nothing. */
@media (max-width: 639px) {
  .sec-head { flex-wrap: wrap; }
  .sec-title { flex: 1 1 100%; order: -1; }

  .ed-row,
  .ed-row--kv,
  .ed-row--link {
    grid-template-columns: 1.25rem 1fr auto;
    row-gap: 0.4375rem;
    align-items: center;
  }
  .ed-row > .ed-grip,
  .ed-row--kv > .ed-grip,
  .ed-row--link > .ed-grip { grid-area: grip; align-self: start; margin-top: 0.625rem; }

  .ed-row { grid-template-areas: 'grip text text' '. status del'; }
  .ed-row > .input { grid-area: text; }
  .ed-row > .status-pick { grid-area: status; justify-self: start; }
  .ed-row > .icon-btn { grid-area: del; }

  .ed-row--kv { grid-template-areas: 'grip label label' 'grip value value' '. status del'; }
  .ed-row--kv > .input:not(.ed-kv-value) { grid-area: label; }
  .ed-row--kv > .ed-kv-value { grid-area: value; }
  .ed-row--kv > .status-pick { grid-area: status; justify-self: start; }
  .ed-row--kv > .icon-btn { grid-area: del; }

  .ed-row--link { grid-template-areas: 'grip label label' 'grip url url' '. . del'; }
  .ed-row--link > .input:not(.ed-link-url) { grid-area: label; }
  .ed-row--link > .ed-link-url { grid-area: url; }
  .ed-row--link > .icon-btn { grid-area: del; }

  .ed-entry-head {
    grid-template-columns: 1.25rem 1fr 1fr auto;
    grid-template-areas: 'grip start end del' 'title title title title';
    row-gap: 0.4375rem;
  }
  .ed-entry-head > .ed-grip { grid-area: grip; }
  .ed-entry-head > .input[type='time']:nth-of-type(1) { grid-area: start; }
  .ed-entry-head > .input[type='time']:nth-of-type(2) { grid-area: end; }
  .ed-entry-head > .ed-entry-title { grid-area: title; }
  .ed-entry-head > .icon-btn { grid-area: del; }

  .ed-sub { padding-left: 0.625rem; margin-left: 0.25rem; }
}

/* ------------------------------------------------------------ task list */

.phase-head { display: flex; align-items: center; gap: 0.75rem; margin: 1.5rem 0 0.625rem; }
.phase-head h2 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.phase-head .rule { flex: 1; height: 1px; background: var(--line); }
.phase-head .count { font-size: 0.75rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.task-list {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  overflow: hidden;
}

.task-row {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: start;
  padding: 0.75rem 0.875rem;
  border-bottom: 1px solid var(--line);
  width: 100%;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  transition: background-color 150ms var(--ease-out-expo);
}
.task-row:last-child { border-bottom: 0; }
.task-row::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-wash);
  clip-path: inset(0 100% 0 0);
  pointer-events: none;
}
.task-row[data-justdone='true']::after { animation: sweep 600ms var(--ease-out-expo) forwards; }
@keyframes sweep {
  0% { clip-path: inset(0 100% 0 0); }
  55% { clip-path: inset(0 0 0 0); }
  100% { clip-path: inset(0 0 0 100%); }
}
@media (hover: hover) and (pointer: fine) {
  .task-row:hover { background: #fbfaf7; }
}

/* The title carries the click; its ::after stretches the hit area over the
   whole row, so the row stays one tap target with no nested controls. */
.task-open {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  display: block;
  width: 100%;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.task-open::after { content: ''; position: absolute; inset: 0; }
.task-open:focus-visible { box-shadow: none; }
.task-open:focus-visible::after { box-shadow: inset var(--focus); border-radius: 6px; }
.task-row > .icon-btn { position: relative; z-index: 1; align-self: center; }

.task-check {
  width: 1.25rem; height: 1.25rem;
  border-radius: 6px;
  border: 1.5px solid var(--line-strong);
  background: var(--panel);
  display: grid;
  place-items: center;
  flex: none;
  margin-top: 1px;
  transition: background-color 180ms var(--ease-out-expo), border-color 180ms var(--ease-out-expo);
}
.task-check svg { width: 12px; height: 12px; color: #fff; opacity: 0; transform: scale(0.5); }
.task-row[data-done='true'] .task-check { background: var(--success); border-color: var(--success); }
.task-row[data-done='true'] .task-check svg {
  opacity: 1;
  transform: scale(1);
  transition: opacity 140ms var(--ease-out-expo) 60ms, transform 260ms var(--ease-out-expo) 60ms;
}

.task-main { min-width: 0; }
.task-title { font-size: 0.875rem; font-weight: 500; line-height: 1.45; color: var(--ink); }
.task-row[data-done='true'] .task-title { color: var(--ink-2); }
.task-desc { font-size: 0.8125rem; color: var(--ink-3); margin-top: 0.125rem; line-height: 1.5; }

.task-proof {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--ink-2);
}
.task-proof .pin {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.0625rem 0.4375rem;
  background: var(--rail);
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.task-proof .pin svg { width: 11px; height: 11px; color: var(--ink-3); }
.task-proof .pin--who { background: var(--accent-wash); color: var(--accent); }
.task-proof .pin--who svg { color: var(--accent); }
.task-note {
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border-radius: 6px;
  font-size: 0.8125rem;
  color: var(--ink-2);
  max-width: 70ch;
}

.task-thumb {
  width: 2.5rem; height: 2.5rem;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--line);
  flex: none;
}
.task-req { display: flex; align-items: center; flex: none; align-self: center; }
.task-req svg { width: 14px; height: 14px; color: var(--ink-3); }

/* --------------------------------------------------------- capture sheet */

.capture-loc {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-control);
  font-size: 0.8125rem;
  line-height: 1.5;
}
.capture-loc svg { width: 16px; height: 16px; flex: none; }
.capture-loc[data-state='locating'] { background: var(--rail); color: var(--ink-2); }
.capture-loc[data-state='locating'] svg { color: var(--ink-3); }
.capture-loc[data-state='found'] { background: var(--success-wash); color: var(--success); }
.capture-loc[data-state='failed'] { background: var(--warning-wash); color: var(--warning); }

.who-suggest { display: flex; gap: 0.375rem; flex-wrap: wrap; margin-top: 0.125rem; }
.who-chip {
  padding: 0.25rem 0.625rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 150ms var(--ease-out-expo), border-color 150ms var(--ease-out-expo), background-color 150ms var(--ease-out-expo);
}
@media (hover: hover) and (pointer: fine) {
  .who-chip:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-wash); }
}

.photo-slot { display: grid; gap: 0.5rem; }
.photo-preview {
  width: 100%;
  max-height: 13rem;
  object-fit: cover;
  border-radius: var(--radius-control);
  border: 1px solid var(--line);
}

/* ------------------------------------------------------------ data lists */

.rowlist {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  overflow: hidden;
}
.rowlist-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.875rem;
  border-bottom: 1px solid var(--line);
}
.rowlist-item:last-child { border-bottom: 0; }
.rowlist-main { flex: 1; min-width: 0; }
.rowlist-main strong { display: block; font-size: 0.875rem; font-weight: 600; }
.rowlist-main span { font-size: 0.8125rem; color: var(--ink-2); }

.rev-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.875rem;
  border-bottom: 1px solid var(--line);
}
.rev-row:last-child { border-bottom: 0; }
.rev-row[data-current='true'] { background: var(--accent-wash); }

.detail-grid {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  overflow: hidden;
}
.detail-row {
  display: grid;
  grid-template-columns: minmax(9rem, 32%) 1fr;
  gap: 0.875rem;
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--line);
}
.detail-row:last-child { border-bottom: 0; }
.detail-row dt { color: var(--ink-2); font-size: 0.8125rem; }
.detail-row dd { margin: 0; font-size: 0.875rem; }
@media (max-width: 520px) { .detail-row { grid-template-columns: 1fr; gap: 0.125rem; } }

/* ------------------------------------------------------------- suppliers */

.sup-card .section-head h2 { margin-bottom: 2px; }

.sup-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.sup-contact a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  color: var(--ink-2);
  text-decoration: none;
}
.sup-contact a:hover { color: var(--accent); }
.sup-contact svg { width: 16px; height: 16px; }

.sup-warn {
  display: flex;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--warning-wash);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-panel);
  color: var(--ink);
}
.sup-warn svg { flex: 0 0 auto; width: 20px; height: 20px; color: var(--warning); }
.sup-warn p { margin: 0; font-size: 0.875rem; line-height: 1.5; }
.sup-warn p + p { margin-top: 0.35rem; }
.sup-warn-title { font-weight: 600; }

.sup-payload {
  font-size: 0.8125rem;
  line-height: 1.6;
  white-space: pre;
  overflow: auto;
  max-height: 14rem;
}

.sup-unsent { margin-top: 1.25rem; }
.sup-unsent-list {
  margin: 0 0 0.9rem;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.sup-unsent-list li {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 0.25rem 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem;
}
.sup-unsent-list span { color: var(--ink-3); }
.sup-unsent-list em { font-style: normal; white-space: pre-line; }

.sup-default { color: var(--warning); }

.sup-notes {
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}
.sup-notes p:last-child { margin: 0.25rem 0 0; font-size: 0.875rem; white-space: pre-line; }

.sup-account { margin-top: 1.5rem; }
.sup-account summary {
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-3);
  padding: 0.35rem 0;
}
.sup-account summary:hover { color: var(--accent); }
.sup-account summary:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
.sup-account[open] summary { margin-bottom: 0.65rem; }

@media (max-width: 639px) {
  .sup-unsent-list li { grid-template-columns: 1fr; }
}

.sup-clash {
  margin: 0.5rem 0 0.65rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.3rem;
}
.sup-clash li {
  display: grid;
  grid-template-columns: 3.5rem 1fr auto;
  gap: 0.75rem;
  align-items: baseline;
  font-size: 0.8125rem;
}
.sup-clash li.is-exact { font-weight: 600; }
.sup-clash li.is-exact .faint { font-weight: 400; }

@media (max-width: 639px) {
  .sup-clash li { grid-template-columns: 3.5rem 1fr; }
  .sup-clash li .faint { grid-column: 2; }
}
