.yld-fire,
.yld-fire * {
  box-sizing: border-box;
}

.yld-fire {
  --yld-ink: #173042;
  --yld-muted: #607283;
  --yld-line: #dce5ea;
  --yld-soft: #f4f7f8;
  --yld-brand: #087f6b;
  --yld-brand-dark: #056353;
  --yld-blue: #1769aa;
  --yld-green: #137a55;
  --yld-green-bg: #eaf7f1;
  --yld-yellow: #9b6c00;
  --yld-yellow-bg: #fff7d8;
  --yld-orange: #b65b16;
  --yld-orange-bg: #fff0e3;
  --yld-red: #aa3147;
  --yld-red-bg: #fcebef;
  --yld-shadow: 0 14px 36px rgba(23, 48, 66, 0.09);
  color: var(--yld-ink);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  margin: 24px auto 48px;
  max-width: 1120px;
}

.yld-fire button,
.yld-fire input,
.yld-fire select {
  font: inherit;
}

.yld-fire button {
  cursor: pointer;
}

.yld-fire__hero {
  background: linear-gradient(135deg, #eef9f5 0%, #f8fbfc 56%, #edf4fa 100%);
  border: 1px solid #d9ebe5;
  border-radius: 22px;
  box-shadow: var(--yld-shadow);
  padding: 36px 40px;
}

.yld-fire__hero h2 {
  background: none !important;
  border: 0 !important;
  color: var(--yld-ink) !important;
  font-size: clamp(1.65rem, 4vw, 2.45rem) !important;
  letter-spacing: -0.025em;
  line-height: 1.35;
  margin: 7px 0 12px !important;
  padding: 0 !important;
}

.yld-fire__hero p:last-child {
  color: #455d6d;
  font-size: 0.98rem;
  line-height: 1.8;
  margin: 0;
  max-width: 760px;
}

.yld-fire__eyebrow {
  color: var(--yld-brand-dark);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin: 0;
}

.yld-fire__mount {
  margin-top: 22px;
}

.yld-fire__loading,
.yld-fire__progress {
  background: #fff;
  border: 1px solid var(--yld-line);
  border-radius: 16px;
  color: var(--yld-muted);
  padding: 30px;
  text-align: center;
}

.yld-fire__panel,
.yld-fire__section,
.yld-fire__status-panel {
  background: #fff;
  border: 1px solid var(--yld-line);
  border-radius: 18px;
  box-shadow: 0 7px 24px rgba(23, 48, 66, 0.06);
}

.yld-fire__panel {
  padding: 30px;
}

.yld-fire__stepper {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none !important;
  margin: 0 0 24px !important;
  padding: 0 !important;
}

.yld-fire__stepper li {
  margin: 0;
  padding: 0;
}

.yld-fire__step-button {
  align-items: center;
  background: var(--yld-soft);
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--yld-muted);
  display: flex;
  font-size: 0.83rem;
  font-weight: 700;
  gap: 8px;
  min-height: 50px;
  padding: 8px 10px;
  text-align: left;
  width: 100%;
}

.yld-fire__step-button span:first-child {
  align-items: center;
  background: #fff;
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 28px;
  height: 28px;
  justify-content: center;
}

.yld-fire__step-button.is-active {
  background: #e8f5f1;
  border-color: #9ccdbf;
  color: var(--yld-brand-dark);
}

.yld-fire__step-button.is-complete span:first-child {
  background: var(--yld-brand);
  color: #fff;
}

.yld-fire__step-title,
.yld-fire__section-title {
  background: none !important;
  border: 0 !important;
  color: var(--yld-ink) !important;
  margin: 0 0 8px !important;
  padding: 0 !important;
}

.yld-fire__step-title {
  font-size: 1.35rem !important;
}

.yld-fire__section-title {
  font-size: 1.18rem !important;
}

.yld-fire__lead,
.yld-fire__fineprint {
  color: var(--yld-muted);
  line-height: 1.7;
}

.yld-fire__lead {
  margin: 0 0 24px;
}

.yld-fire__fineprint {
  font-size: 0.79rem;
  margin: 8px 0 0;
}

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

.yld-fire__form-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.yld-fire__field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.yld-fire__field > span:first-child,
.yld-fire__field-label {
  color: #304b5c;
  font-size: 0.86rem;
  font-weight: 700;
}

.yld-fire__field input,
.yld-fire__field select,
.yld-fire__portfolio-row input,
.yld-fire__portfolio-row select,
.yld-fire__improve-grid input {
  background: #fff;
  border: 1px solid #bdccd5;
  border-radius: 9px;
  color: var(--yld-ink);
  min-height: 46px;
  padding: 9px 11px;
  width: 100%;
}

.yld-fire__field input:focus,
.yld-fire__field select:focus,
.yld-fire__portfolio-row input:focus,
.yld-fire__portfolio-row select:focus,
.yld-fire__improve-grid input:focus {
  border-color: var(--yld-brand);
  box-shadow: 0 0 0 3px rgba(8, 127, 107, 0.14);
  outline: 0;
}

.yld-fire__input-unit {
  position: relative;
}

.yld-fire__input-unit input {
  padding-right: 48px;
}

.yld-fire__input-unit span {
  color: var(--yld-muted);
  font-size: 0.82rem;
  pointer-events: none;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.yld-fire__radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.yld-fire__radio-card {
  align-items: center;
  border: 1px solid var(--yld-line);
  border-radius: 10px;
  display: inline-flex;
  gap: 7px;
  min-height: 44px;
  padding: 8px 12px;
}

.yld-fire__radio-card:has(input:checked) {
  background: #eaf7f3;
  border-color: #8ac4b4;
}

.yld-fire__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-top: 28px;
}

.yld-fire__actions-group {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.yld-fire__button {
  background: #fff;
  border: 1px solid #aebec8;
  border-radius: 10px;
  color: #294454;
  font-weight: 700;
  min-height: 44px;
  padding: 9px 16px;
}

.yld-fire__button:hover {
  background: var(--yld-soft);
}

.yld-fire__button--primary {
  background: var(--yld-brand);
  border-color: var(--yld-brand);
  color: #fff;
}

.yld-fire__button--primary:hover {
  background: var(--yld-brand-dark);
}

.yld-fire__button--danger {
  color: var(--yld-red);
}

.yld-fire__button--small {
  font-size: 0.78rem;
  min-height: 36px;
  padding: 6px 10px;
}

.yld-fire__notice {
  background: #edf5fa;
  border: 1px solid #c6dce9;
  border-radius: 11px;
  color: #34566a;
  font-size: 0.86rem;
  line-height: 1.65;
  margin: 15px 0;
  padding: 12px 14px;
}

.yld-fire__notice--warning {
  background: var(--yld-yellow-bg);
  border-color: #ead388;
  color: #6d5107;
}

.yld-fire__notice--error {
  background: var(--yld-red-bg);
  border-color: #efb8c3;
  color: #7a2636;
}

.yld-fire__portfolio {
  display: grid;
  gap: 10px;
}

.yld-fire__portfolio-head,
.yld-fire__portfolio-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 1.15fr 1.25fr 0.8fr 50px;
}

.yld-fire__portfolio-head {
  color: var(--yld-muted);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0 6px;
}

.yld-fire__portfolio-row {
  background: var(--yld-soft);
  border-radius: 12px;
  padding: 10px;
}

.yld-fire__portfolio-summary {
  align-items: center;
  background: #edf6f3;
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-top: 14px;
  padding: 13px 15px;
}

.yld-fire__portfolio-summary strong {
  color: var(--yld-brand-dark);
  font-size: 1.12rem;
}

.yld-fire__progress-bar {
  background: #e4ecef;
  border-radius: 99px;
  height: 9px;
  margin: 15px auto 8px;
  max-width: 520px;
  overflow: hidden;
}

.yld-fire__progress-bar span {
  background: linear-gradient(90deg, var(--yld-brand), #2b96bd);
  display: block;
  height: 100%;
  transition: width 180ms ease;
  width: 0;
}

.yld-fire__status-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1.35fr 0.65fr;
}

.yld-fire__status-panel {
  padding: 24px;
}

.yld-fire__status-panel--fire {
  border-left: 7px solid var(--status-color, var(--yld-green));
}

.yld-fire__status-panel--market {
  border-top: 5px solid var(--status-color, #8a99a3);
}

.yld-fire__status-label {
  color: var(--yld-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  margin: 0 0 6px;
}

.yld-fire__status-value {
  color: var(--status-color, var(--yld-ink));
  font-size: clamp(1.55rem, 4vw, 2.3rem);
  font-weight: 800;
  line-height: 1.25;
  margin: 0;
}

.yld-fire__status-note {
  color: var(--yld-muted);
  font-size: 0.84rem;
  line-height: 1.6;
  margin: 8px 0 0;
}

.yld-fire [data-level="green"] { --status-color: var(--yld-green); }
.yld-fire [data-level="yellow"] { --status-color: var(--yld-yellow); }
.yld-fire [data-level="orange"] { --status-color: var(--yld-orange); }
.yld-fire [data-level="red"] { --status-color: var(--yld-red); }
.yld-fire [data-level="unavailable"] { --status-color: #70808a; }

.yld-fire__metric-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.yld-fire__metric {
  background: #fff;
  border: 1px solid var(--yld-line);
  border-radius: 14px;
  min-width: 0;
  padding: 16px;
}

.yld-fire__metric-label {
  color: var(--yld-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.yld-fire__metric-value {
  color: var(--yld-ink);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.35;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.yld-fire__metric-note {
  color: var(--yld-muted);
  font-size: 0.72rem;
  line-height: 1.5;
  margin-top: 5px;
}

.yld-fire__conclusion {
  background: #f0f8f5;
  border: 1px solid #c6e2d8;
  border-radius: 15px;
  margin-top: 16px;
  padding: 18px 20px;
}

.yld-fire__conclusion p {
  line-height: 1.75;
  margin: 0 0 7px;
}

.yld-fire__conclusion p:last-child {
  margin-bottom: 0;
}

.yld-fire__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 22px 0 12px;
}

.yld-fire__tab {
  background: #edf2f4;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #49606f;
  font-size: 0.78rem;
  font-weight: 700;
  min-height: 38px;
  padding: 7px 13px;
}

.yld-fire__tab[aria-selected="true"] {
  background: var(--yld-brand);
  color: #fff;
}

.yld-fire__section {
  margin-top: 12px;
  padding: 24px;
}

.yld-fire__section[hidden] {
  display: none;
}

.yld-fire__component-grid,
.yld-fire__risk-dna-grid,
.yld-fire__market-grid {
  display: grid;
  gap: 11px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.yld-fire__component,
.yld-fire__risk-dna,
.yld-fire__market-card {
  background: var(--yld-soft);
  border: 1px solid #e0e8ec;
  border-radius: 12px;
  padding: 14px;
}

.yld-fire__component-head {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.yld-fire__badge {
  background: color-mix(in srgb, var(--status-color) 12%, white);
  border: 1px solid color-mix(in srgb, var(--status-color) 32%, white);
  border-radius: 999px;
  color: var(--status-color);
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
}

.yld-fire__component p,
.yld-fire__risk-dna p,
.yld-fire__market-card p {
  color: var(--yld-muted);
  font-size: 0.76rem;
  line-height: 1.55;
  margin: 7px 0 0;
}

.yld-fire__chart-wrap {
  height: 390px;
  margin-top: 16px;
  min-height: 260px;
  position: relative;
  width: 100%;
}

.yld-fire__chart-wrap--short {
  height: 330px;
}

.yld-fire__table-wrap {
  margin-top: 14px;
  max-width: 100%;
  overflow-x: auto;
}

.yld-fire__table {
  border-collapse: collapse;
  font-size: 0.78rem;
  min-width: 700px;
  width: 100%;
}

.yld-fire__table th,
.yld-fire__table td {
  border-bottom: 1px solid var(--yld-line);
  padding: 10px 9px;
  text-align: right;
  vertical-align: top;
}

.yld-fire__table th:first-child,
.yld-fire__table td:first-child,
.yld-fire__table th:nth-child(2),
.yld-fire__table td:nth-child(2) {
  text-align: left;
}

.yld-fire__table th {
  color: #405969;
  font-weight: 800;
}

.yld-fire__risk-dna ul {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  list-style: none !important;
  margin: 9px 0 0 !important;
  padding: 0 !important;
}

.yld-fire__risk-dna li {
  background: #fff;
  border-radius: 999px;
  color: #49606f;
  font-size: 0.68rem;
  margin: 0;
  padding: 4px 7px;
}

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

.yld-fire__scenario-list {
  display: grid;
  gap: 8px;
  margin-top: 15px;
}

.yld-fire__scenario {
  align-items: center;
  background: var(--yld-soft);
  border-radius: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(150px, 1fr) 90px 90px;
  padding: 11px 13px;
}

.yld-fire__scenario span:nth-child(2),
.yld-fire__scenario span:nth-child(3) {
  text-align: right;
}

.yld-fire__improve-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 16px 0;
}

.yld-fire__comparison-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr 1fr;
  margin-top: 16px;
}

.yld-fire__comparison-grid > div {
  border-bottom: 1px solid var(--yld-line);
  padding: 9px;
}

.yld-fire__comparison-grid > div:nth-child(3n+2),
.yld-fire__comparison-grid > div:nth-child(3n+3) {
  text-align: right;
}

.yld-fire__disclaimer {
  background: #f7f9fa;
  border: 1px solid var(--yld-line);
  border-radius: 12px;
  color: #5a6c79;
  font-size: 0.74rem;
  line-height: 1.65;
  margin-top: 18px;
  padding: 14px 16px;
}

.yld-fire__recommendation,
.yld-fire__summary-section,
.yld-fire__market-summary,
.yld-fire__details {
  background: #fff;
  border: 1px solid var(--yld-line);
  border-radius: 18px;
  box-shadow: 0 7px 24px rgba(23, 48, 66, 0.06);
  margin-top: 18px;
  padding: 28px;
}

.yld-fire__recommendation {
  border-top: 6px solid var(--yld-brand);
  margin-top: 0;
}

.yld-fire__recommendation h3,
.yld-fire__summary-section h3,
.yld-fire__market-summary h3 {
  background: none !important;
  border: 0 !important;
  color: var(--yld-ink) !important;
  font-size: clamp(1.3rem, 3vw, 1.75rem) !important;
  margin: 4px 0 10px !important;
  padding: 0 !important;
}

.yld-fire__section-kicker {
  color: var(--yld-brand-dark);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0;
}

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

.yld-fire__withdrawal-card {
  background: #f7fafb;
  border: 1px solid #d9e5e9;
  border-radius: 15px;
  min-width: 0;
  padding: 20px;
}

.yld-fire__withdrawal-card--balanced {
  background: #edf8f4;
  border-color: #9dd1c2;
  box-shadow: 0 8px 22px rgba(8, 127, 107, 0.10);
}

.yld-fire__withdrawal-title {
  align-items: center;
  display: flex;
  gap: 8px;
}

.yld-fire__withdrawal-title span {
  font-size: 1.2rem;
}

.yld-fire__withdrawal-rate {
  color: var(--yld-brand-dark);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 850;
  line-height: 1.15;
  margin: 12px 0;
}

.yld-fire__withdrawal-card dl,
.yld-fire__withdrawal-card p {
  margin: 0;
}

.yld-fire__withdrawal-card dl > div {
  align-items: baseline;
  border-top: 1px solid #dce6e9;
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
}

.yld-fire__withdrawal-card dt {
  color: var(--yld-muted);
  font-size: 0.76rem;
}

.yld-fire__withdrawal-card dd {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0;
}

.yld-fire__withdrawal-card p {
  color: var(--yld-muted);
  font-size: 0.75rem;
  line-height: 1.55;
  margin-top: 10px;
}

.yld-fire__rule-reference {
  background: #f8f6ee;
  border: 1px solid #ddd5b9;
  border-radius: 14px;
  margin-top: 16px;
  padding: 16px 18px;
}

.yld-fire__rule-reference > div {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.yld-fire__rule-reference span {
  color: #625a3f;
  font-size: 0.82rem;
  font-weight: 800;
}

.yld-fire__rule-reference strong {
  color: var(--yld-ink);
  font-size: 1.65rem;
}

.yld-fire__rule-reference small {
  color: #625a3f;
}

.yld-fire__rule-reference p {
  color: #5d5a4d;
  font-size: 0.78rem;
  line-height: 1.7;
  margin: 8px 0 0;
}

.yld-fire__outcome-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.yld-fire__market-summary {
  border-left: 7px solid var(--status-color, #70808a);
}

.yld-fire__market-summary > p:not(.yld-fire__section-kicker) {
  color: #455d6d;
  line-height: 1.75;
}

.yld-fire__market-score {
  color: var(--status-color, var(--yld-ink)) !important;
  font-size: 1.08rem;
}

.yld-fire__market-score:empty {
  display: none;
}

.yld-fire__market-reasons {
  background: #f5f8fa;
  border: 1px solid #dbe5ea;
  border-radius: 13px;
  margin: 15px 0;
  padding: 15px 17px;
}

.yld-fire__market-reasons > strong {
  color: var(--yld-ink);
  font-size: 0.86rem;
}

.yld-fire__market-reasons ul {
  margin: 9px 0 0 !important;
  padding-left: 1.25rem !important;
}

.yld-fire__market-reasons li,
.yld-fire__market-reasons p {
  color: #455d6d;
  font-size: 0.78rem;
  line-height: 1.7;
}

.yld-fire__market-reasons li {
  margin: 4px 0;
}

.yld-fire__market-reasons p {
  margin: 8px 0 0;
}

.yld-fire__details {
  padding: 20px 24px 24px;
}

.yld-fire__details > summary {
  color: var(--yld-brand-dark);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 800;
  padding: 4px 0;
}

.yld-fire__market-value {
  color: var(--yld-ink);
  font-size: 1.75rem;
  font-weight: 850;
  margin-top: 8px;
}

.yld-fire__market-card small {
  color: var(--yld-muted);
  display: block;
  font-size: 0.68rem;
  margin-top: 10px;
}

.yld-fire__inline-error {
  color: var(--yld-red);
  font-weight: 800;
}

.yld-fire__sr-only {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@media (max-width: 820px) {
  .yld-fire__hero {
    padding: 28px 24px;
  }

  .yld-fire__form-grid--three,
  .yld-fire__component-grid,
  .yld-fire__risk-dna-grid,
  .yld-fire__market-grid,
  .yld-fire__metric-grid,
  .yld-fire__withdrawal-grid,
  .yld-fire__outcome-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .yld-fire__status-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .yld-fire {
    margin: 14px auto 32px;
  }

  .yld-fire__hero {
    border-radius: 16px;
    padding: 22px 17px;
  }

  .yld-fire__panel,
  .yld-fire__section,
  .yld-fire__status-panel {
    border-radius: 14px;
  }

  .yld-fire__panel,
  .yld-fire__section,
  .yld-fire__recommendation,
  .yld-fire__summary-section,
  .yld-fire__market-summary,
  .yld-fire__details {
    padding: 18px 15px;
  }

  .yld-fire__stepper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .yld-fire__form-grid,
  .yld-fire__form-grid--three,
  .yld-fire__component-grid,
  .yld-fire__risk-dna-grid,
  .yld-fire__market-grid,
  .yld-fire__metric-grid,
  .yld-fire__two-column,
  .yld-fire__improve-grid {
    grid-template-columns: 1fr;
  }

  .yld-fire__withdrawal-grid,
  .yld-fire__outcome-grid {
    grid-template-columns: 1fr;
  }

  .yld-fire__portfolio-head {
    display: none;
  }

  .yld-fire__portfolio-row {
    grid-template-columns: 1fr 1fr;
  }

  .yld-fire__portfolio-row > *:first-child {
    grid-column: 1 / -1;
  }

  .yld-fire__actions,
  .yld-fire__actions-group {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .yld-fire__button {
    width: 100%;
  }

  .yld-fire__metric-grid {
    display: grid;
  }

  .yld-fire__chart-wrap,
  .yld-fire__chart-wrap--short {
    height: 300px;
  }

  .yld-fire__scenario {
    grid-template-columns: 1fr auto;
  }

  .yld-fire__scenario span:nth-child(3) {
    grid-column: 1 / -1;
    text-align: left;
  }

  .yld-fire__tabs {
    gap: 6px;
  }

  .yld-fire__tab {
    flex: 1 1 calc(50% - 6px);
  }
}

/* v0.5.0: portfolio-aware market context */
.yld-fire__market-score-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0;
}

.yld-fire__market-score-grid > div {
  background: var(--yld-soft);
  border: 1px solid var(--yld-line);
  border-radius: 12px;
  padding: 13px 14px;
}

.yld-fire__market-score-grid span,
.yld-fire__market-score-grid strong {
  display: block;
}

.yld-fire__market-score-grid span {
  color: var(--yld-muted);
  font-size: 0.72rem;
}

.yld-fire__market-score-grid strong {
  color: var(--status-color, var(--yld-brand-dark));
  font-size: 1.25rem;
  margin-top: 4px;
}

.yld-fire__market-reasons--behavior {
  margin-bottom: 14px;
}

.yld-fire__context-grid {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.yld-fire__context-card {
  --context-color: #087f6b;
  background: #fff;
  border: 1px solid var(--yld-line);
  border-top: 4px solid var(--context-color);
  border-radius: 13px;
  min-width: 0;
  padding: 15px;
}

.yld-fire__context-card[data-level="yellow"] { --context-color: #b28a12; }
.yld-fire__context-card[data-level="orange"] { --context-color: #c36b20; }
.yld-fire__context-card[data-level="red"] { --context-color: #b13b50; }
.yld-fire__context-card[data-level="unavailable"],
.yld-fire__context-card.is-unavailable { --context-color: #87949d; }

.yld-fire__context-card[data-group="behavior"] {
  grid-column: 1 / -1;
}

.yld-fire__context-card-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.yld-fire__context-card-head strong,
.yld-fire__context-card-head small {
  display: block;
}

.yld-fire__context-card-head strong {
  color: var(--yld-ink);
  font-size: 0.92rem;
}

.yld-fire__context-card-head small {
  color: var(--yld-muted);
  font-size: 0.66rem;
  margin-top: 3px;
}

.yld-fire__context-card-head > span {
  background: color-mix(in srgb, var(--context-color) 11%, white);
  border-radius: 999px;
  color: var(--context-color);
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 850;
  padding: 5px 8px;
}

.yld-fire__context-card > p {
  color: var(--yld-muted);
  font-size: 0.7rem;
  line-height: 1.6;
  margin: 9px 0 0;
}

.yld-fire__context-metrics {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.yld-fire__context-metrics li {
  align-items: center;
  border-top: 1px solid var(--yld-line);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 9px 0;
}

.yld-fire__context-metrics li > div:last-child {
  flex: 0 0 auto;
  text-align: right;
}

.yld-fire__context-metrics strong,
.yld-fire__context-metrics a,
.yld-fire__context-metrics small,
.yld-fire__context-metrics b,
.yld-fire__metric-risk {
  display: block;
}

.yld-fire__context-metrics strong,
.yld-fire__context-metrics a {
  color: var(--yld-ink);
  font-size: 0.72rem;
  font-weight: 750;
}

.yld-fire__context-metrics small {
  color: var(--yld-muted);
  font-size: 0.61rem;
  margin-top: 2px;
}

.yld-fire__context-metrics b {
  color: var(--yld-ink);
  font-size: 0.8rem;
}

.yld-fire__metric-risk {
  color: var(--context-color);
  font-size: 0.58rem;
  font-weight: 750;
  margin-top: 2px;
}

.yld-fire__metric-risk.is-reference {
  color: var(--yld-muted);
}

.yld-fire__market-news {
  background: #f7f9fa;
  border: 1px solid var(--yld-line);
  border-radius: 13px;
  margin-top: 14px;
  padding: 15px;
}

.yld-fire__market-news > div {
  align-items: baseline;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.yld-fire__market-news > div strong {
  font-size: 0.86rem;
}

.yld-fire__market-news > div span {
  color: var(--yld-muted);
  font-size: 0.64rem;
}

.yld-fire__market-news ul {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.yld-fire__market-news li {
  border-top: 1px solid var(--yld-line);
  padding: 9px 0;
}

.yld-fire__market-news a,
.yld-fire__market-news li > span {
  color: var(--yld-ink);
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.5;
}

.yld-fire__market-news small {
  color: var(--yld-muted);
  display: block;
  font-size: 0.61rem;
  margin-top: 3px;
}

.yld-fire__market-data-errors {
  color: var(--yld-muted);
  font-size: 0.66rem;
  margin-top: 12px;
}

.yld-fire__market-data-errors summary {
  cursor: pointer;
  font-weight: 750;
}

.yld-fire__market-data-errors ul {
  margin: 8px 0 0;
}

.yld-fire__market-freshness {
  border-top: 1px solid var(--yld-line);
  color: var(--yld-muted) !important;
  font-size: 0.66rem !important;
  margin-top: 14px !important;
  padding-top: 12px;
}

@media (max-width: 720px) {
  .yld-fire__market-score-grid,
  .yld-fire__context-grid {
    grid-template-columns: 1fr;
  }

  .yld-fire__context-card,
  .yld-fire__market-news {
    padding: 13px;
  }
}

@media (max-width: 390px) {
  .yld-fire__step-button {
    font-size: 0.74rem;
  }

  .yld-fire__step-button span:first-child {
    flex-basis: 24px;
    height: 24px;
  }

  .yld-fire__portfolio-row {
    grid-template-columns: 1fr;
  }

  .yld-fire__portfolio-row > * {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .yld-fire__progress-bar span {
    transition: none;
  }
}

/* v0.4: simplified age + four-asset diagnosis */
.yld-fire__input-panel {
  display: grid;
  gap: 26px;
}

.yld-fire__input-section {
  border-bottom: 1px solid var(--yld-line);
  padding-bottom: 26px;
}

.yld-fire__input-heading {
  align-items: flex-start;
  display: flex;
  gap: 13px;
  margin-bottom: 18px;
}

.yld-fire__input-heading > span {
  align-items: center;
  background: var(--yld-brand);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  flex: 0 0 32px;
  font-weight: 800;
  height: 32px;
  justify-content: center;
}

.yld-fire__input-heading p {
  color: var(--yld-muted);
  font-size: 0.86rem;
  line-height: 1.6;
  margin: 3px 0 0;
}

.yld-fire__asset-input-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.yld-fire__asset-field {
  background: #f8fafb;
  border: 1px solid var(--yld-line);
  border-top: 4px solid #8294a1;
  border-radius: 13px;
  padding: 15px;
}

.yld-fire__asset-field--stock { border-top-color: #1769aa; }
.yld-fire__asset-field--bond { border-top-color: #087f6b; }
.yld-fire__asset-field--gold { border-top-color: #c89024; }
.yld-fire__asset-field--cash { border-top-color: #71808a; }

.yld-fire__asset-total {
  align-items: baseline;
  background: #edf7f4;
  border: 1px solid #c1e0d6;
  border-radius: 13px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 14px;
  padding: 15px 18px;
}

.yld-fire__asset-total span {
  color: #3f5a68;
  font-size: 0.84rem;
  font-weight: 700;
}

.yld-fire__asset-total strong {
  color: var(--yld-brand-dark);
  font-size: clamp(1.3rem, 3vw, 1.85rem);
}

.yld-fire__button--diagnose {
  min-width: 250px;
}

.yld-fire__withdrawal-card--grow { border-top: 5px solid #1769aa; }
.yld-fire__withdrawal-card--maintain {
  background: #edf8f4;
  border-color: #9dd1c2;
  border-top: 5px solid #087f6b;
  box-shadow: 0 8px 22px rgba(8, 127, 107, 0.10);
}
.yld-fire__withdrawal-card--use { border-top: 5px solid #c36b20; }

.yld-fire__withdrawal-label {
  color: var(--yld-muted);
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 15px;
}

.yld-fire__withdrawal-rate {
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  white-space: nowrap;
}

.yld-fire__plan-caution {
  background: var(--yld-yellow-bg);
  border-radius: 8px;
  color: #6d5107;
  font-size: 0.73rem;
  line-height: 1.55;
  margin-top: 10px;
  padding: 9px 10px;
}

.yld-fire__chart-legend-note {
  color: var(--yld-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.75rem;
  gap: 8px 18px;
  justify-content: center;
  margin-top: 10px;
}

.yld-fire__portfolio-summary-section {
  align-items: start;
  background: #fff;
  border: 1px solid var(--yld-line);
  border-radius: 18px;
  box-shadow: 0 7px 24px rgba(23, 48, 66, 0.06);
  display: grid;
  gap: 26px;
  grid-template-columns: 1.2fr 0.8fr;
  margin-top: 18px;
  padding: 28px;
}

.yld-fire__portfolio-summary-section h3 {
  background: none !important;
  border: 0 !important;
  color: var(--yld-ink) !important;
  font-size: clamp(1.3rem, 3vw, 1.75rem) !important;
  margin: 4px 0 10px !important;
  padding: 0 !important;
}

.yld-fire__portfolio-summary-section p:not(.yld-fire__section-kicker) {
  color: #455d6d;
  line-height: 1.8;
  margin: 0;
}

.yld-fire__allocation-list {
  display: grid;
  gap: 7px;
}

.yld-fire__allocation-list > div {
  align-items: baseline;
  background: var(--yld-soft);
  border-radius: 9px;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr auto 48px;
  padding: 9px 11px;
}

.yld-fire__allocation-list span,
.yld-fire__allocation-list small {
  color: var(--yld-muted);
  font-size: 0.74rem;
}

.yld-fire__allocation-list small { text-align: right; }

.yld-fire__assumption-intro {
  align-items: center;
  background: #edf7f4;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding: 12px 14px;
}

.yld-fire__assumption-intro span {
  color: var(--yld-muted);
  font-size: 0.78rem;
}

.yld-fire__details .yld-fire__table {
  min-width: 520px;
}

@media (max-width: 820px) {
  .yld-fire__asset-input-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .yld-fire__portfolio-summary-section {
    grid-template-columns: 1fr;
  }
}

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

  .yld-fire__asset-total {
    align-items: flex-start;
    flex-direction: column;
  }

  .yld-fire__button--diagnose {
    min-width: 0;
  }

  .yld-fire__withdrawal-rate {
    white-space: normal;
  }

  .yld-fire__portfolio-summary-section {
    padding: 18px 15px;
  }
}

/* v0.4.1: clickable plan details and portfolio risk */
.yld-fire__withdrawal-card[role="button"] {
  cursor: pointer;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.yld-fire__withdrawal-card[role="button"]:hover {
  box-shadow: 0 10px 26px rgba(23, 48, 66, 0.12);
  transform: translateY(-2px);
}

.yld-fire__withdrawal-card[role="button"]:focus-visible {
  outline: 3px solid rgba(23, 105, 170, 0.28);
  outline-offset: 3px;
}

.yld-fire__withdrawal-card.is-selected {
  box-shadow: 0 0 0 3px rgba(8, 127, 107, 0.20), 0 12px 28px rgba(23, 48, 66, 0.12);
}

.yld-fire__detail-cue {
  align-items: center;
  border-top: 1px solid var(--yld-line);
  color: var(--yld-brand-dark);
  display: flex;
  font-size: 0.76rem;
  font-weight: 800;
  gap: 8px;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
}

.yld-fire__detail-cue span {
  font-size: 1rem;
  transition: transform 160ms ease;
}

.yld-fire__withdrawal-card:hover .yld-fire__detail-cue span {
  transform: translateX(3px);
}

.yld-fire__plan-detail {
  background: #fff;
  border: 1px solid #b9d9cf;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(23, 48, 66, 0.09);
  margin: 20px 0;
  padding: 24px;
  scroll-margin-top: 18px;
}

.yld-fire__plan-detail[hidden] {
  display: none;
}

.yld-fire__plan-detail-head {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.yld-fire__plan-detail-head > div {
  min-width: 0;
}

.yld-fire__plan-detail h4,
.yld-fire__plan-detail h5 {
  background: none !important;
  border: 0 !important;
  color: var(--yld-ink) !important;
  padding: 0 !important;
}

.yld-fire__plan-detail h4 {
  display: block !important;
  font-size: clamp(1.25rem, 3vw, 1.65rem) !important;
  margin: 4px 0 6px !important;
  position: static !important;
  text-indent: 0 !important;
}

.yld-fire__plan-detail h4::before,
.yld-fire__plan-detail h4::after {
  content: none !important;
  display: none !important;
}

.yld-fire__plan-detail h5 {
  font-size: 1.12rem !important;
  margin: 0 0 6px !important;
}

.yld-fire__plan-detail-head p:not(.yld-fire__section-kicker),
.yld-fire__detail-block > p {
  color: var(--yld-muted);
  font-size: 0.82rem;
  line-height: 1.7;
  margin: 0;
}

.yld-fire__detail-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.yld-fire__detail-metrics > div {
  background: var(--yld-soft);
  border-radius: 11px;
  padding: 13px 14px;
}

.yld-fire__detail-metrics span,
.yld-fire__detail-metrics strong {
  display: block;
}

.yld-fire__detail-metrics span {
  color: var(--yld-muted);
  font-size: 0.72rem;
}

.yld-fire__detail-metrics strong {
  font-size: 1.18rem;
  margin-top: 4px;
}

.yld-fire__detail-block {
  border-top: 1px solid var(--yld-line);
  margin-top: 24px;
  padding-top: 22px;
}

.yld-fire__chart-wrap--detail {
  height: 350px;
}

.yld-fire__asset-path-table {
  min-width: 520px;
}

.yld-fire__stress-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.yld-fire__stress-card {
  background: #faf8f4;
  border: 1px solid #e3d8c7;
  border-radius: 12px;
  min-width: 0;
  padding: 14px;
}

.yld-fire__stress-card > strong {
  font-size: 0.84rem;
}

.yld-fire__stress-rate {
  color: var(--yld-red);
  font-size: 1.7rem;
  font-weight: 850;
  margin: 8px 0;
}

.yld-fire__stress-card dl {
  margin: 0;
}

.yld-fire__stress-card dl > div {
  border-top: 1px solid #e8dfd2;
  display: flex;
  font-size: 0.73rem;
  justify-content: space-between;
  padding: 6px 0;
}

.yld-fire__stress-card dt {
  color: var(--yld-muted);
}

.yld-fire__stress-card dd {
  font-weight: 800;
  margin: 0;
}

.yld-fire__stress-card p {
  color: var(--yld-muted);
  font-size: 0.7rem;
  line-height: 1.55;
  margin: 8px 0 0;
}

.yld-fire__stress-breakdown {
  background: var(--yld-soft);
  border-radius: 10px;
  margin-top: 12px;
  padding: 11px 13px;
}

.yld-fire__stress-breakdown > summary {
  color: var(--yld-brand-dark);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
}

.yld-fire__stress-breakdown .yld-fire__table {
  min-width: 520px;
}

.yld-fire__drawdown-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 14px 0;
}

.yld-fire__drawdown-grid > div {
  background: var(--yld-red-bg);
  border: 1px solid #efc4cd;
  border-radius: 12px;
  padding: 15px;
}

.yld-fire__drawdown-grid span,
.yld-fire__drawdown-grid strong,
.yld-fire__drawdown-grid small {
  display: block;
}

.yld-fire__drawdown-grid span {
  color: #70404a;
  font-size: 0.74rem;
  font-weight: 700;
}

.yld-fire__drawdown-grid strong {
  color: var(--yld-red);
  font-size: 1.8rem;
  margin: 5px 0;
}

.yld-fire__drawdown-grid small {
  color: #70404a;
  font-size: 0.7rem;
}

@media (max-width: 820px) {
  .yld-fire__stress-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .yld-fire__withdrawal-card[role="button"]:hover {
    transform: none;
  }

  .yld-fire__plan-detail {
    margin-left: -4px;
    margin-right: -4px;
    padding: 18px 14px;
  }

  .yld-fire__plan-detail-head {
    flex-direction: column;
  }

  .yld-fire__detail-metrics,
  .yld-fire__drawdown-grid {
    grid-template-columns: 1fr;
  }

  .yld-fire__chart-wrap--detail {
    height: 300px;
  }

  .yld-fire__asset-path-table,
  .yld-fire__stress-breakdown .yld-fire__table {
    font-size: 0.64rem;
    min-width: 0;
    table-layout: fixed;
  }

  .yld-fire__asset-path-table th,
  .yld-fire__asset-path-table td,
  .yld-fire__stress-breakdown .yld-fire__table th,
  .yld-fire__stress-breakdown .yld-fire__table td {
    overflow-wrap: anywhere;
    padding: 8px 4px;
  }

  .yld-fire__asset-path-table th:first-child,
  .yld-fire__asset-path-table td:first-child,
  .yld-fire__stress-breakdown .yld-fire__table th:first-child,
  .yld-fire__stress-breakdown .yld-fire__table td:first-child {
    width: 34%;
  }
}
