/* LP「数値化・解析・シミュレーション支援」（solution-numerical-analysis.html と、英語の en/solution-numerical-analysis.html）。管内調査用カメラ車訓練システム（css/ccar.css）と同じ構成にし、色・書体・基本部品はサイト共通の定義を使う。 */
@layer components {
  .nsim-shell {
    width: 100%;
    max-width: calc(var(--max-width) + 2 * var(--page-gutter));
    margin-inline: auto;
    padding-inline: var(--page-gutter);
  }
  .nsim-page main { padding-bottom: 0; }
  .nsim-page main :is(h1, h2, h3) { text-wrap: balance; }
  .nsim-page main p { line-height: 1.9; }
  .nsim-page h3 { color: var(--color-primary-dark); font-size: 21px; line-height: 1.6; }
  .nsim-page .section { scroll-margin-top: 80px; }
  .nsim-page .section > .section-title + p { max-width: 52em; }
  .nsim-page .hero { padding-block: 40px; }
  .nsim-page .hero h1 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.5; letter-spacing: .025em; }
  .nsim-page .hero__actions .site-button { padding-inline: 24px; }
  .nsim-copy > * + * { margin-top: 20px; }
  .nsim-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 16px; text-decoration: underline; text-underline-offset: 4px; }
  .nsim-figure { min-width: 0; margin: 0; }
  .nsim-figure img { display: block; width: 100%; height: auto; border-radius: var(--radius-md); }
  .nsim-figure figcaption { margin-top: 12px; color: var(--color-text-muted); font-size: 14px; line-height: 1.8; }
  .nsim-page img[data-zoomable] { pointer-events: auto; }
  .nsim-page .medium-zoom-image--opened { object-fit: contain; }
  /* 冒頭の写真（1200×900）。列の幅いっぱいに置き、広げすぎない。 */
  .nsim-page .hero > .nsim-hero-figure { width: 100%; max-width: 600px; justify-self: center; }
  .nsim-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .nsim-grid > div { padding-top: 24px; border-top: 1px solid var(--color-border); }
  .nsim-grid h3 { margin-bottom: 16px; }
  .nsim-services { margin-top: 32px; }
  /* 流れの図（現象から判断まで）と導入の効果。紹介動画と冒頭の写真に合わせ、暗い青の地に水色の線と黄色の差し色 */
  .nsim-flow { margin: 48px 0 0; }
  .nsim-flow__panel { padding: 48px 40px 40px; border-radius: var(--radius-md); background: linear-gradient(160deg, #16233b 0%, #2c4166 100%); color: #fff; }
  .nsim-flow__steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
  .nsim-flow__steps li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
  .nsim-flow__steps li:not(:last-child)::after { content: ""; position: absolute; top: 36px; left: calc(50% + 48px); right: calc(-50% + 40px); height: 2px; background: linear-gradient(90deg, #8fe3ee, rgba(143, 227, 238, .25)); }
  .nsim-flow__steps li:not(:last-child)::before { content: ""; position: absolute; top: 32px; right: calc(-50% + 36px); border: 5px solid transparent; border-left: 7px solid rgba(143, 227, 238, .6); }
  .nsim-flow__icon { display: grid; place-items: center; flex: none; width: 72px; height: 72px; border: 1.5px solid rgba(143, 227, 238, .6); border-radius: 50%; background: rgba(143, 227, 238, .08); box-shadow: 0 0 24px rgba(143, 227, 238, .22); }
  .nsim-flow__icon svg { width: 40px; height: 40px; fill: none; stroke: #8fe3ee; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .nsim-flow__icon svg circle[r="1.6"] { fill: #8fe3ee; stroke: none; }
  .nsim-flow__no { margin-top: 16px; color: #f2b23e; font-family: var(--font-family-heading); font-size: 14px; font-weight: 700; letter-spacing: .08em; line-height: 1.4; }
  .nsim-flow__name { margin-top: 2px; color: #fff; font-family: var(--font-family-heading); font-size: 18px; font-weight: 700; line-height: 1.5; word-break: keep-all; }
  .nsim-flow__text { margin-top: 8px; color: #c9d4e6; font-size: 14px; line-height: 1.7; }
  .nsim-flow__effects { margin-top: 40px; padding-top: 32px; border-top: 1px solid rgba(255, 255, 255, .18); }
  .nsim-page main .nsim-flow__label { margin-bottom: 16px; color: #f2b23e; font-family: var(--font-family-heading); font-size: 16px; font-weight: 700; letter-spacing: .08em; line-height: 1.5; }
  .nsim-flow__effects ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
  .nsim-flow__effects li { padding: 24px; border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--radius-md); background: rgba(255, 255, 255, .06); }
  .nsim-flow__effects svg { width: 28px; height: 28px; fill: none; stroke: #f2b23e; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .nsim-flow__effects strong { display: block; margin-top: 12px; color: #fff; font-family: var(--font-family-heading); font-size: 18px; font-weight: 700; line-height: 1.6; }
  .nsim-flow__effects li > span { display: block; margin-top: 6px; color: #c9d4e6; font-size: 14px; line-height: 1.7; }
  .nsim-flow figcaption { margin-top: 12px; color: var(--color-text-muted); font-size: 14px; line-height: 1.8; }
  /* 技術の種類の名札（数値化・解析・シミュレーション） */
  .nsim-kind { margin-bottom: 8px; color: var(--color-accent-dark); font-size: 14px; font-weight: 700; letter-spacing: .04em; line-height: 1.6; }
  .nsim-page main .nsim-kind { line-height: 1.6; }
  /* 製品に使われている例。1 製品に 1 枚のカード */
  .nsim-examples { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 32px; }
  .nsim-example-card { display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
  .nsim-example-card h3 { margin-bottom: 4px; }
  .nsim-relation { margin-bottom: 16px; color: var(--color-text-muted); font-size: 14px; }
  .nsim-page main .nsim-relation { line-height: 1.6; }
  .nsim-example-card .nsim-link { margin-top: auto; padding-top: 16px; align-self: flex-start; }
  .nsim-origin { margin-top: 32px; padding: 24px 28px; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
  .nsim-origin .nsim-link { margin-top: 8px; }
  /* 進め方。番号の付いた 5 つの段 */
  .nsim-steps { display: grid; gap: 0; counter-reset: nsim-step; max-width: 900px; }
  .nsim-steps li { counter-increment: nsim-step; display: grid; grid-template-columns: 2.5em 15em minmax(0, 1fr); gap: 8px 16px; align-items: baseline; padding-block: 20px; border-top: 1px solid var(--color-border); line-height: 1.9; }
  .nsim-steps li:last-child { border-bottom: 1px solid var(--color-border); }
  .nsim-steps li::before { content: counter(nsim-step) "．"; color: var(--color-accent-dark); font-family: var(--font-family-heading); font-weight: 700; }
  .nsim-steps strong { color: var(--color-primary-dark); font-weight: 700; }
  .nsim-list { padding-left: 1.25em; list-style: disc; }
  .nsim-list li + li { margin-top: 12px; }
  .nsim-note { margin-top: 16px; color: var(--color-text-muted); font-size: 14px; }
  .nsim-page main .nsim-note { line-height: 1.8; }
  .nsim-conditions { padding: 28px 32px; background: var(--color-bg-cool); border-radius: var(--radius-md); }
  .nsim-page .dads-accordion { border-top: 1px solid var(--color-border); }
  .nsim-page .dads-accordion:last-child { border-bottom: 1px solid var(--color-border); }
  .nsim-page .dads-accordion__summary { font-size: 17px; padding-block: 24px; }
  .nsim-page .dads-accordion__content { padding-bottom: 24px; }
  /* 関連ページは 2 枚（共通の .related-product-grid は 1 枚用の 1 列なので、このページだけ 2 列にする） */
  .nsim-page .related-product-grid { grid-template-columns: repeat(2, minmax(0, 420px)); gap: 24px; }
  .nsim-contact { margin-top: var(--section-gap); padding-block: 56px; background: var(--color-bg-cool); border-top: 1px solid var(--color-border); }
  .nsim-contact h2 { margin-bottom: 20px; color: var(--color-primary-dark); font-size: 32px; line-height: 1.6; }
  .nsim-contact .cta-band__actions { justify-content: flex-start; flex-wrap: wrap; gap: 16px 32px; margin-top: 28px; }
  /* 紹介動画の導線（ケーブルウィザード css/cwiz.css と同じ指定）。課題の次の節にサムネイルを置く */
  .nsim-kicker { margin-bottom: 16px; font-size: 14px; color: var(--color-primary); }
  .nsim-video-intro { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; gap: 48px; }
  .nsim-video-intro .video-trigger { max-width: none; }
  .nsim-video-intro .section-title { margin-bottom: 24px; }
  .nsim-video-intro .video-trigger__label { text-decoration: underline; text-underline-offset: 4px; }
  /* このCSSを読むページだけ、縦持ち端末で字幕と操作バーの余白を確保する（ケーブルウィザードと同じ値）。
     余白の色だけは白でなく、動画の地の色にする（この動画は背景が暗い紺で、白い余白が動画の下に帯のように見えるため。2026-11-23 に依頼者が選んだ）。 */
  @media (max-width: 767px) and (min-height: 500px) {
    .video-modal .video-modal__frame { aspect-ratio: 1; }
    .video-modal .video-modal__video { object-fit: contain; object-position: center top; background: #06101e; }
    .video-modal__video::cue { font-size: 3.1vw; }
  }
  @media (max-width: 1023px) {
    .nsim-video-intro { grid-template-columns: 1fr; gap: 28px; }
    .nsim-page .hero { grid-template-columns: 1fr; gap: 32px; }
    .nsim-examples { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    /* 流れの図は縦に並べる（左に線を引いて段をつなぐ） */
    .nsim-flow__panel { padding: 36px 28px 28px; }
    .nsim-flow__steps { grid-template-columns: 1fr; gap: 20px; }
    .nsim-flow__steps li { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 16px; align-items: start; text-align: left; }
    .nsim-flow__steps li:not(:last-child)::after { top: 60px; bottom: -20px; left: 27px; right: auto; width: 2px; height: auto; background: linear-gradient(180deg, #8fe3ee, rgba(143, 227, 238, .25)); }
    .nsim-flow__steps li:not(:last-child)::before { display: none; }
    .nsim-flow__icon { grid-row: 1 / span 3; width: 56px; height: 56px; }
    .nsim-flow__icon svg { width: 32px; height: 32px; }
    .nsim-flow__no { grid-column: 2; margin-top: 0; }
    .nsim-flow__name, .nsim-flow__text { grid-column: 2; }
    .nsim-flow__text { margin-top: 2px; }
  }
  @media (max-width: 767px) {
    .nsim-page .hero { padding-block: 28px 32px; }
    .nsim-page .hero h1 { font-size: clamp(24px, 7vw, 30px); }
    .nsim-page .hero__actions .site-button { width: 100%; }
    .nsim-page .section-title { font-size: 27px; line-height: 1.6; }
    .nsim-grid, .nsim-examples, .nsim-page .related-product-grid, .nsim-flow__effects ul { grid-template-columns: 1fr; }
    .nsim-grid { gap: 28px; }
    .nsim-examples { gap: 16px; }
    .nsim-example-card { padding: 24px 20px; }
    .nsim-steps li { grid-template-columns: 2.5em minmax(0, 1fr); }
    .nsim-steps li span { grid-column: 2; }
    .nsim-conditions, .nsim-origin { padding: 24px 20px; }
    .nsim-flow { margin-top: 32px; }
    .nsim-flow__panel { padding: 28px 20px 20px; }
    .nsim-flow__effects li { padding: 20px; }
    .nsim-contact { padding-block: 40px; }
    .nsim-contact h2 { font-size: 26px; }
    .nsim-contact .site-button { width: 100%; }
  }
}
