:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-soft: #fbfbfd;
  --line: rgba(0, 0, 0, 0.12);
  --line-soft: rgba(0, 0, 0, 0.07);
  --text: #1d1d1f;
  --text-soft: #6e6e73;
  --text-faint: #8d8d92;
  --accent: #0071e3;
  --accent-pressed: #0068d1;
  --danger: #d70015;
  --success: #248a3d;
  --warning: #a05a00;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  width: 100%;
}

body {
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select {
  font: inherit;
}

button,
a,
.file-label,
summary {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  min-height: 100vh;
}

.app-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 245, 247, 0.9);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: saturate(180%) blur(18px);
}

.toolbar-inner {
  width: min(100%, 1180px);
  min-height: 58px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.brand-name {
  font-size: 15px;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.brand-meta {
  color: var(--text-soft);
  font-size: 11px;
}

.toolbar-nav {
  display: flex;
  justify-content: center;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.toolbar-nav::-webkit-scrollbar {
  display: none;
}

.toolbar-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 58px;
  padding: 0 12px;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
}

.toolbar-nav a:hover,
.toolbar-nav a.active {
  color: var(--text);
}

.toolbar-nav a.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  background: var(--text);
}

.toolbar-actions,
.backup-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

button,
.secondary,
.file-label,
.primary-button,
.text-cta {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--text);
  padding: 7px 11px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 560;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

button:hover,
.secondary:hover,
.file-label:hover,
.text-cta:hover {
  background: #f5f5f7;
}

button:active,
.secondary:active,
.file-label:active,
.text-cta:active {
  background: #ebebef;
}

.primary-button,
#exportData,
#contributionForm button,
#investmentForm button,
#milestoneForm button,
#subscriptionForm button,
#targetForm button {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.primary-button:hover,
#exportData:hover,
#contributionForm button:hover,
#investmentForm button:hover,
#milestoneForm button:hover,
#subscriptionForm button:hover,
#targetForm button:hover {
  background: var(--accent-pressed);
  border-color: var(--accent-pressed);
}

.danger,
#resetData {
  color: var(--danger);
  background: #fff;
  border-color: rgba(215, 0, 21, 0.34);
}

.danger:hover,
#resetData:hover {
  background: #fff5f5;
}

#importFile {
  display: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
.file-label:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.24);
  outline-offset: 2px;
}

.content {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 28px 24px 80px;
}

.hero-sheet {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
  background: var(--surface);
  border: 1px solid var(--line-soft);
}

.hero-main,
.next-step-card {
  padding: 38px;
}

.next-step-card {
  border-left: 1px solid var(--line-soft);
  background: var(--surface-soft);
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: space-between;
}

.eyebrow,
.kicker {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 620;
  letter-spacing: 0.02em;
}

.hero-main h1 {
  margin: 9px 0 8px;
  font-size: clamp(56px, 8.5vw, 104px);
  line-height: 0.9;
  letter-spacing: -0.078em;
  font-weight: 700;
}

.metric-copy,
.microcopy,
.muted,
.section-note,
.decision-copy {
  color: var(--text-soft);
}

.metric-copy {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.metric-trend.positive {
  color: var(--success);
}

.metric-trend.negative {
  color: var(--danger);
}

.goal-meter {
  width: 100%;
  height: 4px;
  margin-top: 30px;
  background: #e5e5ea;
}

.goal-meter span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--text);
  transition: width 220ms ease;
}

.microcopy {
  margin: 10px 0 0;
  font-size: 13px;
}

.status-row,
.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-soft);
  font-size: 12px;
}

.status-row span,
.meta-row span {
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line-soft);
}

.decision-copy {
  margin: 7px 0 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: -0.04em;
  font-weight: 680;
}

.next-milestone-card {
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.next-milestone-card span,
.next-milestone-card small {
  display: block;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.35;
}

.next-milestone-card strong {
  display: block;
  margin: 5px 0 4px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.text-cta {
  align-self: flex-start;
  color: var(--accent);
  border-color: rgba(0, 113, 227, 0.26);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 16px;
  border: 1px solid var(--line-soft);
  background: var(--surface);
}

.metric-strip article {
  min-width: 0;
  padding: 18px;
  border-right: 1px solid var(--line-soft);
}

.metric-strip article:last-child {
  border-right: 0;
}

.metric-strip p,
.metric-strip span {
  display: block;
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.35;
}

.metric-strip strong {
  display: block;
  margin: 7px 0 5px;
  color: var(--text);
  font-size: clamp(20px, 2.3vw, 28px);
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 680;
}

.guide-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 16px;
  border: 1px solid var(--line-soft);
  background: var(--line-soft);
}

.guide-strip div {
  padding: 14px 16px;
  background: #fff;
}

.guide-strip strong,
.guide-strip span {
  display: block;
  font-size: 13px;
  line-height: 1.35;
}

.guide-strip strong {
  color: var(--text);
  margin-bottom: 3px;
}

.guide-strip span {
  color: var(--text-soft);
}

.sheet,
.card {
  margin-top: 26px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 0;
  box-shadow: none;
}

.sheet {
  padding: 28px;
}

.card {
  padding: 24px;
}

.section-header,
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
}

.section-header h2,
.card-head h2,
.chart-card h3,
.form-title h3,
.backup-panel h3,
.subsection-title {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.12;
  letter-spacing: -0.045em;
  font-weight: 680;
}

.form-title h3,
.chart-card h3,
.backup-panel h3,
.subsection-title {
  font-size: 17px;
}

.section-note {
  max-width: 410px;
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.action-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}

.action-tabs {
  display: grid;
  align-content: start;
  gap: 1px;
  background: var(--line-soft);
}

.action-tabs button {
  min-height: 86px;
  padding: 18px;
  border: 0;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.action-tabs button:hover {
  background: #fbfbfd;
}

.action-tabs button.active {
  background: var(--surface-soft);
  box-shadow: inset 3px 0 0 var(--text);
}

.action-tabs strong,
.action-tabs span {
  display: block;
}

.action-tabs strong {
  font-size: 15px;
  letter-spacing: -0.02em;
}

.action-tabs span {
  margin-top: 5px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
}

.action-panels {
  background: #fff;
  min-width: 0;
}

.action-panel {
  display: none;
}

.action-panel.active {
  display: block;
}

.form-card {
  min-width: 0;
  margin: 0;
  padding: 24px;
  border: 0;
  background: #fff;
}

.form-title {
  margin-bottom: 6px;
}

.form-title p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
}

.form-card label,
.form-inline label {
  display: block;
  margin: 16px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 560;
}

.form-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

input,
select {
  display: block;
  width: 100%;
  min-height: 42px;
  margin-top: 7px;
  padding: 10px 11px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  font-size: 14px;
}

input::placeholder {
  color: #a1a1a6;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.form-card button,
.form-inline button {
  width: 100%;
  min-height: 44px;
  margin-top: 20px;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 18px;
}

.partner-grid,
.insight-list,
.recommendation-grid,
.scenario-grid,
.heatmap-grid {
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
}

.partner-row {
  padding: 18px;
  background: #fff;
}

.partner-row p {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 9px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

.partner-row p:first-child {
  display: block;
  margin: 0 0 12px;
  color: var(--text);
  font-size: 17px;
  letter-spacing: -0.02em;
}

.partner-row p span,
.partner-row strong {
  color: var(--text);
  font-weight: 650;
}

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

.insight-list li {
  margin: 0;
  padding: 14px 16px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.insight-list li.alert,
.insight-list li.danger {
  color: var(--danger);
  background: #fffafa;
}

.insight-list li.warning {
  color: var(--warning);
  background: #fffdf8;
}

.insight-list li.success {
  color: var(--success);
  background: #fbfffb;
}

.project-list {
  display: grid;
  gap: 1px;
  background: var(--line-soft);
}

.project-card {
  background: #fff;
}

.project-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.project-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.project-meta {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.4;
}

.project-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.project-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.project-kpis div {
  padding: 12px 18px;
  background: var(--surface-soft);
}

.project-kpis span,
.milestone-meta,
.milestone-empty,
.project-empty-note {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.35;
}

.project-kpis strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 17px;
  letter-spacing: -0.03em;
}

.milestone-stack {
  display: grid;
  gap: 1px;
  background: var(--line-soft);
}

.milestone-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.36fr) auto;
  gap: 16px;
  align-items: start;
  padding: 15px 18px;
  background: #fff;
}

.milestone-row.done {
  background: #fbfbfd;
}

.milestone-row.overdue {
  background: #fffafa;
}

.milestone-title {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 680;
}

.milestone-action {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.4;
}

.milestone-meta {
  display: grid;
  gap: 6px;
}

.status-pill,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 560;
}

.status-pill.attivo {
  color: var(--success);
  border-color: rgba(36, 138, 61, 0.28);
  background: #fbfffb;
}

.status-pill.chiuso {
  color: var(--warning);
  border-color: rgba(160, 90, 0, 0.28);
  background: #fffdf8;
}

.priority-high {
  color: var(--danger);
  border-color: rgba(215, 0, 21, 0.28);
  background: #fffafa;
}

.priority-medium {
  color: var(--warning);
  border-color: rgba(160, 90, 0, 0.28);
  background: #fffdf8;
}

.priority-low {
  color: var(--text-soft);
  background: #fbfbfd;
}

.status-todo {
  color: var(--text-soft);
  background: #fff;
}

.status-doing {
  color: var(--accent);
  border-color: rgba(0, 113, 227, 0.28);
  background: #f8fbff;
}

.status-done {
  color: var(--success);
  border-color: rgba(36, 138, 61, 0.28);
  background: #fbfffb;
}

.milestone-empty,
.project-empty-note {
  padding: 15px 18px;
  background: #fff;
}

.record-block,
.advanced-block {
  margin-top: 14px;
  border: 1px solid var(--line-soft);
  background: #fff;
}

.record-block:first-of-type {
  margin-top: 0;
}

summary {
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

.record-block summary,
.advanced-block summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 18px;
  border-bottom: 1px solid transparent;
}

details[open] > summary {
  border-bottom-color: var(--line-soft);
}

.record-block summary::after,
.advanced-block summary::after {
  content: "+";
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1;
}

.record-block[open] summary::after,
.advanced-block[open] summary::after {
  content: "–";
}

summary span {
  color: var(--text);
  font-size: 17px;
  font-weight: 680;
  letter-spacing: -0.03em;
}

summary small {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 500;
}

.record-tools {
  display: flex;
  justify-content: flex-end;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-soft);
}

.search-box {
  min-width: min(360px, 100%);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--text-soft);
  font-size: 12px;
}

.search-box input {
  margin: 0;
  min-height: 36px;
}

.table-wrap {
  width: 100%;
  overflow: auto;
}

table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.35;
}

th {
  position: sticky;
  top: 58px;
  z-index: 1;
  color: var(--text-soft);
  background: #fbfbfd;
  font-size: 11px;
  font-weight: 650;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: #fbfbfd;
}

th:last-child,
td:last-child {
  text-align: right;
}

.row-actions {
  display: inline-flex;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
}

.row-actions button {
  min-height: 28px;
  padding: 5px 8px;
  font-size: 12px;
  background: #fff;
}

.muted {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
}

.recommendation-grid,
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
}

.recommendation,
.scenario-card {
  min-width: 0;
  padding: 18px;
  background: #fff;
  border: 0;
}

.recommendation-title,
.scenario-card h4 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.recommendation-value,
.scenario-value {
  margin: 12px 0 6px;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.045em;
  font-weight: 680;
}

.recommendation p:last-child,
.scenario-card p:last-child {
  margin-bottom: 0;
}

.recommendation.warning,
.scenario-card.neutral {
  background: #fffdf8;
}

.recommendation.danger,
.scenario-card.danger {
  background: #fffafa;
}

.recommendation.success,
.scenario-card.positive {
  background: #fbfffb;
}

.advanced-block {
  margin-top: 22px;
}

.charts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.78fr) minmax(240px, 0.78fr);
  gap: 22px;
  padding: 20px 18px 18px;
}

.chart-card {
  min-width: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
}

.chart-card h3 {
  margin-bottom: 14px;
}

#forecastCanvas {
  width: 100%;
  height: 280px;
  display: block;
  background: #fff;
  border: 1px solid var(--line-soft);
}

.forecast-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 14px;
}

.forecast-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-soft);
  font-size: 12px;
}

.forecast-legend-dot,
.scenario-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--text);
}

#forecastSummary {
  margin-top: 10px;
}

.bar-chart {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(92px, 0.72fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
}

.bar-track {
  height: 6px;
  background: #e5e5ea;
}

.bar-fill {
  height: 100%;
  background: var(--accent);
}

.scenario-grid {
  margin: 0 18px 18px;
}

.scenario-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.scenario-title {
  margin: 16px 0 0;
  color: var(--text-soft);
  font-size: 12px;
}

.divider {
  height: 1px;
  margin: 22px 18px;
  background: var(--line-soft);
}

.subsection-title {
  margin: 0 18px 14px;
}

.heatmap-grid {
  display: grid;
  gap: 1px;
  margin: 0 18px 18px;
}

.heat-row {
  background: #fff;
  padding: 14px 16px;
}

.heat-row-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  font-size: 13px;
}

.heat-row-label span:last-child {
  color: var(--text-soft);
  font-size: 12px;
}

.heat-row-track {
  height: 5px;
  margin-top: 10px;
  background: #e5e5ea;
}

.heat-row-fill {
  height: 100%;
  min-width: 5px;
  background: var(--danger);
}

.heat-row-impact {
  margin-top: 7px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 650;
}

.form-inline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(150px, 0.55fr);
  gap: 14px;
  align-items: end;
  padding: 18px;
  border: 1px solid var(--line-soft);
  background: #fff;
}

.form-inline label,
.form-inline button {
  margin: 0;
}

.backup-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  background: var(--surface-soft);
}

.backup-panel h3 {
  margin: 0 0 6px;
}

.backup-panel p {
  margin: 0;
}

.toast-area {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 48px));
}

.toast {
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast strong {
  display: block;
  margin: 0 0 4px;
  color: var(--text);
  font-size: 14px;
}

.toast p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
}

.toast.success {
  border-left: 3px solid var(--success);
}

.toast.warning {
  border-left: 3px solid var(--warning);
}

.toast.danger {
  border-left: 3px solid var(--danger);
}

.small {
  font-size: 12px;
}

@media (max-width: 1080px) {
  .toolbar-inner {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 8px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .toolbar-nav {
    justify-content: flex-start;
  }

  .toolbar-nav a {
    min-height: 36px;
  }

  .toolbar-nav a.active::after {
    bottom: 0;
  }

  .toolbar-actions,
  .backup-actions {
    justify-content: flex-start;
  }

  .hero-sheet,
  .split-grid,
  .action-layout,
  .charts-grid {
    grid-template-columns: 1fr;
  }

  .next-step-card {
    border-left: 0;
    border-top: 1px solid var(--line-soft);
  }

  .metric-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metric-strip article:nth-child(3n) {
    border-right: 0;
  }

  .metric-strip article:nth-child(n + 4) {
    border-top: 1px solid var(--line-soft);
  }

  .guide-strip,
  .recommendation-grid,
  .scenario-grid,
  .form-inline {
    grid-template-columns: 1fr;
  }

  .action-tabs button.active {
    box-shadow: inset 0 -3px 0 var(--text);
  }
}

@media (max-width: 720px) {
  .content {
    padding: 18px 14px 54px;
  }

  .toolbar-inner {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-main,
  .next-step-card,
  .sheet,
  .card {
    padding: 20px;
  }

  .hero-main h1 {
    font-size: 48px;
  }

  .decision-copy {
    font-size: 20px;
  }

  .metric-strip,
  .partner-grid,
  .form-two,
  .project-kpis {
    grid-template-columns: 1fr;
  }

  .metric-strip article,
  .metric-strip article:nth-child(3n) {
    border-right: 0;
    border-top: 1px solid var(--line-soft);
  }

  .metric-strip article:first-child {
    border-top: 0;
  }

  .section-header,
  .card-head,
  .backup-panel,
  .project-card-head,
  .milestone-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .action-tabs button {
    min-height: 72px;
  }

  .search-box,
  .record-tools {
    min-width: 0;
    justify-content: stretch;
  }

  .status-row,
  .meta-row,
  .heat-row-label,
  .partner-row p,
  .record-block summary,
  .advanced-block summary {
    display: grid;
    justify-content: stretch;
  }

  .project-actions,
  .row-actions {
    justify-content: flex-start;
  }

  .toast-area {
    right: 14px;
    bottom: 14px;
    width: calc(100vw - 28px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
