/* Visual identity: precision instruments, clear editorial hierarchy.
   Loaded after styles.css; shared by all Japanese and English pages.
   Screen-only treatments leave the accessible base and print layout intact. */
@media screen {
  :root {
    --radius-lg: 12px;
    --radius-md: 8px;
    --radius-sm: 4px;
  }

  body { background: var(--surface); }
  .container { width: min(calc(100% - 80px), var(--container)); }
  .site-header {
    background: rgba(255,255,255,.94);
    border-bottom-color: rgba(20,23,26,.12);
  }
  .site-nav { font-size: .84rem; gap: 24px; }
  .site-nav a:not(.language-link)::after { bottom: -12px; }
  .language-link { border-radius: 4px; min-height: 36px; background: var(--bg); }

  /* Opening spread */
  .hero {
    background: linear-gradient(90deg, #fff 0%, #fff 54%, var(--bg) 54%);
    border-bottom: 0;
  }
  .hero::before {
    inset: auto 0 0;
    width: 100%;
    height: 10px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 20px);
  }
  .hero-inner {
    grid-template-columns: minmax(0, 1.24fr) minmax(0, 1fr);
    gap: clamp(36px, 5vw, 72px);
    min-height: 700px;
    padding: 72px 0 80px;
  }
  .hero-inner > div { min-width: 0; }
  .eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    font-size: .68rem;
    line-height: 1.8;
    letter-spacing: .16em;
  }
  .eyebrow::before {
    content: '';
    flex: 0 0 6px;
    width: 6px;
    height: 6px;
    background: var(--accent);
    box-shadow: 0 0 0 5px var(--accent-soft);
  }
  .hero h1 { font-size: clamp(2.1rem, 3.6vw, 3.5rem); line-height: 1.35; }
  .hero h1.hero-title-ja { font-size: clamp(1.75rem, 3.05vw, 2.8rem); line-height: 1.55; letter-spacing: -.06em; }
  .hero h1.hero-title-en { font-size: clamp(2.1rem, 3.65vw, 3.4rem); line-height: 1.14; letter-spacing: -.045em; }
  .hero-emphasis { color: var(--accent-strong); }
  .hero-lead { margin-top: 28px; font-size: .96rem; line-height: 1.9; }
  .hero-summary { font-weight: 600; }
  .hero-role-note { margin-top: 18px; padding-left: 16px; border-left: 2px solid var(--line); font-size: .85rem; }
  .hero-actions { gap: 12px; margin-top: 32px; }
  .button { min-height: 52px; padding: 12px 24px; border-radius: 4px; font-size: .88rem; font-weight: 700; }
  .button-primary { box-shadow: 0 6px 16px rgba(47,111,237,.16); }
  .button-primary::after { content: '↗'; margin-left: 14px; font-size: 1.15em; }
  .button-secondary { background: transparent; border-color: #b9c2cd; }
  .button-secondary:hover { background: var(--accent-soft); border-color: var(--accent); }

  /* The visual is abstract geometry, never a fabricated benchmark. */
  .hero-panel {
    isolation: isolate;
    overflow: hidden;
    min-height: 520px;
    padding: 36px;
    gap: 24px;
    border: 1px solid #303b4d;
    border-radius: 8px;
    background: var(--dark);
    box-shadow: 14px 14px 0 var(--accent-soft), 0 24px 48px -32px rgba(16,19,24,.5);
  }
  .hero-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .48;
    background:
      linear-gradient(135deg, transparent 38%, rgba(47,111,237,.32) 100%),
      repeating-linear-gradient(0deg, transparent 0 39px, rgba(255,255,255,.05) 39px 40px),
      repeating-linear-gradient(90deg, transparent 0 39px, rgba(255,255,255,.05) 39px 40px);
  }
  .hero-panel::after {
    inset: 18px;
    border-radius: 0;
    border: 0;
    background:
      linear-gradient(#7894bb, #7894bb) left top / 14px 1px no-repeat,
      linear-gradient(#7894bb, #7894bb) left top / 1px 14px no-repeat,
      linear-gradient(#7894bb, #7894bb) right bottom / 14px 1px no-repeat,
      linear-gradient(#7894bb, #7894bb) right bottom / 1px 14px no-repeat;
  }
  .precision-orbit {
    position: absolute;
    z-index: -1;
    width: 320px;
    height: 320px;
    top: -88px;
    right: -86px;
    border: 1px solid rgba(157,189,255,.4);
    border-radius: 50%;
    box-shadow: 0 0 0 24px rgba(157,189,255,.025), 0 0 0 25px rgba(157,189,255,.15), 0 0 0 64px rgba(157,189,255,.02), 0 0 0 65px rgba(157,189,255,.1);
  }
  .precision-orbit::before,
  .precision-orbit::after { content: ''; position: absolute; background: rgba(157,189,255,.25); }
  .precision-orbit::before { height: 1px; width: 140%; top: 50%; left: -20%; transform: rotate(-45deg); }
  .precision-orbit::after { width: 1px; height: 140%; left: 50%; top: -20%; transform: rotate(-45deg); }
  .panel-kicker { color: #a9b9d0; font-family: Consolas, 'Courier New', monospace; letter-spacing: .2em; }
  .panel-number {
    margin-top: 8px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(5.5rem, 10vw, 9rem);
    font-weight: 800;
    line-height: .9;
    letter-spacing: -.07em;
  }
  .panel-number::after { content: ''; display: block; width: 48px; height: 4px; margin-top: 28px; background: var(--accent); }
  .panel-caption { max-width: 300px; margin: 0 0 24px; line-height: 1.8; }
  .hero-metrics { gap: 0; margin-top: 0; border-top: 1px solid #3b4555; }
  .metric { border: 0; border-radius: 0; padding: 18px 8px 0; background: none; }
  .metric:first-child { padding-left: 0; }
  .metric + .metric { border-left: 1px solid #3b4555; }
  .metric strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
  .metric span { color: #a9b9d0; font-size: .69rem; line-height: 1.6; }

  /* Product catalogue */
  .section { padding: 112px 0; }
  .section-heading {
    grid-template-columns: minmax(240px, .8fr) minmax(0, 1.2fr);
    gap: 64px;
    align-items: end;
    padding-bottom: 28px;
    margin-bottom: 36px;
    border-bottom: 1px solid var(--line);
  }
  .section-label { font-size: .69rem; letter-spacing: .16em; margin-bottom: 14px; }
  .section-label::before { width: 20px; height: 2px; }
  .section-heading h2 { font-size: clamp(1.8rem, 2.8vw, 2.55rem); line-height: 1.4; }
  .section-heading p { font-size: .94rem; line-height: 1.9; }
  .product-roles { margin: -12px 0 36px; border: 0; padding: 0; gap: 10px 30px; font-size: .78rem; }
  .product-grid { gap: 20px; }
  .product-card { min-height: 400px; padding: 36px; border-radius: 8px; box-shadow: none; border-color: var(--line); background: var(--bg); }
  .product-card.accent { background: var(--bg); border-top: 3px solid var(--accent); }
  .product-index { align-self: flex-end; margin-bottom: -24px; color: #8795a9; font: .75rem Consolas, 'Courier New', monospace; }
  .product-card .tag { background: none; color: var(--accent-strong); padding: 0 28px 0 0; font-family: Consolas, 'Courier New', monospace; font-size: .72rem; letter-spacing: .08em; }
  /* CPUix is the sole product with a distinct background. */
  .product-card.dark { background: var(--accent-soft); border-color: #c7d8fa; color: var(--text); }
  .product-card.dark .tag { color: var(--accent-strong); background: none; }
  .product-card.dark p { color: var(--muted); }
  .product-card.dark .product-link { color: var(--accent-strong); }
  .product-card h3 { margin: 30px 0 18px; font-size: clamp(1.4rem, 2.1vw, 1.85rem); letter-spacing: -.04em; }
  .product-card.large h3 { font-size: clamp(1.9rem, 3vw, 2.65rem); }
  .product-card p { font-size: .9rem; line-height: 1.9; }
  .product-link { width: 100%; justify-content: space-between; gap: 16px; font-size: .8rem; }
  .product-link::after { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border: 1px solid currentColor; border-radius: 50%; transition: transform .2s ease, background .2s ease, color .2s ease; }
  .product-link:focus-visible::after { background: var(--accent-strong); color: #fff; border-color: var(--accent-strong); }
  .product-stat { margin-top: 16px; padding-top: 24px; gap: 10px 18px; }
  .product-stat strong { font-size: 2.65rem; font-weight: 600; letter-spacing: -.05em; }
  .product-card.small { min-height: 330px; padding: 28px; }

  /* Philosophy: an editorial spread, rather than another set of cards. */
  #philosophy { position: relative; background: var(--dark); border-top: 4px solid var(--accent); }
  #philosophy > .container { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 36px 80px; }
  .philosophy-essay-heading { grid-column: 1; grid-row: 1 / 3; align-self: start; position: sticky; top: 120px; }
  .philosophy-essay-heading h2 { max-width: 11em; font-size: clamp(1.8rem, 2.6vw, 2.5rem); line-height: 1.65; text-wrap: balance; }
  .philosophy-statement { grid-column: 2; margin: 0; padding: 0 0 36px; background: none; border: 0; border-bottom: 1px solid #3b4555; border-radius: 0; }
  .philosophy-statement strong { color: #fff; font-size: clamp(1.5rem, 2.1vw, 2rem); line-height: 1.7; font-weight: 600; }
  .philosophy-essay { grid-column: 2; margin: 0; }
  .philosophy-essay p { font-size: .94rem; line-height: 2.1; color: #adb9c9; }
  .philosophy-essay p + p { margin-top: 26px; }
  .philosophy-essay p:last-child { margin-top: 34px; padding-top: 28px; border-top: 1px solid #3b4555; }

  /* Business: numbered, open rows with generous whitespace. */
  .business-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 36px; }
  .business-card { grid-column: span 2; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 30px 0 36px; background: transparent; }
  .business-card:nth-last-child(-n+2) { grid-column: span 3; }
  .business-card .icon { display: block; width: auto; height: auto; margin-bottom: 22px; border-radius: 0; background: none; font: 400 .9rem Consolas, 'Courier New', monospace; color: var(--accent-strong); }
  .business-card h3 { font-size: 1.15rem; }
  .business-card p { max-width: 480px; line-height: 1.9; }

  /* History and evidence */
  #story { background: var(--bg); border-block: 1px solid var(--line); }
  .story-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 96px; }
  .story-copy { position: sticky; top: 116px; }
  .story-copy h2 { font-size: clamp(1.85rem, 3vw, 2.8rem); line-height: 1.5; }
  .story-copy p { font-size: .94rem; line-height: 1.95; }
  .timeline { padding-left: 0; }
  .timeline::before { display: none; }
  .timeline-item { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px 20px; padding: 24px 0; border-top: 1px solid var(--line); }
  .timeline-item::before { display: none; }
  .timeline-item time { grid-row: 1 / 3; font: 400 1.25rem Consolas, 'Courier New', monospace; letter-spacing: -.04em; }
  .timeline-item h3 { margin: 0; line-height: 1.6; }
  .timeline-item p { grid-column: 2; margin: 0; }
  .timeline-item:last-child { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
  .section-tight { padding: 64px 0; }
  .achievement-grid { gap: 0; }
  .achievement { padding: 12px 28px 20px; border: 0; border-radius: 0; background: transparent; }
  .achievement:first-child { padding-left: 0; }
  .achievement + .achievement { border-left: 1px solid var(--line); }
  .achievement strong { font-size: clamp(2rem, 3.8vw, 3.3rem); font-weight: 500; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
  .achievement span { margin-top: 14px; font-size: .78rem; }
  .news-block { grid-template-columns: 200px minmax(0, 1fr); margin-top: 36px; padding: 28px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
  .news-item { border: 0; border-radius: 4px; background: var(--bg); }
  .news-item > span:not(.news-arrow) { font-size: .88rem; }

  #company { background: var(--bg); }
  .info-grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 64px; }
  .info-card { padding: 0; border: 0; border-radius: 0; background: transparent; }
  .info-card h3 { font-size: .85rem; color: var(--accent-strong); margin-bottom: 26px; }
  .profile-name { display: block; }
  .profile-name strong { display: block; font-size: 2rem; letter-spacing: .06em; font-weight: 600; }
  .profile-name span { display: block; margin-top: 6px; font-family: Consolas, 'Courier New', monospace; }
  .info-card p { font-size: .92rem; line-height: 1.95; }
  .company-table th, .company-table td { padding: 16px 0; }

  .contact { position: relative; overflow: hidden; background: var(--accent-soft); border-top: 1px solid #c7d8fa; }
  .contact::before { content: ''; position: absolute; width: 430px; height: 430px; border: 1px solid #c7d8fa; border-radius: 50%; top: -140px; left: -300px; box-shadow: 0 0 0 60px rgba(47,111,237,.025), 0 0 0 120px rgba(47,111,237,.02); pointer-events: none; }
  .contact h2 { font-size: clamp(1.8rem, 3vw, 2.7rem); line-height: 1.5; }
  .contact .button { min-width: 220px; }
  .contact-inner { position: relative; }
  .site-footer { border-top: 4px solid var(--accent); padding-top: 64px; }
  .footer-top { padding-bottom: 40px; }
  .footer-brand p { margin-top: 24px; }
  .footer-links { gap: 0 48px; }
  .footer-links a { font-size: .8rem; }
  .back-to-top { border-radius: 4px; box-shadow: 0 6px 20px rgba(20,23,26,.08); }

  /* Long-form pages use the same typographic and line language. */
  .story-detail { max-width: 900px; }
  .story-detail-nav { padding: 20px; margin-bottom: 64px; background: var(--bg); gap: 4px 24px; border-top: 2px solid var(--accent); }
  .story-detail-nav a { font-size: .78rem; }
  .story-chapter { position: relative; padding-left: 32px; padding-bottom: 56px; margin-bottom: 56px; }
  .story-chapter .chapter-no { font-family: Consolas, 'Courier New', monospace; font-size: .72rem; }
  .story-chapter h2 { font-size: clamp(1.5rem, 2.5vw, 2.1rem); max-width: 28em; }
  .story-chapter p { max-width: 48em; line-height: 2.1; }
  .story-quote { margin-left: -32px; padding: 30px 32px; border-radius: 0; font-size: clamp(1.15rem, 1.8vw, 1.5rem); line-height: 1.9; }
  .story-return { background: var(--accent-soft); padding: 80px 0; }
  .legal-hero { background: var(--bg); border-bottom: 1px solid var(--line); padding: 76px 0; }
  .legal-hero::after { display: none; }
  .legal-hero h1 { font-size: clamp(1.8rem, 3.5vw, 3rem); }
  .legal-content { max-width: 900px; border: 0; border-radius: 0; border-top: 3px solid var(--accent); padding: 40px 32px; box-shadow: none; }

  @media (hover: hover) {
    .product-card:hover { transform: translateY(-4px); border-color: #a7bde6; box-shadow: 0 16px 36px -24px rgba(16,19,24,.3); }
    .product-link:hover::after { background: var(--accent-strong); color: #fff; border-color: var(--accent-strong); }
  }

  @media (max-width: 1080px) {
    .container { width: min(calc(100% - 48px), var(--container)); }
    .site-nav { gap: 16px; font-size: .8rem; }
    .hero-inner { gap: 32px; }
    .hero-panel { padding: 28px; }
    .product-card.small { grid-column: span 4; padding: 24px; }
    .product-card h3 { font-size: 1.45rem; }
    #philosophy > .container { gap: 32px 48px; }
    .story-layout { gap: 48px; }
    .achievement-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .achievement { padding-inline: 20px; }
  }

  @media (max-width: 960px) {
    .hero { background: #fff; }
    .hero-inner { grid-template-columns: 1fr; padding: 56px 0 64px; gap: 40px; min-height: auto; }
    .hero-inner > div { max-width: 720px; }
    .hero h1.hero-title-ja { font-size: clamp(1.7rem, 4.5vw, 2.8rem); }
    .hero h1.hero-title-en { font-size: clamp(2.15rem, 5.8vw, 3.6rem); max-width: 18em; }
    .hero-panel { min-height: 0; display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px 40px; padding: 32px; }
    .panel-kicker { grid-column: 1; }
    .panel-number { grid-column: 1; font-size: 6.5rem; margin: 0; }
    .hero-panel > div { grid-column: 2; grid-row: 1 / 3; align-self: center; }
    .panel-caption { max-width: none; }
    .nav-ready .site-nav { justify-content: flex-start; border-top: 2px solid var(--accent); padding-inline: 32px; background: #fff; transform: none; opacity: 0; transition: opacity .2s ease; }
    .nav-open .site-nav { opacity: 1; }
    .site-nav a:not(.language-link)::after { bottom: 0; }
    .nav-ready .site-nav a:not(.language-link) { border-bottom: 1px solid var(--line); padding-block: 12px; }
    .nav-ready .site-nav .language-link { align-self: flex-start; margin-top: 12px; }
    .section { padding: 80px 0; }
    .section-heading { gap: 32px; grid-template-columns: minmax(180px, .7fr) minmax(0, 1.3fr); }
    .product-card.large { grid-column: span 6; padding: 28px; }
    .product-card.large h3 { font-size: 1.85rem; }
    .product-card.small { grid-column: span 6; }
    .product-card.small:last-child { grid-column: span 12; min-height: 0; }
    #philosophy > .container { grid-template-columns: 1fr; gap: 32px; }
    .philosophy-essay-heading { position: static; grid-column: 1; grid-row: auto; }
    .philosophy-essay-heading h2 { max-width: none; }
    .philosophy-statement, .philosophy-essay { grid-column: 1; max-width: 720px; }
    .story-layout { grid-template-columns: 1fr 1fr; gap: 40px; }
    .story-copy { position: static; }
    .info-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
    .footer-top { flex-direction: row; }
  }

  @media (max-width: 620px) {
    .container { width: calc(100% - 40px); }
    .hero-inner { padding-top: 42px; gap: 36px; }
    .eyebrow { font-size: .6rem; letter-spacing: .1em; margin-bottom: 24px; }
    .hero h1.hero-title-ja { font-size: clamp(1.4rem, 5.1vw, 2rem); line-height: 1.6; }
    .hero h1 { font-size: 2rem; }
    .hero h1.hero-title-en { font-size: clamp(2rem, 7.6vw, 2.8rem); }
    .hero-lead { font-size: .9rem; margin-top: 24px; }
    .hero-role-note { font-size: .8rem; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .button { min-height: 50px; }
    .hero-panel { display: flex; min-height: 0; padding: 28px 24px; gap: 24px; box-shadow: 8px 8px 0 var(--accent-soft); }
    .panel-number { font-size: 6.5rem; }
    .panel-number::after { margin-top: 20px; }
    .panel-caption { font-size: .83rem; }
    .hero-metrics { grid-template-columns: 1fr; }
    .metric { display: grid; grid-template-columns: 80px minmax(0, 1fr); padding: 14px 0; gap: 20px; }
    .metric + .metric { border-left: 0; border-top: 1px solid #3b4555; }
    .metric:last-child { padding-bottom: 0; }
    .metric strong { font-size: 1.45rem; }
    .metric span { font-size: .74rem; }
    .section { padding: 64px 0; }
    .section-heading { grid-template-columns: 1fr; gap: 16px; padding-bottom: 24px; margin-bottom: 28px; }
    .section-heading p { font-size: .88rem; }
    .product-roles { display: grid; gap: 8px; font-size: .72rem; margin: -4px 0 28px; }
    .product-roles strong { display: block; margin-bottom: 2px; }
    .product-grid { gap: 16px; }
    .product-card.large, .product-card.small, .product-card.small:last-child { grid-column: span 12; padding: 26px; min-height: 0; }
    .product-card h3 { font-size: 1.55rem; margin-top: 24px; }
    .product-card.large h3 { font-size: clamp(1.7rem, 6.5vw, 2.2rem); }
    .product-card p { font-size: .86rem; }
    .product-stat strong { font-size: 2.35rem; }
    .business-grid { grid-template-columns: 1fr; }
    .business-card, .business-card:nth-last-child(-n+2) { grid-column: 1; padding: 26px 0; }
    .business-card .icon { margin-bottom: 14px; }
    .story-layout { grid-template-columns: 1fr; gap: 40px; }
    .timeline-item { grid-template-columns: 58px minmax(0, 1fr); gap: 8px 14px; }
    .timeline-item time { font-size: 1.1rem; }
    .achievement-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 0; }
    .achievement { padding: 8px 16px; }
    .achievement:nth-child(odd) { padding-left: 0; border-left: 0; }
    .achievement strong { font-size: 2.1rem; }
    .achievement span { font-size: .71rem; }
    .news-block { grid-template-columns: 1fr; gap: 20px; }
    .news-item { padding: 18px; }
    .info-grid { grid-template-columns: 1fr; gap: 40px; }
    .company-table th { padding-bottom: 4px; }
    .company-table td { padding-top: 0; }
    .footer-top { flex-direction: column; gap: 36px; }
    .footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
    .story-detail-nav { padding: 16px; gap: 6px 16px; margin-bottom: 40px; }
    .story-chapter { padding-left: 0; padding-bottom: 40px; margin-bottom: 40px; }
    .story-quote { margin-left: 0; padding: 24px; }
    .legal-hero { padding: 52px 0; }
    .legal-content { padding: 28px 0; }
  }
}
