:root {
  --bg-base: #f3f0fa;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-subtle: #ebdff5;
  --text-main: #334155;
  --text-muted: #64748b;
  --text-plum: #592b63;
  --text-plum-dark: #3b1743;
  --accent-plum: #592b63;
  --accent-plum-hover: #481f52;
  --accent-amber: #b45309;
  --accent-olive: #3f6212;
  --border-light: #e4d7f5;
  --border-dark: #3b1743;
  --shadow-panel: 0 4px 18px rgba(89, 43, 99, 0.08);
  --shadow-hover: 0 8px 24px rgba(89, 43, 99, 0.14);
  --shadow-btn: 4px 4px 0px #3b1743;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  hyphens: auto;
  padding: 24px;
}

@media (max-width: 768px) {
  body {
    padding: 8px;
  }
}

.page-frame {
  max-width: 1200px;
  margin: 0 auto;
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  position: relative;
}

/* Header & Navigation */
.site-header {
  position: static;
  background: transparent;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-wrapper {
  text-align: left;
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-plum);
  text-decoration: none;
  text-transform: lowercase;
}

.brand-tag {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
}

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

.nav-link {
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 6px 10px;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-plum);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-light);
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text-plum);
  padding: 4px 10px;
  cursor: pointer;
}

.mobile-nav-panel {
  display: none;
  border-bottom: 1px solid var(--border-light);
  background: #faf7fd;
  padding: 16px 24px;
}

.mobile-nav-panel.open {
  display: block;
}

.mobile-nav-panel a {
  display: block;
  padding: 8px 0;
  color: var(--text-plum);
  text-decoration: none;
  font-weight: 700;
}

@media (max-width: 768px) {
  .site-nav {
    display: none;
  }
  .menu-toggle {
    display: inline-block;
  }
}

/* Headings & Typography */
h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-plum-dark);
  line-height: 1.18;
}

h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 12px;
}

h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  margin-bottom: 14px;
}

h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

p {
  margin-bottom: 14px;
}

.editorial-copy {
  max-width: 70ch;
  line-height: 1.65;
}

/* Buttons */
.btn-plum {
  display: inline-block;
  background-color: var(--accent-plum);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 24px;
  border: 1px solid var(--border-dark);
  border-radius: 0;
  box-shadow: var(--shadow-btn);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-plum:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px #3b1743;
  background-color: var(--accent-plum-hover);
}

.btn-plum:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 transparent;
}

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--text-plum);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  padding: 10px 20px;
  border: 1px solid var(--text-plum);
  border-radius: 0;
  cursor: pointer;
}

.btn-outline:hover {
  background: #f1e7f8;
}

/* Layout Blocks */
.hero-band {
  background: linear-gradient(180deg, #faf7fe 0%, #ffffff 100%);
  padding: 40px 32px 24px 32px;
  border-bottom: 1px solid var(--border-light);
}

.content-section {
  padding: 40px 32px;
  border-bottom: 1px solid var(--border-light);
}

.section-head {
  margin-bottom: 24px;
  border-left: 4px solid var(--text-plum);
  padding-left: 14px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Cards & Grid */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.ledger-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 0;
  padding: 24px;
  box-shadow: var(--shadow-panel);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ledger-panel:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* Interactive Calculator Strip */
.calculator-box {
  background: #faf7fc;
  border: 1px solid var(--border-light);
  padding: 24px;
  margin-bottom: 28px;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  padding: 16px;
  margin: 16px 0;
}

.stat-item {
  border-left: 2px solid var(--border-light);
  padding-left: 12px;
}

.stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-plum-dark);
}

.stat-value.remain-positive {
  color: var(--accent-olive);
}

.stat-value.remain-negative {
  color: #b91c1c;
}

.calc-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.calc-row label {
  flex: 1 1 200px;
  font-size: 0.9rem;
  font-weight: 600;
}

.calc-input {
  flex: 1 1 140px;
  padding: 10px 12px;
  border: 1px solid #d4c2ea;
  border-radius: 0;
  background: #ffffff;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
}

.calc-input:focus {
  outline: 2px solid var(--text-plum);
}

/* Comparison Table */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid var(--border-light);
}

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.ledger-table th {
  background: #eee5f7;
  color: var(--text-plum-dark);
  padding: 12px 14px;
  font-weight: 700;
  border-bottom: 2px solid var(--border-light);
}

.ledger-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f0e6f7;
}

.ledger-table tr:nth-child(even) {
  background: #faf7fe;
}

/* Image Containers */
.img-wrap {
  width: 100%;
  border: 1px solid var(--border-light);
  border-radius: 0;
  background: #ede3f5;
  margin: 16px 0;
}

.img-wrap img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

/* Tab Panels */
.tab-container {
  margin: 24px 0;
}

.tab-headers {
  display: flex;
  border-bottom: 2px solid var(--border-light);
  gap: 4px;
  flex-wrap: wrap;
}

.tab-btn {
  background: #f7f2fc;
  border: 1px solid var(--border-light);
  border-bottom: none;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 0;
}

.tab-btn.active {
  background: #ffffff;
  color: var(--text-plum);
  border-top: 3px solid var(--text-plum);
}

.tab-content {
  display: none;
  padding: 20px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-top: none;
}

.tab-content.active {
  display: block;
}

/* Checklist / Bill Row */
.bill-list {
  list-style: none;
}

.bill-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #f0e6f7;
}

.bill-item:last-child {
  border-bottom: none;
}

.badge-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 6px;
  border: 1px solid #ccaee8;
  background: #f8efff;
  color: var(--text-plum);
}

/* Footer */
.site-footer {
  background: #2b1232;
  color: #dfcee8;
  padding: 40px 32px 24px 32px;
  font-size: 0.88rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

.footer-title {
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: #dfcee8;
  text-decoration: none;
}

.footer-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-legal-bar {
  border-top: 1px solid #4a2155;
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8rem;
}

@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
