:root {
  --ink: #13253a;
  --muted: #5f7185;
  --blue: #12355b;
  --cyan: #00a6a6;
  --yellow: #ffcf4a;
  --paper: #ffffff;
  --soft: #eef7f7;
  --line: #d8e3e8;
  --danger: #ad2e3f;
  --shadow: 0 18px 50px rgba(18, 53, 91, .12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Segoe UI", Arial, sans-serif; color: var(--ink); background: var(--paper); line-height: 1.55; }
button, input, select { font: inherit; }
a { color: inherit; }
.site-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 0 5vw; background: rgba(255,255,255,.94); border-bottom: 1px solid rgba(216,227,232,.8); backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 1.25rem; font-weight: 800; color: var(--blue); }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; background: var(--blue); color: white; font-size: 1.35rem; }
.main-nav { display: flex; gap: 22px; font-weight: 650; font-size: .94rem; }
.main-nav a { text-decoration: none; color: #334d65; }
.main-nav a:hover, .main-nav a:focus { color: var(--cyan); }
.menu-button { display: none; border: 1px solid var(--line); background: white; border-radius: 10px; padding: 8px 12px; }
.section-shell { width: min(1160px, 90vw); margin: 0 auto; }
.narrow { width: min(860px, 90vw); }
.hero { min-height: 650px; display: grid; grid-template-columns: 1.08fr .92fr; gap: 7vw; align-items: center; padding-block: 80px; }
.eyebrow { margin: 0 0 10px; color: var(--cyan); font-size: .82rem; font-weight: 800; text-transform: uppercase; letter-spacing: .13em; }
h1 { margin: 0; max-width: 720px; font-size: clamp(3rem, 6.3vw, 6rem); line-height: .98; letter-spacing: -.045em; color: var(--blue); }
h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.08; color: var(--blue); }
h3 { margin: 0 0 8px; color: var(--blue); }
.hero-lead, .section-intro { max-width: 760px; color: var(--muted); font-size: 1.12rem; }
.hero-lead { max-width: 650px; margin: 24px 0 0; }
.hero-actions, .camera-controls, .result-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border: 1px solid transparent; border-radius: 14px; cursor: pointer; text-decoration: none; font-weight: 750; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .5; transform: none; }
.button.primary { background: var(--blue); color: white; box-shadow: 0 10px 25px rgba(18,53,91,.2); }
.button.secondary { background: white; color: var(--blue); border-color: #b9c9d4; }
.button.ghost { color: var(--blue); background: #edf5f7; }
.button.danger { background: white; border-color: #e1b2b8; color: var(--danger); }
.button.full { width: 100%; }
.privacy-note, .small-note { color: var(--muted); font-size: .88rem; }
.privacy-note { margin-top: 18px; }
.hero-visual { display: flex; justify-content: center; }
.device-frame { width: min(430px, 100%); padding: 14px; border: 8px solid var(--blue); border-radius: 34px; background: white; box-shadow: var(--shadow); transform: rotate(1.5deg); }
.scan-window { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 20px; background: linear-gradient(145deg,#e7fbf9,#dce8f1); }
.scan-window::before { content: ""; position: absolute; inset: 50% 0 auto; height: 2px; background: linear-gradient(90deg,transparent,var(--cyan),transparent); box-shadow: 0 0 14px var(--cyan); animation: scan 2.8s ease-in-out infinite; }
@keyframes scan { 0%,100% { transform: translateY(-110px); } 50% { transform: translateY(110px); } }
.object-demo { font-size: clamp(6rem,15vw,10rem); filter: drop-shadow(0 16px 14px rgba(18,53,91,.16)); }
.corner { position: absolute; width: 30px; height: 30px; border-color: var(--cyan); border-style: solid; }
.top-left { left: 22px; top: 22px; border-width: 3px 0 0 3px; }.top-right { right: 22px; top: 22px; border-width: 3px 3px 0 0; }.bottom-left { left: 22px; bottom: 22px; border-width: 0 0 3px 3px; }.bottom-right { right: 22px; bottom: 22px; border-width: 0 3px 3px 0; }
.demo-answer { display: flex; justify-content: space-between; align-items: center; padding: 18px 12px 7px; font-size: 1.12rem; }
.demo-answer span { color: var(--cyan); font-weight: 800; }
.content-section { padding: 88px 0; }
.alt-bg { background: var(--soft); }
.camera-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(290px,.7fr); gap: 28px; margin-top: 34px; align-items: start; }
.camera-panel, .recognition-panel, .experiment-form, .method-card { border: 1px solid var(--line); border-radius: 24px; background: white; box-shadow: 0 12px 32px rgba(18,53,91,.07); }
.camera-panel { padding: 16px; }
.camera-stage { position: relative; min-height: 390px; overflow: hidden; border-radius: 17px; background: #0b1724; }
.camera-stage video, .camera-stage img, .camera-stage canvas { position: absolute; width: 100%; height: 100%; object-fit: contain; inset: 0; }
.camera-stage img { display: none; }
.camera-placeholder { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; color: #cad8e3; }
.camera-glyph { font-size: 4.5rem; color: var(--yellow); }
.camera-controls { margin: 16px 0 0; }
.recognition-panel { padding: 24px; }
.recognition-panel label, .experiment-form label { display: grid; gap: 7px; color: #345069; font-weight: 700; }
select, input { width: 100%; min-height: 46px; border: 1px solid #bdccd5; border-radius: 11px; padding: 8px 11px; color: var(--ink); background: white; }
.status-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.status-row strong { color: var(--cyan); }
.result-main { padding: 26px 0 18px; }
.result-label { display: block; color: var(--muted); font-size: .9rem; }
#resultName { display: block; margin-top: 5px; font-size: 2rem; line-height: 1.1; color: var(--blue); }
.confidence-track { height: 10px; margin: 18px 0 8px; overflow: hidden; border-radius: 99px; background: #dbe6eb; }
.confidence-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--cyan),#68d391); transition: width .3s ease; }
#confidenceText { color: var(--muted); font-size: .9rem; }
.prediction-list { margin: 0 0 20px; padding-left: 23px; color: #40566a; }
.prediction-list li { margin: 5px 0; }
.lab-layout { display: grid; grid-template-columns: 1fr .7fr; gap: 28px; margin-top: 32px; }
.experiment-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; padding: 26px; }
.experiment-form label:last-of-type { grid-column: 1 / -1; }
.experiment-form .button { justify-self: start; }
.method-card { padding: 28px; background: var(--blue); color: white; }
.method-card h3 { color: white; }
.method-card .formula { margin: 24px 0; font-size: 1.8rem; color: var(--yellow); }
.stats-row { display: grid; grid-template-columns: repeat(3,1fr); margin: 32px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats-row div { padding: 22px; text-align: center; }
.stats-row div + div { border-left: 1px solid var(--line); }
.stats-row strong { display: block; font-size: 2.1rem; color: var(--blue); }
.stats-row span { color: var(--muted); }
.bar-chart { display: grid; gap: 12px; margin: 28px 0 30px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 55px; gap: 12px; align-items: center; }
.bar-track { height: 18px; border-radius: 99px; background: #dfe9ed; overflow: hidden; }
.bar-fill { height: 100%; border-radius: inherit; background: var(--cyan); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: white; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; }
th { background: var(--blue); color: white; font-size: .88rem; }
tr:last-child td { border-bottom: 0; }
.empty-cell { text-align: center; color: var(--muted); padding: 30px; }
.ok { color: #08745f; font-weight: 800; }.bad { color: var(--danger); font-weight: 800; }
.learning-steps { margin: 36px 0 52px; }
.learning-steps article { display: grid; grid-template-columns: 58px 1fr; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.learning-steps article > span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 16px; background: var(--yellow); color: var(--blue); font-size: 1.2rem; font-weight: 850; }
.learning-steps p { margin: 3px 0 0; color: var(--muted); }
.safety-list { padding-left: 22px; color: #40566a; }
.safety-list li { margin: 9px 0; }
footer { padding: 30px 5vw; text-align: center; background: var(--blue); color: #dce8ef; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 50; transform: translate(-50%,30px); padding: 12px 18px; border-radius: 12px; background: #10263d; color: white; opacity: 0; pointer-events: none; transition: .25s; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%,0); }
@media (max-width: 850px) {
  .menu-button { display: block; }
  .main-nav { position: absolute; top: 68px; left: 5vw; right: 5vw; display: none; flex-direction: column; gap: 0; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 11px; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-visual { order: -1; }
  .device-frame { width: min(360px,90%); }
  .camera-grid, .lab-layout { grid-template-columns: 1fr; }
  .camera-stage { min-height: 320px; }
}
@media (max-width: 560px) {
  .hero { padding-block: 48px 64px; }
  h1 { font-size: 3.1rem; }
  .content-section { padding: 68px 0; }
  .experiment-form { grid-template-columns: 1fr; }
  .experiment-form label:last-of-type { grid-column: auto; }
  .stats-row { grid-template-columns: 1fr; }
  .stats-row div + div { border-left: 0; border-top: 1px solid var(--line); }
  .bar-row { grid-template-columns: 105px 1fr 44px; font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
