    :root{
      /* Light, calm tech palette */
      --bg: #f6f8fb;
      --surface: #ffffff;
      --surface-2: #f0f4ff;
      --text: #1d2330;
      --muted: #5c6a86;
      --brand: #2f6bff;     /* primary */
      --brand-2: #7aa7ff;   /* secondary accent */
      --ok: #1fb77a;
      --warn: #e2a300;
      --err: #e25454;
      --ring: rgba(47,107,255,.22);
      --border: rgba(16,24,40,.10);
      --shadow: 0 10px 30px rgba(18, 38, 74, .06);
    }
    *,*::before,*::after{ box-sizing: border-box; }
    html,body{ height:100%; }
    body{
      margin:0;
      color:var(--text);
      background:
        radial-gradient(1000px 700px at 10% -10%, #e7efff 20%, transparent 60%),
        radial-gradient(900px 600px at 110% 0%, #eaf2ff 25%, transparent 65%),
        var(--bg);
      font: 16px/1.55 system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }
    a{ color: var(--brand); text-decoration: none; }
    a:hover{ text-decoration: underline; }

    /* Shell */
    .container{ max-width: 1120px; margin: 0 auto; padding: 16px; }
    @media (min-width:1280px){ .container{ max-width: 1240px; } }

    /* Top bar */
    header.site-header{
      position: sticky; top:0; z-index: 20;
      backdrop-filter: saturate(1.1) blur(8px);
      background: color-mix(in srgb, var(--surface) 88%, transparent);
      border-bottom: 1px solid var(--border);
    }
    .bar{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding: 10px 0; }
    .brand{ display:flex; align-items:center; gap:12px; }
    .brand img{ height: 44px; width:auto; display:block; }
    .brand-title{ font-weight: 800; letter-spacing:.2px; }
    .top-links{ display:flex; gap:18px; align-items:center; }

    /* Hero */
    .hero{
      margin-top: 2px;
      display:grid; grid-template-columns: 1.2fr 1fr; gap: 20px;
      align-items: center;
    }
    .hero-card{
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 16px;
      box-shadow: var(--shadow);
      padding: 18px;
    }
    .hero h1{
      margin: 0 0 6px; font-size: clamp(16px, 2.6vw, 28px); line-height:1.2;
    }
    .tagline{ color: var(--muted); margin-top: 6px; }

    .hero-visual{
      background: #FFFFFF; /* linear-gradient(140deg, #f4f7ff, #ffffff); */
      border: 1px solid var(--border);
      border-radius: 16px; box-shadow: var(--shadow);
      padding: 8px;
      display:grid; place-items:center;
    }
    .hero-visual img{ max-width: 75%; height:auto; }

    /* Breadcrumb */
    nav.breadcrumb{
      margin: 16px 0 14px;
      display:flex; align-items:center; gap:10px; flex-wrap:wrap;
      padding: 8px 12px; border-radius: 12px;
      background: #ffffffcc; border: 1px solid var(--border);
    }
    .breadcrumb .crumb{ color: var(--text); font-weight: 600; }
    .breadcrumb .sep{ opacity:.45; }
    .breadcrumb .home-chip{ display:grid; place-items:center; width:28px; height:28px; border-radius:10px; background:#f3f6ff; border:1px solid var(--border); }

    /* Main panel */
    .panel{ background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 18px; }
    .panel + .panel{ margin-top: 14px; }

    /* Form */
    label{ display:block; font-weight: 700; margin: 6px 0 8px; }
    .input-wrap{ position: relative; }
    textarea#q{
      width:100%; min-height:130px; resize: vertical;
      padding: 12px 14px; border-radius: 12px;
      background:#fff; color:#0e1726;
      border:1px solid var(--border);
      outline: none;
      box-shadow: 0 0 0 0 transparent;
    }
    textarea#q:focus{ box-shadow: 0 0 0 3px var(--ring); }
    .clear-link{
      position:absolute; right:10px; bottom:10px;
      padding: 6px 10px; border-radius: 10px;
      background:#f3f6ff; border:1px solid var(--border);
      color:#2b3855; cursor:pointer;
    }

    .controls{ display:flex; gap: 16px; align-items:flex-end; flex-wrap:wrap; margin-top: 12px; }

    .model-block{ max-width: 560px; }
    .model-grid{ display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px 14px; }
    .model-tile{ display:flex; align-items:center; gap:8px; background:#f7f9ff; border:1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
    .model-tile input[type="radio"]{ accent-color: var(--brand); }

    .number-field{ display:flex; gap:8px; align-items:center; }
    .number-field input[type="number"]{
      width:110px; padding: 8px 10px; border-radius: 10px;
      border:1px solid var(--border); background:#fff; color:#0e1726;
    }

    .btn{ appearance:none; border:none; cursor:pointer; font-weight:800; color:#fff;
      background: linear-gradient(90deg, var(--brand), var(--brand-2));
      padding: 10px 16px; border-radius: 12px; box-shadow: 0 8px 24px rgba(47,107,255,.22);
    }
    .btn:hover{ filter: brightness(1.05); }

    .muted{ color: var(--muted); font-size: 14px; }

    /* Loading, results */
    #loading{ display:none; text-align:center; padding:20px; }
    .spinner{ width:18px; height:18px; border-radius:50%; border:2px solid #d6defa; border-top-color: var(--brand); display:inline-block; animation:spin 1s linear infinite; }
    @keyframes spin { to{ transform: rotate(360deg); } }

    #results{ display:none; }
    .section-title{ margin: 8px 0 8px; font-size: 18px; }
    .scorebox{ display:flex; flex-wrap:wrap; gap: 8px; margin-bottom: 10px; }
    .score-pill{ padding:6px 10px; border-radius:999px; background:#f3f6ff; border:1px solid var(--border); font-weight:700; }
    .score-pill.first{ background: linear-gradient(90deg, #e8efff, #f2f6ff); }

    .pill{ display:inline-flex; align-items:center; gap:8px; padding:6px 10px; border-radius:999px; background:#f3f6ff; border:1px solid var(--border); font-weight:700; }

    .answer-box{ margin-top:8px; background: #fff; border:1px solid var(--border); border-radius: 12px; padding: 12px; white-space: pre-wrap; }

    .error{ background: #fff3f3; border: 1px solid #ffd6d6; color: #7d1f1f; border-radius: 12px; padding: 14px; }

    /* Footer */
    footer{ margin: 28px 0 20px; color: var(--muted); }
    .footer-inner{ display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap: 8px; border-top:1px solid var(--border); padding-top: 12px; }

    /* Responsive */
    @media (max-width: 960px){
      .hero{ grid-template-columns: 1fr; }
      .brand img{ height: 40px; }
      .model-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
    }
    @media (max-width: 520px){
      .model-grid{ grid-template-columns: 1fr; }
      .number-field input[type="number"]{ width: 100px; }
    }
  
    /* =============================
       Mobile refinement overrides
       ============================= */
    img{max-width:100%;height:auto;}

    /* Prevent iOS zoom on inputs */
    input, textarea, select, button{ font-size:16px; }

    /* Make tap targets comfortable on phones */
    button, .model-tile, .pill, .score-pill{ min-height:44px; }

    /* Tighter container padding on small screens */
    @media (max-width: 768px){
      .container{ padding: 14px; }
      .top-links{ display:none; }
      .brand img{ height: 36px; }
      .hero{ grid-template-columns: 1fr; gap: 12px; }
      .hero-card{ padding: 14px; }
      .hero-visual{ padding: 12px; }
      .breadcrumb{ padding:8px 10px; gap:8px; }
      .panel{ padding: 14px; }
      .controls{ gap: 12px; }
      /* Stack number field and button vertically so they don't cram */
      .number-field{ flex-direction: column; align-items: stretch; }
      #go{ width:100%; }
      /* Make model grid 2-up on mid phones */
      .model-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
    }

    /* Very small phones (iPhone SE / narrow Android) */
    @media (max-width: 420px){
      .container{ padding: 12px; }
      .brand img{ height: 34px; }
      .model-grid{ grid-template-columns: 1fr; }
      .model-tile{ padding: 12px; }
      .number-field input[type="number"]{ width: 100%; }
    }

    /* Comfortable textarea height on phones */
    textarea#q{ min-height: clamp(120px, 28vh, 220px); }

    /* Ensure long lines wrap inside results */
    .answer-box{ word-wrap: break-word; overflow-wrap: anywhere; }

/* Hide site header on mobile */
@media (max-width: 600px) {
  .site-header {
    display: none !important;
  }
}

/* Desktop / default */
.hero{
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  grid-template-areas: "card visual";
  gap: 20px;
}
.hero-card{ grid-area: card; }
.hero-visual{ grid-area: visual; }

/* Mobile: stack with logo (visual) first, then hero card */
@media (max-width: 768px){
  .hero{
    grid-template-columns: 1fr;
    grid-template-areas:
      "visual"
      "card";
    gap: 12px; /* optional tighter spacing on phones */
  }
}

/* Smooth fade for the hero headline */
.hero-card h1{
  transition: opacity 0.25s ease;
  opacity: 1;
  min-height: 2.6em; /* keeps layout height stable across lines */
}

/* Optional: slightly smaller on narrow phones */
@media (max-width: 420px){
  .hero-card h1{ font-size: clamp(20px, 5.3vw, 28px); }
}