:root{
    --bg:#F7F9FC; --panel:#0E1338; --panel2:#151B44;
    --navy:#0B1E3D; --ink:#1B2A4A; --sub:#5A6B8C; --muted:#8A97B5;
    --blue:#2F5FE0; --blue-soft:#E7EDFC;
    --green:#2FD48A; --green-soft:#E5FBF1;
    --red:#E5654B; --red-soft:#FCEAE5;
    --line:#E3E8F4; --line-dark:#2A3162;
  }
  *{box-sizing:border-box; margin:0; padding:0;}
  html{scroll-behavior:smooth;}
  body{background:var(--bg); color:var(--navy); font-family:'Noto Sans JP',sans-serif; line-height:1.85;}
  h1,h2,h3{font-family:'Noto Serif JP',serif; font-weight:600;}
  .wordmark{font-family:'Fraunces',serif; font-weight:600; letter-spacing:.04em;}

  header{
    position:fixed; top:0; left:0; right:0; z-index:100;
    display:flex; justify-content:space-between; align-items:center;
    padding:16px 6vw; background:rgba(247,249,252,.9); backdrop-filter:blur(8px);
    border-bottom:1px solid var(--line);
  }
  header img{height:26px; display:block;}
  nav{display:flex; align-items:center;}
  nav a{color:var(--navy); text-decoration:none; font-size:13.5px; margin-left:28px; opacity:.7;}
  nav a:hover{opacity:1;}
  nav a.lang-switch{
    opacity:1; margin-left:28px; padding:6px 14px; border:1px solid var(--line); border-radius:20px;
    font-size:12.5px; font-weight:500;
  }
  nav a.lang-switch:hover{border-color:var(--navy);}
  @media (max-width:640px){
    nav a{margin-left:14px; font-size:12.5px;}
    nav a.lang-switch{margin-left:14px;}
  }

  section{padding:110px 6vw; max-width:1120px; margin:0 auto;}
  .eyebrow{font-size:12.5px; letter-spacing:.16em; color:var(--blue); font-weight:700; margin-bottom:18px;}
  .lead{font-size:15px; color:var(--sub); max-width:640px;}

  /* hero */
  .hero{padding-top:170px; padding-bottom:70px;}
  .hero h1{font-size:clamp(28px,4.6vw,48px); line-height:1.55; margin-bottom:22px;}
  .hero .lead{font-size:16px; margin-bottom:36px;}
  .cta-row{display:flex; gap:14px; margin-bottom:56px;}
  .btn{display:inline-block; padding:13px 26px; border-radius:4px; font-size:14px; font-weight:500; text-decoration:none;}
  .btn-primary{background:var(--navy); color:#fff;}
  .btn-primary:hover{background:var(--blue);}
  .btn-ghost{border:1px solid var(--line); color:var(--navy);}
  .btn-ghost:hover{border-color:var(--navy);}

  .hero-visual{
    border:1px solid var(--line); border-radius:10px; background:#fff;
    padding:32px 6vw; display:flex; align-items:center; justify-content:space-between; gap:6px;
    flex-wrap:wrap;
  }
  .hv-step{flex:1; min-width:120px; text-align:center;}
  .hv-dot{width:14px; height:14px; border-radius:50%; margin:0 auto 10px; background:var(--line);}
  .hv-step.active .hv-dot{background:var(--green);}
  .hv-label{font-size:12px; color:var(--muted); letter-spacing:.03em;}
  .hv-step.active .hv-label{color:var(--navy); font-weight:500;}
  .hv-arrow{color:var(--line); font-size:16px;}

  /* section headers */
  .sec-head{margin-bottom:52px; max-width:680px;}
  .sec-head h2{font-size:26px; line-height:1.5;}

  /* problem cards */
  .grid-4{display:grid; grid-template-columns:repeat(4,1fr); gap:18px;}
  .p-card{background:#fff; border:1px solid var(--line); border-radius:8px; padding:26px 20px;}
  .p-card .num{font-family:'Fraunces',serif; font-size:13px; color:var(--red); margin-bottom:14px;}
  .p-card h3{font-size:14.5px; font-family:'Noto Sans JP'; font-weight:700; margin-bottom:10px; line-height:1.5;}
  .p-card p{font-size:12.8px; color:var(--sub);}

  /* causal inversion diagram */
  .inversion{background:var(--panel); border-radius:12px; padding:52px 6vw; color:#fff;}
  .inv-row{display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:14px;}
  .inv-row-label{width:100%; font-size:12px; letter-spacing:.1em; color:var(--muted); margin-bottom:14px;}
  .inv-box{
    flex:1; min-width:100px; padding:14px 10px; text-align:center; border-radius:6px;
    font-size:12.5px; border:1px solid var(--line-dark); background:var(--panel2); color:#C7CEEC;
  }
  .inv-arrow{color:var(--line-dark); font-size:14px;}
  .old .inv-box{opacity:.75;}
  .new .inv-box.hi{background:rgba(47,212,138,.12); border-color:var(--green); color:#fff; font-weight:500;}
  .inv-note{
    margin-top:36px; padding:22px 24px; border:1px solid var(--line-dark); border-radius:8px;
    font-size:13.5px; color:#B9C2E6;
  }
  .inv-note b{color:var(--green); font-weight:500;}

  /* how it works */
  .flow3{display:grid; grid-template-columns:1fr auto 1fr; gap:0; align-items:stretch;}
  .flow-col{background:#fff; border:1px solid var(--line); border-radius:8px; padding:26px 22px;}
  .flow-col h3{font-size:14px; margin-bottom:18px;}
  .flow-col ol{list-style:none; counter-reset:step; display:flex; flex-direction:column; gap:14px;}
  .flow-col li{counter-increment:step; font-size:13px; color:var(--sub); padding-left:26px; position:relative;}
  .flow-col li::before{
    content:counter(step); position:absolute; left:0; top:0;
    width:18px; height:18px; border-radius:50%; background:var(--blue-soft); color:var(--blue);
    font-size:10.5px; font-weight:700; display:flex; align-items:center; justify-content:center;
  }
  .flow-wire{
    width:150px; display:flex; flex-direction:column; align-items:center; justify-content:center;
    text-align:center; gap:14px; padding:0 12px; position:relative;
  }
  .flow-wire .wire-arrow{font-size:15px; color:var(--line-dark2,#B9C2E6); color:var(--muted);}
  .flow-wire .wire-badge{
    font-size:10.5px; font-weight:700; letter-spacing:.04em; color:var(--sub);
    background:#fff; border:1px solid var(--line); border-radius:20px; padding:5px 12px; white-space:nowrap;
  }
  .flow-wire .wire-track{
    width:100%; height:34px; border-radius:6px; background:repeating-linear-gradient(90deg,var(--line) 0 6px, transparent 6px 12px);
    display:flex; align-items:center; overflow:hidden; position:relative;
  }
  .flow-wire .wire-frag{
    position:absolute; top:50%; transform:translateY(-50%); width:9px; height:9px; border-radius:2px;
    background:var(--blue); opacity:.85; animation:travel 2.4s linear infinite;
  }
  .flow-wire .wire-frag:nth-child(2){animation-delay:.6s;}
  .flow-wire .wire-frag:nth-child(3){animation-delay:1.2s;}
  .flow-wire .wire-frag:nth-child(4){animation-delay:1.8s;}
  @keyframes travel{
    0%{left:-14px; opacity:0;} 12%{opacity:.85;} 88%{opacity:.85;} 100%{left:100%; opacity:0;}
  }
  .flow-wire .wire-note{font-size:11.5px; color:var(--muted); line-height:1.7;}
  .flow-result{
    margin-top:22px; padding:20px 24px; background:var(--green-soft); border-radius:8px;
    font-size:13.5px; color:#0F6E4E;
  }
  @media (max-width:860px){
    .flow3{grid-template-columns:1fr; gap:0;}
    .flow-wire{width:100%; flex-direction:column; padding:20px 4px;}
    .flow-wire .wire-arrow{transform:rotate(90deg);}
    .flow-wire .wire-track{width:70%; max-width:220px;}
  }

  /* three tech */
  .tech-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:18px;}
  .tech-card{border:1px solid var(--line); border-radius:8px; padding:26px 22px; background:#fff;}
  .tech-card .tag{
    display:inline-block; font-size:11px; font-weight:700; letter-spacing:.06em; color:var(--blue);
    background:var(--blue-soft); padding:4px 10px; border-radius:3px; margin-bottom:16px;
  }
  .tech-card h3{font-size:16px; margin-bottom:10px;}
  .tech-card p{font-size:13px; color:var(--sub);}

  /* comparison */
  .compare{display:grid; grid-template-columns:repeat(4,1fr); gap:14px;}
  .c-card{border:1px solid var(--line); border-radius:8px; padding:20px 18px; background:#fff;}
  .c-card.hi{border:2px solid var(--green); background:var(--green-soft);}
  .c-card h4{font-size:13px; margin-bottom:10px; font-family:'Noto Sans JP'; font-weight:700;}
  .c-card p{font-size:12px; color:var(--sub);}
  .c-card.hi p{color:#0F6E4E;}

  /* markets */
  .market-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:2px; background:var(--line); border:1px solid var(--line); border-radius:8px; overflow:hidden;}
  .m-item{background:#fff; padding:22px 20px; font-size:13px;}

  /* closing */
  .closing{background:var(--navy); color:#fff; border-radius:12px; text-align:center; padding:72px 6vw;}
  .closing h2{color:#fff; font-size:24px; margin-bottom:18px;}
  .closing p{color:#B8C6E6; max-width:520px; margin:0 auto 30px; font-size:14px;}
  .closing .btn-primary{background:var(--green); color:#0B1E3D;}
  .closing .btn-primary:hover{background:#fff;}

  footer{text-align:center; padding:36px 6vw 60px; font-size:11.5px; color:var(--muted);}

  @media (max-width:860px){
    .grid-4{grid-template-columns:repeat(2,1fr);}
    .flow3{grid-template-columns:1fr;}
    .tech-grid{grid-template-columns:1fr;}
    .compare{grid-template-columns:repeat(2,1fr);}
    .market-grid{grid-template-columns:repeat(2,1fr);}
    section{padding:80px 6vw;}
    .inv-row{flex-direction:column; align-items:stretch;}
    .inv-arrow{transform:rotate(90deg); align-self:center;}
  }
