:root {
  --tz-sanctuary: #F5F1E8;
  --tz-surface: #FFFFFF;
  --tz-surface-soft: #F9F6EE;
  --tz-ink: #1A1A1A;
  --tz-muted: rgba(26, 26, 26, 0.68);
  --tz-primary: #2D5016;
  --tz-secondary: #8B7355;
  --tz-accent: #D4AF37;
  --tz-reflection: #4A7C8F;
  --tz-shadow: #C85A3A;
  --tz-border: rgba(139, 115, 85, 0.18);
  --tz-font: Georgia, serif;
  --tz-line: 1.7;
  --tz-radius: 12px;
  --tz-radius-sm: 8px;
  --tz-shadow-1: 0 2px 10px rgba(0,0,0,0.08);
  --tz-shadow-2: 0 10px 26px rgba(0,0,0,0.14);
  --tz-focus: 2px solid var(--tz-accent);
}

body.tz-theme {
  font-family: var(--tz-font);
  background: linear-gradient(180deg, var(--tz-sanctuary) 0%, var(--tz-surface-soft) 100%);
  color: var(--tz-ink);
}

body.tz-theme h1,
body.tz-theme h2,
body.tz-theme h3,
body.tz-theme h4,
body.tz-theme h5,
body.tz-theme h6 {
  font-family: var(--tz-font);
  letter-spacing: 0.01em;
}

body.tz-theme p,
body.tz-theme li,
body.tz-theme label,
body.tz-theme input,
body.tz-theme textarea,
body.tz-theme select,
body.tz-theme button {
  font-family: var(--tz-font);
  line-height: var(--tz-line);
}

body.tz-theme .tz-altar {
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, var(--tz-surface-soft) 100%);
  border: 1px solid var(--tz-border);
  border-left: 4px solid var(--tz-primary);
  border-radius: var(--tz-radius);
  box-shadow: var(--tz-shadow-2);
}

body.tz-theme .tz-threshold {
  background: rgba(255,255,255,0.62);
  border: 1px solid var(--tz-border);
  border-radius: var(--tz-radius-sm);
  padding: 0.8rem 1rem;
  color: var(--tz-muted);
}

body.tz-theme .tz-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tz-secondary);
  font-weight: 700;
}

body.tz-theme .tz-identity {
  display: grid;
  gap: 0.25rem;
}

body.tz-theme .tz-identity-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  background: rgba(45, 80, 22, 0.1);
  color: var(--tz-primary);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

body.tz-theme .tz-identity-title {
  margin: 0;
  color: var(--tz-ink);
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  line-height: 1.15;
}

body.tz-theme .tz-identity-subtitle {
  margin: 0;
  max-width: 70ch;
  color: var(--tz-muted);
  font-size: 0.96rem;
}

body.tz-theme .tz-highlight {
  border-left: 4px solid var(--tz-accent);
  background: linear-gradient(135deg, rgba(212,175,55,0.14), rgba(255,255,255,0.96));
}

body.tz-theme .tz-offering {
  border-radius: var(--tz-radius);
  padding: 1rem 1.1rem;
  box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.14);
}

body.tz-theme .tz-offering-label {
  display: block;
  margin: 0 0 0.32rem;
  font-size: 0.77rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8b6d1b;
  font-weight: 700;
}

body.tz-theme .tz-offering-text {
  margin: 0;
  max-width: 60ch;
  color: var(--tz-ink);
  font-size: clamp(1.05rem, 2.3vw, 1.35rem);
  line-height: 1.6;
}

body.tz-theme .tz-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

body.tz-theme .tz-button-primary,
body.tz-theme .tz-button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.72rem 1.15rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

body.tz-theme .tz-button-primary {
  background: var(--tz-primary);
  color: #f5f1e8;
  box-shadow: var(--tz-shadow-1);
}

body.tz-theme .tz-button-primary:hover {
  transform: translateY(-1px);
}

body.tz-theme .tz-button-secondary {
  background: transparent;
  color: var(--tz-primary);
  border: 1px solid var(--tz-border);
}

body.tz-theme .tz-note {
  margin: 0;
  color: var(--tz-muted);
  font-size: 0.9rem;
}

body.tz-theme .tz-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

body.tz-theme .tz-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(139, 115, 85, 0.28);
  background: rgba(255,255,255,0.94);
  color: var(--tz-ink);
  font-size: 0.78rem;
  text-decoration: none;
  white-space: nowrap;
}

body.tz-theme .tz-chip strong {
  color: var(--tz-secondary);
}

body.tz-theme .tz-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.85rem;
}

body.tz-theme .tz-module {
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, var(--tz-surface-soft) 100%);
  border: 1px solid var(--tz-border);
  border-radius: var(--tz-radius);
  padding: 0.9rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}

body.tz-theme .tz-shell-header {
  background: linear-gradient(180deg, color-mix(in srgb, var(--tz-primary) 92%, black 8%) 0%, var(--tz-primary) 100%);
  color: #f5f1e8;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  border-bottom: 1px solid rgba(212, 175, 55, 0.28);
}

body.tz-theme .tz-shell-nav {
  background: rgba(249, 246, 238, 0.96);
  border-bottom: 1px solid var(--tz-border);
  box-shadow: inset 0 -1px 0 rgba(139, 115, 85, 0.08);
}

body.tz-theme .tz-shell-nav a {
  color: var(--tz-primary);
  border-radius: 999px;
}

body.tz-theme .tz-shell-nav a:hover,
body.tz-theme .tz-shell-nav a.active {
  background: rgba(45, 80, 22, 0.1);
  color: var(--tz-primary);
}

body.tz-theme .mobile-nav-panel {
  background: color-mix(in srgb, var(--tz-surface) 94%, white 6%);
  border: 1px solid var(--tz-border);
}

body.tz-theme .mobile-nav-link:hover,
body.tz-theme .mobile-nav-link.active {
  background: rgba(45, 80, 22, 0.1);
  color: var(--tz-primary);
}

body.tz-theme .card {
  background: color-mix(in srgb, var(--tz-surface) 92%, var(--tz-surface-soft) 8%);
  border-top: 1px solid var(--tz-border);
  border-right: 1px solid var(--tz-border);
  border-bottom: 1px solid var(--tz-border);
  box-shadow: var(--tz-shadow-1);
}

body.tz-theme .tz-module-label {
  margin: 0 0 0.28rem;
  color: var(--tz-secondary);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

body.tz-theme .tz-module-value {
  margin: 0;
  color: var(--tz-ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
}

body.tz-theme .tz-module-action {
  margin: 0.42rem 0 0;
  color: var(--tz-muted);
  font-size: 0.9rem;
}

body.tz-theme .tz-module-link {
  margin: 0.52rem 0 0;
  font-size: 0.84rem;
}

body.tz-theme .tz-module-link a {
  color: var(--tz-reflection);
}

body.tz-theme .tz-inner-chamber {
  border: 1px solid var(--tz-border);
  border-radius: var(--tz-radius);
  background: var(--tz-surface-soft);
  overflow: hidden;
}

body.tz-theme .tz-inner-chamber > summary {
  cursor: pointer;
  list-style: none;
  padding: 0.85rem 1rem;
  color: var(--tz-primary);
  font-weight: 700;
  background: rgba(255,255,255,0.7);
}

body.tz-theme .tz-inner-chamber > summary::-webkit-details-marker {
  display: none;
}

body.tz-theme .tz-inner-chamber > summary::before {
  content: '▸ ';
  color: var(--tz-secondary);
}

body.tz-theme .tz-inner-chamber[open] > summary::before {
  content: '▾ ';
}

body.tz-theme .tz-inner-chamber-body {
  padding: 0 1rem 1rem;
}

body.tz-theme .tz-segment-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

body.tz-theme .tz-segment-track {
  display: flex;
  gap: 0.2rem;
}

body.tz-theme .tz-segment {
  flex: 1 1 0;
  min-width: 10px;
  height: 8px;
  border-radius: 999px;
  background: rgba(139, 115, 85, 0.16);
}

body.tz-theme .tz-segment.is-active {
  background: rgba(74, 124, 143, 0.3);
}

body.tz-theme .tz-segment.is-current {
  background: var(--tz-reflection);
}

@media (max-width: 768px) {
  body.tz-theme .tz-action-row {
    flex-direction: column;
    align-items: stretch;
  }

  body.tz-theme .tz-button-primary,
  body.tz-theme .tz-button-secondary {
    width: 100%;
  }
}
