.page-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.55rem 1.25rem 2.6rem;
}

.calc-hero {
  margin-bottom: 0.7rem;
}

.hero-panel,
.trust-card,
.article-card,
.side-card,
.bottom-card,
.result-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.hero-panel {
  padding: 0.85rem 0.95rem;
}

.eyebrow-row,
.hero-notes,
.hero-links,
.calc-header-notes,
.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.eyebrow-row {
  margin-bottom: 0.65rem;
}

.mini-pill,
.hero-note,
.header-note {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.mini-pill.accent,
.header-note.accent {
  color: var(--accent);
  background: var(--accent-light);
  border-color: rgba(27,107,74,0.16);
}

.hero-panel h1 {
  font-size: clamp(1.28rem, 3vw, 2rem);
  margin-bottom: 0.25rem;
}

.hero-panel p {
  color: var(--text-secondary);
  max-width: 65ch;
  margin-bottom: 0.55rem;
  font-size: 0.91rem;
}

.hero-note {
  font-weight: 600;
  background: var(--bg);
  color: var(--text-tertiary);
}

.hero-note strong {
  color: var(--text-secondary);
}

.hero-links {
  margin-top: 0.75rem;
}

.hero-geo {
  margin-top: 0.55rem;
  padding: 0.62rem 0.78rem;
  border-radius: 10px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.5;
}

.hero-geo strong {
  color: var(--accent);
}

.calc-card {
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-bottom: 0.85rem;
}

.calc-header {
  padding: 0.72rem 1rem 0;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.calc-header-copy {
  min-width: 0;
}

.calc-header h2 {
  font-size: 1rem;
  margin-bottom: 0.18rem;
}

.calc-header p {
  color: var(--text-secondary);
  font-size: 0.8rem;
  max-width: 56ch;
}

.calc-header-notes {
  margin-top: 0.5rem;
}

.calc-year-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.28rem 0.7rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.01em;
  border: 1px solid rgba(27,107,74,0.18);
}

.calc-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 0.68rem;
}

.calc-inputs {
  padding: 0.82rem 1rem 1rem;
}

.preset-block {
  margin-bottom: 0.8rem;
}

.group-label {
  display: block;
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.55rem;
}

.quick-amounts,
.field-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.quick-amounts[hidden] {
  display: none;
}

.quick-amounts button,
.choice-chip {
  min-height: 34px;
  padding: 0.3rem 0.72rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.76rem;
  font-weight: 500;
}

.quick-amounts button:hover,
.quick-amounts button.qa-active,
.choice-chip:hover,
.choice-chip.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  font-weight: 600;
}

.field-group + .field-group {
  margin-top: 0.95rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--border);
}

.field {
  margin-bottom: 0.62rem;
}

.field:last-child {
  margin-bottom: 0;
}

.field label {
  display: block;
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.28rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.field input,
.field select {
  width: 100%;
  height: 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-primary);
  padding: 0 0.875rem;
  font-size: 0.92rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}

.field select {
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236B6860'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(27,107,74,0.12);
}

.input-wrap {
  position: relative;
}

.input-wrap::before {
  content: attr(data-prefix);
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-size: 0.92rem;
  pointer-events: none;
}

.input-wrap.has-prefix input {
  padding-left: 1.65rem;
}

.field-choices {
  margin-top: 0.45rem;
}

.input-brief {
  margin-top: 0.82rem;
  padding: 0.76rem 0.82rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, #fcfcfa 0%, #f6f5f1 100%);
}

.input-brief-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.48rem;
}

.input-brief-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.input-brief-point {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.77rem;
  font-weight: 600;
}

.more-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.15rem;
  border: none;
  background: none;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.more-toggle svg {
  width: 13px;
  height: 13px;
  transition: transform 0.2s ease;
}

.more-toggle.open svg {
  transform: rotate(180deg);
}

.more-fields {
  display: none;
}

.more-fields.open {
  display: block;
}

.boolean-grid {
  display: grid;
  gap: 0.6rem;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.82rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafaf8;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.checkbox-row span {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}

.calc-visual {
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: 0.92rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.68rem;
  align-items: center;
  justify-content: flex-start;
}

.donut-svg {
  width: 200px;
  height: 200px;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 4px 12px rgba(26,26,24,0.08));
}

.donut-track {
  fill: none;
  stroke: var(--border);
  stroke-width: 26;
}

.donut-seg {
  fill: none;
  stroke-width: 26;
  stroke-dasharray: 0 452;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  transition: stroke-dasharray 0.55s cubic-bezier(0.4,0,0.2,1), stroke-dashoffset 0.55s cubic-bezier(0.4,0,0.2,1), stroke-width 0.22s ease, opacity 0.22s ease;
}

.donut-seg.seg-muted {
  opacity: 0.6 !important;
}

.donut-seg.seg-focus {
  stroke-width: 29;
}

.donut-total-text {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 600;
  fill: var(--text-primary);
}

.donut-sub-text {
  font-family: var(--font-body);
  font-size: 10px;
  fill: var(--text-tertiary);
}

.donut-month-text {
  font-family: var(--font-body);
  font-size: 11.5px;
  fill: var(--accent);
  font-weight: 700;
}

.visual-right,
.donut-legend {
  width: 100%;
}

.summary-card {
  display: none;
}

.result-facts {
  width: 100%;
  display: grid;
  gap: 0.38rem;
}

.result-facts:empty {
  display: none;
}

.result-fact {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.5rem;
  border-radius: 6px;
  font-size: 0.79rem;
  transition: background-color 0.15s ease;
}

.result-fact:nth-child(even) {
  background: var(--bg);
}

.result-fact[data-tone="primary"] {
  background: var(--accent-light);
}

.result-fact-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.result-fact-label {
  flex: 1;
  color: var(--text-secondary);
}

.result-fact-value {
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.38rem 0.5rem;
  border-radius: 5px;
  font-size: 0.79rem;
  transition: background-color 0.15s ease;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-name {
  flex: 1;
  color: var(--text-secondary);
}

.legend-val {
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.calc-footer {
  border-top: 1px solid var(--border);
  padding: 0.8rem 1rem 1rem;
  background: var(--surface);
}

.assumptions {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  line-height: 1.65;
  padding: 0.65rem 0.9rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 0.65rem;
}

.assumptions strong {
  color: var(--text-secondary);
}

.adsense-wrap {
  margin: 0 auto 1rem;
}

.result-block {
  padding: 1rem 1.05rem;
}

.result-block + .result-block {
  margin-top: 0.9rem;
}

.result-block h3,
.side-card h3 {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.7rem;
}

.breakdown-list,
.note-list,
.source-list,
.next-step-list {
  display: grid;
  gap: 0.55rem;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fcfcfa;
  font-size: 0.87rem;
}

.breakdown-row span:first-child {
  color: var(--text-secondary);
}

.note-item {
  padding: 0.82rem 0.95rem;
  border-left: 3px solid var(--accent);
  background: rgba(229,243,235,0.55);
  border-radius: 0 12px 12px 0;
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 300px);
  gap: 1rem;
  align-items: start;
}

.article-card {
  padding: 1.25rem 1.25rem 1.35rem;
}

.article-card h2 {
  font-size: 1.18rem;
  margin: 1.1rem 0 0.5rem;
}

.article-card h2:first-of-type {
  margin-top: 0;
}

.article-card p {
  color: var(--text-secondary);
  margin-bottom: 0.82rem;
  max-width: 68ch;
}

.article-card ul {
  margin: 0.4rem 0 0.95rem 1.15rem;
  color: var(--text-secondary);
}

.article-card li + li {
  margin-top: 0.4rem;
}

.side-stack {
  position: sticky;
  top: 74px;
  display: grid;
  gap: 0.9rem;
}

.side-card {
  padding: 1rem 1.05rem;
}

.source-link,
.next-step-link {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.84rem;
  line-height: 1.45;
}

.source-link::before,
.next-step-link::before {
  content: "→";
  color: var(--accent);
  flex-shrink: 0;
}

.source-link:hover,
.next-step-link:hover {
  color: var(--accent);
}

.bottom-grid {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
}

.bottom-card {
  padding: 1.1rem 1.15rem;
}

.bottom-card h2 {
  font-size: 1.1rem;
  margin-bottom: 0.42rem;
}

.bottom-card p {
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.bottom-card.notice {
  background: var(--surface-alt);
}

.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;
}

@media (max-width: 920px) {
  .calc-split,
  .content-layout {
    grid-template-columns: 1fr;
  }

  .calc-visual {
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .side-stack {
    position: static;
  }
}

@media (max-width: 720px) {
  .page-wrap {
    padding: 0.45rem 0 2.3rem;
  }

  .hero-panel,
  .article-card,
  .side-card,
  .bottom-card,
  .result-block {
    border-radius: 14px;
  }

  .hero-panel {
    padding: 0.9rem 0.95rem;
  }

  .hero-panel p {
    font-size: 0.92rem;
    margin-bottom: 0.55rem;
  }

  .hero-links .pill:nth-child(n+3) {
    display: none;
  }

  .hero-notes {
    display: none;
  }

  .calc-header {
    padding: 0.72rem 0.9rem 0;
  }

  .calc-header h2 {
    font-size: 0.98rem;
  }

  .calc-inputs,
  .calc-visual,
  .calc-footer {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .donut-svg {
    width: 184px;
    height: 184px;
  }
}

@media (max-width: 560px) {
  .hero-panel h1 {
    font-size: 1.36rem;
  }

  .eyebrow-row {
    gap: 0.35rem;
    margin-bottom: 0.5rem;
  }

  .mini-pill,
  .header-note {
    font-size: 0.7rem;
    padding: 0.28rem 0.6rem;
  }

  .calc-header-notes {
    margin-top: 0.42rem;
  }

  .calc-header-notes .header-note:nth-child(n+3) {
    display: none;
  }

  .field-choices {
    gap: 0.35rem;
  }

  .choice-chip,
  .quick-amounts button {
    min-height: 40px;
    font-size: 0.76rem;
    padding: 0.42rem 0.74rem;
  }

  .input-brief {
    margin-top: 0.72rem;
    padding: 0.72rem 0.78rem;
  }

  .breakdown-row {
    padding: 0.66rem 0.72rem;
    font-size: 0.84rem;
  }
}
