:root {
  --bg: #121212;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --surface-3: #3a3a3c;
  --text: #f5f5f7;
  --text-secondary: #a1a1a6;
  --accent: #f5f5f7;
  --border: #3a3a3c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 22px;
}

.site-header {
  background: var(--bg);
  color: var(--text);
  padding: 64px 0 48px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.site-header h1 {
  margin: 0 0 20px;
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1.1;
  text-wrap: balance;
}

.subtitle {
  margin: 0 auto 36px;
  font-size: 21px;
  color: var(--text-secondary);
  font-weight: 400;
  max-width: 640px;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.nav-btn {
  display: inline-block;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 980px;
  font-weight: 500;
  font-size: 14px;
  border: 1px solid var(--border);
  transition: background 0.2s;
}

.nav-btn:hover {
  background: var(--surface-2);
}

main {
  padding: 60px 16px 90px;
}

.hero {
  background: var(--surface);
  border-radius: 18px;
  padding: 40px 32px;
  margin-top: 72px;
  margin-bottom: 120px;
  text-align: center;
}

.hero h2 {
  margin-top: 0;
  font-size: 28px;
  font-weight: 600;
}

.hero a,
.hero a:visited {
  color: #f5f5f7;
  text-decoration: underline;
  text-decoration-color: rgba(245,245,247,0.45);
  text-underline-offset: 3px;
}

.hero a:hover,
.hero a:visited:hover {
  text-decoration-color: #f5f5f7;
}


.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-block;
  background: var(--text);
  color: #000;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 980px;
  font-weight: 500;
  font-size: 17px;
  transition: opacity 0.2s;
}

.btn:hover {
  opacity: 0.85;
}

.calculator-highlight {
  background: var(--surface-2);
  border-radius: 18px;
  padding: 48px 32px 52px;
  margin: 120px 0;
  text-align: center;
}

.calculator-highlight h3 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 600;
}

.calculator-highlight p {
  margin: 0;
}

.calculator-highlight .btn {
  margin-top: 32px;
}

.key-changes {
  margin: 120px 0;
}

.key-changes h2,
.background h2 {
  font-size: 32px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 32px;
}

.background p {
  color: #a1a1a6;
}

.background p strong,
.background p em {
  color: #fff;
  font-weight: normal;
  font-style: normal;
}
.background p strong.bold,
.background p strong.bold em {
  color: #fff;
  font-weight: 700;
}

.background h3 {
  font-size: 21px;
  font-weight: 600;
  text-align: left;
  color: var(--text);
  margin: 0 0 12px;
}

.background p + h3 {
  margin-top: 32px;
}

.change-block {
  border-radius: 18px;
  padding: 32px;
  margin-bottom: 48px;
  min-height: 180px;
}

.change-block h3 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 600;
}

.change-block p {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
  color: var(--text-secondary);
}

strong, b {
  font-weight: 700;
  color: var(--text);
}

.highlight {
  color: #ffffff;
  font-weight: 500;
}

.change-1 { background: #1c1c1e; }
.change-2 { background: #2c2c2e; }
.change-3 { background: #3a3a3c; }
.change-4 { background: #48484a; }
.change-5 { background: #1c1c1e; border: 1px solid #3a3a3c; }
.change-6 { background: #2c2c2e; border: 1px solid #48484a; }
.change-7 { background: #1c1c1e; }
.change-8 { background: #2c2c2e; }
.change-9 { background: #3a3a3c; }
.change-10 { background: #48484a; }
.change-11 { background: #1c1c1e; border: 1px solid #3a3a3c; }
.change-12 { background: #2c2c2e; border: 1px solid #48484a; }
.change-13 { background: #2c2c2e; }
.change-14 { background: #3a3a3c; }

.change-emphasis {
  border: none;
  border-left: 3px solid #8e8e93;
  background: #343436;
}

article {
  background: var(--surface);
  border-radius: 18px;
  padding: 28px;
  margin-bottom: 20px;
}

article h3 {
  margin-top: 0;
  font-size: 22px;
  font-weight: 600;
}

.doc-list {
  list-style: none;
  padding: 0;
}

.doc-list li {
  background: var(--surface);
  margin-bottom: 12px;
  padding: 20px 24px;
  border-radius: 12px;
}

.doc-list a {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
  font-size: 17px;
}

.doc-list a:hover {
  text-decoration: underline;
}

footer {
  background: var(--bg);
  color: var(--text-secondary);
  padding: 32px 0;
  text-align: center;
  font-size: 14px;
  border-top: 1px solid var(--border);
}

fieldset {
  border: none;
  background: var(--surface);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 20px;
}

label { display: block; margin: 12px 0; font-weight: 500; }
input, select {
  padding: 10px 12px;
  font-size: 17px;
  width: 100%;
  max-width: 340px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
}

button {
  background: var(--text);
  color: #000;
  border: none;
  padding: 12px 24px;
  border-radius: 980px;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
}

#results {
  background: var(--surface);
  border-radius: 18px;
  padding: 28px;
  margin-top: 24px;
}


.day-row {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
}

.day-row-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 4px;
}

.day-row-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  align-self: center;
}

.day-row-header label {
  margin: 0;
  font-weight: 500;
}

.day-row-header select {
  display: block;
  margin-top: 6px;
  width: 180px;
  max-width: 100%;
}

.day-row-header .day-remove {
  align-self: center;
  justify-self: end;
}

.day-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
}

.day-fields label {
  flex: 1 1 160px;
  margin: 8px 0;
}

.day-fields input {
  display: block;
  width: 100%;
  max-width: none;
}

.day-remove {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 16px;
  font-size: 14px;
}

.day-remove:hover {
  background: var(--surface);
}

#add-day {
  margin-top: 8px;
}

#add-day:disabled,
.day-remove:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#weekly-total {
  margin-bottom: 28px;
}

.weekly-figure {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 8px;
}

.weekly-meta {
  color: var(--text-secondary);
  font-size: 14px;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 16px;
}

.compare-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  min-width: 0;
}

.day-result .compare-col {
  background: var(--surface);
}

.compare-heading {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

.compare-amount {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.compare-note {
  margin: 10px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.4;
}

.weekly-change {
  margin: 0 0 8px;
}

@media (max-width: 640px) {
  .compare-col {
    padding: 12px 10px;
  }
  .compare-heading {
    font-size: 14px;
  }
  .compare-amount {
    font-size: 20px;
  }
  .compare-note {
    font-size: 12px;
  }
}

.day-result {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
}

.day-result h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
}

.day-result p,
.day-result ul {
  margin: 0 0 8px;
}

.day-result ul {
  padding-left: 20px;
}

.day-notes {
  color: var(--text-secondary);
}

#download-report {
  margin-top: 16px;
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.report-actions #download-report {
  margin-top: 0;
}

.share-btn {
  display: inline-block;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 11px 20px;
  border-radius: 980px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.share-btn:hover {
  background: var(--surface-2);
}

.share-status {
  color: var(--text-secondary);
  font-size: 14px;
}

.view-count {
  font-size: 13px;
  color: #6e6e73;
  margin: 8px 0 0;
}

.view-count[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .site-header { padding: 48px 0 36px; }
  .site-header h1 { font-size: 32px; margin-bottom: 16px; }
  .subtitle { font-size: 19px; margin-bottom: 28px; }
  .hero, .change-block { padding: 24px 20px; }
  .calculator-highlight { padding: 30px 20px 32px; }
  .calculator-highlight .btn { margin-top: 24px; }
  .hero { margin-top: 36px; margin-bottom: 72px; }
  .calculator-highlight { margin: 72px 0; }
  .key-changes { margin: 72px 0; }
  .change-block { margin-bottom: 36px; }
  .button-row { flex-direction: column; align-items: center; }
  .day-fields { flex-direction: column; gap: 0; }
  .day-row-header { grid-template-columns: 1fr auto; }
  .day-row-header h3 { grid-column: 1; }
  .day-row-header .day-remove { grid-column: 2; }
  .day-row-header label { grid-column: 1 / -1; }
  .day-row-header select { width: 100%; }
}

@media (min-width: 744px) {
  body { font-size: 17px; }
}

/* Key changes: more open spacing and accent on the highest impact bubbles */
.calculator-highlight { margin-bottom: 160px; }
.key-changes { margin-top: 160px; }
.key-changes h2 { margin-bottom: 56px; }
.key-changes .change-block { padding: 40px; margin-bottom: 64px; }
.key-changes .change-emphasis {
  border-left: 4px solid #d1d1d6;
  background: #363638;
}
.key-changes .change-emphasis h3 { font-size: 25px; color: #fff; margin-bottom: 16px; }
@media (max-width: 640px) {
  .calculator-highlight { margin-bottom: 96px; }
  .key-changes { margin-top: 96px; }
  .key-changes h2 { margin-bottom: 40px; }
  .key-changes .change-block { padding: 28px 22px; margin-bottom: 44px; }
  .key-changes .change-emphasis h3 { font-size: 23px; }
}
