:root {
  --navy: #102a43;
  --blue: #1f5f8b;
  --orange: #e78916;
  --green: #2f855a;
  --red: #c53030;
  --bg: #f3f5f7;
  --panel: #ffffff;
  --line: #d9dee3;
  --text: #17202a;
  --muted: #6b7580;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Noto Sans JP",
    Meiryo,
    sans-serif;
}

.page {
  width: min(1380px, 96vw);
  margin: 18px auto 40px;
}

.header {
  padding: 20px 24px;
  color: #fff;
  background: linear-gradient(90deg, #0e2f4f, #15537e);
  border-radius: 10px 10px 0 0;
}

.brand {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .08em;
  opacity: .9;
}

.company-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}

.code {
  font-size: 24px;
  font-weight: 900;
}

.company-name {
  font-size: 38px;
  font-weight: 900;
}

.market {
  padding: 4px 10px;
  color: #15476c;
  background: #e7f3fb;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.grid {
  display: grid;
  grid-template-columns: 320px 1fr 320px;
  gap: 12px;
  padding-top: 12px;
}

.panel {
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel h2 {
  margin: 0;
  padding: 10px 13px;
  color: #fff;
  background: var(--navy);
  font-size: 16px;
}

.panel-body {
  padding: 13px;
}

.metric {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #e9edf0;
  font-size: 14px;
}

.metric:last-child {
  border-bottom: 0;
}

.metric strong {
  font-size: 16px;
}

.pending {
  color: var(--muted);
  font-weight: 700;
}

.status {
  padding: 10px 12px;
  color: #805400;
  background: #fff8df;
  border-left: 5px solid var(--orange);
  line-height: 1.7;
  font-size: 14px;
}

.placeholder-chart {
  display: grid;
  min-height: 270px;
  place-items: center;
  color: #7b8792;
  background:
    linear-gradient(#edf1f4 1px, transparent 1px),
    linear-gradient(90deg, #edf1f4 1px, transparent 1px);
  background-size: 38px 38px;
  font-weight: 800;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th,
.table td {
  padding: 9px 7px;
  border: 1px solid #dde3e8;
  text-align: right;
}

.table th:first-child,
.table td:first-child {
  text-align: left;
}

.table thead {
  background: #edf3f7;
}

.score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.score {
  padding: 12px;
  background: #fafcfd;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.score b {
  float: right;
  font-size: 20px;
}

.description {
  line-height: 1.8;
  color: #35414c;
  font-size: 14px;
}

.footer {
  margin-top: 12px;
  padding: 12px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
}

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

  .company-name {
    font-size: 30px;
  }
}

/* ===== 広告枠 ===== */

.ad-slot,
.amazon-slot {
  width: 100%;
  margin: 14px 0;
  overflow: hidden;
  border: 1px dashed #c4ccd3;
  border-radius: 8px;
  background: #fff;
}

.ad-slot {
  min-height: 110px;
}

.ad-slot-top {
  min-height: 120px;
}

.ad-slot-inline {
  min-height: 180px;
}

.ad-slot-bottom {
  min-height: 140px;
}

.amazon-slot {
  min-height: 190px;
}

.ad-placeholder {
  display: grid;
  min-height: inherit;
  padding: 18px;
  place-items: center;
  color: #7b8792;
  background:
    repeating-linear-gradient(
      -45deg,
      #fafbfc,
      #fafbfc 12px,
      #f5f7f8 12px,
      #f5f7f8 24px
    );
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.amazon-placeholder strong {
  display: block;
  margin-bottom: 6px;
  color: #38434d;
  font-size: 15px;
}

/* ===== 企業検索トップ ===== */

.search-page {
  width: min(1200px, 96vw);
  margin: 20px auto 50px;
}

.search-hero {
  padding: 28px;
  color: #fff;
  background: linear-gradient(100deg, #0e2f4f, #15537e);
  border-radius: 12px;
}

.search-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 5vw, 48px);
}

.search-hero p {
  margin: 0;
  line-height: 1.8;
  opacity: .92;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 22px;
}

.search-box input {
  width: 100%;
  min-height: 54px;
  padding: 0 17px;
  border: 0;
  border-radius: 8px;
  font-size: 18px;
  outline: none;
}

.search-box button {
  min-width: 120px;
  padding: 0 22px;
  color: #fff;
  background: #e78916;
  border: 0;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.search-summary {
  margin: 14px 0 8px;
  color: #53606b;
  font-size: 14px;
}

.search-results {
  display: grid;
  gap: 8px;
}

.company-result {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  color: inherit;
  background: #fff;
  border: 1px solid #d9dee3;
  border-radius: 8px;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}

.company-result:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(20, 40, 60, .09);
}

.result-code {
  color: #15537e;
  font-size: 19px;
  font-weight: 900;
}

.result-name {
  font-size: 17px;
  font-weight: 850;
}

.result-meta {
  margin-top: 4px;
  color: #6b7580;
  font-size: 12px;
}

.result-open {
  color: #15537e;
  font-weight: 800;
}

.no-results {
  padding: 28px;
  color: #6b7580;
  background: #fff;
  border: 1px solid #d9dee3;
  border-radius: 8px;
  text-align: center;
}

@media (max-width: 700px) {
  .search-box {
    grid-template-columns: 1fr;
  }

  .company-result {
    grid-template-columns: 70px 1fr;
  }

  .result-open {
    display: none;
  }

  .ad-slot-top {
    min-height: 100px;
  }
}

/* INST_FLOW company related links */
.company-related-links {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid #e4e7ec;
}

.company-related-links h2 {
  margin: 0 0 18px;
}

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

.company-related-box {
  padding: 18px;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #fff;
}

.company-related-box h3 {
  margin: 0 0 12px;
  font-size: 17px;
}

.company-related-list {
  margin: 0;
  padding-left: 20px;
}

.company-related-list li {
  margin: 8px 0;
  line-height: 1.55;
}

.company-related-list a {
  text-decoration: none;
}

.company-related-list a:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .company-related-grid {
    grid-template-columns: 1fr;
  }
}

/* Company FAQ */
.company-faq .faq-list {
  display: grid;
  gap: 10px;
}

.company-faq .faq-item {
  border: 1px solid rgba(120, 130, 145, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  overflow: hidden;
}

.company-faq .faq-item summary {
  position: relative;
  padding: 14px 42px 14px 14px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.6;
  list-style: none;
}

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

.company-faq .faq-item summary::after {
  content: "＋";
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  font-size: 18px;
  line-height: 1;
}

.company-faq .faq-item[open] summary::after {
  content: "−";
}

.company-faq .faq-answer {
  padding: 0 14px 15px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

@media (prefers-color-scheme: dark) {
  .company-faq .faq-item {
    background: rgba(255, 255, 255, 0.035);
  }
}


/* Industry pages and breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.6;
}

.breadcrumb a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.breadcrumb-separator {
  opacity: 0.55;
}

.industry-page h1 {
  margin: 0;
  font-size: clamp(21px, 4vw, 30px);
  line-height: 1.4;
}

.industry-introduction h1 {
  padding: 16px 18px 0;
}

.industry-company-list,
.industry-index-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.industry-company-list {
  grid-template-columns: repeat(
    auto-fit,
    minmax(230px, 1fr)
  );
}

.industry-company-item a,
.industry-index-item a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  height: 100%;
  box-sizing: border-box;
  padding: 13px 14px;
  border: 1px solid rgba(120, 130, 145, 0.22);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.industry-company-item a:hover,
.industry-index-item a:hover {
  transform: translateY(-2px);
  border-color: rgba(32, 166, 232, 0.55);
  box-shadow: 0 8px 20px rgba(30, 80, 120, 0.12);
}

.industry-company-main {
  display: flex;
  gap: 9px;
  min-width: 0;
}

.industry-company-main strong {
  flex: 0 0 auto;
}

.industry-company-main span {
  overflow-wrap: anywhere;
}

.industry-company-item small {
  flex: 0 0 auto;
  max-width: 45%;
  text-align: right;
  line-height: 1.5;
  opacity: 0.7;
}

.industry-index-list {
  grid-template-columns: repeat(
    auto-fit,
    minmax(190px, 1fr)
  );
}

.industry-index-item a {
  align-items: center;
}

.industry-index-item span {
  flex: 0 0 auto;
  font-size: 12px;
  opacity: 0.7;
}

@media (max-width: 600px) {
  .industry-company-list,
  .industry-index-list {
    grid-template-columns: 1fr;
  }

  .industry-company-item a {
    flex-direction: column;
  }

  .industry-company-item small {
    max-width: none;
    text-align: left;
  }
}


/* Related companies */
.related-company-list {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(220px, 1fr)
  );
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.related-company-item a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  height: 100%;
  box-sizing: border-box;
  padding: 13px 14px;
  border: 1px solid rgba(120, 130, 145, 0.22);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.related-company-item a:hover {
  transform: translateY(-2px);
  border-color: rgba(32, 166, 232, 0.55);
  box-shadow: 0 8px 20px rgba(30, 80, 120, 0.12);
}

.related-company-main {
  display: flex;
  gap: 9px;
  min-width: 0;
}

.related-company-main strong {
  flex: 0 0 auto;
}

.related-company-main span {
  overflow-wrap: anywhere;
}

.related-company-item small {
  flex: 0 0 auto;
  max-width: 45%;
  text-align: right;
  line-height: 1.5;
  opacity: 0.7;
}

.related-industry-link {
  margin-top: 14px;
  text-align: right;
}

.related-industry-link a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  color: inherit;
  text-underline-offset: 4px;
}

.related-industry-link a::after {
  content: "›";
  font-size: 18px;
  line-height: 1;
}

@media (max-width: 600px) {
  .related-company-list {
    grid-template-columns: 1fr;
  }

  .related-company-item a {
    flex-direction: column;
  }

  .related-company-item small {
    max-width: none;
    text-align: left;
  }

  .related-industry-link {
    text-align: left;
  }
}

/* =========================================================
   財務履歴テーブル
========================================================= */

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

.table th,
.table td {
  padding: 11px 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: right;
  white-space: nowrap;
}

.table th:first-child,
.table td:first-child {
  text-align: left;
  font-weight: 600;
}

.table thead th {
  background: #f7f8fa;
  color: #4b5563;
  font-size: 13px;
}

.table tbody tr:hover {
  background: #fafafa;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table .forecast-row td {
  background: #fff8e6;
  font-weight: 600;
}

.table .forecast-row td:first-child::before {
  content: "予想 ";
  display: inline-block;
  margin-right: 5px;
  color: #b45309;
  font-size: 11px;
  font-weight: 700;
}

.panel-body {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 760px) {
  .table {
    min-width: 760px;
    font-size: 13px;
  }

  .table th,
  .table td {
    padding: 9px 10px;
  }
}

/* 最新四半期行 */
.table .latest-quarter-row td {
  background: #eef6ff;
  font-weight: 700;
}

.table .latest-quarter-row td:first-child::before {
  content: "最新 ";
  display: inline-block;
  margin-right: 5px;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
}

/* 業績SVGグラフ */
.financial-chart-note {
  margin: 0 0 16px;
  color: #6b7280;
  font-size: 13px;
}

.financial-chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.financial-chart-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
}

.financial-chart-card h3 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 15px;
}

.financial-chart {
  width: 100%;
  min-height: 230px;
  overflow: hidden;
}

.financial-chart svg {
  display: block;
  width: 100%;
  height: auto;
  min-width: 520px;
}

.financial-chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  color: #9ca3af;
  font-size: 13px;
}

.financial-chart-grid-lines line {
  stroke: #e5e7eb;
  stroke-width: 1;
}

.financial-chart-axis-label,
.financial-chart-period-label {
  fill: #6b7280;
  font-size: 11px;
}

.financial-chart-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.financial-chart-line.actual-line {
  stroke: #2563eb;
}

.financial-chart-line.forecast-line {
  stroke: #d97706;
  stroke-dasharray: 8 6;
}

.financial-chart-point {
  stroke: #ffffff;
  stroke-width: 2;
}

.financial-chart-point.actual-point {
  fill: #2563eb;
}

.financial-chart-point.forecast-point {
  fill: #d97706;
}

.financial-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 14px;
  color: #4b5563;
  font-size: 12px;
}

.financial-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-line {
  display: inline-block;
  width: 28px;
  height: 0;
  border-top: 3px solid;
}

.legend-actual {
  border-color: #2563eb;
}

.legend-forecast {
  border-color: #d97706;
  border-top-style: dashed;
}

@media (min-width: 1180px) {
  .financial-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .financial-chart-card:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .financial-chart-card {
    padding: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .financial-chart {
    min-height: 205px;
  }

  .financial-chart svg {
    min-width: 560px;
  }
}

/* 業績グラフ数値ラベル */
.financial-chart-value-label {
  fill: #1f2937;
  font-size: 11px;
  font-weight: 700;
  paint-order: stroke;
  stroke: #ffffff;
  stroke-width: 4px;
  stroke-linejoin: round;
}

.financial-chart-value-label.forecast-value-label {
  fill: #b45309;
}

.financial-chart-zero-line {
  stroke: #9ca3af;
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

@media (max-width: 760px) {
  .financial-chart-value-label {
    font-size: 10px;
  }
}

/* 業績トレンド判定 */
.performance-trend-note {
  margin: 0 0 16px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.7;
}

.performance-trend-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 36px;
}

.performance-trend-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #f9fafb;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.performance-trend-positive {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.performance-trend-positive::before {
  content: "↑";
  margin-right: 6px;
  font-size: 15px;
}

.performance-trend-negative {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #991b1b;
}

.performance-trend-negative::before {
  content: "↓";
  margin-right: 6px;
  font-size: 15px;
}

.performance-trend-forecast {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.performance-trend-forecast::before {
  content: "予";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 6px;
  border-radius: 50%;
  background: #f59e0b;
  color: #ffffff;
  font-size: 11px;
}

.performance-trend-neutral {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #475569;
}

.performance-trend-loading,
.performance-trend-empty {
  color: #9ca3af;
  font-size: 13px;
}

@media (max-width: 760px) {
  .performance-trend-list {
    gap: 8px;
  }

  .performance-trend-badge {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* 成長率サマリー */
.growth-summary-note {
  margin: 0 0 16px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.7;
}

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

.growth-summary-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #ffffff;
}

.growth-summary-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.growth-summary-card h3 {
  margin: 0;
  color: #374151;
  font-size: 13px;
  line-height: 1.45;
}

.growth-summary-category {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 10px;
  font-weight: 700;
}

.growth-summary-value {
  margin-bottom: 7px;
  color: #374151;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.growth-summary-detail {
  min-height: 18px;
  color: #9ca3af;
  font-size: 11px;
  line-height: 1.5;
}

.growth-summary-positive {
  border-color: #86efac;
  background:
    linear-gradient(
      180deg,
      #f0fdf4 0%,
      #ffffff 100%
    );
}

.growth-summary-positive
.growth-summary-value {
  color: #15803d;
}

.growth-summary-negative {
  border-color: #fca5a5;
  background:
    linear-gradient(
      180deg,
      #fef2f2 0%,
      #ffffff 100%
    );
}

.growth-summary-negative
.growth-summary-value {
  color: #b91c1c;
}

.growth-summary-neutral {
  border-color: #d1d5db;
  background:
    linear-gradient(
      180deg,
      #f9fafb 0%,
      #ffffff 100%
    );
}

.growth-summary-loading {
  grid-column: 1 / -1;
  color: #9ca3af;
  font-size: 13px;
}

.growth-summary-caution {
  margin: 12px 0 0;
  color: #9ca3af;
  font-size: 11px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .growth-summary-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .growth-summary-grid {
    grid-template-columns: 1fr;
  }

  .growth-summary-card {
    padding: 13px;
  }

  .growth-summary-value {
    font-size: 23px;
  }
}


/* =========================================================
   Investment dashboard
   ========================================================= */

.investment-dashboard {
  margin: 18px 0 22px;
  padding: 18px;
  border: 1px solid rgba(31, 111, 235, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(
      135deg,
      rgba(31, 111, 235, 0.08),
      rgba(255, 255, 255, 0.96) 42%,
      rgba(20, 184, 166, 0.06)
    );
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.investment-dashboard-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.investment-dashboard-heading h2 {
  margin: 2px 0 0;
  font-size: 1.3rem;
  line-height: 1.3;
}

.investment-dashboard-heading p {
  max-width: 560px;
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.6;
  text-align: right;
}

.investment-dashboard-kicker {
  display: block;
  color: #2563eb;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.investment-dashboard-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1.25fr)
    minmax(0, 1fr)
    minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.investment-dashboard-grid > .panel {
  height: 100%;
  margin: 0;
  box-shadow: none;
}

.investment-dashboard-grid > .panel h2 {
  min-height: 44px;
  display: flex;
  align-items: center;
}

.investment-dashboard-grid .score-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.investment-dashboard-grid #assessment-score {
  font-size: 1.18rem;
}

.investment-dashboard-grid #assessment-signal {
  font-size: 1.18rem;
}

@media (max-width: 1050px) {
  .investment-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .investment-dashboard-grid > .panel:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .investment-dashboard {
    margin: 12px 0 16px;
    padding: 12px;
    border-radius: 14px;
  }

  .investment-dashboard-heading {
    display: block;
  }

  .investment-dashboard-heading p {
    margin-top: 7px;
    text-align: left;
  }

  .investment-dashboard-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .investment-dashboard-grid > .panel:first-child {
    grid-column: auto;
  }

  .investment-dashboard-grid .score-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .investment-dashboard-grid .score-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-color-scheme: dark) {
  .investment-dashboard {
    border-color: rgba(96, 165, 250, 0.28);
    background:
      linear-gradient(
        135deg,
        rgba(37, 99, 235, 0.18),
        rgba(15, 23, 42, 0.96) 45%,
        rgba(13, 148, 136, 0.12)
      );
  }

  .investment-dashboard-heading p {
    color: #94a3b8;
  }

  .investment-dashboard-kicker {
    color: #60a5fa;
  }
}


/* =========================================================
   Company page sidebar navigation
   ========================================================= */

.sidebar-navigation-note {
  margin: 0 0 12px;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.6;
}

.sidebar-link-list {
  display: grid;
  gap: 8px;
}

.sidebar-link-list > a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 16px;
  gap: 9px;
  align-items: center;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  color: inherit;
  text-decoration: none;
  background: #fff;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.sidebar-link-list > a:hover {
  border-color: #60a5fa;
  box-shadow: 0 5px 15px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

.sidebar-link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 3px;
  border-radius: 8px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.sidebar-link-main {
  min-width: 0;
}

.sidebar-link-main strong,
.sidebar-link-main small {
  display: block;
}

.sidebar-link-main strong {
  font-size: 0.84rem;
  line-height: 1.35;
}

.sidebar-link-main small {
  margin-top: 2px;
  color: #64748b;
  font-size: 0.7rem;
  line-height: 1.35;
}

.sidebar-link-arrow {
  color: #94a3b8;
  font-size: 1.25rem;
  line-height: 1;
}

.sidebar-ranking-index-link {
  display: block;
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 9px;
  color: #fff;
  background: #2563eb;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.sidebar-ranking-index-link:hover {
  background: #1d4ed8;
}

.grid > aside:last-of-type .related-companies {
  position: static;
}

.grid > aside:last-of-type .sidebar-navigation-panel {
  position: relative;
  z-index: 1;
}

@media (max-width: 1050px) {
  .grid > aside:last-of-type .related-companies {
    position: static;
  }
}

@media (prefers-color-scheme: dark) {
  .sidebar-navigation-note,
  .sidebar-link-main small {
    color: #94a3b8;
  }

  .sidebar-link-list > a {
    border-color: #334155;
    background: #0f172a;
  }

  .sidebar-link-list > a:hover {
    border-color: #60a5fa;
  }

  .sidebar-link-icon {
    color: #93c5fd;
    background: rgba(37, 99, 235, 0.22);
  }

  .sidebar-link-arrow {
    color: #64748b;
  }
}



.grid > aside:last-of-type .panel:last-child {
  position: sticky;
  top: 12px;
  align-self: start;
}

/* EDINET企業情報 */
.company-profile-panel {
  margin-top: 20px;
}

.company-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid #e5e7eb;
  border-left: 1px solid #e5e7eb;
}

.company-profile-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.company-profile-item dt,
.company-profile-item dd {
  margin: 0;
  padding: 10px 12px;
  line-height: 1.6;
}

.company-profile-item dt {
  background: #f7f8fa;
  font-size: 13px;
  font-weight: 700;
}

.company-profile-item dd {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.company-profile-item a {
  color: #155eef;
  text-decoration: none;
}

.company-profile-item a:hover {
  text-decoration: underline;
}

@media (max-width: 760px) {
  .company-profile-grid {
    grid-template-columns: 1fr;
  }

  .company-profile-item {
    grid-template-columns: 105px minmax(0, 1fr);
  }
}

.company-overview-panel .company-text-block {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.85;
}

/* ===== 企業カルテ 横幅・可読性調整 ===== */

.grid {
  grid-template-columns: 270px minmax(0, 1fr) 270px;
  gap: 12px;
}

.grid > * {
  min-width: 0;
}

.grid > section {
  min-width: 0;
  overflow: hidden;
}

.panel,
.panel-body {
  min-width: 0;
  max-width: 100%;
}

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

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

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

.financial-chart svg {
  max-width: 100%;
  min-width: 0;
}

@media (max-width: 1350px) {
  .grid {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .grid > aside:last-child {
    grid-column: 1 / -1;
  }
}

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

  .growth-summary-grid,
  .financial-chart-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .score-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== 共通サイトトップリンク ===== */

.site-top-links {
  width: min(1200px, calc(100% - 36px));
  margin: 14px auto 0;
  font-size: 14px;
  line-height: 1.6;
}

.site-top-links a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}

.site-top-links a:hover,
.site-top-links a:focus-visible {
  text-decoration: underline;
}

.site-top-links span {
  margin: 0 8px;
  color: #94a3b8;
}

@media (max-width: 560px) {
  .site-top-links {
    width: calc(100% - 24px);
    margin-top: 10px;
    font-size: 13px;
  }

  .site-top-links span {
    margin: 0 5px;
  }
}

/* COMPANY_FAQ_START */
.company-faq-panel {
  margin-top: 24px;
}

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

.company-faq-item {
  border: 1px solid rgba(120, 130, 145, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  overflow: hidden;
}

.company-faq-item summary {
  position: relative;
  padding: 15px 44px 15px 16px;
  font-weight: 700;
  line-height: 1.6;
  cursor: pointer;
  list-style: none;
}

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

.company-faq-item summary::after {
  content: "＋";
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  font-size: 20px;
  line-height: 1;
}

.company-faq-item[open] summary::after {
  content: "−";
}

.company-faq-answer {
  padding: 0 16px 15px;
  border-top: 1px solid rgba(120, 130, 145, 0.16);
}

.company-faq-answer p {
  margin: 13px 0 0;
  line-height: 1.8;
}

@media (max-width: 640px) {
  .company-faq-item summary {
    padding: 14px 40px 14px 14px;
  }

  .company-faq-answer {
    padding: 0 14px 14px;
  }
}
/* COMPANY_FAQ_END */


/* ===== Top Quick Links ===== */
.quick-links{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:14px;
  margin:22px 20px 0;
}
.quick-card{
  display:block;
  padding:20px 12px;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:14px;
  text-align:center;
  text-decoration:none;
  color:#0f172a;
}
.quick-card:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 20px rgba(15,23,42,.10);
}
.quick-card strong{
  display:block;
  margin-top:8px;
  font-size:16px;
}
.quick-card small{
  display:block;
  margin-top:6px;
  color:#64748b;
}
@media(max-width:760px){
  .quick-links{grid-template-columns:repeat(2,1fr);margin:18px 0 0}
}
.quick-card-disabled{
  opacity:.68;
  cursor:default;
}
.quick-card-disabled:hover{
  transform:none;
  box-shadow:none;
}
.ranking-cards{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin:20px 0;
}
.ranking-cards a{
  padding:18px 12px;
  background:#fff;
  border:1px solid #dbe3ef;
  border-radius:12px;
  text-align:center;
  text-decoration:none;
  color:#1d4ed8;
  font-weight:800;
}
.ranking-cards a:hover{
  background:#eff6ff;
  border-color:#93c5fd;
}
.ranking-all-link{
  margin-top:14px;
}
@media(max-width:760px){
  .ranking-cards{
    grid-template-columns:repeat(2,1fr);
  }
}
.industry-page{
  max-width:1100px;
  margin:0 auto;
  padding:32px 20px 60px;
}
.industry-hero{
  margin-bottom:28px;
}
.industry-list{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
}
.industry-card{
  padding:18px;
  background:#fff;
  border:1px solid #dbe3ef;
  border-radius:12px;
  text-align:left;
  cursor:pointer;
}
.industry-card strong,
.industry-card span{
  display:block;
}
.industry-card span{
  margin-top:6px;
  color:#64748b;
}
.industry-company-list{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin-top:18px;
}
.industry-company{
  display:flex;
  gap:12px;
  padding:14px;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:10px;
  text-decoration:none;
  color:#0f172a;
}
.industry-company strong{
  color:#1d4ed8;
}
@media(max-width:760px){
  .industry-list,
  .industry-company-list{
    grid-template-columns:repeat(2,1fr);
  }
}
.glossary-page{
  max-width:980px;
  margin:0 auto;
  padding:32px 20px 60px;
}
.glossary-hero{
  margin-bottom:24px;
}
.glossary-index{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:24px 0 30px;
}
.glossary-index a{
  padding:9px 13px;
  background:#fff;
  border:1px solid #dbe3ef;
  border-radius:999px;
  text-decoration:none;
  color:#1d4ed8;
  font-weight:700;
}
.glossary-list{
  display:grid;
  gap:16px;
}
.glossary-card{
  padding:22px;
  background:#fff;
  border:1px solid #dbe3ef;
  border-radius:14px;
  scroll-margin-top:20px;
}
.glossary-card h2{
  margin-top:0;
  color:#0f172a;
}
.glossary-card p{
  line-height:1.8;
}
.glossary-reading{
  color:#64748b;
  font-weight:700;
}
