/* ============================================================
   macroutine — Components
   ============================================================ */

/* ---------- Generic grids ---------- */
.grid {
  display: grid;
  gap: 20px;
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

@media (max-width: 860px) {
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
}

/* ---------- Card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.card h3,
.card h4 { font-size: 17px; margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--text-soft); }

.tag {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--surface-inset);
}

/* ---------- Palette swatches ---------- */
.palette {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.swatch {
  border-radius: var(--r-md);
  padding: 20px;
  min-height: 148px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.swatch__name {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}
.swatch__hex {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  opacity: 0.85;
}
.swatch--forest { background: var(--forest); }
.swatch--sage   { background: var(--sage); }
.swatch--mint   { background: var(--mint); color: var(--forest); }
.swatch--teal   { background: var(--teal); }

@media (max-width: 720px) {
  .palette { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- KPI grid ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--mint);
  border-radius: var(--r-md);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
}
.kpi__num {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 36px);
  color: var(--forest);
}
.kpi__label {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-soft);
}

@media (max-width: 860px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 460px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

/* ---------- Checklist ---------- */
.checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 640px;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.check-item:hover { border-color: var(--border-strong); }
.check-item.is-done { background: var(--good-bg); border-color: var(--good-br); }
.check-item__box {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 2px solid var(--sage);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.check-item.is-done .check-item__box { background: var(--good); border-color: var(--good); }
.check-item__text { font-size: 14.5px; }
.check-item.is-done .check-item__text { text-decoration: line-through; color: var(--text-mute); }

.checklist-progress {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--teal);
}

/* ---------- Weekly roadmap (tabs) ---------- */
.week-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.week-tab {
  padding: 10px 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-soft);
  transition: all var(--dur) var(--ease);
}
.week-tab:hover { border-color: var(--border-strong); }
.week-tab[aria-selected="true"] {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--offwhite);
}
.week-panel[hidden] { display: none; }

/* Week intro card */
.week-intro {
  background: var(--surface-inset);
  border: 1px solid var(--border);
  border-left: 3px solid var(--mint);
  border-radius: var(--r-md);
  padding: 20px 22px;
  margin-bottom: 24px;
}
.week-intro__title { font-size: 20px; }
.week-intro__goal {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-soft);
  max-width: 62ch;
}

/* Vertical content track */
.track { list-style: none; margin: 0; padding: 0; }
.track__item {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 16px;
  padding-bottom: 16px;
}
.track__item:last-child { padding-bottom: 0; }
.track__marker { position: relative; display: flex; justify-content: center; }
.track__dot {
  width: 12px;
  height: 12px;
  margin-top: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--sage);
  z-index: 1;
}
.track__item:not(:last-child) .track__marker::after {
  content: "";
  position: absolute;
  top: 22px;
  bottom: -16px;
  width: 2px;
  background: var(--border);
}
.track__body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
}
.track__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
}
.track__day {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
}
.track__topic { font-size: 14.5px; }
.track__push {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--forest);
  background: var(--mint);
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.fmt {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--r-xs);
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  white-space: nowrap;
}
.fmt .icon { width: 12px; height: 12px; }
.fmt--static   { background: var(--forest); }
.fmt--carousel { background: var(--sage); }
.fmt--reel     { background: var(--mint); color: var(--forest); }
.fmt--story    { background: var(--teal); }

@media (max-width: 560px) {
  .track__push { margin-left: 0; }
}

/* ---------- SWOT ---------- */
.swot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.swot-card {
  border-radius: var(--r-md);
  padding: 28px;
}
.swot-card--good   { background: var(--good-bg);   border: 1px solid var(--good-br); }
.swot-card--bad,
.swot-card--weak   { background: var(--warn-bg);   border: 1px solid var(--warn-br); }
.swot-card--opp    { background: var(--info-bg);   border: 1px solid var(--info-br); }
.swot-card--threat { background: var(--danger-bg); border: 1px solid var(--danger-br); }
.swot-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  margin-bottom: 14px;
}
.swot-card__kind {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.75;
}
.swot-card--good h3   { color: var(--good); }
.swot-card--bad h3,
.swot-card--weak h3   { color: var(--warn); }
.swot-card--opp h3    { color: var(--info); }
.swot-card--threat h3 { color: var(--danger); }
.swot-card li {
  font-size: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.swot-card li:last-child { border-bottom: none; }

@media (max-width: 860px) {
  .swot-grid { grid-template-columns: 1fr; }
}

/* ---------- Steps ---------- */
.steps {
  counter-reset: step;
  display: flex;
  flex-direction: column;
}
.step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 22px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}
.step:first-child { padding-top: 0; }
.step:last-child { border-bottom: none; padding-bottom: 0; }
.step__num {
  counter-increment: step;
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--mint);
}
.step__num::before { content: counter(step, decimal-leading-zero); }
.step h4 { font-size: 16.5px; margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--text-soft); max-width: 60ch; }

@media (max-width: 560px) {
  .step { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- Budget bars ---------- */
.budget-wrap {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 40px;
  align-items: start;
}
.bar-item { margin-bottom: 22px; }
.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13.5px;
  margin-bottom: 8px;
}
.bar-label .amt {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--forest);
  white-space: nowrap;
}
.bar-track {
  height: 12px;
  background: var(--surface-inset);
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 999px;
  width: 0;
  transition: width 1s var(--ease);
}
.bar-fill--1 { background: var(--forest); }
.bar-fill--2 { background: var(--sage); }
.bar-fill--3 { background: var(--mint); }
.bar-fill--4 { background: var(--teal); }

.budget-total {
  margin-top: 4px;
  padding-top: 18px;
  border-top: 1px dashed var(--border-strong);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--forest);
}

.panel-dark {
  background: var(--forest);
  color: var(--on-dark-soft);
  border-radius: var(--r-md);
  padding: 28px;
}
.panel-dark h4 {
  color: var(--mint);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.panel-dark ul { display: flex; flex-direction: column; gap: 10px; }
.panel-dark li {
  font-size: 13.5px;
  padding-left: 18px;
  position: relative;
}
.panel-dark li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--mint);
}

@media (max-width: 860px) {
  .budget-wrap { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- Statement block (conviction / closing) ---------- */
.statement {
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(144, 204, 168, 0.18), transparent 55%),
    var(--forest);
  color: var(--on-dark-soft);
  border-radius: var(--r-lg);
  padding: clamp(28px, 5vw, 46px);
  box-shadow: var(--shadow-md);
}
.statement__lead {
  font-family: var(--font-display);
  font-size: clamp(19px, 2.4vw, 25px);
  line-height: 1.4;
  color: var(--offwhite);
  margin-bottom: 18px;
}
.statement p {
  font-size: clamp(14.5px, 1.5vw, 16px);
  line-height: 1.7;
  max-width: 66ch;
}
.statement p + p { margin-top: 14px; }
.statement strong { color: var(--mint); font-weight: 600; }

/* ---------- Contingency ---------- */
.contingency {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.cont-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  border-radius: var(--r-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.cont-card .trigger {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--warn);
}
.cont-card h4 { margin-top: 8px; font-size: 16px; }
.cont-card p { margin-top: 8px; font-size: 13.5px; color: var(--text-soft); }

@media (max-width: 980px) { .contingency { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .contingency { grid-template-columns: 1fr; } }

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}
.data-table {
  min-width: 560px;
  background: var(--surface);
  font-size: 14px;
}
.data-table thead th {
  padding: 16px 20px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--offwhite);
  background: var(--forest);
  white-space: nowrap;
}
.data-table tbody td {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  vertical-align: top;
}
.data-table tbody tr:hover td { background: var(--surface-2); }
.data-table td:first-child {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--forest);
}
.data-table .col-detail { color: var(--text-soft); font-size: 13.5px; }
.data-table .col-qty {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  white-space: nowrap;
}
.data-table .col-qty .qty-sub {
  display: block;
  margin-top: 2px;
  font-weight: 400;
  font-size: 11px;
  color: var(--text-mute);
}
.data-table .col-price s {
  color: var(--text-mute);
  font-weight: 400;
  margin-right: 6px;
}
.savings-note {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
  padding: 18px 22px;
  border-radius: var(--r-md);
  background: var(--good-bg);
  border: 1px solid var(--good-br);
}
.savings-note__pct {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  color: var(--good);
  line-height: 1;
}
.savings-note__text {
  font-size: 13.5px;
  color: var(--text-soft);
}
.savings-note__text strong { color: var(--forest); }

@media (max-width: 520px) {
  .savings-note { flex-wrap: wrap; }
}

.tag-free {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--good-bg);
  border: 1px solid var(--good-br);
  color: var(--good);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.data-table .col-price {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--forest);
  white-space: nowrap;
}
.data-table tfoot td {
  padding: 20px;
  background: var(--surface-inset);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--forest);
  border-top: 2px solid var(--mint);
}
.data-table tfoot .col-price {
  font-family: var(--font-display);
  font-size: 22px;
  text-transform: none;
  letter-spacing: 0;
}
.data-table tfoot .col-price s {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-mute);
  margin-bottom: 2px;
}
.table-note {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
}

/* ---------- Callout ---------- */
.callout {
  display: flex;
  gap: 14px;
  padding: 18px 22px;
  border-radius: var(--r-md);
  background: var(--surface-inset);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-soft);
}
.callout strong { color: var(--forest); }

/* ---------- Offer / included-for-free panel ---------- */
.offer {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  padding: clamp(28px, 4vw, 44px);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(144, 204, 168, 0.28), transparent 55%),
    linear-gradient(155deg, var(--forest), #123B2C 70%, #0C2E22);
  color: var(--on-dark-soft);
  box-shadow: var(--shadow-md);
}
.offer__badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--forest);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.offer__title {
  margin-top: 16px;
  font-size: clamp(22px, 3vw, 30px);
  color: var(--offwhite);
  max-width: 22ch;
}
.offer__lede {
  margin-top: 12px;
  max-width: 60ch;
  font-size: 15px;
}
.offer__list {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 28px;
}
.offer__list li {
  display: flex;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--on-dark-soft);
}
.offer__list li::before {
  content: "";
  flex-shrink: 0;
  margin-top: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background:
    var(--mint)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230A382E' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}
.offer__foot {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(144, 204, 168, 0.22);
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--mint);
}

@media (max-width: 640px) {
  .offer__list { grid-template-columns: 1fr; }
}

/* ---------- Icons ---------- */
.icon {
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
  vertical-align: -0.18em;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tag .icon { width: 13px; height: 13px; }

.swot-card h3 .icon { width: 22px; height: 22px; }

.hero__channels {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.hero__channels span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: clamp(15px, 1.7vw, 18px);
  color: var(--offwhite);
}
.hero__channels .icon { width: 18px; height: 18px; color: var(--mint); }

.bar-label > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.bar-label .bar-icon {
  width: 17px;
  height: 17px;
  color: var(--sage);
  flex-shrink: 0;
}

.cont-card .trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.cont-card .trigger .icon { width: 13px; height: 13px; }

/* ---------- Sub-heading inside sections ---------- */
.subhead {
  margin: clamp(36px, 5vw, 56px) 0 20px;
  font-size: 22px;
  color: var(--forest);
}
.subhead:first-child { margin-top: 0; }
