/* ============================================================================
   components.css — reusable UI. Flat surfaces, 1px lines, black on white.
   Every value comes from tokens.css.
   ========================================================================= */

/* --- Site header ---------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  /* Positioning context for the mobile menu, which overlays below the bar. */
}

/* --- Desktop app chrome ---------------------------------------------------- */

.site-header--app { height: auto; flex-direction: column; align-items: stretch; }
.site-header--app .site-header__inner { height: 56px; width: 100%; }
.site-header--app .brand__name { font-size: var(--text-base); }

/* Custom title bar: the native frame is hidden, the controls sit on our white strip. */
.app-titlebar {
  height: 34px;
  flex: none;
  display: flex;
  align-items: center;
  padding: 0 16px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  -webkit-app-region: drag;
  user-select: none;
}
.app-titlebar__title {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.app-history {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-right: var(--space-2);
}
.app-history .icon-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  font-size: 15px;
  line-height: 1;
  color: var(--text);
}
.app-history .icon-btn:hover:not(:disabled) { border-color: var(--text); }
.app-history .icon-btn:disabled { opacity: 0.3; cursor: default; }

.site-footer--app {
  border-top: 1px solid var(--line);
  padding-block: var(--space-3);
  margin-top: var(--space-8);
}
.site-footer--app .site-footer__base { border: 0; padding-block: 0; }
.app-footer__links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--text-xs);
}
.app-footer__links a:hover { color: var(--text); text-decoration: underline; }

/* --- Web-only app promotion ------------------------------------------------ */

.app-promo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding: 8px 20px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  font-size: var(--text-sm);
}
.app-promo strong { font-weight: 600; }
.app-promo__close {
  border: 0;
  background: none;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
}
.app-promo__close:hover { color: var(--text); }

.site-header__inner {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-width: 0;
}
.site-header__inner > * { min-width: 0; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
}

.brand__mark {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-xs);
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #d9b48f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand__name { font-weight: 600; }

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-inline-start: auto;
}

.nav__link {
  font-size: var(--text-sm);
  color: var(--text-muted);
  padding-block: var(--space-1);
  border-bottom: 2px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.nav__link:hover { color: var(--text); }
.nav__link[aria-current="page"] { color: var(--text); border-bottom-color: var(--text); }

/* Google renders a fixed-width iframe; centre it instead of letting it sit left. */
[data-gsi] {
  display: flex;
  justify-content: center;
  width: 100%;
}
[data-gsi] > div { max-width: 100%; }

/* Desktop: our own button plus a caption, stacked and full width. */
[data-gsi].gsi-desktop {
  display: block;
  width: 100%;
}
[data-gsi].gsi-desktop .btn {
  width: 100%;
  justify-content: center;
}

/* --- Mobile menu ---------------------------------------------------------- */

/* Higher specificity than .icon-btn, which would otherwise force display:grid. */
.icon-btn.menu-btn { display: none; }
.menu-btn span { font-size: 1rem; line-height: 1; }

@media (max-width: 860px) {
  .icon-btn.menu-btn { display: grid; }
}

/* The panel must overlay below the header, not become a flex sibling of it. */
.mobile-menu {
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: var(--z-header);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  padding: var(--space-3) 1.25rem var(--space-4);
  box-shadow: var(--shadow-md);
}

.mobile-menu nav { display: grid; gap: 2px; }

.mobile-menu a {
  padding: var(--space-3) var(--space-2);
  border-bottom: 1px solid var(--line);
  font-size: var(--text-base);
}

.mobile-menu a[aria-current="page"] { font-weight: 600; }

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-inline-start: var(--space-2);
  padding-inline-start: var(--space-4);
  border-inline-start: 1px solid var(--line);
}

@media (max-width: 860px) {
  .nav--primary { display: none; }
  .header__actions { border: 0; padding: 0; }
}

/* --- Ad slots ------------------------------------------------------------ */

.ad-slot-wrap { padding-block: var(--space-4); }
.ad-slot {
  width: 100%;
  min-height: 90px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.ad-slot:empty { display: none; }

/* --- Buttons -------------------------------------------------------------- */

.btn {
  --btn-bg: #ffffff;
  --btn-fg: #000000;
  --btn-border: #cfcfcf;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.6rem 1rem;
  min-height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.btn:hover { --btn-bg: #f5f5f5; --btn-border: #a8a8a8; }

.btn--primary {
  --btn-bg: #000000;
  --btn-fg: #ffffff;
  --btn-border: #000000;
  font-weight: 600;
}

.btn--primary:hover { --btn-bg: #262626; --btn-border: #262626; }

.btn--ghost { --btn-border: transparent; --btn-fg: var(--text-muted); }
.btn--ghost:hover { --btn-bg: #f5f5f5; --btn-border: transparent; --btn-fg: #000000; }

.btn--danger { --btn-fg: var(--danger); --btn-border: #d9b3b0; }
.btn--danger:hover { --btn-bg: #fdf3f2; --btn-border: var(--danger); }

.btn--block { width: 100%; }
.btn--lg { min-height: 46px; padding-inline: 1.25rem; font-size: var(--text-base); }
.btn--sm { min-height: 32px; padding: 0.3rem 0.7rem; font-size: var(--text-xs); }

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn__icon { width: 16px; height: 16px; flex: none; }

/* --- Surfaces ------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}

.card--flush { padding: 0; overflow: hidden; }
.card--raised { border-color: var(--line-strong); }
.card--accent { border-color: #000000; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
}

/* --- Badges & pills ------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-xs);
  font-size: var(--text-xs);
  font-weight: 500;
  border: 1px solid var(--line);
  color: var(--text-muted);
  background: var(--surface-2);
  white-space: nowrap;
}

.badge--verified {
  color: #000000;
  border-color: #000000;
  background: #ffffff;
  font-weight: 600;
}

.badge--masked { color: var(--text-muted); border-color: var(--line-strong); background: #ffffff; }
.badge--live { color: #000000; border-color: #000000; background: #ffffff; }
.badge--warn { color: var(--warning); border-color: #e2d3b8; background: #fdf9f0; }
.badge--danger { color: var(--danger); border-color: #e0bdb9; background: #fdf5f4; }

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.dot--pulse { animation: pulse 2.4s var(--ease) infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* --- Forms ---------------------------------------------------------------- */

.field { display: grid; gap: 0.35rem; }

.field__label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
}

.field__hint { font-size: var(--text-xs); color: var(--text-muted); }

.input,
.select,
.textarea {
  width: 100%;
  min-height: 42px;
  padding: 0.55rem 0.7rem;
  background: #ffffff;
  border: 1px solid #cfcfcf;
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.input::placeholder, .textarea::placeholder { color: var(--text-faint); }

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: #000000;
  box-shadow: 0 0 0 1px #000000;
}

.textarea { min-height: 120px; resize: vertical; line-height: var(--leading-normal); }

.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #000 50%),
    linear-gradient(135deg, #000 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-inline-end: 2.2rem;
}

.check {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  font-size: var(--text-sm);
  color: var(--text-soft);
  cursor: pointer;
}

.check input {
  appearance: none;
  width: 17px;
  height: 17px;
  flex: none;
  margin-top: 2px;
  border: 1px solid #767676;
  border-radius: 3px;
  background: #ffffff;
  display: grid;
  place-items: center;
}

.check input:checked { background: #000000; border-color: #000000; }

.check input:checked::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(-45deg) translateY(-1px);
}

.field__error {
  font-size: var(--text-xs);
  color: var(--danger);
  min-height: 1em;
}

/* --- Segmented control ---------------------------------------------------- */

.segmented {
  display: inline-flex;
  padding: 2px;
  gap: 2px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.segmented button {
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-xs);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.segmented button[aria-pressed="true"] { background: #ffffff; color: #000000; border: 1px solid var(--line-strong); }

/* --- Creator card --------------------------------------------------------- */

.creator-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease);
}

.creator-card:hover { border-color: #000000; }

.creator-card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--media-bg);
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* Flat monogram placeholder: honest until verified photography exists. */
.portrait {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 500;
  color: #b3b3b3;
  background: var(--media-bg);
}

.portrait--masked { color: #a0a0a0; }

.creator-card__overlay {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3);
}

.creator-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  flex: 1;
}

.creator-card__name {
  font-size: var(--text-lg);
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

.creator-card__meta { font-size: var(--text-xs); color: var(--text-muted); }

.creator-card__line {
  font-size: var(--text-sm);
  color: var(--text-soft);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.creator-card__footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}

.price { display: flex; align-items: baseline; gap: 0.25rem; font-variant-numeric: tabular-nums; }
.price__value { font-size: var(--text-lg); font-weight: 600; }
.price__unit { font-size: var(--text-xs); color: var(--text-muted); }

/* --- Meter ---------------------------------------------------------------- */

.meter {
  height: 5px;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  overflow: hidden;
}

.meter__fill {
  height: 100%;
  width: var(--progress, 0%);
  background: #000000;
  border-radius: inherit;
  transition: width 1s linear, background-color var(--dur) var(--ease);
}

.meter--warn .meter__fill { background: #7a5200; }
.meter--danger .meter__fill { background: var(--danger); }

/* --- Call room ------------------------------------------------------------ */

.call-stage {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000000;
  color: #ffffff;
  border: 1px solid #000000;
  aspect-ratio: 16 / 10;
  min-height: 300px;
  display: grid;
  place-items: center;
}

.call-stage__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000000;
}

.call-stage__placeholder {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--space-5) var(--space-6);
  color: #cfcfcf;
  background: transparent;
  max-width: 44ch;
}

.call-stage__placeholder .eyebrow { color: #a3a3a3; }

.call-stage__waiting {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--space-5) var(--space-6);
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid #2e2e2e;
  border-radius: var(--radius-md);
  max-width: 380px;
}
.call-stage__waiting[hidden] { display: none; }

.call-stage__local {
  position: absolute;
  z-index: 2;
  right: 16px;
  bottom: 92px;
  width: 132px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid #3a3a3a;
  background: #111111;
}

/* --- Split call layouts ---------------------------------------------------- */

.call-stage--split {
  display: flex;
  flex-direction: column;
  padding: 6px;
  gap: 6px;
}

.call-panes {
  flex: 1;
  min-height: 0;
  display: grid;
  gap: 26px;
  position: relative;
}

.call-stage--horizontal .call-panes { grid-template-columns: 1fr 1fr; }
.call-stage--vertical .call-panes { grid-template-rows: 1fr 1fr; }

.call-pane {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #0d0d0d;
  border: 1px solid #232323;
  min-height: 0;
}

.call-pane video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000000;
}

/* The local camera is mirrored, as every video call app does. */
.call-pane--self video { transform: scaleX(-1); }

.call-pane__label {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e8e8e8;
  background: rgba(0, 0, 0, 0.45);
  padding: 2px 6px;
  border-radius: 3px;
}

.call-pane__center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  padding: 16px;
  color: #cfcfcf;
}

.call-pane__center[hidden] { display: none; }
.call-pane__overlay { background: rgba(0, 0, 0, 0.35); }

.call-stage--split .call-stage__hud {
  position: static;
  border-top: 0;
  padding: 8px 4px 2px;
  background: transparent;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.layout-toggle {
  display: inline-flex;
  border: 1px solid #3a3a3a;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.layout-toggle button {
  border: 0;
  background: transparent;
  color: #bdbdbd;
  font: inherit;
  font-size: var(--text-xs);
  padding: 5px 10px;
  cursor: pointer;
}
.layout-toggle button + button { border-left: 1px solid #3a3a3a; }
.layout-toggle button[aria-pressed="true"] { background: #ffffff; color: #000000; }

/* Brand sits on the line between the two faces. */
.call-brand {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  transform: translate(-50%, -50%) rotate(-90deg);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: #d9b48f;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  pointer-events: none;
}
.call-stage--vertical .call-brand { transform: translate(-50%, -50%); }
.call-brand span {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid #d9b48f;
  border-radius: 4px;
  font-size: 10px;
  letter-spacing: 0;
}
.call-brand em { font-style: normal; }

/* --- Free-tier banner ------------------------------------------------------ */

.ad-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.82);
}

.ad-card {
  width: min(420px, 100%);
  overflow: hidden;
  border: 1px solid #333333;
  border-radius: 12px;
  background: #0b0b0b;
  color: #ffffff;
}

.ad-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid #222222;
  color: #9a9a9a;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 10px;
}

.ad-banner {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 250px;
  padding: 12px;
  background: #ffffff;
  color: #111111;
}

.ad-frame {
  position: absolute;
  inset: 0;
  margin: auto;
  display: block;
  border: 0;
  width: 300px;
  height: 250px;
  max-width: 100%;
  background: transparent;
}

.ad-blocked-note {
  margin-top: var(--space-2);
  max-width: 280px;
  text-align: center;
}

.ad-house {
  display: grid;
  justify-items: center;
  gap: 6px;
  max-width: 280px;
  padding: 18px 10px;
  text-align: center;
}
.ad-house .brand__mark {
  width: 38px;
  height: 38px;
  border-color: #111111;
  color: #111111;
}
.ad-house .eyebrow { color: #6a6a6a; }
.ad-house h3 { font-size: var(--text-lg); color: #111111; }
.ad-house .small { color: #555555; }

.ad-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 10px 14px;
  border-top: 1px solid #222222;
}
.ad-bar .btn { background: #ffffff; color: #000000; border-color: #ffffff; }
.ad-bar .btn--primary { background: #d9b48f; border-color: #d9b48f; }

/* --- Phone layout ---------------------------------------------------------- */

@media (max-width: 680px) {
  .container,
  .site-header__inner { width: calc(100% - 1.75rem); }

  .site-header__inner { gap: var(--space-2); }
  .brand__name { font-size: 0.95rem; }
  .header__actions { margin-inline-start: auto; }
  .header__actions [data-account-name] { display: none; }

  .hero h1 { font-size: clamp(1.9rem, 9vw, 2.5rem); }
  .hero__inner { gap: var(--space-5); }
  .hero__media { aspect-ratio: 16 / 10; }
  .hero__trust { gap: var(--space-2); font-size: var(--text-xs); }

  /* 16px prevents the browser zooming when a field is focused. */
  .btn,
  .input,
  .select,
  textarea { font-size: 16px; }
  .btn { min-height: 44px; }

  /* A phone call is portrait; the two faces stack. */
  .call-stage { aspect-ratio: 3 / 4; }
  .call-stage--horizontal .call-panes {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }
  .call-controls { gap: var(--space-2); }
  .control-btn { width: 46px; height: 46px; }

  .ad-card { width: min(340px, 100%); }
  .ad-banner { padding: 6px; }

  .table { display: block; overflow-x: auto; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .site-footer__base {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
  .app-promo { padding: 8px 12px; font-size: var(--text-xs); }
}

@media (max-width: 620px) {
  .call-stage--horizontal .call-panes {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }
}

.call-stage__hud {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4);
  background: #000000;
  border-top: 1px solid #2e2e2e;
  color: #ffffff;
}

/* On a black stage the meter needs inverted colours to stay legible. */
.call-stage__hud .meter { background: #333333; }
.call-stage__hud .meter__fill { background: #ffffff; }
.call-stage__hud .meter--warn .meter__fill { background: #d8a94a; }
.call-stage__hud .meter--danger .meter__fill { background: #e07070; }

.call-timer {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--text-lg);
  letter-spacing: 0.02em;
}

.call-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.control-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ffffff;
  border: 1px solid #cfcfcf;
  color: #000000;
  transition: background var(--dur) var(--ease);
}

.control-btn:hover { background: #f2f2f2; }
.control-btn--danger { background: #000000; border-color: #000000; color: #ffffff; }
.control-btn--danger:hover { background: #262626; }

/* --- Stats & tables ------------------------------------------------------- */

.stat { display: grid; gap: 0.15rem; }

.stat__value {
  font-size: var(--text-2xl);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.stat__label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }

.table th {
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--line-strong);
}

.table td {
  padding: var(--space-3);
  border-bottom: 1px solid var(--line);
  color: var(--text-soft);
}

.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* --- Feedback ------------------------------------------------------------- */

.toast-region {
  position: fixed;
  inset-block-end: var(--space-5);
  inset-inline-end: var(--space-5);
  z-index: var(--z-toast);
  display: grid;
  gap: var(--space-2);
  width: min(360px, calc(100vw - 2rem));
}

.toast {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-4);
  background: #ffffff;
  border: 1px solid #000000;
  border-left-width: 4px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  animation: toast-in var(--dur) var(--ease);
}

.toast--error { border-color: var(--danger); }
.toast--success { border-color: #000000; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.notice {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-left: 3px solid #000000;
  border-radius: var(--radius-sm);
  background: #fafafa;
  font-size: var(--text-sm);
  color: var(--text-soft);
}

.notice--warn { border-left-color: var(--warning); }
.notice--danger { border-left-color: var(--danger); }
.notice strong { color: var(--text); }

.empty {
  padding: var(--space-7) var(--space-4);
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--text-muted);
}

.skeleton {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  animation: skeleton-fade 1.6s ease-in-out infinite;
}

@keyframes skeleton-fade {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* --- Footer --------------------------------------------------------------- */

.site-footer {
  margin-top: var(--space-8);
  border-top: 1px solid var(--line);
  padding-block: var(--space-6) var(--space-5);
  font-size: var(--text-sm);
  color: var(--text-muted);
  background: #ffffff;
}

.site-footer__grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.site-footer h4 {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  margin-bottom: var(--space-3);
}

.site-footer ul { list-style: none; padding: 0; display: grid; gap: var(--space-2); }
.site-footer a:hover { color: #000000; text-decoration: underline; }

.site-footer__base {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--text-faint);
}

/* --- Steps ---------------------------------------------------------------- */

.steps { display: grid; gap: var(--space-4); counter-reset: step; }

.step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: var(--space-4);
  counter-increment: step;
}

.step::before {
  content: counter(step);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #000000;
  color: #ffffff;
  font-size: var(--text-xs);
  font-weight: 600;
}

/* --- Misc ----------------------------------------------------------------- */

.hairline { border: 0; border-top: 1px solid var(--line); }

.tag-list { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; padding: 0; }

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--text-muted);
}

.icon-btn:hover { color: #000000; border-color: #000000; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.section-head p { max-width: 56ch; }
