:root {
  color-scheme: light;
  --color-carbon: #000000;
  --color-paper-white: #fff;
  --color-sky-wash: #dceeff;
  --color-concrete-gray: #c9cbd3;
  --color-soft-mist: #e9e9ee;
  --color-electric-blue: #4da2ff;
  --color-mint-pop: #55db9c;
  --color-lavender: #e9ccff;
  --color-sunburst: #ffd731;
  --color-ember: #fb4903;
  --color-voltage-violet: #5c4ade;
  --color-radius: 26px;
  --border: 2px solid var(--color-carbon);
  --shadow: 0 7px 0 rgba(17, 18, 25, .92);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 24px; }

body {
  margin: 0;
  color: var(--color-carbon);
  background:
    radial-gradient(ellipse at 82% 4%, rgba(233, 204, 255, .54), transparent 34rem),
    radial-gradient(ellipse at 7% 38%, rgba(85, 219, 156, .12), transparent 28rem),
    linear-gradient(180deg, #edf7ff 0%, #fbf7ff 54%, #f4fbff 100%);
  font-family: "Segoe UI", "Inter", sans-serif;
  overflow-x: clip;
}

button, input, textarea, select { font: inherit; }
button { touch-action: manipulation; }
button, select { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid rgba(57, 141, 241, .48);
  outline-offset: 3px;
}
input:focus-visible, textarea:focus-visible {
  border-color: var(--color-electric-blue);
  box-shadow: 0 0 0 4px rgba(57, 141, 241, .14);
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

.page-shell {
  width: min(100% - 48px, 1400px);
  margin: 0 auto;
  padding: 22px 0 36px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
  animation: rise-in .55s both;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 9px;
  color: inherit;
  text-decoration: none;
  border: var(--border);
  border-radius: 1000px;
  background: rgba(255,255,255,.82);
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.brand:hover { transform: translateY(-2px); box-shadow: 0 9px 0 rgba(17,18,25,.92); }
.brand-mark { width: 40px; height: 40px; }
.brand-name { font-size: 1.5rem; font-weight: 850; letter-spacing: -.05em; }

.header-tools { display: flex; align-items: center; gap: 12px; }
.nav { display: flex; flex-wrap: wrap; gap: 8px; }
.mobile-nav { display: none; }
.nav-pill, .language-picker select {
  min-height: 42px;
  border: var(--border);
  border-radius: 999px;
  background: var(--color-paper-white);
  font-weight: 750;
}
.nav-pill {
  padding: 9px 16px;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.nav-pill:hover { transform: translateY(-2px); box-shadow: 0 4px 0 rgba(17,18,25,.8); }
.nav-pill.active { background: var(--color-electric-blue); }
.language-picker select { padding: 8px 30px 8px 12px; cursor: pointer; }

.app-shell { display: flex; flex-direction: column; gap: 24px; }
.hero-section {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  gap: 28px;
  align-items: stretch;
}
.hero-section > *, .workspace-grid > *, .panel-header > *, .card-header > * { min-width: 0; }
.hero-copy { position: relative; padding: 30px 12px 20px 4px; animation: rise-in .62s .06s both; }
.eyebrow, .mini-label {
  display: inline-block;
  padding: 7px 11px;
  border: var(--border);
  border-radius: 999px;
  background: var(--color-sunburst);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hero-copy h1 {
  margin: 19px 0 14px;
  font-size: clamp(3rem, 5vw, 6.15rem);
  line-height: .88;
  letter-spacing: -.078em;
  font-weight: 900;
}
.hero-copy h1 span { display: inline; }
.hero-copy h1 span:last-child { color: #1d5ca4; }
.hero-copy > p:not(.privacy-note) { max-width: 580px; margin: 0; font-size: 1.08rem; line-height: 1.62; }
.hero-visual { position: relative; width: min(230px, 42%); height: 130px; margin: 3px 4% -13px auto; }
.hero-paper { position: absolute; display: block; width: 104px; height: 125px; border: 2px solid var(--color-carbon); border-radius: 14px; box-shadow: 4px 5px 0 var(--color-carbon); }
.hero-paper-back { top: 2px; left: 56px; transform: rotate(9deg); background: var(--color-lavender); }
.hero-paper-front { top: 4px; left: 24px; padding: 27px 13px 10px; transform: rotate(-7deg); background: var(--color-paper-white); }
.hero-paper-front::before { position: absolute; top: 12px; left: 13px; width: 40px; height: 5px; border-radius: 5px; background: var(--color-electric-blue); content: ""; }
.hero-paper-front i { display: block; height: 3px; margin: 8px 0; border-radius: 4px; background: #d3d9e2; }
.hero-paper-front i:nth-child(2) { width: 82%; }
.hero-paper-front i:nth-child(3) { width: 65%; }
.hero-paper-front b { display: block; width: 33px; height: 12px; margin: 10px 0 0 auto; border-radius: 3px; background: var(--color-mint-pop); }
.hero-sticker { position: absolute; z-index: 1; top: 17px; right: 3px; display: grid; width: 54px; height: 54px; place-items: center; transform: rotate(9deg); border: 2px solid var(--color-carbon); border-radius: 50%; background: var(--color-sunburst); font-size: .73rem; font-weight: 900; }
.hero-spark { position: absolute; top: 92px; right: 35px; width: 11px; height: 11px; border: 2px solid var(--color-carbon); border-radius: 50%; background: var(--color-mint-pop); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 23px; }
.privacy-note { display: flex; align-items: center; gap: 8px; margin: 20px 0 0; color: #4a505d; font-size: .85rem; line-height: 1.45; }
.privacy-dot, .status-dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: #2fbf79; }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 47px;
  padding: 12px 19px;
  border: var(--border);
  border-radius: 1000px;
  font-weight: 800;
  letter-spacing: .01em;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 5px 0 rgba(17,18,25,.88); }
.button:active:not(:disabled) { transform: translateY(1px); box-shadow: none; }
.button:disabled { opacity: .6; cursor: wait; }
.button-primary { background: var(--color-carbon); color: var(--color-paper-white); }
.button-secondary { background: var(--color-paper-white); }
.button.compact { min-height: 42px; padding: 9px 15px; }

.card { border: var(--border); border-radius: var(--color-radius); box-shadow: var(--shadow); }
.input-card {
  padding: 20px;
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(235,249,255,.96));
  animation: rise-in .65s .12s both;
  transition: transform .22s ease, box-shadow .22s ease;
}
.card-header, .panel-header, .block-title-row, .input-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-header h2 { margin: 8px 0 0; font-size: 1.28rem; letter-spacing: -.04em; }
.tiny-button, .text-button {
  border: var(--border);
  font-weight: 750;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease;
}
.tiny-button { padding: 8px 12px; border-radius: 999px; background: var(--color-lavender); }
.tiny-button:hover, .text-button:hover { transform: translateY(-1px); }
.text-button { padding: 6px 9px; border-radius: 999px; background: transparent; font-size: .82rem; }
.text-button:hover { background: rgba(57,141,241,.12); }
.drop-zone {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px;
  border: 1.5px dashed #4386c8;
  border-radius: 17px;
  background: linear-gradient(110deg, rgba(220,238,255,.72), rgba(233,204,255,.32));
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.drop-zone:hover, .drop-zone.is-dragging { transform: translateY(-1px); border-color: var(--color-voltage-violet); background: #e9e5ff; }
.drop-zone:focus-visible { outline: 3px solid rgba(77,162,255,.55); outline-offset: 3px; }
.drop-zone[aria-disabled="true"] { opacity: .58; cursor: wait; }
.drop-zone > span:last-child { display: grid; gap: 3px; }
.drop-zone strong { font-size: .9rem; }
.drop-zone small { color: #515864; font-size: .77rem; }
.drop-icon { display: grid; width: 35px; height: 35px; place-items: center; border: 1.5px solid var(--color-carbon); border-radius: 50%; background: var(--color-paper-white); font-size: 1.1rem; font-weight: 900; }

textarea {
  display: block;
  width: 100%;
  min-height: 250px;
  margin-top: 17px;
  padding: 16px;
  resize: vertical;
  border: var(--border);
  border-radius: 20px;
  background: rgba(255,255,255,.92);
  font-size: .98rem;
  line-height: 1.6;
  transition: border-color .16s ease, box-shadow .16s ease;
}
textarea:disabled { opacity: .72; cursor: wait; }
textarea::placeholder, input::placeholder { color: #737985; opacity: 1; }
.input-footer { flex-wrap: wrap; margin-top: 15px; }
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 37px;
  padding: 7px 11px;
  border: var(--border);
  border-radius: 999px;
  background: var(--color-mint-pop);
  font-size: .82rem;
  font-weight: 750;
}
.status-badge.is-busy .status-dot { animation: pulse 1s ease-in-out infinite; }
.progress-wrap { margin-top: 13px; }
.progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: #d6e8f7; }
.progress-fill {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--color-electric-blue), var(--color-mint-pop));
  animation: progress-sweep 1.15s ease-in-out infinite alternate;
}

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr); gap: 25px; align-items: start; }
.panel { padding: 22px; }
.results-panel { background: linear-gradient(155deg, rgba(249,242,255,.96), rgba(238,250,255,.96)); animation: rise-in .62s .1s both; transition: transform .22s ease, box-shadow .22s ease; }
.questions-panel { background: linear-gradient(155deg, rgba(255,250,241,.98), rgba(238,252,255,.96)); animation: rise-in .62s .18s both; transition: transform .22s ease, box-shadow .22s ease; }
.panel-header { margin-bottom: 17px; }
.panel-header h2 { margin: 8px 0 0; font-size: clamp(1.65rem, 2.5vw, 2.3rem); letter-spacing: -.055em; line-height: 1.05; }
.model-badge { max-width: 45%; overflow: hidden; padding: 6px 9px; border-radius: 999px; background: rgba(255,255,255,.78); color: #555b66; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.result-block { padding: 17px 0; border-top: 1px solid rgba(17,18,25,.18); scroll-margin-top: 18px; }
.result-block:first-of-type { border-top: 0; padding-top: 0; }
.topic-score-hint { margin: 8px 0 0; color: #555c68; font-size: .76rem; line-height: 1.4; }
.block-title-row h3, .doc-meta h3 { margin: 0; font-size: 1.08rem; letter-spacing: -.02em; }
.result-text { margin: 12px 0 0; font-size: 1rem; line-height: 1.72; white-space: pre-line; overflow-wrap: anywhere; }
.muted { color: #515661; }
.result-text.is-loading, .chat-content.is-loading { color: #656d79; animation: text-pulse 1.2s ease-in-out infinite; }
.result-state { color: #5b6270; font-size: .8rem; }
.chip-list { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 35px;
  padding: 7px 12px;
  border: 1.5px solid var(--color-carbon);
  border-radius: 999px;
  background: var(--color-electric-blue);
  color: var(--color-carbon);
  font-size: .86rem;
  font-weight: 750;
}
.chip.placeholder { background: var(--color-soft-mist); color: var(--color-carbon); }
.keyword-chip { animation: chip-in .3s both; animation-delay: calc(var(--item-index, 0) * 35ms); }
.skeleton { width: 92px; height: 35px; border-color: transparent; background: linear-gradient(100deg, #e1e4eb 20%, #f5f6f9 45%, #e1e4eb 70%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.score-list { display: grid; gap: 11px; margin-top: 14px; }
.score-row { display: grid; grid-template-columns: minmax(78px, .35fr) minmax(70px, 1fr) 44px; gap: 10px; align-items: center; animation: rise-in .35s both; animation-delay: calc(var(--item-index, 0) * 50ms); }
.score-row label { font-size: .88rem; font-weight: 750; overflow-wrap: anywhere; }
.score-row strong { text-align: right; font-size: .82rem; font-variant-numeric: tabular-nums; }
.score-evidence { grid-column: 1 / -1; margin-top: -5px; color: #59606c; font-size: .73rem; line-height: 1.4; }
.score-bar { height: 11px; overflow: hidden; border: 1.5px solid var(--color-carbon); border-radius: 999px; background: var(--color-soft-mist); }
.score-fill { display: block; width: var(--score, 0%); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--color-electric-blue), var(--color-mint-pop)); animation: bar-in .7s ease-out both; }
.score-row.placeholder { display: block; color: #646a75; font-size: .88rem; }
.skeleton-row { height: 35px; border-radius: 8px; background: linear-gradient(100deg, #e1e4eb 20%, #f5f6f9 45%, #e1e4eb 70%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.reference-list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.reference-label { margin-right: 2px; color: #555c68; font-size: .75rem; font-weight: 750; }
.reference-chip { display: inline-flex; padding: 4px 8px; border: 1px solid #9ca3af; border-radius: 999px; color: #343a44; font-size: .73rem; font-weight: 700; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.reference-chip:hover { transform: translateY(-1px); border-color: var(--color-electric-blue); background: #eaf4ff; }

.question-history { display: flex; flex-direction: column; gap: 11px; min-height: 145px; max-height: 390px; overflow: auto; padding: 2px 3px 4px 0; scroll-behavior: smooth; }
.history-empty { margin: 0; padding: 17px; border: 1px dashed #abb4c1; border-radius: 17px; color: #5c6370; font-size: .92rem; line-height: 1.55; }
.chat-message { max-width: 96%; padding: 12px 14px; border: 1.5px solid var(--color-carbon); border-radius: 17px; animation: rise-in .25s both; }
.chat-user { align-self: flex-end; background: #e5f2ff; border-bottom-right-radius: 5px; }
.chat-assistant { align-self: flex-start; background: rgba(255,255,255,.85); border-bottom-left-radius: 5px; }
.chat-label { display: block; margin-bottom: 4px; color: #59606c; font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.chat-content { margin: 0; font-size: .92rem; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.question-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; margin-top: 13px; }
.question-form input { width: 100%; min-width: 0; min-height: 46px; padding: 11px 13px; border: var(--border); border-radius: 15px; background: rgba(255,255,255,.92); }
.question-form .button { min-height: 46px; padding: 9px 15px; }
.doc-meta { margin-top: 22px; padding-top: 17px; border-top: 1px solid rgba(17,18,25,.18); }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 8px; margin-top: 11px; }
.meta-grid > div { min-width: 0; padding: 10px; border: 1.5px solid var(--color-carbon); border-radius: 15px; background: rgba(255,255,255,.7); }
.meta-label { display: block; margin-bottom: 4px; color: #5b606b; font-size: .66rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.meta-grid strong { display: block; overflow: hidden; font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }

.ad-unit { display: flex; justify-content: center; align-items: center; width: 100%; min-height: 90px; overflow: hidden; border-radius: 16px; }
.ad-hero, .ad-middle, .ad-footer { min-height: 88px; }
.ad-sidebar { min-height: 250px; margin-top: 22px; }
.ad-unit.is-development { border: 1px dashed #adb8c6; background: rgba(255,255,255,.32); }
.ad-placeholder { color: #737b87; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }

.site-footer { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px 24px; margin-top: 34px; padding: 21px 2px 0; border-top: 1px solid rgba(17,18,25,.18); color: #515864; }
.footer-brand { display: flex; align-items: center; gap: 8px; color: var(--color-carbon); }
.footer-brand img { width: 30px; height: 30px; }
.footer-brand strong { font-size: 1.06rem; }
.site-footer > p { margin: 0; font-size: .83rem; line-height: 1.5; }
.privacy-details { grid-column: 1 / -1; max-width: 860px; font-size: .82rem; line-height: 1.55; }
.privacy-details summary { width: fit-content; color: #1d5ca4; font-weight: 750; cursor: pointer; }
.privacy-details p { max-width: 860px; margin: 8px 0 0; }
.privacy-page { max-width: 860px; margin: 40px auto; padding: 32px; }
.privacy-page h1, .privacy-page h2 { color: #17243a; }
.privacy-page p { color: #4a505d; line-height: 1.65; }
.site-footer small { grid-column: 1 / -1; font-size: .78rem; }
.site-footer a { color: #1d5ca4; font-weight: 700; }
.site-footer .ad-footer { grid-column: 1 / -1; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes chip-in { from { opacity: 0; transform: translateY(5px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes progress-sweep { from { transform: translateX(-8%); } to { transform: translateX(150%); } }
@keyframes pulse { 50% { opacity: .35; transform: scale(.8); } }
@keyframes text-pulse { 50% { opacity: .55; } }
@keyframes bar-in { from { width: 0; } to { width: var(--score, 0%); } }

@media (max-width: 980px) {
  .hero-section { grid-template-columns: 1fr 1fr; gap: 20px; }
  .workspace-grid { grid-template-columns: 1fr; gap: 18px; }
  .header-tools { align-items: flex-end; flex-direction: column-reverse; gap: 8px; }
  .nav-pill { padding-inline: 12px; }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 32px, 620px);
    padding-top: 16px;
    padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px));
  }
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px 8px;
    margin-bottom: 20px;
  }
  .brand { align-self: center; }
  .header-tools { display: contents; }
  .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    padding: 3px 3px 7px;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
  .nav::-webkit-scrollbar { display: none; }
  .language-picker { grid-column: 2; grid-row: 1; justify-self: end; }
  .nav-pill { flex: 0 0 auto; min-height: 44px; padding: 8px 12px; font-size: .82rem; }
  .language-picker select { min-height: 44px; font-size: .84rem; }
  .hero-section, .workspace-grid { grid-template-columns: 1fr; }
  .hero-copy { padding: 8px 2px 2px; }
  .hero-visual { margin-right: 1%; }
  .hero-copy h1 { font-size: clamp(3.1rem, 11vw, 5rem); }
  .hero-copy > p:not(.privacy-note) { font-size: 1rem; }
  .input-card { padding: 17px; }
  textarea { min-height: 210px; }
  .panel { padding: 18px; }
  .ad-sidebar { min-height: 90px; }
  .mobile-nav {
    position: fixed;
    z-index: 20;
    left: 50%;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    width: min(460px, calc(100vw - 24px));
    padding: 6px;
    transform: translate(-50%, calc(100% + 24px));
    border: var(--border);
    border-radius: 24px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 6px 0 rgba(17, 18, 25, .88);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform .2s ease, opacity .2s ease, visibility .2s ease;
  }
  .mobile-nav.is-visible {
    transform: translate(-50%, 0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .mobile-nav .nav-pill {
    min-width: 0;
    min-height: 46px;
    padding: 6px 5px;
    border-width: 1.5px;
    border-color: transparent;
    background: transparent;
    font-size: .78rem;
    line-height: 1.15;
    white-space: normal;
  }
  .mobile-nav .nav-pill.active {
    border-color: var(--color-carbon);
    background: var(--color-electric-blue);
    box-shadow: 0 3px 0 rgba(17, 18, 25, .8);
  }
  .mobile-nav .nav-pill:hover { transform: none; }
}

@media (max-width: 440px) {
  .page-shell { width: calc(100% - 24px); }
  .topbar { gap: 10px 6px; }
  .brand { gap: 7px; padding: 6px 12px 6px 7px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-name { font-size: 1.3rem; }
  .hero-copy h1 { font-size: clamp(2.85rem, 12vw, 3.6rem); letter-spacing: -.075em; }
  .hero-visual { width: 190px; height: 116px; margin-right: 3%; }
  .eyebrow, .mini-label { max-width: 100%; font-size: .64rem; letter-spacing: .09em; }
  .input-card, .panel { padding: 16px; }
  textarea { min-height: 180px; padding: 13px; border-radius: 16px; font-size: 16px; }
  .card-header { align-items: flex-start; }
  .card-header h2 { font-size: 1.12rem; }
  .tiny-button { max-width: 45%; font-size: .8rem; }
  .panel-header h2 { font-size: 1.65rem; }
  .model-badge { max-width: 42%; font-size: .62rem; }
  .result-text { font-size: .96rem; line-height: 1.65; }
  .hero-actions .button { flex: 1 1 100%; }
  .input-footer { align-items: stretch; flex-direction: column; }
  .input-footer .button { width: 100%; }
  .status-badge { align-self: flex-start; }
  .score-row { grid-template-columns: minmax(68px, .5fr) minmax(54px, 1fr) 39px; gap: 7px; }
  .question-form { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr; gap: 10px; }
  .site-footer small { grid-column: auto; }
}

@media (hover: hover) and (pointer: fine) {
  .input-card:hover, .results-panel:hover, .questions-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 0 rgba(17, 18, 25, .9);
  }
}

@media (max-width: 360px) {
  .page-shell { width: calc(100% - 20px); }
  .nav { gap: 5px; }
  .nav-pill { padding-inline: 10px; font-size: .76rem; }
  .language-picker select { padding-inline: 9px 24px; }
  .score-row { grid-template-columns: minmax(58px, .55fr) minmax(35px, 1fr) 34px; gap: 6px; }
  .score-row label { font-size: .78rem; }
  .reference-chip { padding-inline: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
