/* ============================================================
   テンバガー銘柄スクリーナー - スタイルシート
   ============================================================ */

:root {
  --primary:       #1a6fd4;
  --primary-dark:  #0f4fa0;
  --primary-light: #e8f0fd;
  --accent:        #f59e0b;
  --accent-dark:   #d97706;
  --success:       #10b981;
  --danger:        #ef4444;
  --warning:       #f59e0b;
  --neutral-50:    #f8fafc;
  --neutral-100:   #f1f5f9;
  --neutral-200:   #e2e8f0;
  --neutral-300:   #cbd5e1;
  --neutral-400:   #94a3b8;
  --neutral-500:   #64748b;
  --neutral-600:   #475569;
  --neutral-700:   #334155;
  --neutral-800:   #1e293b;
  --neutral-900:   #0f172a;
  --radius-sm:     6px;
  --radius-md:     12px;
  --radius-lg:     20px;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:     0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg:     0 10px 40px rgba(0,0,0,.1), 0 4px 16px rgba(0,0,0,.07);
  --font-jp:       'Noto Sans JP', sans-serif;
  --font-en:       'Inter', sans-serif;

  /* sector colors */
  --dx-color:      #6366f1;
  --semi-color:    #3b82f6;
  --hr-color:      #8b5cf6;
  --health-color:  #ec4899;
  --green-color:   #22c55e;
}

/* ======= RESET & BASE ======= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-jp);
  background: var(--neutral-50);
  color: var(--neutral-800);
  line-height: 1.7;
  min-height: 100vh;
}

/* ======= HEADER ======= */
.site-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #2d8fe0 100%);
  color: #fff;
  padding: 1.5rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(15,79,160,.3);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-icon {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .03em;
}

.brand-text p {
  font-size: .8rem;
  opacity: .8;
  margin-top: 2px;
}

.header-badge {
  flex-shrink: 0;
}

.badge-cagr {
  display: block;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius-md);
  padding: .5rem 1rem;
  font-size: .9rem;
  font-weight: 700;
  font-family: var(--font-en);
  text-align: center;
  line-height: 1.4;
}

.badge-cagr small {
  display: block;
  font-size: .65rem;
  font-weight: 400;
  opacity: .85;
  font-family: var(--font-jp);
}

/* ======= MAIN CONTAINER ======= */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ======= STEP NAVIGATION ======= */
.step-nav {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: .75rem 1.25rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  overflow-x: auto;
  flex-wrap: nowrap;
}

.step-btn {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: none;
  border: 2px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: .5rem 1rem;
  cursor: pointer;
  font-family: var(--font-jp);
  font-size: .8rem;
  font-weight: 500;
  color: var(--neutral-500);
  transition: all .2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.step-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.step-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(26,111,212,.3);
}

.step-num {
  width: 22px;
  height: 22px;
  background: rgba(255,255,255,.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  font-family: var(--font-en);
}

.step-btn:not(.active) .step-num {
  background: var(--neutral-200);
  color: var(--neutral-600);
}

.step-arrow {
  color: var(--neutral-300);
  font-size: .8rem;
  flex-shrink: 0;
}

/* ======= STEP PANELS ======= */
.step-panel {
  display: none;
  animation: fadeIn .35s ease;
}

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

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

/* ======= PANEL HEADER ======= */
.panel-header {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary);
}

.panel-title-group {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.panel-icon {
  width: 52px;
  height: 52px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.panel-title-group h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--neutral-800);
  margin-bottom: .25rem;
}

.panel-subtitle {
  font-size: .9rem;
  color: var(--neutral-500);
}

/* ======= CARDS GRID ======= */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.criteria-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-200);
  transition: box-shadow .2s;
}

.criteria-card:hover {
  box-shadow: var(--shadow-md);
}

.card-head {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}

.card-icon {
  font-size: 1.3rem;
  color: var(--primary);
}

.card-head h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--neutral-700);
}

/* ---- criteria list ---- */
.criteria-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: 1rem;
}

.criteria-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .5rem .75rem;
  border-radius: var(--radius-sm);
  background: var(--neutral-50);
  font-size: .85rem;
}

.criteria-item.recommended {
  background: var(--primary-light);
  border-left: 3px solid var(--primary);
}

.ci-label {
  color: var(--neutral-600);
  flex-shrink: 0;
}

.ci-value {
  font-weight: 700;
  color: var(--neutral-800);
  text-align: right;
}

/* ---- formula box ---- */
.formula-box {
  background: var(--neutral-800);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  margin-bottom: .75rem;
  font-family: var(--font-en);
}

.formula-label {
  display: block;
  font-size: .7rem;
  color: var(--neutral-400);
  margin-bottom: .25rem;
}

.formula-text {
  font-size: .9rem;
  font-weight: 600;
}

/* ---- card insight ---- */
.card-insight {
  display: flex;
  gap: .5rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: .65rem .85rem;
  font-size: .8rem;
  color: var(--neutral-700);
}

.card-insight i {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: .15rem;
}

/* ======= TOOL BOX ======= */
.tool-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
  border: 1px solid var(--neutral-200);
}

.tool-box-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.25rem;
}

.tool-box-header i {
  font-size: 1.2rem;
  color: var(--primary);
}

.tool-box-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--neutral-700);
}

.tool-desc {
  font-size: .88rem;
  color: var(--neutral-500);
  margin-bottom: 1rem;
}

/* ======= CAGR CALCULATOR ======= */
.cagr-calculator {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.calc-inputs {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

.calc-field {
  flex: 1;
  min-width: 160px;
}

.calc-field label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--neutral-600);
  margin-bottom: .4rem;
}

.calc-field input {
  width: 100%;
  padding: .65rem .9rem;
  border: 1.5px solid var(--neutral-300);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-family: var(--font-en);
  transition: border-color .2s;
  outline: none;
}

.calc-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,111,212,.1);
}

.calc-arrow {
  color: var(--neutral-400);
  font-size: 1.1rem;
  padding-bottom: .65rem;
}

.calc-btn {
  padding: .65rem 1.5rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  font-family: var(--font-jp);
  cursor: pointer;
  transition: background .2s, transform .1s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.calc-btn:hover { background: var(--primary-dark); }
.calc-btn:active { transform: scale(.97); }

.calc-result {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--neutral-50);
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  flex-wrap: wrap;
}

.result-value {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: var(--font-en);
  color: var(--primary);
}

.result-label {
  font-size: .85rem;
  color: var(--neutral-500);
}

.result-judge {
  font-size: .9rem;
  font-weight: 700;
  padding: .35rem .85rem;
  border-radius: 999px;
}

.result-judge.pass {
  background: #d1fae5;
  color: #065f46;
}

.result-judge.fail {
  background: #fee2e2;
  color: #991b1b;
}

/* ======= STEP NAV BOTTOM ======= */
.step-nav-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--neutral-200);
}

.btn-next, .btn-prev, .btn-top {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius-md);
  font-size: .92rem;
  font-weight: 600;
  font-family: var(--font-jp);
  cursor: pointer;
  transition: all .2s;
  border: none;
}

.btn-next {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(26,111,212,.25);
}

.btn-next:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 20px rgba(26,111,212,.35);
  transform: translateY(-1px);
}

.btn-prev {
  background: var(--neutral-100);
  color: var(--neutral-600);
  border: 1.5px solid var(--neutral-200);
}

.btn-prev:hover {
  background: var(--neutral-200);
  color: var(--neutral-800);
}

.btn-top {
  background: var(--neutral-700);
  color: #fff;
}

.btn-top:hover {
  background: var(--neutral-800);
}

/* ======= QUALITATIVE SECTION ======= */
.qualitative-section {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-200);
  margin-bottom: 1.5rem;
}

.qualitative-section > h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--neutral-700);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}

.qualitative-section > h3 i {
  color: var(--primary);
}

/* ---- moat grid ---- */
.moat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.moat-card {
  background: var(--neutral-50);
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  cursor: pointer;
  transition: all .2s;
}

.moat-card:hover, .moat-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.moat-icon {
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: .75rem;
}

.moat-card h4 {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: .5rem;
  color: var(--neutral-800);
}

.moat-card p {
  font-size: .82rem;
  color: var(--neutral-600);
  line-height: 1.6;
  margin-bottom: .75rem;
}

.moat-examples {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
}

.example-tag {
  font-size: .72rem;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  padding: .15rem .6rem;
}

/* ---- TAM content ---- */
.tam-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.tam-requirement {
  display: flex;
  gap: 1rem;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.tam-icon {
  font-size: 2rem;
  color: var(--primary);
  flex-shrink: 0;
}

.tam-text h4 {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: .5rem;
}

.tam-text p {
  font-size: .84rem;
  color: var(--neutral-700);
  line-height: 1.6;
}

.tam-text strong {
  color: var(--primary-dark);
}

.tam-checklist {
  background: var(--neutral-50);
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.tam-checklist h4 {
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: .75rem;
  color: var(--neutral-700);
}

.check-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: .84rem;
  color: var(--neutral-700);
}

.check-list li i {
  color: var(--success);
  margin-top: .15rem;
  flex-shrink: 0;
}

/* ---- management grid ---- */
.management-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.mgmt-card {
  background: var(--neutral-50);
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
}

.mgmt-card.highlight {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-color: #fcd34d;
}

.mgmt-icon {
  font-size: 1.8rem;
  color: var(--accent-dark);
  margin-bottom: .75rem;
}

.mgmt-card h4 {
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: .5rem;
  color: var(--neutral-700);
}

.mgmt-card p {
  font-size: .82rem;
  color: var(--neutral-600);
  line-height: 1.6;
}

/* ---- checklist tool ---- */
.checklist-tool {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}

.checklist-item {
  display: block;
}

.check-label {
  display: flex;
  align-items: center;
  gap: .85rem;
  cursor: pointer;
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--neutral-50);
  border: 1.5px solid var(--neutral-200);
  transition: all .15s;
}

.check-label:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.check-label input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 22px;
  height: 22px;
  border: 2px solid var(--neutral-300);
  border-radius: 5px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  position: relative;
}

.check-label input:checked ~ .checkmark {
  background: var(--primary);
  border-color: var(--primary);
}

.check-label input:checked ~ .checkmark::after {
  content: '✓';
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
}

.check-text {
  font-size: .88rem;
  color: var(--neutral-700);
}

.check-label input:checked ~ .check-text {
  color: var(--neutral-900);
  font-weight: 600;
}

.qualitative-score {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: .5rem;
  padding: .75rem 1rem;
  background: var(--neutral-50);
  border-radius: var(--radius-sm);
}

.score-bar-wrap {
  flex: 1;
  height: 8px;
  background: var(--neutral-200);
  border-radius: 999px;
  overflow: hidden;
}

.score-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--success));
  border-radius: 999px;
  transition: width .4s ease;
}

.score-text {
  font-size: .82rem;
  font-weight: 600;
  color: var(--neutral-600);
  white-space: nowrap;
}

/* ======= SECTOR ======= */
.sector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.sector-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--neutral-200);
  position: relative;
  transition: all .2s;
}

.sector-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.sector-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.sector-badge span {
  background: #ff6b35;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: .2rem .7rem;
  border-radius: 999px;
}

.sector-header {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  margin-bottom: .85rem;
}

.sector-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  flex-shrink: 0;
}

.sector-icon.dx     { background: var(--dx-color); }
.sector-icon.semi   { background: var(--semi-color); }
.sector-icon.hr     { background: var(--hr-color); }
.sector-icon.health { background: var(--health-color); }
.sector-icon.green  { background: var(--green-color); }

.sector-header h3 {
  font-size: .98rem;
  font-weight: 700;
  margin-bottom: .25rem;
  color: var(--neutral-800);
}

.sector-tag {
  font-size: .74rem;
  color: var(--neutral-500);
}

.sector-card > p {
  font-size: .84rem;
  color: var(--neutral-600);
  line-height: 1.7;
  margin-bottom: .85rem;
}

.sector-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.kw-tag {
  font-size: .75rem;
  padding: .2rem .7rem;
  border-radius: 999px;
  background: var(--neutral-100);
  color: var(--neutral-600);
  border: 1px solid var(--neutral-200);
}

/* ---- sector selector ---- */
.sector-selector {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.sector-check-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  padding: .6rem 1.25rem;
  border: 2px solid var(--neutral-200);
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 500;
  transition: all .2s;
  user-select: none;
}

.sector-check-label input[type="checkbox"] {
  display: none;
}

.sector-check-label:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
}

.sc-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  color: #fff;
  flex-shrink: 0;
}

.sc-icon.dx     { background: var(--dx-color); }
.sc-icon.semi   { background: var(--semi-color); }
.sc-icon.hr     { background: var(--hr-color); }
.sc-icon.health { background: var(--health-color); }
.sc-icon.green  { background: var(--green-color); }

/* ======= FILTER SETTINGS ======= */
.filter-settings {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-200);
  margin-bottom: 1.5rem;
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.filter-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--neutral-700);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.filter-header h3 i {
  color: var(--primary);
}

.reset-btn {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .9rem;
  background: var(--neutral-100);
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-family: var(--font-jp);
  cursor: pointer;
  color: var(--neutral-600);
  transition: all .15s;
}

.reset-btn:hover {
  background: var(--neutral-200);
  color: var(--neutral-800);
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.filter-group-title {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--primary);
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--primary-light);
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.filter-row label {
  font-size: .84rem;
  color: var(--neutral-600);
  flex: 1;
}

.filter-input-wrap {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-shrink: 0;
}

.filter-input-wrap input {
  width: 90px;
  padding: .4rem .65rem;
  border: 1.5px solid var(--neutral-300);
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-family: var(--font-en);
  text-align: right;
  outline: none;
  transition: border-color .2s;
}

.filter-input-wrap input:focus {
  border-color: var(--primary);
}

.unit {
  font-size: .78rem;
  color: var(--neutral-500);
  white-space: nowrap;
}

/* toggle */
.toggle-label {
  display: flex !important;
  align-items: center !important;
  gap: .75rem !important;
  cursor: pointer;
  font-size: .84rem;
  color: var(--neutral-600);
  width: 100%;
}

.toggle-label input[type="checkbox"] {
  display: none;
}

.toggle-slider {
  width: 40px;
  height: 22px;
  background: var(--neutral-300);
  border-radius: 999px;
  position: relative;
  flex-shrink: 0;
  transition: background .2s;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.toggle-label input:checked + .toggle-slider {
  background: var(--primary);
}

.toggle-label input:checked + .toggle-slider::after {
  transform: translateX(18px);
}

/* ======= STOCK FORM ======= */
.stock-input-section {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--neutral-200);
  margin-bottom: 1.5rem;
}

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-header-row h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--neutral-700);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.section-header-row h3 i {
  color: var(--primary);
}

.header-actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

.btn-demo {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem 1rem;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-family: var(--font-jp);
  cursor: pointer;
  color: #166534;
  font-weight: 600;
  transition: all .15s;
}

.btn-demo:hover {
  background: #dcfce7;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.form-field label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--neutral-600);
}

.req {
  color: var(--danger);
}

.form-field input,
.form-field select {
  padding: .6rem .85rem;
  border: 1.5px solid var(--neutral-300);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-family: var(--font-jp);
  outline: none;
  transition: border-color .2s;
  background: #fff;
}

.form-field input:focus,
.form-field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,111,212,.1);
}

.form-actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

.btn-screen {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.75rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: .92rem;
  font-weight: 700;
  font-family: var(--font-jp);
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 4px 12px rgba(26,111,212,.25);
}

.btn-screen:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-add {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.5rem;
  background: var(--success);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: .92rem;
  font-weight: 700;
  font-family: var(--font-jp);
  cursor: pointer;
  transition: all .2s;
}

.btn-add:hover {
  background: #059669;
}

.btn-clear-form {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .7rem 1.25rem;
  background: var(--neutral-100);
  color: var(--neutral-500);
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-md);
  font-size: .88rem;
  font-family: var(--font-jp);
  cursor: pointer;
  transition: all .15s;
}

.btn-clear-form:hover {
  background: var(--neutral-200);
  color: var(--neutral-700);
}

/* ---- screening result ---- */
.screening-result {
  margin-top: 1.25rem;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  animation: fadeIn .3s ease;
}

.screening-result.pass-all {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  border: 2px solid var(--success);
}

.screening-result.pass-some {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 2px solid var(--warning);
}

.screening-result.fail {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  border: 2px solid var(--danger);
}

.result-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.result-icon {
  font-size: 2.5rem;
}

.result-title {
  font-size: 1.2rem;
  font-weight: 800;
}

.result-sub {
  font-size: .85rem;
  opacity: .8;
  margin-top: .2rem;
}

.result-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .5rem;
}

.result-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .84rem;
  padding: .4rem .65rem;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.5);
}

.result-item.ok i { color: var(--success); }
.result-item.ng i { color: var(--danger); }
.result-item.na i { color: var(--neutral-400); }

/* ======= WATCHLIST ======= */
.watchlist-section {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-200);
}

.btn-clear-list {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .9rem;
  background: #fee2e2;
  border: 1.5px solid #fca5a5;
  border-radius: var(--radius-sm);
  font-size: .8rem;
  font-family: var(--font-jp);
  cursor: pointer;
  color: #991b1b;
  font-weight: 600;
  transition: all .15s;
}

.btn-clear-list:hover {
  background: #fecaca;
}

.empty-list {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--neutral-400);
}

.empty-list i {
  font-size: 2.5rem;
  margin-bottom: .75rem;
}

.empty-list p {
  font-size: .9rem;
  line-height: 1.8;
}

.watchlist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}

.watchlist-table th {
  background: var(--neutral-50);
  padding: .65rem .9rem;
  text-align: left;
  font-size: .78rem;
  font-weight: 700;
  color: var(--neutral-500);
  border-bottom: 2px solid var(--neutral-200);
  white-space: nowrap;
}

.watchlist-table td {
  padding: .65rem .9rem;
  border-bottom: 1px solid var(--neutral-100);
  color: var(--neutral-700);
}

.watchlist-table tr:hover td {
  background: var(--neutral-50);
}

.wl-badge-pass {
  display: inline-block;
  background: #d1fae5;
  color: #065f46;
  font-size: .72rem;
  font-weight: 700;
  padding: .15rem .6rem;
  border-radius: 999px;
}

.wl-badge-warn {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  font-size: .72rem;
  font-weight: 700;
  padding: .15rem .6rem;
  border-radius: 999px;
}

.btn-delete-wl {
  background: none;
  border: none;
  color: var(--neutral-400);
  cursor: pointer;
  font-size: .9rem;
  padding: .2rem .4rem;
  border-radius: 4px;
  transition: all .15s;
}

.btn-delete-wl:hover {
  color: var(--danger);
  background: #fee2e2;
}

/* sector label in table */
.sector-label { font-size: .75rem; color: var(--neutral-500); }
.sector-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: .3rem;
}
.sector-dot.dx     { background: var(--dx-color); }
.sector-dot.semi   { background: var(--semi-color); }
.sector-dot.hr     { background: var(--hr-color); }
.sector-dot.health { background: var(--health-color); }
.sector-dot.green  { background: var(--green-color); }
.sector-dot.other  { background: var(--neutral-400); }

/* ======= RISK SECTION ======= */
.risk-section {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-200);
  margin-bottom: 1.5rem;
}

.risk-section > h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--neutral-700);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}

.risk-section > h3 i {
  color: var(--primary);
}

.risk-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.risk-card {
  background: var(--neutral-50);
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
}

.risk-card.primary {
  background: var(--primary-light);
  border-color: rgba(26,111,212,.25);
}

.risk-icon {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: .75rem;
}

.risk-card h4 {
  font-size: .92rem;
  font-weight: 700;
  margin-bottom: .5rem;
  color: var(--neutral-700);
}

.risk-stat {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  font-family: var(--font-en);
  margin-bottom: .5rem;
}

.risk-card p {
  font-size: .8rem;
  color: var(--neutral-600);
  line-height: 1.6;
}

/* ---- simulator ---- */
.simulator {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sim-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.sim-field {
  flex: 1;
  min-width: 130px;
}

.sim-field label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--neutral-600);
  margin-bottom: .35rem;
}

.sim-field input {
  width: 100%;
  padding: .6rem .85rem;
  border: 1.5px solid var(--neutral-300);
  border-radius: var(--radius-sm);
  font-size: .92rem;
  font-family: var(--font-en);
  outline: none;
  transition: border-color .2s;
}

.sim-field input:focus {
  border-color: var(--primary);
}

.sim-result {
  background: var(--neutral-50);
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.sim-result-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
  margin-bottom: 1rem;
}

.sim-result-item {
  text-align: center;
  padding: .75rem;
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--neutral-200);
}

.sr-label {
  display: block;
  font-size: .75rem;
  color: var(--neutral-500);
  margin-bottom: .3rem;
}

.sr-value {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  font-family: var(--font-en);
  color: var(--neutral-700);
}

.sr-value.highlight {
  color: var(--primary);
  font-size: 1.3rem;
}

.sim-breakdown {
  font-size: .82rem;
  color: var(--neutral-600);
  line-height: 1.8;
}

/* ---- stop loss ---- */
.stop-loss-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.stop-card {
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.stop-card.warning {
  background: #fffbeb;
  border: 1.5px solid #fcd34d;
}

.stop-card.danger {
  background: #fff5f5;
  border: 1.5px solid #fca5a5;
}

.stop-icon {
  font-size: 1.5rem;
  margin-bottom: .75rem;
}

.stop-card.warning .stop-icon { color: var(--accent-dark); }
.stop-card.danger  .stop-icon { color: var(--danger); }

.stop-card h4 {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: .5rem;
  color: var(--neutral-800);
}

.stop-range {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-dark);
  margin-bottom: .5rem;
  font-family: var(--font-en);
}

.stop-card p {
  font-size: .82rem;
  color: var(--neutral-600);
  line-height: 1.6;
}

.trigger-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.trigger-list li {
  display: flex;
  align-items: flex-start;
  gap: .4rem;
  font-size: .84rem;
  color: var(--neutral-700);
}

.trigger-list li i {
  color: var(--danger);
  margin-top: .15rem;
  flex-shrink: 0;
}

/* stoploss calc */
.stoploss-calc {
  background: var(--neutral-50);
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.stoploss-calc h4 {
  font-size: .92rem;
  font-weight: 700;
  color: var(--neutral-700);
  margin-bottom: .85rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.slc-inputs {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.slc-field {
  flex: 1;
  min-width: 130px;
}

.slc-field label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--neutral-600);
  margin-bottom: .35rem;
}

.slc-field input {
  width: 100%;
  padding: .6rem .85rem;
  border: 1.5px solid var(--neutral-300);
  border-radius: var(--radius-sm);
  font-size: .92rem;
  font-family: var(--font-en);
  outline: none;
  transition: border-color .2s;
}

.slc-field input:focus {
  border-color: var(--primary);
}

.slc-result {
  margin-top: .85rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  font-size: .88rem;
  color: var(--neutral-600);
  padding: .75rem 1rem;
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--neutral-200);
}

.slc-result-value {
  font-size: 1.3rem;
  font-weight: 800;
  font-family: var(--font-en);
  color: var(--danger);
}

.slc-result-loss {
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-en);
  color: var(--neutral-600);
}

/* ---- review checklist ---- */
.review-desc {
  font-size: .86rem;
  color: var(--neutral-500);
  margin-bottom: 1rem;
}

.review-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.review-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: var(--radius-md);
}

.review-item.green {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
}

.review-item.red {
  background: #fff5f5;
  border: 1.5px solid #fca5a5;
}

.review-item > i {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: .1rem;
}

.review-item.green > i { color: var(--success); }
.review-item.red   > i { color: var(--danger); }

.review-item h5 {
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: .5rem;
}

.review-item ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.review-item ul li {
  font-size: .82rem;
  color: var(--neutral-700);
}

.review-item ul li::before {
  content: '・';
  margin-right: .2rem;
}

/* ======= INVESTMENT FLOW ======= */
.flow-section {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-200);
  margin-bottom: 1.5rem;
}

.flow-section > h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--neutral-700);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}

.flow-section > h3 i {
  color: var(--primary);
}

.flow-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.flow-step {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.1rem 1.25rem;
  background: var(--neutral-50);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--neutral-200);
}

.flow-arrow {
  text-align: center;
  color: var(--primary);
  font-size: .9rem;
  padding: .3rem 0;
}

.flow-num {
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  font-family: var(--font-en);
  flex-shrink: 0;
}

.flow-content h4 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--neutral-800);
  margin-bottom: .25rem;
}

.flow-content p {
  font-size: .83rem;
  color: var(--neutral-500);
}

/* ======= FOOTER ======= */
.site-footer {
  background: var(--neutral-800);
  color: var(--neutral-400);
  padding: 2rem;
  margin-top: 3rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.disclaimer {
  font-size: .82rem;
  line-height: 1.8;
  margin-bottom: .75rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: .5rem;
}

.disclaimer i {
  flex-shrink: 0;
  margin-top: .2rem;
  color: var(--accent);
}

.footer-note {
  font-size: .78rem;
  color: var(--neutral-600);
}

/* ======= RESPONSIVE ======= */
@media (max-width: 768px) {
  .site-header { padding: 1rem 1.25rem; }
  .brand-text h1 { font-size: 1rem; }
  .badge-cagr { display: none; }
  .main-container { padding: 1rem; }
  .step-nav { gap: .35rem; padding: .6rem; }
  .step-label { display: none; }
  .panel-header { padding: 1.25rem; }
  .panel-title-group h2 { font-size: 1.1rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .filter-grid { grid-template-columns: 1fr; }
  .stop-loss-grid { grid-template-columns: 1fr; }
  .review-items { grid-template-columns: 1fr; }
  .tam-content { grid-template-columns: 1fr; }
  .sim-result-grid { grid-template-columns: repeat(2, 1fr); }
  .tool-box { padding: 1.25rem; }
  .qualitative-section { padding: 1.25rem; }
  .risk-section { padding: 1.25rem; }
  .filter-settings { padding: 1.25rem; }
  .stock-input-section { padding: 1.25rem; }
  .watchlist-section { padding: 1.25rem; }
  .flow-section { padding: 1.25rem; }
  .sector-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .step-nav-bottom { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 480px) {
  .form-grid { grid-template-columns: 1fr; }
  .sim-result-grid { grid-template-columns: 1fr 1fr; }
  .calc-inputs { flex-direction: column; }
  .calc-arrow { display: none; }
}
