/* Typography:
 *   wordmark + headings = IBM Plex Serif (editorial / classical feel)
 *   body                = Inter (clean modern sans)
 *   mono blocks         = IBM Plex Mono (loaded inline where needed)
 * Fonts loaded via Google Fonts in the layout <head>.
 */

:root {
  --font-serif: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:  'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --color-text:    #1f1f23;
  --color-mute:    #777;
  --color-accent:  #0f62fe;          /* IBM Carbon blue 60 — headings + accent rules */
  --color-accent-soft: #edf5ff;       /* tinted background for callout */
  --color-link:    #0043ce;           /* IBM Carbon blue 70 — link/hover */
  --color-rule:    #ececec;

  --measure: 720px;
}

body {
  font-family: var(--font-sans);
  max-width: var(--measure);
  margin: 3rem auto 5rem;
  padding: 0 1.25rem;
  line-height: 1.65;
  color: var(--color-text);
  font-size: 17px;
}

/* ---------- header / brand ---------- */

header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 4rem;
}
.brand {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--color-accent);
  text-decoration: none;
}
.tagline {
  color: var(--color-mute);
  margin: 0.15rem 0 0 0;
  font-style: italic;
  font-size: 0.9rem;
}

nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
  padding-bottom: 0.25rem;
}
nav a {
  color: var(--color-mute);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
nav a:hover {
  color: var(--color-text);
}
nav a.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}
nav a.nav-cta {
  color: var(--color-accent);
  font-weight: 500;
}
nav a.nav-cta:hover {
  color: var(--color-link);
}

/* hamburger toggle (CSS-only via hidden checkbox) — desktop hides it */
.nav-toggle {
  display: none;
}
.nav-toggle-label {
  display: none;
}

@media (max-width: 600px) {
  header {
    align-items: center;
  }
  .nav-toggle-label {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 22px;
    cursor: pointer;
    padding: 0;
  }
  .nav-toggle-label span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    border-radius: 1px;
    transition: transform 0.2s, opacity 0.2s;
  }
  nav {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    order: 99;            /* push below brand+hamburger row when shown */
    margin-top: 1rem;
    padding-top: 1rem;
    padding-bottom: 0;
    border-top: 1px solid var(--color-rule);
  }
  .nav-toggle:checked ~ nav {
    display: flex;
  }
  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* ---------- main typography ---------- */

main h1 {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 1.5rem;
  color: var(--color-accent);
  letter-spacing: -0.005em;
}
main h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 3rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-rule);
  color: var(--color-text);
}
main h3 {
  font-family: var(--font-sans);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--color-mute);
  margin: 0 0 0.6rem;
  font-weight: 600;
}
main p, main ul {
  margin: 1rem 0;
}
main ul {
  padding-left: 1.25rem;
}
main li {
  margin: 0.4rem 0;
}
main a {
  color: var(--color-link);
  text-decoration: underline;
  text-decoration-color: rgba(15, 98, 254, 0.3);
  text-underline-offset: 0.2em;
}
main a:hover {
  text-decoration-color: var(--color-accent);
}
main strong {
  color: var(--color-accent);
  font-weight: 600;
}

/* ---------- before/after diff block ---------- */

.diff {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
  font-size: 0.825rem;
}
.diff-col {
  border: 1px solid var(--color-rule);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  background: #fafafa;
}
.diff-after {
  border-color: rgba(15, 98, 254, 0.35);
  background: var(--color-accent-soft);
}
.diff pre {
  font-family: var(--font-mono);
  white-space: pre;
  overflow-x: auto;
  margin: 0;
  line-height: 1.5;
  color: var(--color-text);
}

/* Player screenshots on the home page — three across on desktop,
   stacked on mobile. Each thumbnail is a click target that opens
   the full-size PNG in a new tab. */
.player-shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0 0.5rem;
}
.player-shots img {
  width: 100%;
  height: auto;
  border: 1px solid var(--color-rule);
  border-radius: 4px;
  display: block;
  transition: transform 0.15s, box-shadow 0.15s;
}
.player-shots a:hover img {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
@media (max-width: 600px) {
  .player-shots { grid-template-columns: 1fr; gap: 1rem; }
}
@media (max-width: 600px) {
  .diff {
    grid-template-columns: 1fr;
  }
}

/* ---------- callout (dry-run pull-out) ---------- */

.callout {
  background: var(--color-accent-soft);
  border-left: 3px solid var(--color-accent);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  margin: 2.5rem 0;
}
.callout h2 {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
  color: var(--color-accent);
}
.callout p:last-child {
  margin-bottom: 0;
}

/* ---------- callout warn variant (validation errors) ---------- */

.callout-warn {
  background: #fff7ed;
  border-left-color: #c2410c;
}
.callout-warn strong {
  color: #c2410c;
}
.callout-warn ul {
  margin: 0.5rem 0 0;
}

/* ---------- intake form ---------- */

.intake-form {
  margin: 2rem 0;
}

.intake-form label:not(.check):not(.radio) {
  display: block;
  margin: 1.25rem 0 0.4rem;
  font-weight: 500;
  font-size: 0.95rem;
}
.intake-form .req {
  color: var(--color-accent);
  margin-left: 0.15em;
}
.intake-form .opt {
  color: var(--color-mute);
  font-weight: 400;
  font-size: 0.85rem;
  margin-left: 0.15em;
}

.intake-form input[type="email"],
.intake-form input[type="text"],
.intake-form input[type="number"],
.intake-form textarea {
  display: block;
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-text);
  background: #fff;
  border: 1px solid var(--color-rule);
  border-radius: 4px;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.intake-form input:focus,
.intake-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(15, 98, 254, 0.12);
}
.intake-form textarea {
  resize: vertical;
  min-height: 8rem;
}

.intake-form fieldset {
  margin: 1.5rem 0 0;
  padding: 0;
  border: none;
}
.intake-form fieldset legend {
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  padding: 0;
}

.intake-form .check,
.intake-form .radio {
  display: block;
  margin: 0.4rem 0;
  font-weight: 400;
  cursor: pointer;
  padding: 0.15rem 0;
}
.intake-form .check input,
.intake-form .radio input {
  margin-right: 0.55rem;
  vertical-align: middle;
}
/* standalone checkbox row (e.g. Idagio/Apple) gets the same spacing as a label */
.intake-form > label.check {
  margin-top: 1.5rem;
}

.intake-form button {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  background: var(--color-accent);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}
.intake-form button:hover {
  background: var(--color-link);
}

/* Compact variant for the admin login (just two fields). */
.login-form {
  max-width: 22rem;
}

/* Free-dry-run pill in the admin quote header. */
.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 0.5rem;
  letter-spacing: 0.02em;
}
.badge-dryrun {
  background: #edf5ff;
  color: #0043ce;
  border: 1px solid #a6c8ff;
}

/* Disabled price fieldset on dry-run quotes — no border, just visually muted. */
.pricing-fieldset {
  border: none;
  padding: 0;
  margin: 0;
}
.pricing-fieldset.is-disabled {
  opacity: 0.55;
}
.pricing-fieldset.is-disabled input {
  background: #f5f5f5;
  cursor: not-allowed;
}

/* ---------- admin chrome + tables ---------- */

body.admin {
  max-width: 1100px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.admin-table th,
.admin-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--color-rule);
}
.admin-table th {
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-mute);
  background: #fafafa;
  border-bottom: 1px solid var(--color-rule);
}
.admin-table td.num,
.admin-table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.admin-table tbody tr {
  cursor: pointer;
  transition: background 0.1s;
}
.admin-table tbody tr:hover {
  background: var(--color-accent-soft);
}
main .admin-table a {
  color: var(--color-text);
  text-decoration: none;
}
main .admin-table tbody tr:hover a {
  color: var(--color-accent);
}



.admin-tag {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-left: 0.4rem;
  vertical-align: middle;
}

/* ---------- admin form extras ---------- */

.admin-form select {
  display: block;
  padding: 0.6rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-text);
  background: #fff;
  border: 1px solid var(--color-rule);
  border-radius: 4px;
  min-width: 220px;
}
.admin-form select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(15, 98, 254, 0.12);
}

.field-help {
  font-size: 0.85rem;
  color: var(--color-mute);
  margin: 0.4rem 0 0;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-actions {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.intake-form.admin-form .form-actions button {
  margin-top: 0;
}
main a.btn-secondary {
  color: var(--color-mute);
  text-decoration: none;
  font-size: 0.95rem;
}
main a.btn-secondary:hover {
  color: var(--color-text);
}

.notes-block {
  white-space: pre-line;
  background: #fafafa;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  border: 1px solid var(--color-rule);
  font-size: 0.92rem;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- primary CTA button (home, callout) ---------- */

main a.cta-button {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  font-size: 1.05rem;
  transition: background 0.15s;
}
main a.cta-button:hover {
  background: var(--color-link);
  color: #fff;
}

/* ---------- quote dashboard ---------- */

.quote-meta,
.quote-figures {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1.5rem;
  margin: 1.5rem 0 2rem;
  font-size: 0.95rem;
  align-items: baseline;
}
.quote-meta dt,
.quote-figures dt {
  color: var(--color-mute);
  font-weight: 500;
}
.quote-meta dd,
.quote-figures dd {
  margin: 0;
  color: var(--color-text);
}
.quote-meta code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: #fafafa;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  border: 1px solid var(--color-rule);
}

.status-badge {
  display: inline-block;
  padding: 0.15rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 99px;
  background: #f0f0f0;
  color: var(--color-text);
}
.status-badge.status-waitlisted    { background: #fef3c7; color: #92400e; }
.status-badge.status-quoted        { background: #fff7ed; color: #c2410c; }
.status-badge.status-accepted      { background: #ecfdf5; color: #065f46; }
.status-badge.status-deposit_paid  { background: #d1fae5; color: #065f46; }
.status-badge.status-in_progress   { background: #eef2ff; color: #3730a3; }
.status-badge.status-preview_sent  { background: #f0f9ff; color: #075985; }
.status-badge.status-balance_due   { background: #fef9c3; color: #854d0e; }
.status-badge.status-balance_paid  { background: #d1fae5; color: #065f46; }
.status-badge.status-delivered     { background: #f5f3ff; color: #6d28d9; }
.status-badge.status-closed        { background: #e5e7eb; color: #374151; }
.status-badge.status-paid          { background: #ecfdf5; color: #065f46; }
.status-badge.status-cancelled     { background: #f3f4f6; color: #6b7280; text-decoration: line-through; }
.status-badge.status-overdue       { background: #fee2e2; color: #b91c1c; margin-left: 0.4rem; }

/* Cancellation-reason dialog — opens when admin picks status=cancelled. */
.cancel-dialog {
  max-width: 28rem;
  width: 90%;
  border: none;
  border-radius: 6px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.cancel-dialog::backdrop {
  background: rgba(0,0,0,0.45);
}
.cancel-dialog h3 {
  margin-top: 0;
}
.cancel-dialog textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  border: 1px solid var(--color-rule);
  border-radius: 4px;
  box-sizing: border-box;
  resize: vertical;
}
.cancel-dialog .form-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
}

/* FAQ accordion — each H2 wrapped in <details><summary> by Page.pm. */
.accordion-item {
  border-top: 1px solid var(--color-rule);
  padding: 0.85rem 0;
}
.accordion-item:last-child {
  border-bottom: 1px solid var(--color-rule);
}
.accordion-item > summary {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;        /* remove default disclosure triangle */
  padding-right: 1.5rem;
  position: relative;
  color: var(--color-text);
}
.accordion-item > summary::-webkit-details-marker { display: none; }
.accordion-item > summary::after {
  content: '+';
  position: absolute;
  right: 0.25rem;
  top: 0;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--color-mute);
  transition: transform 0.15s;
}
.accordion-item[open] > summary::after {
  content: '−';
  color: var(--color-accent);
}
.accordion-item[open] > summary {
  color: var(--color-accent);
}
.accordion-item > :not(summary) {
  margin-top: 0.5rem;
}

/* Workflow stepper on the customer dashboard. Horizontal row on desktop,
   vertical column below 600px. Past steps filled with the accent colour;
   current step has a glow ring; future steps are muted outlines. */
.workflow {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 2rem;
  display: flex;
  align-items: flex-start;
  font-size: 0.78rem;
}
.workflow-step {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  text-align: center;
  color: var(--color-mute);
  padding: 0 0.25rem;
}
.workflow-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 0.45rem;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--color-rule);
  z-index: 0;
}
.workflow-step.workflow-done:not(:last-child)::after {
  background: var(--color-accent);
}
.workflow-dot {
  display: block;
  width: 0.95rem;
  height: 0.95rem;
  margin: 0 auto 0.45rem;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--color-rule);
  position: relative;
  z-index: 1;
}
.workflow-done .workflow-dot {
  background: var(--color-accent);
  border-color: var(--color-accent);
}
.workflow-current .workflow-dot {
  background: var(--color-accent);
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(15, 98, 254, 0.25);
}
.workflow-current .workflow-label {
  color: var(--color-accent);
  font-weight: 600;
}
.workflow-done .workflow-label {
  color: var(--color-text);
}
.workflow-label {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 600px) {
  .workflow {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-left: 0.4rem;
  }
  .workflow-step {
    flex: 0 0 auto;
    text-align: left;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
  }
  .workflow-step:not(:last-child)::after {
    top: 1.4rem;
    left: 0.45rem;
    width: 2px;
    height: 100%;
  }
  .workflow-dot {
    margin: 0;
    flex: 0 0 auto;
  }
  .workflow-label {
    white-space: normal;
  }
}

/* Communication timeline — used on both the customer dashboard and
   the admin quote view. Reverse-chronological list of events. */
.timeline {
  list-style: none;
  padding: 0;
  margin: 1rem 0 2rem;
  border-left: 2px solid var(--color-rule);
}
.timeline-event {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin-left: -1px;
}
.timeline-event::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 0.85rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 2px solid #fff;
}
.timeline-event.timeline-system::before { background: var(--color-mute); }
.timeline-event.timeline-status_change::before { background: var(--color-link); }
.timeline-time {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-mute);
  margin-bottom: 0.15rem;
}
.timeline-body {
  display: block;
  white-space: pre-line;
}
.timeline-body.timeline-system {
  color: var(--color-mute);
  font-style: italic;
}
.timeline-from {
  color: var(--color-mute);
  font-size: 0.85rem;
  margin-left: 0.4rem;
}

/* Refund-acknowledged checkbox shown only when current status is 'paid' —
   visually warn the admin this is a destructive transition. */
.intake-form .check.refund-ack {
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 4px;
  font-weight: 500;
}

.quoted-message {
  background: var(--color-accent-soft);
  border-left: 3px solid var(--color-accent);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  white-space: pre-line;
}

.pay-options {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
}
.pay-options li {
  margin: 0.85rem 0;
}
main a.pay-button {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.15rem;
  background: #fff;
  color: var(--color-text);
  text-decoration: none;
  border: 1px solid var(--color-rule);
  border-left: 5px solid var(--color-rule);
  border-radius: 4px;
  font-weight: 600;
  transition: background 0.15s, transform 0.05s, box-shadow 0.15s;
}
main a.pay-button:hover {
  color: var(--color-text);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}
main a.pay-button .pay-icon {
  font-size: 1.5rem;
  line-height: 1;
  text-align: center;
}
main a.pay-button .pay-sub {
  display: block;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--color-muted, #666);
  margin-top: 0.15rem;
}
main a.pay-button .pay-arrow {
  color: var(--color-muted, #999);
  font-size: 1.2rem;
}

/* Per-provider accents — left border + tinted hover background. */
main a.pay-button.pay-stripe    { border-left-color: #635bff; }
main a.pay-button.pay-stripe:hover    { background: #f3f1ff; }
main a.pay-button.pay-etransfer { border-left-color: #FFD200; }
main a.pay-button.pay-etransfer:hover { background: #fff9e0; }
main a.pay-button.pay-wise      { border-left-color: #9fe870; }
main a.pay-button.pay-wise:hover      { background: #f0fbe5; }

.etransfer-block {
  font-family: var(--font-mono);
  background: #fafafa;
  border: 1px solid var(--color-rule);
  padding: 0.75rem 1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
  white-space: pre-wrap;
}

.quote-foot {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-rule);
  font-size: 0.9rem;
  color: var(--color-mute);
}

/* ---------- footer ---------- */

footer {
  margin-top: 5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-rule);
  font-size: 0.85rem;
  color: var(--color-mute);
}
footer a {
  color: var(--color-link);
}
.mb-credit {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.mb-credit a {
  display: inline-flex;
  align-items: center;
  line-height: 0;          /* avoid extra vertical space around the SVG */
}
.mb-logo {
  height: 1.5rem;
  width: auto;
  display: block;
  opacity: 0.8;
  transition: opacity 0.15s;
}
.mb-credit a:hover .mb-logo {
  opacity: 1;
}
.mb-counter {
  margin-top: 0.5rem;
  color: var(--color-mute);
}
.mb-counter strong {
  color: var(--color-text);
}

/* Inline delete button on the contributions admin table. */
.btn-link {
  background: none;
  border: none;
  color: var(--color-mute);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0 0.3rem;
}
.btn-link:hover { color: #b91c1c; }

/* Hero sub-tagline directly below the home-page H1. Three trust
   signals separated by middle dots. Restrained — accent color but
   not a callout box. */
.hero-sub {
  margin: -0.5rem 0 2rem;
  font-size: 0.95rem;
  color: var(--color-accent);
  font-style: italic;
}

/* Public contributions table at /contributions. */
.contrib-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}
.contrib-table th, .contrib-table td {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--color-rule);
  vertical-align: top;
}
.contrib-table th {
  font-weight: 500;
  color: var(--color-mute);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.contrib-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-mute);
  white-space: nowrap;
}

/* ---------- pre-launch banner ---------- */

.pre-launch-banner {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #78350f;
  padding: 0.6rem 1rem;
  margin-bottom: 1.5rem;
  border-radius: 4px;
  text-align: center;
  font-size: 0.9rem;
}

.pre-launch-banner a {
  color: #78350f;
  text-decoration: underline;
  font-weight: 500;
}

/* Launch testimonial promo banner — site-wide, green/emerald to read
   as a positive promotion rather than a status notice. Same shape as
   .pre-launch-banner so the two stack cleanly when both are active. */
.promo-banner {
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  color: #064e3b;
  padding: 0.6rem 1rem;
  margin-bottom: 1.5rem;
  border-radius: 4px;
  text-align: center;
  font-size: 0.9rem;
}
.promo-banner a {
  color: #064e3b;
  text-decoration: underline;
  font-weight: 500;
  margin-left: 0.4rem;
}

/* Soft, low-key testimonial prompt for non-promo customers on the
   dashboard. Tone: passing aside, not a callout. */
.testimonial-nudge {
  margin: 1.25rem 0 0;
  padding: 0.55rem 0.8rem;
  color: #555;
  font-size: 0.9rem;
  font-style: italic;
  border-left: 2px solid #d4d4d4;
}
.testimonial-nudge a {
  font-style: normal;
}

/* Customer-facing rating widget — 5 radios reversed in DOM so the
   CSS sibling selector `~` highlights the picked star and all stars
   to its left. No JS, native focus + keyboard nav still work. */
.star-rating .stars {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 0.15rem;
  font-size: 1.8rem;
  line-height: 1;
}
.star-rating .stars input { position: absolute; opacity: 0; pointer-events: none; }
.star-rating .stars label {
  color: #d4d4d4;
  cursor: pointer;
  transition: color 0.1s;
}
.star-rating .stars label:hover,
.star-rating .stars label:hover ~ label,
.star-rating .stars input:checked ~ label {
  color: #f59e0b;
}
.star-rating .stars input:focus + label {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Public /testimonials intro block — tighter than the default
   page H1/H2/p spacing so the list starts near the top. */
.testimonials-intro :first-child { margin-top: 0; }
.testimonials-intro h1 { margin-bottom: 0.25rem; }
.testimonials-intro p  { margin: 0.25rem 0; }

/* Public /testimonials list — tight, scannable column. */
.testimonials-list {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0;
}
.testimonial-card {
  padding: 0.5rem 0.85rem;
  border-left: 3px solid #6ee7b7;
  background: #f9fafb;
  border-radius: 0 6px 6px 0;
}
.testimonial-rating {
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.2;
}
.stars-filled { color: #f59e0b; }
.stars-empty  { color: #d4d4d4; }
.testimonial-card .testimonial-body {
  /* blockquote has chunky browser defaults; reset them */
  margin: 0.15rem 0 0.25rem;
  padding: 0;
  font-style: italic;
  white-space: pre-wrap;
}
.testimonial-byline {
  color: #555;
  font-size: 0.9rem;
  margin: 0;
}
.testimonial-stats {
  color: #888;
  font-size: 0.85rem;
}

/* /admin/testimonials — compact table with status badges. */
.testimonials-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.testimonials-table th,
.testimonials-table td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid #eee;
  vertical-align: top;
  text-align: left;
}
.testimonials-table .testimonial-body pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 0.85rem;
  margin: 0;
  max-width: 38rem;
}
.testimonials-table .inline-form { display: inline-flex; gap: 0.4rem; }
.testimonials-table tr.testimonial-rejected { opacity: 0.55; }
.badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-pending  { background: #fef3c7; color: #78350f; }
.badge-approved { background: #d1fae5; color: #064e3b; }
.badge-rejected { background: #fee2e2; color: #7f1d1d; }

/* /admin/testimonials — card-per-submission layout with inline curate
   textarea on pending rows. */
.testimonial-admin-list { display: grid; gap: 1rem; }
.testimonial-admin-card {
  padding: 0.9rem 1rem;
  border: 1px solid #e3e3e3;
  border-radius: 6px;
  background: #fafafa;
}
.testimonial-admin-card.testimonial-rejected { opacity: 0.6; }
.testimonial-admin-card header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
}
.testimonial-admin-card header .meta { color: #555; }
.testimonial-admin-card .rating-stars { color: #f59e0b; font-size: 1rem; }
.testimonial-curate-form textarea {
  width: 100%;
  min-height: 4rem;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.5rem;
}
.testimonial-curate-form .raw-body {
  margin: 0.6rem 0;
  font-size: 0.85rem;
}
.testimonial-curate-form .raw-body pre {
  white-space: pre-wrap;
  background: #fff;
  border: 1px solid #eee;
  padding: 0.5rem;
  border-radius: 3px;
  margin: 0.3rem 0 0;
}
.testimonial-admin-card blockquote {
  margin: 0;
  padding: 0.4rem 0.8rem;
  border-left: 3px solid #d4d4d4;
  white-space: pre-wrap;
}

/* Contact bullets + footer Contact link with leading icons. The email
   icon uses stroke=currentColor so it follows link colour; the
   WhatsApp brand icon keeps its green fill. */
.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
}
.icon-link img {
  width: 1.05em;
  height: 1.05em;
  flex-shrink: 0;
}

/* /admin/settings — 2-up auto-flow grid. Each setting is a tight
   key|input row; settings flow 2 per line on wide viewports, 1 per
   line below ~600px. Descriptions are in the title= attribute and
   show on hover so they don't widen rows. */
.settings-form .settings-group {
  border: 1px solid #e3e3e3;
  border-radius: 6px;
  padding: 0.5rem 1rem 0.75rem;
  margin-bottom: 1rem;
}
.settings-form .settings-group > legend {
  font-weight: 600;
  padding: 0 0.5rem;
}
.settings-form .settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
  column-gap: 1.25rem;
  row-gap: 0.25rem;
}
.settings-form .setting {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 8rem;
  column-gap: 0.6rem;
  align-items: center;
  padding: 0.1rem 0;
  cursor: help;       /* signals the hover-for-description affordance */
}
.settings-form .setting-key {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.settings-form .setting input[type="text"],
.settings-form .setting input[type="number"] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.2rem 0.4rem;
}
.settings-form .setting input[type="checkbox"] {
  justify-self: start;
}

/* ---------- pictures: passphrase gate + helpers ---------- */

.callout-error {
  background: #fff1f1;
  border-left: 3px solid #da1e28;   /* IBM Carbon red 60 */
}
.callout-error strong { color: #a2191f; }

.muted { color: var(--color-mute); font-size: 0.92em; }

/* Gate screen — full-viewport centred card, ignores the body measure. */
body.gate-body {
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-soft);
}
.gate-main { width: 100%; padding: 1.5rem; }
.gate-card {
  max-width: 26rem;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--color-rule);
  border-radius: 10px;
  padding: 2.25rem 2rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  text-align: center;
}
.gate-brand {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  margin: 0 0 0.25rem;
}
.gate-tagline { color: var(--color-mute); margin: 0 0 1.5rem; }
.gate-form { display: flex; flex-direction: column; gap: 0.9rem; text-align: left; }
.gate-form label { font-weight: 600; font-size: 0.9rem; }
.gate-form input[type="password"] {
  padding: 0.7rem 0.8rem;
  font-size: 1rem;
  border: 1px solid var(--color-rule);
  border-radius: 6px;
  font-family: var(--font-sans);
}
.gate-form button {
  margin-top: 0.3rem;
  padding: 0.7rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--color-accent);
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.gate-form button:hover { background: var(--color-link); }

/* Reveal-password ("eye") toggle, injected by /js/reveal-password.js around
   every password input. The wrapper stretches to the input's width so the
   button can sit at the right edge without disturbing existing layouts. */
.pw-field { position: relative; display: block; }
.pw-field > input,
.pw-field > input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  padding-right: 2.6rem;
}
/* Scoped under .pw-field so these beat the form's primary-button styles
   (.gate-form button / .intake-form button paint buttons accent-blue). */
.pw-field .pw-toggle {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 2.6rem;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  color: var(--color-mute);
  cursor: pointer;
}
.pw-field .pw-toggle:hover { background: transparent; color: var(--color-text); }
.pw-field .pw-toggle.is-on { color: var(--color-accent); }
.pw-field .pw-toggle svg { width: 1.15rem; height: 1.15rem; display: block; }

/* ---------- pictures: accounts + admin roster ---------- */

.nav-user { color: var(--color-mute); font-size: 0.9rem; }

.cb { display: flex; align-items: center; gap: 0.4rem; font-weight: 400; }
.cb input { width: auto; margin: 0; }

.admin-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }

.btn-secondary {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--color-accent);
  border-radius: 6px;
  color: var(--color-accent);
  text-decoration: none;
}
.btn-secondary:hover { background: var(--color-accent-soft); }

/* Standalone destructive button (photo + album delete). Inside
   .inline-form the more specific `.inline-form button` rule still wins. */
.btn-danger {
  padding: 0.45rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: #da1e28;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.btn-danger:hover { background: #a2191f; }

.user-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.user-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--color-rule);
}
.user-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.user-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.inline-form { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0; }
.inline-form button {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  color: #fff;
  background: var(--color-accent);
}
.inline-form button:hover { background: var(--color-link); }

/* ---------- pictures: grid + single-photo view ---------- */

/* Masonry layout via CSS columns: every thumbnail shows whole, at its own
   aspect ratio (no cropping, no distortion, no row gaps). Tiles flow down
   each column. */
.photo-grid {
  column-width: 200px;
  column-gap: 6px;
  margin: 1.5rem 0;
}
.photo-grid .tile {
  position: relative;
  display: block;
  break-inside: avoid;
  margin: 0 0 6px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--color-rule);
}
.photo-grid .tile img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.2s ease;
}
.photo-grid .tile:hover img { transform: scale(1.04); }

/* Year/decade badge shown on a thumbnail when the photo has one. */
.tile-date {
  position: absolute;
  left: 6px;
  bottom: 6px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  pointer-events: none;
}

/* Single photo. The view is wider than the text measure. */
.photo-view {
  max-width: 1100px;
  margin: 0 auto;
}
.photo-main {
  display: block;
  /* width/height attrs on the <img> supply the aspect ratio (no layout
     shift); auto here lets it scale proportionally within both caps
     instead of being stretched to the literal pixel dimensions. */
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 80vh;
  margin: 0 auto;
  border-radius: 6px;
}
.photo-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0 0.5rem;
}
.photo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--color-text);
}
.photo-actions {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.photo-actions .photo-delete { margin: 0; }

/* ---------- pictures: bilingual UI + captions ---------- */

.lang-switch {
  border: 1px solid var(--color-rule);
  border-radius: 6px;
  padding: 0.2rem 0.6rem;
  font-size: 0.85rem;
}
.gate-lang { margin: 1rem 0 0; text-align: center; }
.gate-lang a { font-size: 0.85rem; color: var(--color-mute); }

.caption-form, .caption-display {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.25rem 0;
}
.caption-form button {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 0.5rem 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--color-accent);
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.caption-form button:hover { background: var(--color-link); }
.caption-box label, .caption-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-mute);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.caption-box textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  font: inherit;
  border: 1px solid var(--color-rule);
  border-radius: 6px;
  resize: vertical;
}
.caption-box textarea:disabled { background: #fafafa; color: var(--color-mute); }
.caption-display .caption-box p { margin: 0; }

/* Per-box "translate to the other language" button — small + subtle; it
   (re)translates this box into the other, overwriting it (on-demand
   refresh, unlike the empty-only blur autofill). */
.caption-refresh {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  font-family: var(--font-sans);
  color: var(--color-mute);
  background: none;
  border: 1px solid var(--color-rule);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.caption-refresh:hover { color: var(--color-accent); border-color: var(--color-accent); }
.caption-refresh:disabled { opacity: 0.6; cursor: default; }

/* Per-photo caption-change history (collapsible). */
.caption-history { margin: 1.25rem 0; }
.caption-history > summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-mute);
}
.caption-history > summary:hover { color: var(--color-text); }
.caption-history .activity-feed { margin: 0.5rem 0 0; }

/* Year/decade editor on the photo page. */
.date-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin: 1rem 0;
}
.date-form label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-mute);
}
.date-form input {
  width: 7rem;
  padding: 0.4rem 0.5rem;
  font: inherit;
  border: 1px solid var(--color-rule);
  border-radius: 6px;
}
.date-form button {
  padding: 0.45rem 0.9rem;
  font-weight: 600;
  color: #fff;
  background: var(--color-accent);
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.date-form button:hover { background: var(--color-link); }
.date-form .field-help { flex-basis: 100%; margin: 0; }

@media (max-width: 600px) {
  .caption-form, .caption-display { grid-template-columns: 1fr; }
}

/* ---------- pictures: albums + activity feed ---------- */

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
/* Date auto-albums: decade sections wrapping year/decade cards. */
.decade-group { margin: 2rem 0; }
.decade-head {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 0.75rem;
  text-transform: none;
  letter-spacing: 0;
}

.album-card { display: block; text-decoration: none; color: inherit; }
.album-cover {
  aspect-ratio: 4 / 3;
  background: var(--color-rule);
  border-radius: 6px;
  overflow: hidden;
}
.album-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-meta { margin-top: 0.4rem; display: flex; flex-direction: column; }

/* Photo picker on the album edit form */
.album-picker { border: 1px solid var(--color-rule); border-radius: 8px; padding: 0.75rem; }
.album-picker legend { font-weight: 600; padding: 0 0.4rem; }
.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.6rem;
}
.picker-tile {
  position: relative;
  display: block;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
}
.picker-tile img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; opacity: 0.55; transition: opacity 0.15s; }
.picker-tile input[type="checkbox"]:checked ~ img { opacity: 1; }
.picker-tile > input[type="checkbox"] { position: absolute; top: 6px; left: 6px; width: 18px; height: 18px; z-index: 2; }
.picker-cover {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 0.3rem;
  background: rgba(0,0,0,0.55); color: #fff;
  font-size: 0.72rem; padding: 0.2rem 0.4rem;
}
.picker-cover input { width: auto; margin: 0; }
.album-delete { margin-top: 1rem; }

.activity-feed { list-style: none; padding: 0; margin: 1rem 0; }
.activity-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-rule);
}
.activity-who { font-weight: 600; }
.activity-when { margin-left: auto; font-size: 0.82rem; }
