/* NISA page-specific styles. Shared page frame, hero, tabs, cards, buttons, and footer come from site.css. */
.nisa-page {
  scroll-behavior: smooth;
}

.nisa-page .tab[aria-current="page"] {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 10px 22px rgba(29, 111, 214, 0.22);
}

.nisa-page .hero-main {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: left;
}

.nisa-page .hero-main > * {
  width: 100%;
}

.nisa-page .hero-main h1 {
  font-size: clamp(46px, 7vw, 82px);
}

.nisa-page .tabs {
  scrollbar-width: none;
}

.nisa-page .tabs::-webkit-scrollbar {
  display: none;
}

.nisa-kicker {
  margin: 0 0 4px;
  color: #24584f;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.nisa-section,
.nisa-overview {
  scroll-margin-top: 92px;
}

.nisa-progress-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.nisa-progress-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfdff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.nisa-progress-step strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  margin-bottom: 3px;
}

.nisa-progress-step small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  font-weight: 700;
}

.nisa-progress-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 11px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 950;
}

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

.nisa-check-card {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
}

.nisa-check-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--primary-soft);
  font-size: 24px;
}

.nisa-check-card h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: -0.03em;
}

.nisa-check-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.ad-note {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f4f5f2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.compare-table-card {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  overflow: hidden;
}

.compare-table-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.compare-table-head h3 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.04em;
}

.compare-table-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.compare-mobile-guide,
.compare-extra-mobile {
  display: none;
}

.compare-table-wrap {
  overflow-x: auto;
}

.compare-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  font-size: 14px;
}

.compare-table th,
.compare-table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
  line-height: 1.55;
}

.compare-table th {
  background: #f7faf8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.compare-table td:nth-child(2),
.compare-table td:nth-child(3) {
  font-weight: 950;
  font-size: 16px;
  white-space: nowrap;
  text-align: center;
}

.compare-table tr:last-child td {
  border-bottom: none;
}

.priority-row td {
  background: linear-gradient(90deg, #f2faf6, #ffffff);
}

.priority-row td:first-child {
  border-left: 5px solid #2f6e62;
}

.priority-rakuten td {
  background: linear-gradient(90deg, #fff5f5, #ffffff);
}

.priority-rakuten td:first-child {
  border-left-color: #bf0000;
}

.win {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef6f1;
  color: #24584f;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.win.sbi {
  background: #fff1e6;
  color: #9a4d10;
}

.win.rakuten {
  background: #ffecec;
  color: #a40000;
}

.win.same {
  background: #eff4f8;
  color: #34566b;
}

.symbol-strong {
  color: #24584f;
}

.compare-note {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: #fafcfa;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

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

.apply-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
}

.apply-card.is-rakuten {
  border-color: rgba(191, 0, 0, 0.24);
  background: linear-gradient(180deg, #ffffff, #fff7f7);
}

.apply-card.is-sbi {
  border-color: rgba(232, 119, 34, 0.24);
  background: linear-gradient(180deg, #ffffff, #fff8f1);
}

.broker-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 22px;
  font-weight: 950;
  background: linear-gradient(135deg, #2f6e62, #3e6b8a);
}

.broker-mark.rakuten {
  background: #bf0000;
}

.broker-mark.sbi {
  background: #e87722;
}

.apply-card h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.04em;
}

.apply-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.apply-card .btn {
  width: fit-content;
  max-width: 100%;
}

.official-small {
  margin-top: 14px;
  padding: 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: #fbfdff;
  color: #475569;
  font-size: 13px;
  line-height: 1.7;
}

.official-small a {
  color: #155bb2;
  font-weight: 900;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
}

.faq-list summary {
  cursor: pointer;
  padding: 15px 16px;
  font-weight: 900;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  color: var(--primary);
  font-weight: 900;
}

.faq-list details[open] summary::after {
  content: "-";
}

.faq-list details p {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.nisa-disclaimer {
  margin-top: 20px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.nisa-disclaimer p {
  margin: 0 0 10px;
}

.nisa-disclaimer strong {
  color: var(--ink);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.footer-links a {
  color: inherit;
}

@media (max-width: 880px) {
  .nisa-progress-steps,
  .nisa-checks-grid,
  .apply-grid {
    grid-template-columns: 1fr;
  }

  .compare-table-head {
    display: block;
  }
}

@media (max-width: 760px) {
  .compare-mobile-guide {
    display: block;
    margin: 0;
    padding: 10px 14px 0;
    color: #24584f;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.55;
  }

  .compare-table-wrap {
    overflow: visible;
  }

  .compare-table {
    min-width: 0;
    font-size: 13px;
  }

  .compare-table thead {
    display: none;
  }

  .compare-table,
  .compare-table tbody,
  .compare-table tr,
  .compare-table td {
    display: block;
    width: 100%;
  }

  .compare-table tbody {
    display: grid;
    gap: 10px;
    padding: 12px;
    background: #f8fbff;
  }

  .compare-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  }

  .compare-table .compare-extra-row {
    display: none;
  }

  .compare-table tr:last-child {
    border-bottom: 1px solid var(--line);
  }

  .compare-table td {
    border-bottom: none;
    padding: 0;
    text-align: left !important;
    white-space: normal !important;
  }

  .compare-table td:first-child,
  .compare-table td:nth-child(4),
  .compare-table td:nth-child(5) {
    grid-column: 1 / -1;
  }

  .compare-table td:first-child {
    color: var(--ink);
    font-size: 15px;
    line-height: 1.35;
  }

  .compare-table td:first-child::before {
    content: none;
  }

  .compare-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 950;
    letter-spacing: 0.02em;
    margin-bottom: 2px;
  }

  .compare-table td:nth-child(2),
  .compare-table td:nth-child(3) {
    min-height: 46px;
    padding: 8px 10px;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    background: #fbfdff;
    font-size: 17px;
    line-height: 1.1;
    text-align: center !important;
  }

  .compare-table td:nth-child(2)::before,
  .compare-table td:nth-child(3)::before {
    text-align: center;
  }

  .compare-table td:nth-child(4) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    background: #f8fafc;
  }

  .compare-table td:nth-child(4)::before {
    margin-bottom: 0;
  }

  .compare-table td:nth-child(5) {
    color: #475569;
    font-size: 12px;
    line-height: 1.55;
  }

  .compare-table td:nth-child(5) strong {
    color: var(--ink);
  }

  .priority-row {
    border-color: rgba(47, 110, 98, 0.28);
    background: linear-gradient(180deg, #ffffff, #f4faf6);
  }

  .priority-row td,
  .priority-rakuten td {
    background: transparent;
  }

  .priority-row td:first-child {
    border-left: 0;
  }

  .priority-row td:first-child strong {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef6f1;
    color: #24584f;
    font-size: 14px;
  }

  .priority-rakuten {
    border-color: rgba(191, 0, 0, 0.28);
    background: linear-gradient(180deg, #ffffff, #fff5f5);
  }

  .priority-rakuten td:first-child strong {
    background: #ffecec;
    color: #a40000;
  }

  .priority-rakuten td:nth-child(4) {
    background: #fff1f1;
  }

  .priority-rakuten .win.rakuten {
    min-width: 74px;
    background: #bf0000;
    color: #ffffff;
  }

  .compare-extra-mobile {
    display: block;
    margin: 0;
    padding: 0 12px 12px;
    background: #f8fbff;
  }

  .compare-extra-mobile summary {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 12px;
    border: 1px solid #bdd7fb;
    border-radius: 999px;
    background: #ffffff;
    color: #155bb2;
    font-size: 13px;
    font-weight: 900;
    list-style: none;
  }

  .compare-extra-mobile summary::-webkit-details-marker {
    display: none;
  }

  .compare-extra-mobile summary::after {
    content: "+";
    margin-left: 8px;
    font-weight: 950;
  }

  .compare-extra-mobile[open] summary {
    border-radius: 14px;
    background: #f8fbff;
  }

  .compare-extra-mobile[open] summary::after {
    content: "-";
  }

  .compare-extra-list {
    display: grid;
    gap: 9px;
    margin-top: 10px;
  }

  .compare-detail-card {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
  }

  .compare-detail-card h4 {
    margin: 0;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.35;
  }

  .compare-detail-scores {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .compare-detail-scores span {
    padding: 7px 8px;
    border: 1px solid #dbe4ef;
    border-radius: 11px;
    background: #fbfdff;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-align: center;
  }

  .compare-detail-scores b {
    display: block;
    margin-top: 2px;
    color: #24584f;
    font-size: 16px;
    line-height: 1;
  }

  .compare-detail-choice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 9px;
    border-radius: 11px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
  }

  .compare-detail-card p {
    margin: 0;
    color: #475569;
    font-size: 12px;
    line-height: 1.55;
  }
}

@media (max-width: 560px) {
  .nisa-page .hero-main {
    min-height: 220px;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
  }

  .nisa-page .hero-main h1 {
    margin: 4px 0 2px;
    font-size: 46px;
    line-height: 1.06;
    letter-spacing: -0.045em;
  }

  .nisa-page .hero-main .eyebrow {
    width: fit-content;
    max-width: 100%;
    margin-bottom: 2px;
    padding: 5px 10px;
    font-size: 12px;
    line-height: 1.35;
    white-space: normal;
  }

  .nisa-page .hero-main .lead {
    max-width: 100%;
    font-size: 14px;
    line-height: 1.7;
  }

  .nisa-page .tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
    padding: 6px;
  }

  .nisa-page .tab {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 7px;
    font-size: 12px;
    text-align: center;
    white-space: normal;
    line-height: 1.25;
  }

  .nisa-check-card {
    grid-template-columns: 46px minmax(0, 1fr);
    padding: 14px;
  }

  .nisa-check-icon {
    width: 46px;
    height: 46px;
  }
}
