@font-face {
  font-family: 'Playfair Display';
  src: url('/public/fonts/playfair-display-700-latin.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('/public/fonts/playfair-display-700-italic-latin.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/public/fonts/inter-400-700-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f2ede6;
  --bg-alt: #e8dccb;
  --card: #fffbf6;
  --ink: #211a14;
  --muted: #63584d;
  --accent: #ad5b36;
  --accent-dark: #6f3a22;
  --accent-2: #326f66;
  --border: #d9cbbb;
  --shadow: rgba(27, 19, 14, 0.085);
  --ring: rgba(173, 91, 54, 0.2);

  /* Semantic tokens (mapped to palette) */
  --stone: #ad5b36;
  --stone-light: #c98a68;
  --sage: #326f66;
  --sage-light: #d4e8e5;
  --cream: #f2ede6;
  --warm-white: #faf7f3;
  --charcoal: #211a14;

  /* Shadow scale */
  --shadow-soft: 0 2px 8px rgba(27, 19, 14, 0.06);
  --shadow-card: 0 8px 24px rgba(27, 19, 14, 0.085);
  --shadow-elevated: 0 16px 40px rgba(27, 19, 14, 0.14);

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 48px;

  /* Typography scale */
  --text-xs: 0.75rem;
  --text-sm: 0.85rem;
  --text-md: 0.95rem;
  --text-base: 1rem;
  --text-lg: 1.1rem;
  --text-xl: 1.3rem;
  --text-2xl: 1.5rem;

  /* Border radius */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 999px;

  /* Status colors */
  --status-warn-bg: #fff7e8;
  --status-warn-border: #e0be77;
  --status-warn-text: #6d4a10;

  --status-error-bg: #fff0ee;
  --status-error-border: #d98f84;
  --status-error-text: #7a2416;

  --status-info-bg: #eef4ff;
  --status-info-border: #8db4e6;
  --status-info-text: #1a3a5c;

  --status-success-bg: #e3f0ed;
  --status-success-border: #9bc5b6;
  --status-success-text: #2f6d5d;

  --status-danger-bg: #fce4e4;
  --status-danger-border: #c0392b;
  --status-danger-text: #7a2416;

  /* Disabled & form error */
  --disabled-bg: #c7b8aa;
  --form-error: #b00020;

  /* Landing page palette */
  --l-bg: #f2ede6;
  --l-bg-alt: #e8dccb;
  --l-bg-dark: #211a14;
  --l-bg-dark-alt: #3c2919;
  --l-card: #fffbf6;
  --l-ink: #211a14;
  --l-muted: #63584d;
  --l-accent: #ad5b36;
  --l-accent-light: #c98a68;
  --l-accent-dark: #6f3a22;
  --l-accent-2: #326f66;
  --l-border: #d9cbbb;
  --l-on-dark: #f2ede6;
  --l-on-dark-muted: #b8a99a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% -6%, rgba(255, 240, 218, 0.45) 0%, transparent 34%),
    radial-gradient(circle at 94% 4%, rgba(223, 236, 230, 0.4) 0%, transparent 30%),
    linear-gradient(180deg, #f7f2eb 0%, var(--bg) 52%, #ebe1d3 100%);
}

h1,
h2,
h3 {
  letter-spacing: -0.012em;
  line-height: 1.16;
}

p {
  line-height: 1.68;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px clamp(16px, 4vw, 48px) 48px;
}

.login-page {
  align-items: center;
  justify-content: center;
}

.login-page > .site-header {
  background: none;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
}

.plan-expiry-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 20px var(--shadow);
}

.plan-expiry-banner p {
  margin: 0;
  font-weight: 600;
  line-height: 1.4;
}

.plan-expiry-banner.is-warning {
  background: var(--status-warn-bg);
  border-color: var(--status-warn-border);
  color: var(--status-warn-text);
}

.plan-expiry-banner.is-expired {
  background: var(--status-error-bg);
  border-color: var(--status-error-border);
  color: var(--status-error-text);
}

.plan-limit-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid var(--status-warn-border);
  box-shadow: 0 8px 20px var(--shadow);
  background: var(--status-warn-bg);
  color: var(--status-warn-text);
}

.plan-limit-banner.critical {
  background: var(--status-error-bg);
  border-color: var(--status-error-border);
  color: var(--status-error-text);
}

.plan-limit-banner + .plan-limit-banner {
  margin-top: 8px;
}

.plan-limit-banner p {
  margin: 0;
  font-weight: 600;
  line-height: 1.4;
}

.pending-deletion-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid var(--status-error-border);
  box-shadow: 0 8px 20px var(--shadow);
  background: var(--status-error-bg);
  color: var(--status-error-text);
}

.pending-deletion-banner p {
  margin: 0;
  font-weight: 600;
  line-height: 1.4;
}

.pending-deletion-banner .banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pending-deletion-card {
  background: var(--status-error-bg);
  border: 1px solid var(--status-error-border);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 12px;
  color: var(--status-error-text);
}

.pending-deletion-card p {
  margin: 0 0 4px 0;
}

.pending-deletion-card .item-actions {
  margin-top: 8px;
}

/* --- Maintenance banner --- */
.maintenance-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-left: 4px solid;
  margin-bottom: 0;
  font-size: 0.92rem;
}
.maintenance-banner p { margin: 4px 0 0; }
.maintenance-banner-content { flex: 1; }
.maintenance-banner-time { font-size: 0.84rem; }
.maintenance-info {
  background: var(--status-info-bg);
  border-color: var(--status-info-border);
  color: var(--status-info-text);
}
.maintenance-warning {
  background: #fff3e0;
  border-color: #e6a817;
  color: #5c4200;
}
.maintenance-critical {
  background: var(--status-danger-bg);
  border-color: var(--status-danger-border);
  color: var(--status-danger-text);
}
.maintenance-dismiss {
  background: transparent;
  border: none;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.6;
  color: inherit;
}
.maintenance-dismiss:hover { opacity: 1; }
@media (max-width: 600px) {
  .maintenance-banner { flex-direction: column; gap: 6px; padding: 10px 14px; }
}

.pro-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 20px;
  background: var(--accent-dark);
  color: var(--bg);
  border-radius: 12px 12px 0 0;
  font-size: 0.88rem;
  font-weight: 500;
}

.pro-bar a {
  color: var(--bg);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 999px;
  transition: background-color 0.16s ease;
}

.pro-bar a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.pro-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pro-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pro-bar-create {
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  font-size: 0.82rem;
}

.wizard-step-indicator {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.wizard-step {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.wizard-step.active {
  color: var(--ink);
  background: var(--bg);
  border-color: var(--accent);
  font-weight: 600;
}

.wizard-step.completed {
  color: var(--accent-2);
  border-color: var(--accent-2);
  text-decoration: none;
}

a.wizard-step.completed:hover {
  background: var(--bg-alt, #f5f0eb);
}

.verify-resume-banner {
  max-width: 540px;
  margin: 1rem auto;
  padding: 0.75rem 1rem;
  background: var(--bg-alt, #f5f0eb);
  border: 1px solid var(--accent-2);
  border-radius: 8px;
  text-align: center;
}
.verify-resume-banner p {
  margin: 0 0 0.5rem;
}
.verify-resume-banner .btn {
  font-size: 0.88rem;
}

.skip-link {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: underline;
  margin-top: 0.25rem;
}
.skip-link:hover {
  color: var(--accent-2);
}

.payment-provider-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.payment-provider-buttons .provider-form {
  flex: 1;
  min-width: 140px;
}
.payment-provider-buttons .btn {
  width: 100%;
}
.btn-vipps {
  background: #ff5b24;
  color: #fff;
  border-color: #ff5b24;
}
.btn-vipps:hover {
  background: #e64e1c;
  border-color: #e64e1c;
}

.vipps-polling-widget {
  max-width: 540px;
  margin: 1rem auto;
  padding: 1rem;
  background: var(--bg-alt, #f5f0eb);
  border: 1px solid var(--accent-2);
  border-radius: 8px;
  text-align: center;
}
.vipps-polling-widget .spinner {
  width: 24px;
  height: 24px;
  margin: 0.5rem auto;
  border: 3px solid var(--muted);
  border-top-color: var(--accent-2);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.pro-bar .link {
  color: var(--bg);
  font-size: 0.88rem;
  font-weight: 500;
}

.pro-bar + .site-header {
  border-radius: 0 0 18px 18px;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 auto;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 251, 246, 0.9);
  box-shadow: var(--shadow-card);
  position: relative;
  z-index: 3;
  backdrop-filter: blur(10px);
}

.brand-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  display: block;
}

.brand {
  text-decoration: none;
  color: inherit;
}

.brand-sub {
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
  border-radius: 999px;
  padding: 5px 10px;
  transition: background-color 0.16s ease, color 0.16s ease;
  white-space: nowrap;
}

.nav a:hover {
  background: rgba(33, 26, 20, 0.06);
  color: var(--ink);
}

.nav a.is-active {
  background: var(--accent);
  color: #fff;
}

.nav a.is-active:hover {
  background: var(--accent-dark);
}

.nav a.nav-alert {
  font-weight: 700;
}

.nav .btn.small {
  font-size: 0.82rem;
  padding: 5px 12px;
  color: #fff;
}

/* --- Nav dropdowns (desktop) --- */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.85rem;
  border-radius: 999px;
  padding: 5px 10px;
  border: none;
  background: none;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
  white-space: nowrap;
  font-family: inherit;
}

.nav-dropdown-trigger:hover {
  background: rgba(33, 26, 20, 0.06);
  color: var(--ink);
}

.nav-dropdown-trigger.is-active {
  background: var(--accent);
  color: #fff;
}

.nav-dropdown-chevron {
  transition: transform 0.2s ease;
}

.nav-dropdown.is-open .nav-dropdown-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 170px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-elevated);
  padding: 6px;
  z-index: 100;
  animation: dropdownIn 0.15s ease;
}

.nav-dropdown-menu-right {
  left: auto;
  right: 0;
}

.nav-dropdown.is-open .nav-dropdown-menu {
  display: block;
}

@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.nav-dropdown-menu a,
.nav-dropdown-link {
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
  text-decoration: none;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-link:hover {
  background: rgba(33, 26, 20, 0.06);
  color: var(--ink);
}

.nav-dropdown-menu a.is-active {
  background: var(--accent);
  color: #fff;
}

.nav-dropdown-form {
  display: block;
  width: 100%;
  margin: 0;
}

.nav-dropdown-link {
  text-align: left;
  border: 0;
  background: none;
  font-family: inherit;
  font-weight: 400;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

/* --- Mobile drawer sections --- */
.desktop-only { display: flex; }
.mobile-only { display: none; }

.nav-drawer-section {
  width: 100%;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

.nav-drawer-heading {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  font-family: inherit;
}

.nav-drawer-heading:hover {
  background: rgba(33, 26, 20, 0.04);
}

.nav-drawer-chevron {
  margin-left: auto;
  transition: transform 0.2s ease;
}

.nav-drawer-section.is-open .nav-drawer-chevron {
  transform: rotate(180deg);
}

.nav-drawer-links {
  display: none;
  padding-left: 6px;
}

.nav-drawer-section.is-open .nav-drawer-links {
  display: block;
}

.nav-icon-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.nav-icon:hover {
  background: rgba(33, 26, 20, 0.06);
  color: var(--ink);
}

.nav-icon.is-active {
  background: var(--accent);
  color: #fff;
}

.nav-icon .notification-count {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 0.65rem;
}

.nav-close {
  display: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 10px 20px var(--shadow);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0;
}

.nav-toggle-bar {
  width: 20px;
  height: 2px;
  background: var(--ink);
  display: block;
  border-radius: 999px;
}

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

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(33, 26, 20, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1400;
}

body.nav-open .nav-overlay {
  opacity: 1;
  pointer-events: auto;
}

.notification-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  line-height: 1;
}

.inline {
  display: inline;
}

.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-estate-switch {
  min-width: 0;
  margin-left: 0;
}

.nav-estate-switch select {
  width: auto;
  min-width: 0;
  font-size: 0.82rem;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--bg-alt);
  border-color: var(--border);
}

.nav-estate-switch .btn.small {
  font-size: 0.78rem;
  padding: 4px 10px;
}

.nav-lang {
  margin-top: 4px;
}

.lang-toggle {
  font-size: 0.85em;
  opacity: 0.75;
}

.lang-toggle:hover {
  opacity: 1;
}

main {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(145deg, var(--warm-white) 0%, var(--bg-alt) 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

/* ===== Non-landing hero (login, register, etc.) ===== */
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 12px;
  line-height: 1.05;
}

.hero p {
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.66;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.hero-panel {
  display: grid;
  gap: 16px;
  background: var(--card);
  border-radius: 20px;
  padding: 20px;
  border: 1px solid var(--border);
}

/* ===== Landing page ===== */
.landing-page {
  background: var(--l-bg);
  color: var(--l-ink);
}

.landing-page .page {
  padding: 0;
  gap: 0;
  max-width: 100%;
}

.landing-page main {
  max-width: 100%;
}

.landing-container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
}

/* Note: .landing-btn* rules live further down (around line 1090 after this
   deletion) — this duplicate block, formerly here, was fully overridden by
   that later one and read as live code, which was misleading. */

.landing-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.landing-icon::before,
.landing-icon::after {
  content: '';
  position: absolute;
}

.landing-icon-lock::before {
  width: 12px;
  height: 9px;
  border: 2px solid currentColor;
  border-radius: 3px;
  top: 7px;
}

.landing-icon-lock::after {
  width: 8px;
  height: 7px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  top: 1px;
}

.landing-icon-shield::before {
  width: 12px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 6px 6px 8px 8px;
  clip-path: polygon(50% 0%, 100% 20%, 100% 62%, 50% 100%, 0% 62%, 0% 20%);
}

.landing-icon-check::before {
  width: 10px;
  height: 6px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.landing-icon-camera::before {
  width: 14px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 4px;
  top: 4px;
}

.landing-icon-camera::after {
  width: 4px;
  height: 4px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.landing-icon-chart::before {
  width: 3px;
  height: 8px;
  left: 2px;
  bottom: 2px;
  background: currentColor;
  border-radius: 999px;
  box-shadow: 5px -3px 0 0 currentColor, 10px -7px 0 0 currentColor;
}

.landing-icon-list::before {
  width: 12px;
  height: 2px;
  top: 3px;
  left: 4px;
  background: currentColor;
  box-shadow: 0 5px 0 0 currentColor, 0 10px 0 0 currentColor;
}

.landing-icon-list::after {
  width: 2px;
  height: 2px;
  top: 3px;
  left: 0;
  background: currentColor;
  border-radius: 50%;
  box-shadow: 0 5px 0 0 currentColor, 0 10px 0 0 currentColor;
}

.landing-hero {
  position: relative;
  background: var(--l-bg);
  padding: 80px 0 72px;
  overflow: hidden;
  text-align: center;
}

.landing-hero::before,
.landing-hero::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.08;
  z-index: 0;
  pointer-events: none;
}

.landing-hero::before {
  top: -200px;
  right: -100px;
  background: var(--l-accent);
}

.landing-hero::after {
  bottom: -200px;
  left: -100px;
  background: var(--l-accent-2);
}

.landing-hero .landing-container {
  position: relative;
  z-index: 1;
}

.landing-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 20px;
  color: var(--l-ink);
}

.landing-hero .landing-lead {
  font-size: 1.12rem;
  line-height: 1.7;
  color: var(--l-muted);
  max-width: 600px;
  margin: 0 auto 32px;
}

.landing-hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.landing-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.landing-btn:hover {
  transform: translateY(-1px);
}

.landing-btn-primary {
  /* Solid accent matches the rest of the site (.btn uses var(--accent)).
     The previous orange→teal gradient (var(--l-accent) → var(--l-accent-2))
     read as a "weird color change" within the button itself. */
  background: var(--l-accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(173, 91, 54, 0.35);
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.landing-btn-primary:hover {
  background: var(--l-accent-dark);
  box-shadow: 0 6px 20px rgba(173, 91, 54, 0.45);
}

.landing-btn-ghost {
  background: var(--l-card);
  color: var(--l-muted);
  border: 1px solid var(--l-border);
}

.landing-btn-ghost:hover {
  border-color: var(--l-accent);
  color: var(--l-accent);
}

.landing-btn-ghost-light {
  background: transparent;
  color: var(--l-muted);
  border: 1px solid var(--l-border);
}

.landing-btn-ghost-light:hover {
  border-color: var(--l-accent);
  color: var(--l-accent);
}

.landing-hero-trust {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--l-muted);
}

.landing-hero-trust span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.landing-trust-bar {
  background: var(--l-bg);
  border-top: 1px solid var(--l-border);
  border-bottom: 1px solid var(--l-border);
  padding: 24px 0;
}

.landing-trust-bar .landing-container {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.landing-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--l-muted);
  font-weight: 500;
}

.landing-features {
  background: var(--l-card);
  padding: 72px 0;
}

.landing-features .landing-section-header {
  text-align: center;
  margin-bottom: 48px;
}

.landing-feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 48px;
}

.landing-feature-row:last-child {
  margin-bottom: 0;
}

.landing-feature-row.is-reversed {
  direction: rtl;
}

.landing-feature-row.is-reversed > * {
  direction: ltr;
}

.landing-feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--l-bg-alt);
  margin-bottom: 16px;
}

.landing-feature-icon svg {
  color: var(--l-accent);
}

.landing-feature-card svg {
  color: var(--l-accent-light);
}

.landing-feature-text h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--l-ink);
}

.landing-feature-text p {
  color: var(--l-muted);
  margin: 0;
  line-height: 1.7;
}

.landing-feature-card {
  background: var(--l-bg-alt);
  border: 1px solid var(--l-border);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  font-size: 3rem;
}

.landing-steps {
  background: var(--l-bg-alt);
  padding: 72px 0;
}

.landing-steps .landing-section-header {
  text-align: center;
  margin-bottom: 48px;
}

.landing-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}

.landing-step {
  text-align: center;
}

.landing-step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  background: var(--l-accent);
  color: #fff;
  margin-bottom: 16px;
}

.landing-step h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--l-ink);
}

.landing-step p {
  color: var(--l-muted);
  margin: 0;
  line-height: 1.6;
  font-size: 0.95rem;
}

.landing-steps-line {
  position: absolute;
  top: 24px;
  left: calc(16.66% + 32px);
  right: calc(16.66% + 32px);
  height: 2px;
  border-top: 2px dashed var(--l-border);
  z-index: 0;
}

.landing-step-number {
  position: relative;
  z-index: 1;
}

.landing-pricing {
  background: var(--l-card);
  padding: 72px 0;
  text-align: center;
}

.landing-pricing .landing-section-header {
  margin-bottom: 40px;
}

.landing-pricing-card {
  max-width: 420px;
  margin: 0 auto;
  background: var(--l-card);
  border: 1px solid var(--l-border);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: var(--shadow-card);
  border-top: 3px solid transparent;
  border-image: linear-gradient(135deg, var(--l-accent), var(--l-accent-2)) 1;
  border-image-slice: 1;
  overflow: hidden;
}

.landing-pricing-card .landing-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--l-ink);
  margin: 0 0 8px;
}

.landing-pricing-card .landing-price-sub {
  font-size: 0.9rem;
  color: var(--l-muted);
  margin: 0 0 24px;
}

.landing-pricing-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  text-align: left;
}

.landing-pricing-list li {
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--l-ink);
}

.landing-pricing-list li::before {
  content: '\2713';
  color: var(--l-accent);
  font-weight: 700;
  flex-shrink: 0;
}

.landing-pricing-link {
  display: block;
  margin-top: 16px;
  color: var(--l-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.landing-pricing-link:hover {
  color: var(--l-accent);
}

.landing-pro-callout {
  max-width: 520px;
  margin: 40px auto 0;
  background: rgba(173, 91, 54, 0.06);
  border: 1px solid rgba(173, 91, 54, 0.15);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  color: var(--l-ink);
}

.landing-pro-callout h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--l-ink);
}

.landing-pro-callout p {
  font-size: 0.95rem;
  margin: 0 0 20px;
  color: var(--l-muted);
}

.landing-faq {
  background: var(--l-card);
  padding: 72px 0;
}

.landing-faq .landing-section-header {
  text-align: center;
  margin-bottom: 40px;
}

.landing-faq-list {
  max-width: 700px;
  margin: 0 auto;
}

.landing-faq-item {
  border-bottom: 1px solid var(--l-border);
}

.landing-faq-item summary {
  padding: 18px 0;
  font-weight: 600;
  font-size: 1.02rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--l-ink);
}

.landing-faq-item summary::-webkit-details-marker {
  display: none;
}

.landing-faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--l-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 16px;
}

.landing-faq-item[open] summary::after {
  content: '\2212';
}

@keyframes faq-open {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.landing-faq-item .landing-faq-answer {
  padding: 0 0 18px;
  animation: faq-open 0.2s ease;
  color: var(--l-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

.landing-cta {
  position: relative;
  background: var(--l-bg);
  border-top: 1px solid var(--l-border);
  padding: 72px 0;
  text-align: center;
}

.landing-cta .landing-container {
  position: relative;
  z-index: 1;
}

.landing-cta h2 {
  color: var(--l-ink);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  margin: 0 0 12px;
}

.landing-cta p {
  color: var(--l-muted);
  margin: 0 0 32px;
  font-size: 1.05rem;
}

.landing-cta-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.landing-section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--l-ink);
}

.landing-section-header p {
  color: var(--l-muted);
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Scroll-reveal only hides content when JS is present to reveal it again
   (html.js is set by a nonce'd inline script in the header partial), and
   never when the user prefers reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  html.js .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .landing-hero {
    padding: 56px 0 48px;
  }

  .landing-hero h1 {
    font-size: clamp(2rem, 7vw, 2.8rem);
  }

  .landing-feature-row {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .landing-feature-row.is-reversed {
    direction: ltr;
  }

  .landing-feature-card {
    min-height: 120px;
  }

  .landing-steps-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .landing-steps-line {
    display: none;
  }

  .landing-hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .landing-hero-actions .landing-btn {
    width: 100%;
    max-width: 300px;
  }

  .landing-trust-bar .landing-container {
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .landing-hero h1 {
    font-size: clamp(1.8rem, 8vw, 2.2rem);
  }

  .landing-features,
  .landing-steps,
  .landing-pricing,
  .landing-faq,
  .landing-cta {
    padding: 48px 0;
  }

  .landing-pricing-card {
    padding: 28px 20px;
  }
}

.plan-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plans-page main {
  gap: 40px;
}

.plans-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.plans-hero {
  padding: 12px 0 8px;
}

.plans-hero .plans-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 24px;
  align-items: stretch;
}

.plans-hero-copy,
.plans-hero-panel-card {
  border-radius: 28px;
  box-shadow: var(--shadow-card);
}

.plans-hero-copy {
  padding: 34px;
  background:
    radial-gradient(circle at top right, rgba(212, 232, 229, 0.78), transparent 34%),
    linear-gradient(135deg, rgba(255, 251, 246, 0.96), rgba(232, 220, 203, 0.9));
  border: 1px solid var(--border);
}

.plans-kicker {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.plans-hero-copy h1 {
  margin: 0 0 12px;
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1.04;
}

.plans-lead {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.72;
}

.plans-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.plans-hero-panel-card {
  display: grid;
  gap: 16px;
  height: 100%;
  padding: 30px;
  background: linear-gradient(180deg, #2b2119 0%, #3a2a1c 100%);
  color: var(--bg);
}

.plans-hero-panel-card h2 {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  line-height: 1.08;
}

.plans-hero-panel-card p {
  margin: 0;
  color: rgba(242, 237, 230, 0.72);
  line-height: 1.7;
}

.plans-hero-points {
  display: grid;
  gap: 12px;
}

.plans-hero-points span {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(242, 237, 230, 0.84);
  font-size: 0.92rem;
}

.plans-hero-points span::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #cf8663 0%, var(--bg) 100%);
  box-shadow: 0 0 0 4px rgba(242, 237, 230, 0.08);
}

.plans-section {
  padding: 4px 0 8px;
}

.plans-section-header {
  display: grid;
  gap: 10px;
  max-width: 720px;
  margin: 0 auto 26px;
  text-align: center;
}

.plans-section-header h2 {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.08;
}

.plans-section-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.plans-grid {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 22px;
}

.plans-plan-card {
  gap: 18px;
  padding: 24px;
  border-radius: 26px;
  min-height: 100%;
  background: rgba(255, 251, 246, 0.92);
}

.plans-plan-card.is-featured {
  border-color: rgba(173, 91, 54, 0.34);
  box-shadow: 0 24px 50px rgba(173, 91, 54, 0.12);
}

.plans-plan-top {
  display: grid;
  gap: 14px;
}

.plans-plan-heading {
  display: grid;
  gap: 8px;
}

.plans-plan-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(173, 91, 54, 0.1);
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plans-plan-card h3 {
  margin: 0;
}

.plans-feature-list {
  flex: 1;
  margin: 0;
}

.plans-feature-list li {
  padding: 8px 0;
}

.plans-limits {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.plans-limit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(242, 237, 230, 0.72);
}

.plans-limit span {
  color: var(--muted);
  font-size: 0.88rem;
}

.plans-limit strong {
  font-size: 0.94rem;
}

.plans-plan-footer {
  display: grid;
  gap: 10px;
}

.plans-plan-footer .btn {
  width: 100%;
  justify-content: center;
}

.plans-plan-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.plan-card-head h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.plan-card-head .muted {
  font-size: 0.88rem;
}

.plan-price {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 12px 0 0;
  letter-spacing: -0.012em;
}

.plan-price .plan-period {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
}

.plan-limits p {
  margin: 0 0 6px;
}

.plan-card--current {
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 2px var(--ring);
}

.plan-feature-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  font-size: 0.88rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.plan-feature-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
}
.plan-feature-list li.feature-yes::before {
  content: '\2713';
  color: var(--sage);
  flex-shrink: 0;
}
.plan-feature-list li.feature-no {
  color: var(--muted);
  opacity: 0.5;
}
.plan-feature-list li.feature-no::before {
  content: '\2717';
  color: var(--muted);
  flex-shrink: 0;
}

.duration-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.duration-label {
  font-weight: 600;
  font-size: 0.9rem;
}
.duration-option {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}
.duration-option input[type="radio"] {
  width: auto;
  border: none;
  padding: 0;
  box-shadow: none;
  background: none;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

@media (max-width: 960px) {
  .plans-hero .plans-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .plans-hero-copy,
  .plans-hero-panel-card,
  .plans-plan-card {
    padding: 22px;
  }

  .plans-hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Plan comparison table */
.plan-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 10px 20px var(--shadow);
}
.plan-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  font-size: 0.9rem;
}
.plan-table th,
.plan-table td {
  padding: 10px 14px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.plan-table thead th {
  vertical-align: bottom;
  padding-bottom: 14px;
  padding-top: 14px;
}
.plan-table tfoot td {
  border-bottom: none;
  padding-top: 14px;
  padding-bottom: 14px;
}
.plan-table__feature-col,
.plan-table__feature-label {
  text-align: left;
  white-space: nowrap;
  font-weight: 500;
}
/* Recommended status is conveyed by the top border + ribbon banner only.
   Background tint is reserved for the selected state so the two don't
   collide visually (was: both used sage-light and the user couldn't tell
   them apart). */
.plan-table__plan-col--recommended {
  border-top: 4px solid var(--sage);
  position: relative;
}
.plan-table__plan-col--current {
  border-top: 3px solid var(--accent);
}
.plan-table__plan-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.plan-table__badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--sage);
  color: #fff;
  margin-bottom: 4px;
}
/* Ribbon-style badge: in-flow banner that spans the full column width.
   We can't use absolute positioning here because .plan-table-scroll has
   overflow-x: auto (which forces overflow-y to a non-visible value),
   clipping anything outside the scroll container. Negative horizontal
   margins pull through the cell padding so the banner edge-aligns with
   the column. */
.plan-table__badge--ribbon {
  display: block;
  margin: -14px -14px 10px;
  padding: 6px 8px;
  background: var(--sage);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  border-radius: 0;
  white-space: nowrap;
}
/* Price in the column header — bigger than the body text so it scans fast */
.plan-table__price-stack {
  margin-top: 8px;
  line-height: 1;
}
.plan-table__price-amount {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
}
.plan-table__price-period {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 2px;
}
/* Whole-plan-column click affordance: hover hint + selected outline */
.plan-table th[data-plan-select],
.plan-table td[data-plan-select] {
  cursor: pointer;
}
.plan-table th[data-plan-select]:hover,
.plan-table td[data-plan-select]:hover {
  background-color: var(--sage-light);
}
.plan-table__col--selected {
  background-color: var(--sage-light) !important;
}
.plan-table th[data-plan-select].plan-table__col--selected {
  box-shadow: inset 0 2px 0 var(--accent), inset 2px 0 0 var(--accent), inset -2px 0 0 var(--accent);
}
.plan-table td[data-plan-select].plan-table__col--selected {
  box-shadow: inset 2px 0 0 var(--accent), inset -2px 0 0 var(--accent);
}
.plan-table tfoot td[data-plan-select].plan-table__col--selected {
  box-shadow: inset 2px 0 0 var(--accent), inset -2px 0 0 var(--accent), inset 0 -2px 0 var(--accent);
}
.plan-table__price {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 4px;
}
.plan-table__yes {
  color: #16a34a;
  font-weight: 700;
}
.plan-table__no {
  color: #999;
}
.plan-table__num {
  font-weight: 600;
}
.plan-summary-card {
  border: 2px solid var(--sage);
  border-radius: 12px;
  padding: 24px;
  background: var(--card-bg, #fff);
  max-width: 520px;
  margin: 0 auto 24px;
}
.plan-summary-card--current {
  border-color: var(--accent, var(--sage));
}
.plan-summary-card__header {
  text-align: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.plan-summary-card__name {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.plan-summary-card__tagline {
  font-size: 0.95rem;
  margin-bottom: 12px;
}
.plan-summary-card__features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}
.plan-summary-card__feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}
.plan-summary-card__feature-label {
  flex: 1;
}
.plan-summary-card__cta {
  margin-top: 20px;
  text-align: center;
}
@media (max-width: 600px) {
  .plan-summary-card__features {
    grid-template-columns: 1fr;
  }
}
.duration-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--sage-light);
  color: var(--sage);
  margin-left: 2px;
  vertical-align: baseline;
  line-height: 1;
}
.plan-table__price-row {
  border-top: 2px solid var(--border);
}
.plan-table__price-row .plan-table__feature-label {
  font-weight: 700;
}
.plan-table tfoot .btn {
  width: 100%;
}
.plan-table__hint-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  cursor: help;
  vertical-align: middle;
  margin-left: 4px;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .plan-table__feature-col,
  .plan-table__feature-label {
    position: sticky;
    left: 0;
    background: var(--card);
    z-index: 1;
    box-shadow: 2px 0 4px rgba(0,0,0,0.05);
  }
}

@media (max-width: 720px) {
  .cta-band {
    flex-direction: column;
    align-items: flex-start;
  }
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.info-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 10px 20px var(--shadow);
}

.info-card h3 {
  margin-top: 0;
}

.intro-nav-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.intro-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.intro-link {
  font-weight: 600;
  color: var(--accent-dark);
  text-decoration: underline;
}

.step-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 0.95rem;
  color: var(--text);
}

.step-indicator-accent {
  border-color: var(--accent);
  color: var(--accent-dark);
  font-weight: 600;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.intro-checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
}

.checklist-item.done {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
}

.checklist-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  line-height: 1;
}

.checklist-item.done .checklist-icon {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

.checklist-label {
  color: var(--text);
  text-decoration: none;
}

a.checklist-label:hover {
  text-decoration: underline;
}

/* --- Stat grid (card-based) --- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
}

.stat-card {
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.stat-card .stat-label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.stat-card .stat-value {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.2;
}

/* Legacy stat row (still used in some places) */
.stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-label {
  color: var(--muted);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 600;
}

/* --- Progress bar --- */
.progress-bar {
  height: 12px;
  width: 100%;
  border-radius: 999px;
  background: var(--bg-alt);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.progress-bar-fill.warning {
  background: var(--status-warn-border);
}

.progress-bar-fill.critical {
  background: var(--status-danger-border);
}

/* Inline-style replacements (CSP safe) */
.hidden-initial { display: none; }
.consent-error-msg { color: #e11d48; font-weight: 600; margin: 0 0 0.5rem; font-size: 0.9rem; }
.consent-checkbox--error { outline: 2px solid #e11d48; }

/* Checkout consent block — card container with custom checkbox + required pill */
.checkout-consent {
  padding: 1rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--card, #fff);
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.checkout-consent:has(input[type="checkbox"]:checked) {
  border-color: var(--sage);
  background-color: rgba(0, 0, 0, 0.01);
}
.checkout-consent.consent-checkbox--error,
.checkout-consent.shake {
  border-color: #e11d48;
  background-color: rgba(225, 29, 72, 0.04);
  outline: none;
  animation: consent-shake 0.4s;
}
@keyframes consent-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}
.checkout-consent__header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}
.checkout-consent__pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
}
.checkout-consent:has(input[type="checkbox"]:checked) .checkout-consent__pill {
  background: var(--sage);
}
.checkout-consent__pill::before { content: '✱ '; }

/* Custom checkbox — scoped to the consent block so other checkboxes are untouched */
.checkout-consent__checkbox-label { gap: 12px; align-items: flex-start; }
.checkout-consent__checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  border: 2px solid var(--border);
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.checkout-consent__checkbox-label input[type="checkbox"]:hover { border-color: var(--sage); }
.checkout-consent__checkbox-label input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.checkout-consent__checkbox-label input[type="checkbox"]:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}
.checkout-consent__checkbox-label input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

/* Disabled submit — visible enough that the user knows it's not yet ready */
.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.3);
}
.plan-select-radio {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.6rem 0.85rem;
  min-height: 44px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background-color 0.15s ease;
}
.plan-select-radio:hover { background-color: rgba(0, 0, 0, 0.04); }
.plan-select-radio input[type="radio"] { margin: 0; width: 1.25rem; height: 1.25rem; accent-color: var(--sage); }
.plan-select-radio__label { user-select: none; }
.plan-table__select-cell { text-align: center; }

/* Payment provider chooser — side-by-side cards (Vipps / Stripe) */
.provider-selector { margin-top: 1.5rem; }
.provider-selector__label { font-size: 0.95rem; margin-bottom: 0.6rem; }
.provider-selector__options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.provider-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 96px;
  padding: 1rem 0.85rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--card, #fff);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.provider-option:hover { border-color: var(--sage); }
.provider-option:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.provider-option:has(input[type="radio"]:checked) {
  border-color: var(--accent);
  background-color: var(--sage-light);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.provider-option.is-checked {
  border-color: var(--accent);
  background-color: var(--sage-light);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
/* Visually hide the radio but keep it for keyboard + screen-reader users */
.provider-option input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.provider-option__logo {
  height: 28px;
  width: auto;
  display: block;
}
.provider-option > span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
/* Checkmark badge on selected card */
.provider-option:has(input[type="radio"]:checked)::after,
.provider-option.is-checked::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.provider-selector__help {
  margin-top: 0.6rem;
  font-size: 0.85rem;
}
@media (max-width: 480px) {
  .provider-selector__options { grid-template-columns: 1fr; }
}

.checkout-submit { text-align: center; }
.tight-margin { margin: 4px 0; }
.line-height-relaxed { line-height: 1.5; }
.text-danger { color: var(--status-danger-text, #b54e00); }
.text-warning { color: var(--status-warning-text, #6b5900); }

.progress-bar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.progress-bar-label .muted {
  color: var(--muted);
}

/* --- Section card (bordered card wrapper) --- */
.section-card {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.section-card h3 {
  margin: 0 0 16px;
  font-size: 1rem;
  font-weight: 600;
}

.section-card + .section-card {
  margin-top: 32px;
}

.admin-page-shell {
  width: min(1100px, 100%);
  margin: 0 auto;
}

.admin-page-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
}

.admin-page-intro {
  display: grid;
  gap: 10px;
}

.admin-page-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(173, 91, 54, 0.08);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-page-header h1 {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  line-height: 1.08;
}

.admin-page-header .muted {
  max-width: 62ch;
  margin: 0;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 14px;
}

.admin-stat-card {
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
}

.admin-stat-card strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
  color: var(--ink);
}

.admin-stat-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 600;
}

/* Sections containing section-cards get consistent vertical flow */
section > .section-header {
  margin-bottom: 24px;
}

section > .stat-grid {
  margin-bottom: 24px;
}

/* --- Notification card state (Lovable-style) --- */
.notification-item {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 16px;
  box-shadow: var(--shadow-card);
  transition: opacity 0.15s ease;
}

.notification-item.is-unread {
  border-left: 4px solid var(--accent);
  background: rgba(173, 91, 54, 0.04);
}

.notification-item.is-read {
  opacity: 0.7;
}

.notification-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* --- Activity feed cards --- */
.activity-card {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-card);
}

/* --- Invite card --- */
.invite-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
}

.invite-card .badge-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.badge-status.used {
  background: var(--accent);
  color: #fff;
}

.badge-status.pending {
  background: transparent;
  color: var(--muted);
  padding: 0;
}

.badge-status.expired {
  background: transparent;
  color: var(--muted);
  padding: 0;
}

/* --- Role badges --- */
.badge-role {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-alt);
  color: var(--muted);
}

.badge-role.owner {
  background: rgba(173, 91, 54, 0.1);
  color: var(--accent);
}

.badge-role.admin {
  background: rgba(50, 111, 102, 0.1);
  color: var(--sage);
}

/* --- Section card header --- */
.section-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.section-card-header h3 {
  margin: 0;
}

.admin-donations-form {
  margin-bottom: 0;
}

.admin-donations-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.admin-donations-form-row label {
  flex: 1 1 180px;
  min-width: 0;
}

.admin-donations-form-row button {
  flex: 0 0 auto;
  align-self: flex-end;
}

.admin-donations-link-list {
  display: grid;
  gap: 10px;
}

.admin-donation-link-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
}

.admin-donation-link-row--inactive {
  opacity: 0.55;
}

.admin-donation-link-info {
  flex: 1;
  min-width: 0;
}

.admin-donation-link-primary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-donation-link-meta {
  margin-top: 2px;
}

.admin-donation-link-url {
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-donation-link-url a {
  color: var(--muted);
  text-decoration: none;
}

.admin-donation-link-url a:hover {
  text-decoration: underline;
}

.admin-donation-link-actions {
  flex-shrink: 0;
}

.admin-donation-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-donation-status.is-active {
  background: rgba(47, 109, 93, 0.12);
  color: var(--status-success-text);
}

.admin-donation-status.is-expired {
  background: rgba(176, 123, 51, 0.12);
  color: #9a6628;
}

.admin-donation-status.is-revoked {
  background: rgba(143, 62, 46, 0.12);
  color: #8f3e2e;
}

.admin-settings-summary {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
}

.admin-settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 20px;
}

.admin-settings-card,
.admin-settings-status-card,
.admin-settings-categories-card {
  box-shadow: var(--shadow-card);
}

.admin-settings-status-card,
.admin-settings-categories-card {
  margin-top: 20px;
}

.admin-settings-card .stack {
  margin-bottom: 0;
}

.admin-settings-actions {
  justify-content: flex-start;
}

.admin-settings-note-list {
  margin: 0 0 0.8rem 1rem;
  padding-left: 0.2rem;
}

.admin-settings-list-label {
  margin-bottom: 0.2rem;
}

/* --- Settings: iOS-style pill switch + row layout --- */
.settings-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.switch-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: var(--warm-white);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.switch-row:hover {
  background: var(--cream);
}

.switch-row--child {
  margin-left: var(--space-6);
  background: transparent;
}

.switch-row__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.switch-row__title {
  font-weight: 600;
  color: var(--ink);
  font-size: var(--text-md);
  line-height: 1.35;
}

.switch-row__help {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: 1.45;
}

/* The pill itself */
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 26px;
  margin-top: 2px;
}

.switch input[type="checkbox"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.switch__track {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 999px;
  transition: background 0.18s ease;
}

.switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(27, 19, 14, 0.25);
  transition: transform 0.18s ease;
}

.switch input[type="checkbox"]:checked + .switch__track {
  background: var(--sage);
}

.switch input[type="checkbox"]:checked + .switch__track::after {
  transform: translateX(18px);
}

.switch input[type="checkbox"]:focus-visible + .switch__track {
  box-shadow: 0 0 0 3px var(--ring);
}

.switch input[type="checkbox"]:disabled + .switch__track {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Numeric child input that depends on a parent switch */
.switch-child-input {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 0 var(--space-6);
  padding: var(--space-3);
  font-size: var(--text-sm);
  color: var(--muted);
}

.switch-child-input input[type="number"] {
  width: 90px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--warm-white);
  font: inherit;
  color: var(--ink);
}

.switch-child-input.is-disabled {
  opacity: 0.5;
}

.switch-child-input.is-disabled input {
  pointer-events: none;
  background: var(--bg);
}

/* Card-level section header + grouping for the settings form */
.settings-card-header h3 {
  margin: 0 0 4px;
}

.settings-section-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--space-5) 0 var(--space-4);
}

.settings-save-row {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--space-4);
}

/* Estate-status danger zone — visual separation of risky actions */
.danger-zone {
  margin-top: var(--space-5);
  padding: var(--space-4);
  border: 1px dashed #c45a3f;
  border-radius: var(--radius-md);
  background: rgba(196, 90, 63, 0.04);
}

.danger-zone__title {
  font-weight: 600;
  color: #8a3a23;
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 var(--space-3);
}

.danger-zone .item-actions {
  margin: 0;
}

@media (max-width: 600px) {
  .switch-row {
    padding: var(--space-3);
  }
  .switch-row--child,
  .switch-child-input {
    margin-left: var(--space-4);
  }
}

/* --- Inline invite/add form --- */
.inline-invite-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
}

.inline-invite-field {
  flex: 1;
}

.inline-invite-field label {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 4px;
}

.inline-invite-field input,
.inline-invite-field select {
  width: 100%;
}

@media (max-width: 600px) {
  .inline-invite-form {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 960px) {
  .admin-page-header {
    grid-template-columns: 1fr;
  }

  .admin-page-header {
    align-items: stretch;
  }

  .admin-stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-settings-grid,
  .admin-settings-summary {
    grid-template-columns: 1fr;
  }
}

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

/* --- FAQ grid --- */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.faq-card {
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.faq-card h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 600;
}

.faq-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.section-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.section-subtitle {
  margin: 2px 0 0;
  font-size: 0.85rem;
}

.items-overview-page main {
  gap: 24px;
}

.items-overview-section {
  display: grid;
  gap: 18px;
}

.items-overview-hero {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 20px;
  padding: 18px 22px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at top right, rgba(212, 232, 229, 0.75), transparent 34%),
    linear-gradient(135deg, rgba(255, 251, 246, 0.96), rgba(232, 220, 203, 0.88));
  box-shadow: var(--shadow-card);
}

.items-overview-copy {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  width: auto;
}

.items-overview-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  justify-content: flex-start;
  width: auto;
}

.items-overview-subtitle {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.4;
  white-space: nowrap;
  text-align: left;
}

.items-overview-meta .btn {
  box-shadow: 0 14px 28px rgba(173, 91, 54, 0.18);
  white-space: nowrap;
}

.items-overview-controls {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(217, 203, 187, 0.9);
  background: rgba(255, 251, 246, 0.74);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
}

/* --- Toolbar --- */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  flex-wrap: wrap;
}

.search-bar {
  position: relative;
  flex: 1 1 240px;
  max-width: 380px;
  min-width: 160px;
}

.search-bar-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search-bar input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  font-size: 0.9rem;
  color: var(--ink);
}

.search-bar input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}

/* --- Category chips --- */
.category-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.chip:hover {
  background: var(--bg-alt);
}

.chip.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* --- Legacy filter layout (still used by section-actions in other pages) --- */
.section-actions {
  display: grid;
  gap: 12px;
  width: 100%;
  align-items: start;
}

.section-tools {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.section-tools .section-actions {
  width: auto;
  margin-right: auto;
}

.section-tools .view-toggle {
  align-self: flex-start;
}

.filter-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.filter-toggle-btn svg {
  flex-shrink: 0;
}

.filter-control,
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-control input,
.filter-bar > input {
  width: 220px;
  max-width: 100%;
  flex: 1 1 220px;
}

.filter-toggle-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px dashed var(--border);
  background: var(--warm-white);
  position: relative;
  z-index: 5;
}

.filter-panel[hidden] {
  display: none;
}

.filter-panel-header {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.filter-panel-title {
  font-weight: 600;
}

.filter-panel-actions {
  width: 100%;
  margin-top: 10px;
}

/* No-JS fallback: with JS active the filters fetch on change, so the
   explicit submit button is redundant. */
.has-js .filter-panel-actions {
  display: none;
}

.items-pager {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 24px 0 8px;
}

.items-pager-status {
  margin: 0;
}

.items-pager-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(33, 26, 20, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 4;
}

.filter-overlay[hidden] {
  display: none;
}

.filters-open .filter-overlay {
  opacity: 1;
  pointer-events: auto;
}

.section-primary-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.bulk-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-bar .bulk-actions {
  flex-wrap: nowrap;
}

.bulk-actions select {
  min-width: 180px;
  width: auto;
}

.bulk-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0;
  z-index: 6;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.bulk-select:hover {
  background: var(--bg-alt);
}

.bulk-select:hover::after {
  content: attr(title);
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  background: var(--charcoal);
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
}

.bulk-select input {
  width: 14px;
  height: 14px;
  margin: 0;
}

@media (max-width: 960px) {
  .section-header {
    align-items: flex-start;
  }

  .items-overview-hero {
    padding: 22px;
  }

  .items-overview-controls .bulk-actions {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }

  .section-tools {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .toolbar {
    flex-wrap: wrap;
  }

  .toolbar-left {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .items-overview-hero {
    padding: 20px 18px;
    border-radius: 22px;
  }

  .items-overview-copy {
    align-items: flex-start;
  }

  .items-overview-meta {
    width: 100%;
    gap: 10px;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .items-overview-meta .btn {
    justify-content: center;
  }

  .items-overview-controls {
    padding: 14px;
    border-radius: 20px;
  }

  .items-toolbar {
    gap: 12px;
  }

  .items-overview-controls .search-bar {
    max-width: none;
  }

  .items-overview-controls .filter-panel {
    padding: 14px;
  }

  .items-overview-controls .checkbox.inline {
    width: 100%;
    justify-content: flex-start;
  }

  .filter-panel {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    border-style: solid;
    box-shadow: 0 8px 20px var(--shadow);
  }

  .filter-panel-header {
    display: flex;
  }

  .category-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }

.category-chips::-webkit-scrollbar {
    display: none;
  }

  .bulk-actions {
    display: none;
  }

  .toolbar {
    margin-bottom: 8px;
  }

  .section-subtitle {
    display: none;
  }
}

.view-toggle {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--warm-white);
}

.view-toggle .btn {
  box-shadow: none;
}

.view-toggle .btn.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.items-overview-controls .toolbar-left {
  gap: 12px;
}

.items-toolbar {
  gap: 16px;
}

.items-overview-controls .search-bar {
  flex: 1 1 320px;
  max-width: 460px;
}

.items-overview-controls .search-bar input {
  min-height: 44px;
  padding: 10px 14px 10px 40px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.items-overview-controls .filter-toggle-btn,
.items-overview-controls .btn.ghost.small {
  min-height: 42px;
  border-radius: 12px;
}

.items-overview-controls .bulk-actions {
  margin-left: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
}

.items-overview-controls .bulk-actions select {
  min-height: 42px;
  border-radius: 12px;
  background: var(--card);
}

.items-overview-controls .view-toggle {
  padding: 4px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
}

.items-overview-controls .view-toggle .btn {
  min-height: 42px;
  border-radius: 12px;
  padding: 0 14px;
}

.items-category-chips {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 2px 2px;
}

.items-category-chips::-webkit-scrollbar {
  display: none;
}

.items-category-chips .chip {
  min-height: 38px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
  color: var(--ink);
  border-color: rgba(99, 88, 77, 0.22);
}

.items-category-chips .chip.is-active {
  background: var(--ink);
  color: var(--warm-white);
  border-color: var(--ink);
  box-shadow: 0 10px 20px rgba(33, 26, 20, 0.18);
}

.items-overview-controls .filter-panel {
  padding: 16px;
  border-style: solid;
  border-radius: 20px;
  border-color: rgba(217, 203, 187, 0.9);
  background: rgba(255, 255, 255, 0.56);
}

.items-overview-controls .filter-panel input[list] {
  flex: 1 1 240px;
  min-height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  font-weight: 600;
}

.items-overview-controls .filter-panel input[list]::placeholder {
  color: var(--muted);
  font-weight: 500;
}

.items-overview-controls .checkbox.inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.78);
}

@media (max-width: 720px) {
  .view-toggle {
    display: none;
  }
}

.item-detail-page main {
  gap: 24px;
}

.item-detail-shell {
  display: grid;
  gap: 20px;
}

.item-detail-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.item-detail-heading {
  display: grid;
  gap: 8px;
}

.item-detail-kicker {
  margin: 0;
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.item-detail-heading h1 {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.item-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
  gap: 22px;
  align-items: start;
}

.item-detail-main,
.item-detail-rail {
  display: grid;
  gap: 18px;
}

.item-detail-rail {
  position: sticky;
  top: 24px;
}

.detail-card {
  padding: 20px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: rgba(255, 251, 246, 0.94);
  box-shadow: var(--shadow-card);
}

.item-detail-media-card {
  display: grid;
  gap: 14px;
}

.item-detail-image {
  border-radius: 22px;
  background: #f4ede3;
}

.item-detail-image img {
  width: 100%;
  min-height: 380px;
  max-height: 640px;
  object-fit: cover;
  border-radius: 22px;
}

.item-detail-gallery {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 0;
}

.item-detail-gallery .image-button img {
  height: 120px;
  border-radius: 16px;
}

.item-detail-content-card .item-body {
  gap: 16px;
}

.item-detail-content-card .item-header {
  gap: 10px;
}

.item-detail-content-card .item-detail-meta {
  gap: 14px;
}

.item-detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.item-detail-section-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.item-detail-status-card,
.item-detail-actions-card {
  display: grid;
  gap: 14px;
}

.item-detail-claim {
  margin: 0;
}

.item-detail-claim .claim-status {
  display: inline-flex;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 248, 240, 0.92);
}

.item-detail-claim .claim-status.open {
  background: rgba(212, 232, 229, 0.88);
}

.item-detail-facts {
  display: grid;
  gap: 12px;
}

.item-detail-fact {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(242, 237, 230, 0.7);
}

.item-detail-fact strong {
  font-size: 0.96rem;
  line-height: 1.45;
}

.item-detail-actions {
  display: grid;
  gap: 10px;
}

.item-detail-actions > * {
  margin: 0;
}

.item-detail-actions .btn,
.item-detail-actions a.btn {
  width: 100%;
  justify-content: center;
}

.item-detail-flag-toggles {
  display: grid;
  gap: 10px;
}

.item-detail-flag-toggles form {
  margin: 0;
}

.item-detail-comments-card {
  display: grid;
  gap: 14px;
}

.item-detail-comments-card .comment-form {
  margin-top: 6px;
}

@media (max-width: 960px) {
  .item-detail-layout {
    grid-template-columns: 1fr;
  }

  .item-detail-rail {
    position: static;
  }
}

@media (max-width: 720px) {
  .detail-card {
    padding: 16px;
    border-radius: 20px;
  }

  .item-detail-image img {
    min-height: 260px;
  }

  .item-detail-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.items-grid {
  display: grid;
  gap: 24px;
  transition: gap 0.2s ease;
}

.items-grid.grid {
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 18px;
  align-items: start;
  margin-top: 8px;
}

.items-grid.grid .item-card {
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  align-content: start;
  height: fit-content;
  padding: 0;
  gap: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(27, 19, 14, 0.06);
}

.items-grid.grid .item-body {
  gap: 2px;
}

.items-grid.grid .item-card:hover {
  box-shadow: 0 4px 12px rgba(27, 19, 14, 0.10);
  transform: translateY(-1px);
}

.items-grid.grid .item-card > *:not(.item-image):not(.bulk-select) {
  padding-left: 10px;
  padding-right: 10px;
}

.items-grid.grid .item-body {
  padding-bottom: 10px;
}

.items-grid.grid .item-header {
  padding-top: 2px;
}

.items-grid.grid .item-image {
  border-radius: 0;
  width: 100%;
}

.items-grid.grid .item-image-stack {
  padding: 0;
}

.items-grid.grid .item-image img {
  width: 100%;
  height: 165px;
  border-radius: 0;
  border: none;
}

.items-grid.grid .item-header h3 {
  font-size: 0.88rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.items-grid.grid .item-description {
  display: none;
}

.items-grid.grid .item-meta {
  font-size: 0.75rem;
  gap: 8px;
}

.items-grid.grid .item-actions {
  gap: 6px;
  flex-wrap: nowrap;
  justify-content: space-between;
}

.items-grid.grid .item-actions .btn {
  min-width: 0;
  flex: 1 1 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.items-grid.grid .btn {
  padding: 5px 10px;
  font-size: 0.78rem;
  border-radius: 8px;
  gap: 3px;
}


.item-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) 1.1fr;
  gap: 20px;
  padding: 20px;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  position: relative;
  transition: box-shadow 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.item-card:hover {
  box-shadow: var(--shadow-elevated);
  border-color: var(--stone-light);
  transform: translateY(-2px);
}

.item-card[data-recycling="1"] {
  background: linear-gradient(135deg, rgba(200, 235, 218, 0.98), rgba(228, 243, 236, 0.6) 85%);
  border-color: #7dc4a5;
  border-left: 4px solid #4aa87c;
}

.item-card[data-donating="1"] {
  background: linear-gradient(135deg, rgba(232, 210, 230, 0.98), rgba(243, 232, 242, 0.6) 85%);
  border-color: #c49dc2;
  border-left: 4px solid #a06e9e;
}

.item-card[data-donation-keep="1"] {
  background: linear-gradient(135deg, rgba(255, 210, 110, 0.95), rgba(255, 235, 180, 0.6) 85%);
  border-color: #d4a030;
  border-left: 4px solid #c08c10;
}

.item-card[data-claimed="1"] {
  background: linear-gradient(135deg, rgba(245, 218, 178, 0.95), rgba(251, 234, 210, 0.6) 85%);
  border-color: #d4a060;
  border-left: 4px solid #b8842e;
}

.item-card-placeholder {
  border-radius: 24px;
  border: 1px dashed var(--border);
  background: rgba(255, 250, 244, 0.5);
}

.item-card.is-collapsed:not(.is-overlay) .item-header .badge,
.item-card.is-collapsed:not(.is-overlay) .item-flag-toggles,
.item-card.is-collapsed:not(.is-overlay) .category-tags,
.item-card.is-collapsed:not(.is-overlay) .item-description,
.item-card.is-collapsed:not(.is-overlay) .claim,
.item-card.is-collapsed:not(.is-overlay) .interest-list,
.item-card.is-collapsed:not(.is-overlay) .comments {
  display: none;
}

.item-card.is-collapsed:not(.is-overlay) .item-meta span {
  display: none;
}

.item-card.is-collapsed:not(.is-overlay) .item-meta .item-meta__comments,
.item-card.is-collapsed:not(.is-overlay) .item-meta .item-meta__value {
  display: inline-flex;
}

.item-card.is-collapsed:not(.is-overlay) .item-actions > * {
  display: none;
}

.item-card.is-collapsed:not(.is-overlay) .item-actions > .item-action--interest,
.item-card.is-collapsed:not(.is-overlay) .item-actions > .item-action--claim {
  display: inline-flex;
}

.item-card.is-collapsed:not(.is-overlay) .item-actions {
  margin-top: auto;
}

.item-action--claim {
  margin-left: auto;
}

.item-card.is-collapsed:not(.is-overlay) {
  cursor: pointer;
}

.items-overview-section .items-grid {
  gap: 20px;
}

.items-overview-section .items-grid.grid {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
  margin-top: 0;
}

.items-overview-section .item-card {
  gap: 22px;
  padding: 18px;
  border-radius: 26px;
}

.items-overview-section .item-card.is-collapsed:not(.is-overlay) .item-header .badge,
.items-overview-section .item-card.is-collapsed:not(.is-overlay) .category-tags {
  display: flex;
}

.items-overview-section .items-grid:not(.grid) .item-card.is-collapsed:not(.is-overlay) .item-description {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.items-overview-section .items-grid:not(.grid) .item-card.is-collapsed:not(.is-overlay) .claim {
  display: flex;
}

.items-overview-section .items-grid.grid .item-card.is-collapsed:not(.is-overlay) .item-header .badge {
  display: none;
}

.items-overview-section .item-header {
  gap: 8px;
}

.items-overview-section .item-header h3 {
  font-size: 1.28rem;
}

.items-overview-section .badge {
  font-size: 0.78rem;
}

.items-overview-section .item-description {
  line-height: 1.58;
}

.items-overview-section .item-meta {
  gap: 12px;
}

.items-overview-section .claim-status {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 248, 240, 0.92);
  font-size: 0.82rem;
}

.items-overview-section .claim-status.open {
  background: rgba(212, 232, 229, 0.92);
}

.items-overview-section .item-actions {
  gap: 10px;
}

.items-overview-section .item-actions .btn {
  border-radius: 12px;
}

.items-overview-section .items-grid.grid .item-card {
  gap: 0;
  min-height: 100%;
  overflow: hidden;
}

.items-overview-section .items-grid.grid .item-body {
  gap: 10px;
  padding: 14px 14px 16px;
}

.items-overview-section .items-grid.grid .item-header h3 {
  font-size: 1.04rem;
  white-space: normal;
  overflow: visible;
  text-overflow: initial;
}

.items-overview-section .items-grid.grid .category-tags {
  display: flex;
}

.items-overview-section .items-grid.grid .item-image img {
  height: 220px;
}

.items-overview-section .items-grid.grid .item-actions {
  justify-content: stretch;
}

.items-overview-section .empty-state {
  padding: 34px 28px;
  border-radius: 24px;
  border: 1px dashed var(--border);
  background: rgba(255, 251, 246, 0.82);
  box-shadow: var(--shadow-soft);
}

@media (max-width: 720px) {
  .items-overview-section .item-card,
  .items-overview-section .items-grid.grid .item-card {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .items-overview-section .items-grid.grid {
    grid-template-columns: 1fr;
  }

  .items-overview-section .items-grid.grid .item-image img {
    height: 240px;
  }

  .items-overview-section .items-grid:not(.grid) .item-card.is-collapsed:not(.is-overlay) .item-header .badge,
  .items-overview-section .items-grid:not(.grid) .item-card.is-collapsed:not(.is-overlay) .category-tags,
  .items-overview-section .items-grid:not(.grid) .item-card.is-collapsed:not(.is-overlay) .item-description,
  .items-overview-section .items-grid:not(.grid) .item-card.is-collapsed:not(.is-overlay) .claim {
    display: none;
  }
}

.item-card.is-overlay .bulk-select {
  display: none;
}

.item-image {
  overflow: hidden;
  border-radius: 18px;
}

.item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--border);
  transition: transform 0.3s ease;
}

.item-card:hover .item-image img {
  transform: scale(1.03);
}

.item-image-stack {
  position: relative;
  padding-right: 16px;
  padding-bottom: 16px;
  overflow: visible;
}

.item-image-slide {
  display: block;
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translate(0, 0) scale(0.98);
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.item-image-slide.is-active {
  position: relative;
  z-index: 3;
  opacity: 1;
  transform: translate(0, 0) scale(1);
  pointer-events: auto;
}

.item-image-slide.is-next {
  z-index: 2;
  opacity: 1;
  transform: translate(8px, 8px) scale(0.985);
}

.item-image-slide.is-back {
  z-index: 1;
  opacity: 1;
  transform: translate(16px, 16px) scale(0.97);
}

.item-image-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  /* a11y A12: 44px touch target (was 36px). */
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(27, 19, 14, 0.16);
  background: rgba(255, 250, 244, 0.92);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  z-index: 4;
}

.item-image-nav--prev {
  left: 10px;
}

.item-image-nav--next {
  right: 10px;
}

.item-image-counter {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(24, 18, 14, 0.7);
  color: #fff;
  font-size: 0.78rem;
  line-height: 1;
  z-index: 4;
}

.item-card.is-collapsed:not(.is-overlay) .item-image-nav,
.item-card.is-collapsed:not(.is-overlay) .item-image-counter {
  display: none;
}

.item-extra-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.item-extra-gallery-card {
  display: grid;
  gap: 8px;
}

.item-extra-gallery .image-button img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.image-button {
  display: block;
  padding: 0;
  border: none;
  background: none;
  width: 100%;
  cursor: zoom-in;
}

.image-button img {
  display: block;
}

.image-modal {
  position: fixed;
  inset: 0;
  background: rgba(24, 18, 14, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}

.image-modal.open {
  display: flex;
}

.image-modal-content {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  overflow: hidden;
  background: var(--warm-white);
  border-radius: 20px;
  padding: 24px;
  border: 1px solid var(--border);
}

.image-modal-content img {
  display: block;
  max-width: 100%;
  max-height: calc(95vh - 48px);
  width: auto;
  height: auto;
  object-fit: contain;
  touch-action: none;
  will-change: transform;
  transform-origin: 0 0;
}

.image-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: var(--card);
  color: var(--ink);
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(27, 19, 14, 0.2);
}

.item-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24, 18, 14, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
  overflow: auto;
}

.item-overlay.open {
  display: flex;
}

.item-overlay-content {
  position: relative;
  width: min(1080px, calc(100vw - 48px));
  max-height: 92vh;
  overflow: auto;
  background: var(--warm-white);
  border-radius: 24px;
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px var(--shadow);
  box-sizing: border-box;
}

.item-overlay .item-card {
  box-shadow: none;
  border: none;
  padding: 0;
  grid-template-columns: minmax(300px, 0.95fr) 1.05fr;
}

.item-overlay .item-image img {
  height: 360px;
}

.item-overlay-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: var(--warm-white);
  color: var(--ink);
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(27, 19, 14, 0.2);
  z-index: 10;
}

.cropper-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24, 18, 14, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1200;
}

.cropper-overlay.open {
  display: flex;
}

.cropper-panel {
  width: min(900px, 94vw);
  background: var(--card);
  border-radius: 22px;
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px var(--shadow);
  display: grid;
  gap: 16px;
}

.cropper-panel h2 {
  margin: 0;
  font-family: 'Playfair Display', serif;
}

.cropper-stage {
  position: relative;
  width: 100%;
  height: 60vh;
  background: var(--charcoal);
  border-radius: 0;
  overflow: hidden;
  border: 2px solid var(--cream);
  touch-action: none;
}

.cropper-stage img {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  user-select: none;
  touch-action: none;
  cursor: grab;
  z-index: 1;
}

.cropper-stage img.dragging {
  cursor: grabbing;
}

.cropper-frame {
  position: absolute;
  border: 2px solid #111;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.28);
  cursor: move;
  z-index: 2;
  touch-action: none;
}

.cropper-handle {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: #111;
  border: 2px solid #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.cropper-handle.nw {
  top: 6px;
  left: 6px;
  cursor: nwse-resize;
}

.cropper-handle.ne {
  top: 6px;
  right: 6px;
  cursor: nesw-resize;
}

.cropper-handle.sw {
  bottom: 6px;
  left: 6px;
  cursor: nesw-resize;
}

.cropper-handle.se {
  bottom: 6px;
  right: 6px;
  cursor: nwse-resize;
}

.cropper-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.cropper-toggle {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 10px;
}

.cropper-zoom {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cropper-overlay.cropper-disabled .cropper-frame {
  display: none;
}

.cropper-zoom input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 180px;
  max-width: 240px;
  flex: 1;
  height: 18px;
  background: transparent;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

.cropper-zoom input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
}

.cropper-zoom input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  margin-top: -5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cropper-zoom input[type="range"]::-moz-range-track {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
}

.cropper-zoom input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cropper-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.item-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.item-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.item-header h3 {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.item-flag-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.item-flag-toggles form {
  margin: 0;
}

.item-flag-toggles .badge {
  border: 1px solid var(--border);
  cursor: pointer;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 0.85rem;
}

.badge[hidden] {
  display: none !important;
}

.badge.category {
  background: #efe7dc;
  color: #5a4b40;
}

.badge.recycling {
  background: #c8ebda;
  color: #1a5740;
  border: 1px solid #7dc4a5;
  font-weight: 600;
}

.badge.donating {
  background: #e8d2e6;
  color: #5a2060;
  border: 1px solid #c49dc2;
  font-weight: 600;
}

.badge.donation-keep {
  background: #ffd26e;
  color: #5a3000;
  border: 1px solid #d4a030;
  font-weight: 600;
}

.badge.selling {
  background: #cfe3f5;
  color: #1c4a70;
  border: 1px solid #8fbcdf;
  font-weight: 600;
}

.badge.sold {
  background: #d7e8c8;
  color: #3a5720;
  border: 1px solid #a5c47d;
  font-weight: 600;
}

.badge.claim {
  background: #f5dab2;
  color: #6e4010;
  border: 1px solid #d4a060;
  font-weight: 600;
}

.badge.decided {
  background: #e0cce8;
  color: #4a1a70;
  border: 1px solid #b08cc0;
  font-weight: 600;
}

.badge.archived {
  background: #d5dee5;
  color: #2a3a47;
  border: 1px solid #9aacba;
  font-weight: 600;
}

/* --- Support ticket list --- */
.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.ticket-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1rem;
  background: var(--card);
  text-decoration: none;
  color: inherit;
  transition: background 0.12s;
}
.ticket-row:not(:last-child) {
  border-bottom: 1px solid var(--border);
}
.ticket-row:hover {
  background: var(--bg-alt);
}
.ticket-row--unread {
  background: rgba(173, 91, 54, 0.04);
}
.ticket-row--unread:hover {
  background: rgba(173, 91, 54, 0.08);
}
.ticket-row-main {
  min-width: 0;
  flex: 1;
}
.ticket-row-subject {
  font-size: 0.95rem;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.ticket-row--unread .ticket-row-subject {
  font-weight: 600;
}
.ticket-row-meta {
  font-size: 0.8rem;
  margin-top: 0.2rem;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.ticket-row-status {
  flex-shrink: 0;
}

/* Unread badge */
.badge-unread {
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
}

/* Support status badges */
.badge-status-open {
  background: var(--status-success-bg);
  color: var(--sage, var(--accent-2));
}
.badge-status-in_progress {
  background: #dce8f5;
  color: #2a5a8c;
}
.badge-status-waiting_for_user {
  background: #fbecd0;
  color: #8a6320;
}
.badge-status-resolved {
  background: #e0e8e0;
  color: #3a6040;
}
.badge-status-closed {
  background: var(--bg-alt);
  color: var(--muted);
}
.badge-status-spam {
  background: #f0d8d8;
  color: #8c3030;
}

.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.category-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #efe7dc;
  color: #5a4b40;
  font-size: 0.85rem;
}

.tag-remove {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  /* a11y A12: 44px touch target for the older/mobile audience (WCAG 2.5.8). */
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.item-description {
  color: var(--muted);
  white-space: pre-wrap;
  margin: 0;
  line-height: 1.62;
}

.item-meta {
  display: flex;
  gap: 16px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
  flex-wrap: wrap;
}

.item-meta__value {
  font-weight: 600;
  color: var(--ink);
}

.claim {
  display: flex;
  align-items: center;
  gap: 10px;
}

.claim-status {
  font-weight: 600;
  color: var(--accent-dark);
}

.claim-status.open {
  color: var(--accent-2);
}

.item-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.item-action--interest {
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.item-action--interest:active {
  transform: scale(0.95);
}

.item-action--interest.is-liked {
  background: var(--sage-light);
  color: var(--sage);
  border-color: var(--sage);
}

.interest-list {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
}

.interest-label {
  font-weight: 600;
  color: var(--ink);
}

.interest-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.interest-tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: #efe4d6;
  color: var(--muted);
  font-size: 0.85rem;
}

.comments {
  grid-column: 1 / -1;
  border-top: 1px dashed var(--border);
  padding-top: 16px;
}

.comments h4 {
  margin: 0 0 10px;
}

.comment {
  padding: 10px 12px;
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 10px;
}

.comment-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
}

.comment-body {
  margin: 6px 0 0;
  white-space: pre-wrap;
}

.comment-delete {
  margin-top: 6px;
}

.comment-delete .link {
  font-size: 0.85rem;
  color: var(--muted);
}

.upload-options {
  display: grid;
  gap: 12px;
}

.upload-options label {
  width: 100%;
}

.comment-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-start;
}

textarea,
input,
select {
  width: 100%;
  border-radius: 11px;
  border: 1px solid var(--border);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.98rem;
  line-height: 1.45;
  background: var(--warm-white);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

textarea:focus,
input:focus,
select:focus {
  outline: none;
  border-color: var(--stone-light);
  box-shadow: 0 0 0 3px var(--ring);
  background: #fff;
}

textarea {
  flex: 1;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 560;
  letter-spacing: 0.002em;
}

.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.checkbox input {
  width: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.012em;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 0.15s ease, filter 0.15s ease, background-color 0.15s ease;
  box-shadow: var(--shadow-soft);
}

.btn:hover {
  box-shadow: var(--shadow-card);
  filter: saturate(1.02);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring), 0 8px 18px rgba(173, 91, 54, 0.2);
}

/* Unified focus ring for interactive elements without their own focus styles */
a:focus-visible,
summary:focus-visible,
[role="button"]:not(.btn):focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
  border-radius: var(--radius-sm);
}

.link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
  border-radius: 2px;
}

.btn:disabled {
  background: var(--disabled-bg);
  cursor: not-allowed;
  box-shadow: none;
}

.btn.small {
  padding: 8px 14px;
  font-size: 0.9rem;
}

.btn.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn.ghost:hover {
  background: var(--bg-alt);
  box-shadow: none;
}

.btn.accent {
  background: var(--accent-2);
  box-shadow: 0 6px 14px rgba(50, 111, 102, 0.2);
}

.btn.btn-recycling {
  background: #bfe6d2;
  color: #245a46;
  box-shadow: 0 8px 18px rgba(63, 138, 106, 0.2);
}

.btn.btn-donating {
  background: #e7c8e8;
  color: #5d2a66;
  box-shadow: 0 8px 18px rgba(111, 65, 132, 0.2);
}

.btn.btn-selling,
.btn.btn-sold {
  background: #c8ddf0;
  color: #1c4a70;
  box-shadow: 0 8px 18px rgba(63, 106, 138, 0.2);
}

.mark-sold-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.sale-amount-input {
  width: 110px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  padding: 6px 8px;
  font-size: 0.875rem;
}

.getting-started-steps {
  list-style: none;
  margin: 12px 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.getting-started-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.getting-started-steps li.is-done {
  color: var(--muted);
}

.getting-started-check {
  font-weight: 700;
  color: var(--accent-2);
}

.attention-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.attention-list li::before {
  content: '\2022';
  color: var(--accent);
  margin-right: 8px;
}

.btn.interest-active {
  background: transparent;
  color: var(--accent-dark);
  border: 2px solid var(--accent-dark);
  box-shadow: none;
}

.btn.interest-active:hover {
  background: rgba(33, 26, 20, 0.045);
  box-shadow: none;
}

.btn.danger {
  background: transparent;
  color: #b4462a;
  border: 1px solid rgba(180, 70, 42, 0.3);
  box-shadow: none;
}

.btn.danger:hover {
  background: rgba(180, 70, 42, 0.08);
  box-shadow: none;
}

.btn.hero {
  padding: 14px 28px;
  font-size: 1.05rem;
  font-weight: 600;
  box-shadow: var(--shadow-card);
}

.btn.hero-outline {
  padding: 14px 28px;
  font-size: 1.05rem;
  font-weight: 600;
  background: transparent;
  color: var(--accent-dark);
  border: 2px solid var(--accent);
  box-shadow: none;
}

.btn.hero-outline:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-card);
}

.btn.sage {
  background: var(--sage);
  color: #fff;
  box-shadow: 0 6px 14px rgba(50, 111, 102, 0.2);
}

.btn.sage:hover {
  box-shadow: 0 8px 18px rgba(50, 111, 102, 0.28);
}

.btn.xl {
  height: 56px;
  padding: 14px 40px;
  font-size: 1.1rem;
}

.link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
}

.count {
  background: rgba(255, 255, 255, 0.25);
  padding: 0 3px;
  border-radius: 999px;
}

.flash {
  width: fit-content;
  max-width: min(90%, 560px);
  margin: 12px auto;
  padding: 10px 20px;
  text-align: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--warm-white);
  font-weight: 500;
  box-shadow: var(--shadow-soft);
}

.flash.error {
  border-color: var(--status-error-border);
  color: var(--status-error-text);
}

.flash.success {
  border-color: var(--status-success-border);
  color: var(--status-success-text);
}

.flash-inline {
  margin-top: 8px;
  margin-bottom: 8px;
}

.flash-fade {
  opacity: 0;
  transition: opacity 300ms ease-out;
}

.form-section {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.new-item-shell {
  width: min(1040px, 100%);
  margin: 0 auto;
  align-items: stretch;
}

.new-item-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  width: 100%;
  margin-bottom: 20px;
}

.new-item-header-copy {
  display: grid;
  gap: 10px;
}

.new-item-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(173, 91, 54, 0.08);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.new-item-header h1 {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.08;
}

.new-item-mode-switch {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.new-item-card {
  width: 100%;
  max-width: 760px;
  align-self: center;
  margin: 0 auto;
}

.new-item-mode-note {
  margin-top: 0;
}

.form-card {
  width: min(520px, 100%);
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.form-card.wide,
.form-card:has(.plan-table) {
  width: min(760px, 100%);
}

.form-card.full-width {
  width: 100%;
  max-width: 100%;
}

.form-card h1 {
  margin-top: 0;
  font-family: 'Playfair Display', serif;
}

.compliance-section {
  margin-bottom: 1.5rem;
}

.compliance-section h2 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.compliance-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 0.92rem;
  margin-bottom: 0.5rem;
}

.compliance-box ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.compliance-box li {
  margin-bottom: 0.25rem;
}

.invite-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.invite-row:last-child {
  border-bottom: none;
}

.invite-row input[type="email"] {
  grid-column: 1 / -1;
}

.invite-row select {
  width: auto;
  min-width: 140px;
}

.btn-icon {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px 10px;
  color: var(--muted);
  line-height: 1;
}

.btn-icon:hover {
  color: var(--danger, var(--status-danger-border));
  border-color: var(--danger, var(--status-danger-border));
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
}

.category-picker {
  display: grid;
  gap: 10px;
}

.category-picker-input {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

.user-card {
  background: var(--card);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  overflow-x: auto;
}

.activity-card {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.activity-page-shell {
  width: min(960px, 100%);
  margin: 0 auto;
}

.activity-page-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
}

.activity-page-intro {
  display: grid;
  gap: 10px;
}

.activity-page-header h1 {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.08;
}

.activity-page-header .muted {
  max-width: 58ch;
  margin: 0;
}

.activity-page-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(173, 91, 54, 0.08);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.activity-page-summary {
  min-width: 180px;
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  text-align: left;
}

.activity-page-summary strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
  color: var(--ink);
}

.activity-page-summary span {
  display: block;
  margin-top: 6px;
  font-weight: 600;
  color: var(--muted);
}

.activity-page-summary p {
  margin: 10px 0 0;
}

.activity-empty-state {
  margin-top: 20px;
}

.activity-timeline {
  position: relative;
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.activity-timeline::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 18px;
  width: 2px;
  background: linear-gradient(180deg, rgba(173, 91, 54, 0.24), rgba(173, 91, 54, 0.05));
}

.activity-timeline-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  padding: 18px 20px;
}

.activity-timeline-marker {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  margin-top: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 6px rgba(173, 91, 54, 0.12);
}

.activity-timeline-body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.activity-list li {
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.notification-item.unread {
  border-left: 4px solid var(--accent);
  background: rgba(173, 91, 54, 0.04);
}

.notification-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.notification-link:hover {
  text-decoration: none;
}

.activity-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.activity-main-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.activity-label {
  font-weight: 600;
}

.activity-time {
  color: var(--muted);
  font-size: 0.85rem;
}

.activity-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.activity-meta-inline {
  color: var(--muted);
}

.activity-item-link {
  display: inline-flex;
  width: fit-content;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}

.activity-item-link:hover {
  text-decoration: underline;
}

.activity-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--bg-alt);
  border: 1px solid rgba(173, 91, 54, 0.08);
  white-space: pre-wrap;
}

@media (max-width: 720px) {
  .activity-page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .activity-page-summary {
    min-width: 0;
  }

  .activity-timeline::before {
    left: 14px;
  }

  .activity-timeline-card {
    grid-template-columns: auto 1fr;
    gap: 12px;
    padding: 16px;
  }

  .activity-timeline-marker {
    width: 14px;
    height: 14px;
  }
}

/* --- Data table scroll container (flush with card edges) --- */
.data-table-scroll {
  overflow-x: auto;
  margin: 0 -24px;
  padding: 0 24px;
}

.user-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.user-table.data-table {
  min-width: 750px;
}

.user-table th,
.user-table td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.user-table thead th {
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 1;
}

.user-table td {
  font-size: 0.875rem;
  color: var(--ink);
}

.user-table td.td-muted {
  color: var(--muted);
}

.user-table th {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.user-table .text-center {
  text-align: center;
}

.user-table .text-right {
  text-align: right;
}

/* Compact checkbox for data tables */
.table-checkbox {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid var(--border);
  cursor: pointer;
  accent-color: var(--accent);
}

/* Compact share input */
.share-input {
  width: 72px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  padding: 6px 8px;
  font-size: 0.875rem;
  text-align: right;
}

.share-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.share-sum-indicator {
  font-size: 0.875rem;
  white-space: nowrap;
}

.share-sum-indicator.is-warning {
  color: var(--form-error);
  font-weight: 600;
}

@media (max-width: 720px) {
  .user-table {
    display: block;
    min-width: 0;
  }

  .user-table thead {
    display: none;
  }

  .user-table tbody {
    display: block;
  }

  .user-table tbody tr {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }

  .user-table tbody tr:last-child {
    border-bottom: none;
  }

  .user-table td {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 4px 12px;
    border-bottom: none;
    min-width: 0;
  }

  .user-table td::before {
    content: attr(data-label);
    flex-shrink: 0;
    width: 90px;
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .user-table td > * {
    min-width: 0;
  }

  .user-table td select {
    max-width: 100%;
    min-width: 0;
  }

  .user-table td .muted.small {
    word-break: break-all;
  }

  .user-table td:empty {
    display: none;
  }

  .user-table .table-total {
    background: rgba(33, 26, 20, 0.03);
    border-radius: 10px;
  }

  .user-card {
    overflow-x: hidden;
  }
}

.stack {
  display: grid;
  gap: 16px;
  margin: 16px 0;
}

.form-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.invite-note {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff2e1;
  color: var(--accent-dark);
  font-weight: 500;
}

.invite-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.invite-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
}

.invite-label {
  font-weight: 600;
  margin: 0 0 4px;
}

.invite-meta,
.invite-used,
.invite-open {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.invite-open {
  color: var(--accent-2);
  font-weight: 600;
}

.invite-actions {
  display: grid;
  gap: 10px;
}

.invite-actions input {
  font-size: 0.9rem;
}

.owner-panel {
  margin-top: 24px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff7ec;
  display: grid;
  gap: 12px;
}

.owner-panel h2 {
  margin: 0;
  font-size: 1.2rem;
}

.muted {
  color: var(--muted);
  line-height: 1.62;
}

.form-help {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 6px 0 0;
}

.form-error {
  color: var(--form-error);
  font-size: 0.85rem;
  margin: 6px 0 0;
}

.queue-step {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: 18px;
  background: var(--warm-white);
}

.queue-title {
  margin: 0;
  font-size: 1rem;
}

.new-item-step-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.new-item-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(173, 91, 54, 0.16);
}

.photo-queue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.queue-file-btn {
  position: relative;
  overflow: hidden;
}

.queue-file-btn input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.photo-queue-status {
  font-size: 0.9rem;
  color: var(--muted);
}

.photo-queue-preview {
  border-radius: 14px;
  overflow: hidden;
  background: #f2ece2;
  border: 1px solid var(--border);
}

.photo-queue-preview img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: #f5f0e6;
}

.photo-queue-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.queue-feedback {
  min-height: 20px;
}

.queue-feedback.is-success {
  color: #1f6b36;
}

@media (max-width: 720px) {
  .new-item-header {
    flex-direction: column;
    align-items: stretch;
  }

  .new-item-mode-switch {
    justify-content: flex-start;
  }
}

.queue-feedback.is-error {
  color: var(--form-error);
}

.choice-list {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.choice-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--warm-white);
  box-shadow: 0 8px 18px var(--shadow);
}

.choice-card .muted {
  font-size: 0.85rem;
}

.choice-card-clickable {
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.choice-card-clickable:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 18px var(--shadow), 0 0 0 1px var(--accent);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  border-radius: 20px;
  border: 1px dashed var(--border);
  background: var(--warm-white);
}

.empty-state p {
  max-width: 24rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.empty-state-icon {
  font-size: 2rem;
  margin-bottom: var(--space-2);
  opacity: 0.5;
}

.empty-state-title {
  margin: 0 0 var(--space-2);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--ink);
}

.empty-state-action {
  margin-top: var(--space-4);
}

/* ── Reusable data table ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: var(--space-3) var(--space-3);
  border-bottom: 1px solid var(--border);
}

.data-table thead th {
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 1;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.data-table td {
  font-size: var(--text-sm);
  color: var(--ink);
}

.data-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

.data-table .td-muted {
  color: var(--muted);
}

.data-table .td-nowrap {
  white-space: nowrap;
}

.data-table .td-numeric {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.data-table .td-actions {
  white-space: nowrap;
  text-align: right;
  width: 1%;
}

@media (max-width: 720px) {
  .data-table.data-table--responsive {
    display: block;
    min-width: 0;
  }

  .data-table.data-table--responsive thead {
    display: none;
  }

  .data-table.data-table--responsive tbody {
    display: block;
  }

  .data-table.data-table--responsive tbody tr {
    display: block;
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--border);
  }

  .data-table.data-table--responsive tbody tr:last-child {
    border-bottom: none;
  }

  .data-table.data-table--responsive td {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    border-bottom: none;
    min-width: 0;
  }

  .data-table.data-table--responsive td::before {
    content: attr(data-label);
    flex-shrink: 0;
    width: 90px;
    font-size: var(--text-xs);
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .data-table.data-table--responsive .td-actions {
    text-align: left;
    width: auto;
  }
}

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  flex-wrap: wrap;
  padding: var(--space-4) 0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.pagination a:hover {
  background: var(--bg-alt);
  color: var(--ink);
}

.pagination a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}

.pagination .is-active {
  background: var(--accent);
  color: #fff;
  pointer-events: none;
}

.pagination .is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.pagination .pagination-ellipsis {
  min-width: auto;
  padding: 0;
  pointer-events: none;
  color: var(--muted);
}

/* ── Utilities ── */
.nowrap { white-space: nowrap; }
.text-muted { color: var(--muted); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.site-footer-links {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.site-footer-links a {
  color: var(--muted);
}

.site-footer-links .link {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 22;
  display: flex;
  justify-content: center;
}

.cookie-banner[hidden],
.cookie-modal[hidden] {
  display: none !important;
}

.cookie-banner__card {
  width: min(900px, 100%);
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-elevated);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.cookie-banner__title {
  margin: 0;
  font-weight: 700;
  color: var(--ink);
}

.cookie-banner__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 23;
}

.cookie-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.36);
}

.cookie-modal__dialog {
  position: relative;
  width: min(720px, calc(100vw - 32px));
  margin: 7vh auto;
  max-height: 86vh;
  overflow: auto;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--warm-white);
  box-shadow: 0 20px 40px rgba(27, 19, 14, 0.2);
  display: grid;
  gap: 14px;
}

.cookie-option {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--warm-white);
}

.cookie-option p {
  margin: 4px 0 0;
}

.cookie-option input[type='checkbox'] {
  width: 20px;
  height: 20px;
}

.cookie-option__state {
  font-size: 0.85rem;
  color: var(--muted);
  background: #efe5d8;
  border-radius: 999px;
  padding: 4px 10px;
}

.cookie-option--locked {
  background: #f4ede2;
}

.cookie-modal__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
}

body.cookie-modal-open {
  overflow: hidden;
}

@media (max-width: 960px) {
  body {
    line-height: 1.52;
  }

  .brand-title {
    font-size: 1.62rem;
  }

  .hero h1 {
    font-size: clamp(1.86rem, 5vw, 2.56rem);
  }
}

@media (max-width: 960px) {
  .item-card {
    grid-template-columns: 1fr;
  }

  .item-overlay .item-card {
    grid-template-columns: 1fr;
  }

  .item-overlay .item-image img {
    height: 280px;
  }

  .comment-form {
    flex-direction: column;
  }

  .item-header h3 {
    font-size: 1.28rem;
  }
}

@media (max-width: 960px) {
  .pro-bar {
    flex-wrap: wrap;
    font-size: 0.82rem;
    padding: 6px 14px;
    gap: 6px;
  }

  .pro-bar-right {
    gap: 4px;
  }

  body.nav-open .site-header {
    z-index: 1402;
  }

  .nav {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    height: calc(100vh - 40px);
    width: min(320px, 86vw);
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 18px 36px var(--shadow);
    z-index: 1401;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.nav-open .nav {
    display: flex;
  }

  .nav a {
    width: 100%;
  }

  .nav form.inline {
    width: 100%;
  }

  .nav form.inline .link {
    width: 100%;
    text-align: left;
    padding: 8px 0;
  }

  .nav .nav-estate-switch {
    width: 100%;
    margin-left: 0;
  }

  .nav .nav-estate-switch select,
  .nav .nav-estate-switch .btn.small {
    width: 100%;
  }

  .nav .btn.small {
    width: 100%;
    justify-content: center;
  }

  .desktop-only { display: none !important; }
  .mobile-only { display: block !important; }

  .nav-drawer-section.is-open .nav-drawer-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .nav-icon-group {
    flex-direction: row;
    width: 100%;
    gap: 8px;
    margin-left: 0;
  }

  .nav-icon {
    width: auto;
    height: auto;
    padding: 6px 10px;
    gap: 6px;
    border-radius: 999px;
  }

  .nav-icon::after {
    content: attr(aria-label);
    font-size: 0.9rem;
    font-weight: 500;
  }

  .nav-icon .notification-count {
    position: static;
    min-width: 20px;
    height: 20px;
    padding: 2px 6px;
    font-size: 0.75rem;
  }

  .nav-close {
    display: inline-flex;
    align-self: flex-end;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--ink);
    font-size: 1.5rem;
    line-height: 1;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-header {
    width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .pro-bar + .site-header {
    border-radius: 0;
  }

  .site-header .brand {
    flex: 1;
    text-align: center;
  }

  .site-header .nav-toggle {
    position: absolute;
    right: 12px;
  }
}

/* --- Contextual help tooltips --- */
.contextual-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #eaf4fb;
  border: 1px solid #b8d8ef;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #1a3a52;
  animation: contextualTipIn 0.25s ease-out;
}

.contextual-tip-icon::before {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-top: 2px;
  background: #3a8fc2;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='9' fill='none' stroke='currentColor' stroke-width='1.5'/%3E%3Ctext x='10' y='14.5' text-anchor='middle' font-size='13' font-weight='600' fill='currentColor'%3Ei%3C/text%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='9' fill='none' stroke='currentColor' stroke-width='1.5'/%3E%3Ctext x='10' y='14.5' text-anchor='middle' font-size='13' font-weight='600' fill='currentColor'%3Ei%3C/text%3E%3C/svg%3E") center / contain no-repeat;
}

.contextual-tip p {
  flex: 1;
  margin: 0;
}

.contextual-tip .btn {
  white-space: nowrap;
  align-self: center;
  flex-shrink: 0;
}

.contextual-tip.is-dismissing {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Narrow screens: let the dismiss button wrap under the text instead of
   squeezing the paragraph into per-character line breaks. */
@media (max-width: 480px) {
  .contextual-tip {
    flex-wrap: wrap;
  }
  .contextual-tip p {
    min-width: 0;
  }
  .contextual-tip .btn {
    align-self: flex-start;
    margin-left: 30px;
  }
}

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

/* --- Inline help tooltip (hover/focus) --- */
.help-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--status-info-border);
  background: var(--status-info-bg);
  color: #3a6fa0;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: help;
  vertical-align: middle;
  margin-left: 6px;
  flex-shrink: 0;
}

.help-tooltip:focus {
  outline: 2px solid #3a8fc2;
  outline-offset: 2px;
}

.help-tooltip-content {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  background: #fff;
  border: 1px solid #c8d6e5;
  border-radius: 6px;
  padding: 10px 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.45;
  color: #2c3e50;
  z-index: 100;
  text-align: left;
}

.help-tooltip-content strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.88rem;
}

.help-tooltip:hover .help-tooltip-content,
.help-tooltip:focus .help-tooltip-content {
  display: block;
}

@media (max-width: 600px) {
  .help-tooltip-content {
    width: 220px;
    left: auto;
    right: -8px;
    transform: none;
  }
}

@media (max-width: 600px) {
  body {
    line-height: 1.5;
  }

  .page {
    gap: 20px;
    padding: 16px 14px 30px;
  }

  .brand-title {
    font-size: 1.44rem;
  }

  .brand-sub {
    font-size: 0.86rem;
  }

  .hero h1 {
    font-size: clamp(1.6rem, 8.5vw, 2.15rem);
    line-height: 1.08;
  }

  .hero p {
    font-size: 0.98rem;
    line-height: 1.6;
  }

  .item-header h3 {
    font-size: 1.18rem;
  }

  .item-meta {
    font-size: 0.8rem;
  }

  textarea,
  input,
  select {
    font-size: 0.95rem;
  }

  .btn {
    font-size: 0.92rem;
    padding: 9px 14px;
  }

  .choice-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .choice-card .btn {
    width: 100%;
  }

  .cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  .cookie-banner__actions,
  .cookie-modal__actions {
    flex-direction: column;
  }

  .cookie-banner__actions .btn,
  .cookie-modal__actions .btn {
    width: 100%;
  }

  .cookie-option {
    grid-template-columns: 1fr;
  }

  .plan-expiry-banner,
  .plan-limit-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .page {
    padding: 14px 12px 26px;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-actions .btn,
  .cta-actions .btn,
  .photo-queue-actions .btn {
    width: 100%;
  }
}

/* ── Utility classes (CSP hardening — replace inline styles) ────────── */

.m-0 { margin: 0; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.5rem; }
.ml-4 { margin-left: 1rem; }
.d-inline { display: inline; }
.d-flex { display: flex; }
.d-none { display: none; }
.flex-between { display: flex; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.mw-narrow { max-width: 560px; }
.mw-medium { max-width: 600px; }
.mw-wide { max-width: 640px; }
.text-xxs { font-size: 0.75em; }
.text-xs { font-size: 0.8em; }
.text-sm { font-size: 0.85em; }
.text-base-sm { font-size: 0.9em; }
.fw-normal { font-weight: normal; }
.ws-pre-wrap { white-space: pre-wrap; }
.text-danger { color: var(--status-danger-text, #b54e00); }
.text-warning { color: var(--status-warning-text, #6b5900); }
.text-inherit { color: inherit; }
.disclaimer-box {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 6px;
  background: var(--bg-muted, #f9fafb);
}
.disclaimer-box--lg { padding: 1rem; margin-top: 1.5rem; }
.ticket-message-bubble {
  border: 1px solid var(--border, #ddd);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}
.ticket-message-bubble--admin { background: var(--bg-subtle, #f8f9fa); }
.ticket-message-header { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
.consent-info-box {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 6px;
  background: var(--bg-muted, #f9fafb);
  font-size: 0.85em;
  line-height: 1.4;
}
.checkout-consent--spaced { margin-top: 1rem; }
.progress-bar-container--spaced { margin-bottom: 1.5rem; }
.intro-skip-btn {
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  padding: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
}

.password-toggle:hover {
  color: var(--ink);
}

/* --- Pro registration plan picker (register-pro.ejs) ---
   Styled to match the rest of the form cards: the browser-default
   fieldset/legend and free-floating radios were the only unstyled
   controls in the app. */
.plan-select-group {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--space-4);
  margin: 0;
  display: grid;
  gap: var(--space-2);
  background: var(--warm-white);
}

.plan-select-group legend {
  font-weight: 600;
  color: var(--ink);
  padding: 0 var(--space-2);
}

.plan-option {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.plan-option:hover {
  border-color: var(--accent);
}

.plan-option:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}

.plan-option input[type="radio"] {
  margin: 3px 0 0;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.plan-option-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.plan-price-inline {
  font-weight: 600;
  color: var(--accent-dark);
}

/* ==========================================================================
   Accessibility + performance review (2026-07-03) additions
   ========================================================================== */

/* A6: skip-to-content link. Only the one placed as a direct child of <body>
   (header.ejs) is the skip-nav — hidden until keyboard focus, then slides in.
   The in-flow .skip-link used elsewhere as a "skip this step" affordance
   (register-pro-team) keeps its own visible styling. */
body > .skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 2000;
  margin: 0;
  padding: 10px 16px;
  background: var(--card);
  color: var(--ink);
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm, 8px);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.15s ease;
}
body > .skip-link:focus {
  transform: translateY(0);
  outline: none;
}

/* A3: keep word-bearing STATUS badges visible on collapsed cards (colour-only
   status is inaccessible). The verbose "added by" .badge and .category tags
   stay hidden. More specific than the collapse hide rules, so it wins. */
.item-card.is-collapsed:not(.is-overlay) .item-header .badge.decided,
.item-card.is-collapsed:not(.is-overlay) .item-header .badge.recycling,
.item-card.is-collapsed:not(.is-overlay) .item-header .badge.donated,
.item-card.is-collapsed:not(.is-overlay) .item-header .badge.donating,
.item-card.is-collapsed:not(.is-overlay) .item-header .badge.donation-keep,
.item-card.is-collapsed:not(.is-overlay) .item-header .badge.selling,
.item-card.is-collapsed:not(.is-overlay) .item-header .badge.sold,
.items-overview-section .items-grid.grid .item-card.is-collapsed:not(.is-overlay) .item-header .badge.decided,
.items-overview-section .items-grid.grid .item-card.is-collapsed:not(.is-overlay) .item-header .badge.recycling,
.items-overview-section .items-grid.grid .item-card.is-collapsed:not(.is-overlay) .item-header .badge.donated,
.items-overview-section .items-grid.grid .item-card.is-collapsed:not(.is-overlay) .item-header .badge.donating,
.items-overview-section .items-grid.grid .item-card.is-collapsed:not(.is-overlay) .item-header .badge.donation-keep,
.items-overview-section .items-grid.grid .item-card.is-collapsed:not(.is-overlay) .item-header .badge.selling,
.items-overview-section .items-grid.grid .item-card.is-collapsed:not(.is-overlay) .item-header .badge.sold {
  display: inline-flex;
}

/* P5: reserve vertical space in the list view so lazy-loaded thumbnails don't
   shift layout as they arrive. Scoped to the list (non-grid) view to avoid
   disturbing the grid's own image sizing. */
.items-overview-section .items-grid:not(.grid) .item-image {
  aspect-ratio: 4 / 3;
}

/* A12: 44px minimum touch targets on the small per-item action buttons and
   filter chips, on the phone widths where the older audience taps them. */
@media (max-width: 768px) {
  .btn.small,
  .chip {
    min-height: 44px;
  }
}
