/* Freelance — uses /assets/theme.css for base */

/* ============================================================
   Wizard (5-step interactive flow)
   ============================================================ */
.wizard-card { padding: 24px 20px 16px; }

.wizard-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: -4px 0 20px;
}
.wizard-progress-bar {
  flex: 1 1 auto;
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}
.wizard-progress-bar::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: var(--progress, 20%);
  background: linear-gradient(90deg, var(--accent) 0%, #ffb88c 100%);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.wizard-progress-text {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.wizard-steps { position: relative; min-height: 200px; }
.wizard-step { display: none; animation: stepFade 0.25s ease; }
.wizard-step.is-active { display: block; }

@keyframes stepFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.wizard-question {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--text-strong);
  text-transform: none;
  letter-spacing: 0;
  border-bottom: none;
  padding-bottom: 0;
}
.wizard-helper {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.wizard-input-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}
.wizard-input-row input {
  flex: 1 1 auto;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  text-align: right;
  padding: 14px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--bg-elevated);
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}
.wizard-input-row input:focus {
  outline: none;
  border-color: var(--accent);
}
.wizard-unit {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0 4px;
}

.wizard-step .field { margin-bottom: 0; }
.wizard-step .field label {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
}
.wizard-step select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}
.wizard-step select:focus { outline: none; border-color: var(--accent); }

.wizard-nav {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}
.wizard-nav .btn { flex: 2 1 auto; }
.wizard-nav .btn-secondary { flex: 1 1 auto; }

/* ============================================================
   Result head (with reset button)
   ============================================================ */
.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.result-head h2 {
  margin: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.result-card { animation: stepFade 0.35s ease; }

/* ============================================================
   Improvements (節税の改善余地)
   ============================================================ */
.improvements-card { animation: stepFade 0.35s ease; }
.improvements-list { display: grid; gap: 10px; margin-top: 6px; }

.improvement-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px;
}
.improvement-item.is-combined {
  background:
    linear-gradient(180deg, rgba(255, 107, 53, 0.06), rgba(255, 107, 53, 0.01)),
    var(--bg-elevated);
  border-color: var(--accent-border);
}

.imp-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.imp-title-wrap { flex: 1 1 200px; min-width: 0; }
.imp-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-strong);
  line-height: 1.4;
}
.imp-from {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  letter-spacing: 0.02em;
}

.imp-saving {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: 0 0 auto;
}
.imp-saving-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.imp-saving-value {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.improvement-item.is-combined .imp-saving-value { font-size: 22px; }

.imp-desc {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
}
.imp-detail {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.improvement-empty {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================================
   Approaches (節税の考え方 4-step framework)
   ============================================================ */
.approaches-card { animation: stepFade 0.35s ease; }

.approach-block {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.approach-block:first-of-type { padding-top: 6px; }
.approach-block:last-of-type { border-bottom: none; padding-bottom: 6px; }

.approach-num {
  flex: 0 0 32px;
  height: 32px;
  border-radius: 4px;
  background: var(--accent);
  color: #0a0d12;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 14px;
}
.approach-body { flex: 1 1 auto; min-width: 0; }
.approach-body h3 {
  margin: 4px 0 6px;
  font-size: 14px;
  color: var(--text-strong);
}
.approach-body > p {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.approach-body ul {
  margin: 6px 0 0 18px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-muted);
}
.approach-body ul li { margin-bottom: 4px; }
.approach-body strong { color: var(--text); }
.approach-body a {
  color: var(--cyan);
  font-weight: 700;
}

.approach-tip {
  margin-top: 16px;
  padding: 12px 14px;
  background: rgba(227, 179, 65, 0.08);
  border-left: 3px solid var(--amber);
  border-radius: 4px;
  font-size: 12.5px;
  color: #f5d680;
  line-height: 1.65;
}
.approach-tip strong { color: var(--amber); }

/* ============================================================
   Asset Formation
   ============================================================ */
.asset-card { animation: stepFade 0.35s ease; }

.asset-controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 14px 0 16px;
  padding: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
}
@media (max-width: 520px) {
  .asset-controls { grid-template-columns: 1fr; gap: 10px; }
}
.asset-controls .wizard-input-row input {
  font-size: 18px;
  padding: 10px 12px;
}

.asset-summary { margin-bottom: 16px; }
@media (min-width: 768px) {
  .asset-summary { grid-template-columns: repeat(4, 1fr); }
}
