/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --red:        #e05a00;
  --red-dk:     #b84400;
  --orange:     #ff6600;
  --bg:         #f4f4f0;
  --surface:    #ffffff;
  --gray-50:    #fafafa;
  --gray-100:   #f0f0f0;
  --border:     #dddddd;
  --text:       #1a1a1a;
  --text-sub:   #555555;
  --text-muted: #999999;
  --link:       #0066cc;
  --font: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic', sans-serif;
  --r:    3px;
  --r-md: 6px;
  --shadow:    0 1px 4px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.12);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 14px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ============================================================
   CONTAINER
   ============================================================ */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 8px;
}
@media (min-width: 640px) {
  .container { padding: 0 16px; }
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: var(--red);
  border-bottom: 3px solid var(--red-dk);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 8px;
}
.logo {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1;
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo span {
  font-size: 11px;
  font-weight: 400;
  display: block;
  letter-spacing: 0;
  margin-top: 2px;
  color: rgba(255,255,255,0.85);
}
.header-right { display: flex; align-items: center; gap: 8px; }
.header-btn {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  padding: 5px 12px;
  border-radius: var(--r);
  font-size: 12px;
  cursor: pointer;
  font-family: var(--font);
}
.header-btn.primary {
  background: #fff;
  color: var(--red);
  font-weight: 700;
}
.search-bar { background: var(--red-dk); padding: 8px 16px 10px; }
.search-inner { display: flex; gap: 6px; max-width: 600px; }
.search-inner input {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: var(--r) 0 0 var(--r);
  font-size: 14px;
  outline: none;
  font-family: var(--font);
}
.search-inner button {
  background: var(--orange);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 0 var(--r) var(--r) 0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font);
  transition: background 0.15s;
}
.search-inner button:hover { background: #e55a00; }

/* ============================================================
   NAVIGATION BAR
   ============================================================ */
.nav-bar {
  background: #222;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-bar::-webkit-scrollbar { display: none; }
.nav-item {
  color: #ddd;
  padding: 8px 14px;
  font-size: 13px;
  white-space: nowrap;
  border-right: 1px solid #333;
  transition: background 0.15s;
  text-decoration: none;
  display: block;
}
.nav-item:hover { background: #333; color: #fff; text-decoration: none; }
.nav-item.active { color: var(--orange); font-weight: 700; }
.nav-item-btn { background: none; border: none; font-family: var(--font); cursor: pointer; }
.nav-item-caret { font-size: 9px; margin-left: 3px; opacity: 0.7; }
.nav-dropdown-wrap { position: relative; display: flex; }
.nav-dropdown { display: none; position: absolute; top: 100%; left: 0; min-width: 240px; background: #2a2a2a; border: 1px solid #444; box-shadow: 0 4px 12px rgba(0,0,0,.4); z-index: 200; }
.nav-dropdown-wrap:hover .nav-dropdown,
.nav-dropdown-wrap:focus-within .nav-dropdown { display: block; }
.nav-dropdown a { display: flex; align-items: center; gap: 8px; color: #ddd; padding: 10px 14px; font-size: 13px; border-bottom: 1px solid #3a3a3a; white-space: nowrap; text-decoration: none; }
.nav-dropdown a:last-child { border-bottom: none; }
.nav-dropdown a:hover { background: #3a3a3a; color: #fff; text-decoration: none; }
.nav-dropdown-label { font-size: 10px; color: var(--orange); font-weight: 700; margin-left: auto; padding: 1px 5px; border: 1px solid var(--orange); border-radius: 2px; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 6px 0;
}
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--link); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--text-sub); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: linear-gradient(135deg, #1a0a00 0%, #3d1500 50%, #5c2200 100%);
  padding: 28px 0;
}
@media (max-width: 480px) {
  .hero { padding: 20px 0; }
}
.hero-inner { max-width: 720px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,102,0,0.25);
  color: #ffaa66;
  border: 1px solid rgba(255,102,0,0.4);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 2px;
  margin-bottom: 10px;
}
.hero-title {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 12px;
}
@media (max-width: 480px) {
  .hero-title { font-size: 22px; }
}
.hero-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  line-height: 1.7;
  max-width: 600px;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 12px 0 40px;
  align-items: start;
}
@media (min-width: 768px) {
  .layout { grid-template-columns: 1fr 260px; }
}

/* ============================================================
   SECTION CARD
   ============================================================ */
.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 12px;
}
.section-card:last-child { margin-bottom: 0; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 2px solid var(--red);
  background: var(--gray-50);
}
.section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 6px;
}
.update-date {
  font-size: 11px;
  color: var(--text-muted);
}
.section-body {
  padding: 14px;
}
.lead-text {
  font-size: 14px;
  line-height: 1.75;
  margin-bottom: 16px;
}
.section-lead-text {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 14px;
  line-height: 1.7;
}

/* ============================================================
   INFO COMPARE（通常口座 vs NISA）
   ============================================================ */
.info-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}
@media (max-width: 640px) {
  .info-compare { grid-template-columns: 1fr; }
  .info-compare-arrow { display: none; }
}
.info-compare-item {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.info-compare-item--bad { border-color: #dda0a0; background: #fff8f8; }
.info-compare-item--good { border-color: #a0c8a0; background: #f4fff4; }
.info-compare-label {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.info-compare-item--bad .info-compare-label { color: #c0392b; }
.info-compare-item--good .info-compare-label { color: #27ae60; }
.info-compare-item p { font-size: 13px; color: var(--text-sub); margin-bottom: 8px; }
.info-compare-calc {
  font-size: 13px;
  padding: 8px 10px;
  border-radius: var(--r);
  margin-bottom: 8px;
}
.info-compare-item--bad .info-compare-calc { background: #fce4e4; }
.info-compare-item--good .info-compare-calc { background: #e4fce4; }
.tax-amount { color: #c0392b; }
.tax-amount.good { color: #27ae60; }
.info-compare-result { font-size: 13px; font-weight: 700; }
.info-compare-result.bad { color: #c0392b; }
.info-compare-result.good { color: #27ae60; }
.info-compare-arrow {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  padding: 0 4px;
}

/* ============================================================
   NOTE BOX
   ============================================================ */
.note-box {
  background: #fffbf0;
  border: 1px solid #e8d48c;
  border-radius: var(--r);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.7;
  display: flex;
  gap: 6px;
}
.note-box p { margin: 0; }

/* ============================================================
   NISA FRAMES
   ============================================================ */
.nisa-frames {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 14px;
}
@media (max-width: 640px) {
  .nisa-frames { grid-template-columns: 1fr; }
  .nisa-frames-plus { display: none; }
}
.nisa-frames-plus {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 300;
  color: var(--text-muted);
  padding: 0 4px;
}
.nisa-frame {
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
}
.nisa-frame--tsumitate { border-color: #4a90d9; }
.nisa-frame--growth { border-color: var(--orange); }
.nisa-frame-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.nisa-frame-icon {
  font-size: 22px;
  line-height: 1;
}
.nisa-frame-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.nisa-frame--tsumitate .nisa-frame-name { color: #1a5fa0; }
.nisa-frame--growth .nisa-frame-name { color: #c44e00; }
.nisa-frame-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.nisa-frame-specs { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.nisa-frame-spec {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
}
.nisa-frame-spec dt {
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 80px;
}
.nisa-frame-spec dd { color: var(--text); }
.nisa-frame-spec dd strong { color: var(--text); font-size: 14px; }
.nisa-frame-note {
  font-size: 11px;
  color: var(--text-sub);
  background: var(--gray-50);
  padding: 6px 8px;
  border-radius: var(--r);
  line-height: 1.6;
}

.nisa-total-box {
  border: 2px solid var(--orange);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 14px;
}
.nisa-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #ffe0cc;
  gap: 8px;
  flex-wrap: wrap;
}
.nisa-total-row:last-child { border-bottom: none; }
.nisa-total-row:first-child { background: #fff5ee; }
.nisa-total-label { font-size: 12px; color: var(--text-sub); }
.nisa-total-value { font-size: 13px; color: var(--text); }
.nisa-total-value strong { color: var(--orange); font-size: 15px; }

/* ============================================================
   POINT BOX
   ============================================================ */
.point-box {
  background: #fff5ee;
  border: 1px solid #ffcc99;
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.point-box-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.point-list { display: flex; flex-direction: column; gap: 6px; }
.point-list li {
  font-size: 13px;
  color: var(--text-sub);
  padding-left: 14px;
  position: relative;
  line-height: 1.6;
}
.point-list li::before {
  content: '●';
  position: absolute;
  left: 0;
  color: var(--orange);
  font-size: 10px;
  top: 4px;
}
.point-list li strong { color: var(--text); }

/* ============================================================
   COMPARE TABLE
   ============================================================ */
.table-wrap {
  overflow-x: auto;
  margin-bottom: 8px;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 560px;
}
.compare-table caption {
  font-size: 11px;
  color: var(--text-muted);
  text-align: left;
  margin-bottom: 6px;
  padding-bottom: 4px;
}
.compare-table th,
.compare-table td {
  padding: 8px 10px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
.compare-table thead th {
  background: var(--gray-100);
  font-weight: 700;
  font-size: 12px;
  color: var(--text-sub);
}
.compare-table thead th.highlight-col {
  background: #fff0e6;
  color: var(--red);
}
.compare-table tbody tr:hover { background: var(--gray-50); }
.compare-table tbody th {
  background: var(--gray-50);
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
}
.compare-table td.highlight { background: #fff5ee; color: var(--text); }
.compare-table .recommended td { background: #fff9e6; }
.compare-table .recommended td.highlight { background: #fff0d0; }
.compare-table small { font-size: 11px; color: var(--text-muted); display: block; }
.table-note {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ============================================================
   DO / DON'T GRID
   ============================================================ */
.do-dont-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 640px) {
  .do-dont-grid { grid-template-columns: 1fr; }
}
.do-box, .dont-box {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.do-box-head, .dont-box-head {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.do-box-head { background: #e8f5e9; color: #2e7d32; }
.dont-box-head { background: #fce4e4; color: #c0392b; }
.do-list, .dont-list {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.do-list li, .dont-list li {
  font-size: 12px;
  color: var(--text-sub);
  padding-left: 16px;
  position: relative;
  line-height: 1.6;
}
.do-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #2e7d32;
  font-weight: 700;
}
.dont-list li::before {
  content: '×';
  position: absolute;
  left: 0;
  color: #c0392b;
  font-weight: 700;
}

/* ============================================================
   STEPS LIST
   ============================================================ */
.steps-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.step-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--orange);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  margin-top: 1px;
}
.step-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.step-content p {
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.7;
  margin: 0;
}

/* ============================================================
   BROKER GRID
   ============================================================ */
.broker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (max-width: 640px) {
  .broker-grid { grid-template-columns: 1fr; }
}
.broker-item {
  display: block;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.broker-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--orange);
  text-decoration: none;
}
.broker-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.broker-features {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}
.broker-features li {
  font-size: 11px;
  color: var(--text-sub);
  padding-left: 12px;
  position: relative;
  line-height: 1.5;
}
.broker-features li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--orange);
  font-weight: 700;
}
.broker-cta {
  font-size: 11px;
  font-weight: 700;
  color: var(--link);
}

/* ============================================================
   TIPS LIST
   ============================================================ */
.tips-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.tip-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.tip-item:last-child { border-bottom: none; padding-bottom: 0; }
.tip-num {
  flex-shrink: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-100);
  line-height: 1;
  min-width: 28px;
  text-align: right;
  padding-top: 2px;
}
.tip-content h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.tip-content p {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
  margin: 0;
}

/* ============================================================
   SIMULATION TABLE
   ============================================================ */
.sim-table td { text-align: right; }
.sim-table th[scope="row"] { text-align: left; }
.sim-table small { font-size: 10px; color: var(--text-muted); }

/* ============================================================
   FAQ
   ============================================================ */
.faq-body { padding: 0; }
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:last-child { border-bottom: none; }
.faq-q {
  list-style: none;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  position: relative;
  user-select: none;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::before {
  content: 'Q';
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: var(--red);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.faq-q::after {
  content: '▼';
  flex-shrink: 0;
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.2s;
  margin-left: auto;
}
.faq-item[open] .faq-q::after { transform: rotate(180deg); }
.faq-q:hover { background: var(--gray-50); }
.faq-a {
  padding: 10px 14px 14px 48px;
  border-top: 1px solid var(--border);
  background: var(--gray-50);
}
.faq-a p {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.75;
  margin: 0;
}

/* ============================================================
   DISCLAIMER BOX
   ============================================================ */
.disclaimer-box {
  padding: 10px 14px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.7;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  margin-bottom: 12px;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 12px;
}
.sidebar-widget:last-child { margin-bottom: 0; }
.sidebar-widget-head {
  padding: 8px 12px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--border);
  border-left: 3px solid var(--red);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.sidebar-widget-head--warn {
  border-left-color: #c84f14;
  color: #c84f14;
}
.sidebar-widget-body { padding: 10px 12px; }
.related-list { display: flex; flex-direction: column; gap: 8px; }
.related-list li {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.5;
}
.related-list li:last-child { border-bottom: none; padding-bottom: 0; }
.related-list a { color: var(--link); }
.related-list a:hover { text-decoration: underline; }
.sidebar-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ============================================================
   NISA POINTS（サイドバー）
   ============================================================ */
.nisa-points-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.nisa-points-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dotted var(--border);
  font-size: 12px;
  gap: 6px;
}
.nisa-points-list li:last-child { border-bottom: none; }
.nisa-point-label { color: var(--text-muted); white-space: nowrap; }
.nisa-point-val { font-weight: 700; color: var(--text); text-align: right; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #222;
  color: #aaa;
  text-align: center;
  padding: 20px 16px;
  font-size: 12px;
  line-height: 1.8;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
  margin-bottom: 8px;
}
.footer-links a { color: #aaa; }
.footer-links a:hover { color: #fff; text-decoration: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 480px) {
  .step-item { flex-direction: column; gap: 8px; }
  .faq-a { padding: 10px 12px 12px; }
}
