/* Mete Defence Systems — site stylesheet. Tokens follow the design system (Night / Paper).
   Layout idea: flat fields that step sideways like the three-layer stack; drawings on night, specifications on cream. */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/montserrat-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/montserrat-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --night: #1e201b; --olive: #4b5320; --sage: #b8bb9c; --cream: #f2f0e4;
  --on-night: #f0ede6; --on-olive: #f0ede6;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(20px, 5vw, 64px); --max: 1240px;
  /* Night is the default ground */
  --ground: #1e201b; --surface: #272a23; --ink: #f0ede6; --ink-muted: #b8bb9c;
  --line: #383b34; --border: #7d8068; --accent: #b8bb9c; --focus: #f0ede6; --danger: #e08a6e;
  color-scheme: dark;
}
.paper {
  --ground: #f2f0e4; --surface: #f8f6ee; --ink: #1e201b; --ink-muted: #5a5d4f;
  --line: #d9d6c6; --border: #6f7260; --accent: #4b5320; --focus: #1e201b; --danger: #a03d24;
  color-scheme: light;
}
.night {
  --ground: #1e201b; --surface: #272a23; --ink: #f0ede6; --ink-muted: #b8bb9c;
  --line: #383b34; --border: #7d8068; --accent: #b8bb9c; --focus: #f0ede6; --danger: #e08a6e;
  color-scheme: dark;
}
.olive-field { --ground: #4b5320; --surface: #566026; --ink: #f0ede6; --ink-muted: #d9dcc0; --line: #66702f; --border: #c9ccae; --accent: #f0ede6; --focus: #f0ede6; color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; background: var(--night); color: var(--on-night); -webkit-font-smoothing: antialiased; }
img, svg, canvas { max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; font-weight: 600; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--cream); color: var(--night); padding: 8px 16px; z-index: 100; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* fields */
.paper, .night, .olive-field { color: var(--ink); }
.field { background: var(--ground); color: var(--ink); }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.sec { padding-top: clamp(56px, 8vw, 112px); padding-bottom: clamp(56px, 8vw, 112px); }
.sec-tight { padding-top: clamp(40px, 5vw, 64px); padding-bottom: clamp(40px, 5vw, 64px); }

/* type */
.display { font-size: clamp(36px, 5.1vw, 66px); line-height: 1.02; letter-spacing: -.028em; }
.h1 { font-size: clamp(34px, 4.6vw, 60px); line-height: 1.05; letter-spacing: -.022em; }
.h2 { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.1; letter-spacing: -.018em; }
.h3 { font-size: 21px; line-height: 1.25; letter-spacing: -.005em; }
.lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: var(--ink-muted); max-width: 58ch; }
.eyebrow { font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-muted); }
.muted { color: var(--ink-muted); }
.small { font-size: 13px; line-height: 20px; }
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 26px; line-height: 1.2; letter-spacing: -.012em; margin-top: 2em; }
.prose h3 { font-size: 19px; margin-top: 1.6em; }
.prose p, .prose li { font-size: 17px; line-height: 1.7; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: .4em; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 12px 16px 12px 0; border-top: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 600; }
.tablewrap { overflow-x: auto; }
.answer { background: var(--surface); padding: 20px 24px; border-left: 0; }
.answer p { font-size: 17px; line-height: 1.6; }
.answer .eyebrow { margin-bottom: 8px; }

/* controls */
.btn { display: inline-block; font: inherit; font-size: 15px; font-weight: 600; line-height: 20px; padding: 14px 24px; border-radius: 2px; border: 1px solid var(--border); background: none; color: var(--ink); text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.btn:hover { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.btn-primary { background: var(--olive); border-color: var(--olive); color: var(--on-olive); }
.btn-primary:hover { background: var(--cream); border-color: var(--cream); color: var(--night); }
.paper .btn-primary:hover { background: var(--night); border-color: var(--night); color: var(--on-night); }
.olive-field .btn-primary { background: var(--cream); border-color: var(--cream); color: var(--night); }
.olive-field .btn-primary:hover { background: var(--night); border-color: var(--night); color: var(--on-night); }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.tag { display: inline-block; font-size: 12px; line-height: 16px; font-weight: 600; padding: 4px 8px; border-radius: 2px; background: var(--olive); color: var(--on-olive); border: 1px solid var(--olive); }
.tag-outline { background: none; color: var(--ink); border-color: var(--border); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.textlink { color: var(--accent); font-weight: 600; text-underline-offset: 4px; }

/* header */
.hdr { position: sticky; top: 0; z-index: 50; background: var(--night); color: var(--on-night); border-bottom: 1px solid #383b34; }
.hdr-in { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.logo svg { display: block; height: 30px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { font-size: 14px; font-weight: 500; text-decoration: none; padding: 8px 12px; color: #d9d7cd; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--sage); }
.hdr-end { display: flex; align-items: center; gap: 12px; }
.lang { font-size: 13px; font-weight: 600; text-decoration: none; padding: 8px 10px; border: 1px solid #7d8068; border-radius: 2px; }
.lang:hover { background: var(--cream); color: var(--night); }
.hdr .btn { padding: 9px 16px; font-size: 14px; }
.menu-btn { display: none; font: inherit; font-size: 14px; font-weight: 600; background: none; color: inherit; border: 1px solid #7d8068; border-radius: 2px; padding: 8px 12px; cursor: pointer; }
@media (max-width: 980px) {
  .menu-btn { display: inline-block; margin-left: auto; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--night); flex-direction: column; align-items: stretch; padding: 8px var(--gutter) 20px; border-bottom: 1px solid #383b34; margin: 0; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; font-size: 17px; border-top: 1px solid #383b34; }
  .hdr-end .btn { display: none; }
}

/* hero */
.hero { position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding-top: clamp(40px, 6vw, 88px); padding-bottom: clamp(48px, 6vw, 96px); }
.hero-grid > * { min-width: 0; }
.hero-copy > * + * { margin-top: 24px; }
.hero-copy .btns { margin-top: 36px; }
.stage { position: relative; aspect-ratio: 1 / .92; min-height: 300px; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage-fallback { position: absolute; inset: 8% 4% 8% 4%; display: flex; flex-direction: column; justify-content: center; }
.stage-fallback i { display: block; height: 22%; }
.stage-fallback i:nth-child(1) { background: var(--olive); margin-right: 22%; }
.stage-fallback i:nth-child(2) { background: var(--sage); margin: 0 11%; }
.stage-fallback i:nth-child(3) { background: var(--cream); margin-left: 22%; }
.stage.live .stage-fallback { display: none; }
.stage-key { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px; }
.stage-key li { font-size: 13px; line-height: 18px; padding-top: 10px; border-top: 3px solid var(--olive); }
.stage-key li:nth-child(2) { border-color: var(--sage); }
.stage-key li:nth-child(3) { border-color: var(--cream); }
.stage-key b { display: block; font-weight: 600; }
.stage-key span { color: var(--ink-muted); }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .stage { aspect-ratio: 1 / .7; } }

/* stepped bands motif */
.steps { display: flex; height: 16px; }
.steps i { display: block; height: 100%; }
.steps i:nth-child(1) { background: var(--olive); width: 46%; }
.steps i:nth-child(2) { background: var(--sage); width: 30%; height: 66%; }
.steps i:nth-child(3) { background: var(--cream); width: 24%; height: 33%; }
.paper .steps i:nth-child(3), .steps.on-paper i:nth-child(3) { background: var(--night); }

/* section heads */
.head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(32px, 4vw, 56px); }
.head .lead { justify-self: start; }
@media (max-width: 860px) { .head { grid-template-columns: 1fr; } }

/* product grid */
.range { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.pcard { display: flex; flex-direction: column; text-decoration: none; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 24px; min-width: 0; transition: background .18s, color .18s; }
.pcard:hover { background: var(--olive); color: var(--on-olive); }
.pcard:hover .muted { color: #d9dcc0; }
.pcard .sk { position: relative; aspect-ratio: 4 / 3; margin-bottom: 20px; }
.pcard .sk svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pcard h3 { font-size: 21px; line-height: 1.25; }
.pcard p { font-size: 15px; line-height: 22px; margin-top: 6px; }
@media (max-width: 900px) { .range { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .range { grid-template-columns: 1fr; } }

/* sketches */
.sketch { color: currentColor; overflow: visible; }
.sketch path, .sketch line, .sketch rect, .sketch polygon { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.sketch .dot circle { fill: var(--olive); stroke: var(--cream); stroke-width: 1.25; }
.sketch .dot text { fill: var(--cream); font-family: var(--font); font-weight: 600; text-anchor: middle; }
.sketch .faint { opacity: .5; }
.draw-pre .sketch .ln { stroke-dasharray: 1; stroke-dashoffset: 1; }
.draw-pre.draw-in .sketch .ln { animation: draw 1.5s cubic-bezier(.6, 0, .2, 1) forwards; }
.draw-pre .sketch .dot { opacity: 0; }
.draw-pre.draw-in .sketch .dot { animation: fadein .4s 1.2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }

/* layer stack */
.layers { display: grid; gap: 0; }
.layer { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 20px 24px; }
.layer:nth-child(1) { background: var(--olive); color: var(--on-olive); margin-right: clamp(24px, 6vw, 96px); }
.layer:nth-child(2) { background: var(--sage); color: var(--night); margin: 0 clamp(12px, 3vw, 48px); }
.layer:nth-child(3) { background: var(--cream); color: var(--night); margin-left: clamp(24px, 6vw, 96px); }
.layer-n { font-size: 13px; font-weight: 600; line-height: 16px; }
.layer-k { font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; }
.layer-t { font-size: clamp(19px, 2vw, 24px); line-height: 1.25; font-weight: 600; margin: 2px 0; }
.layer-d { font-size: 14px; line-height: 20px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.two > * { min-width: 0; }
.two-top { align-items: start; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
.stack-copy > * + * { margin-top: 20px; }

/* fabric rows */
.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr) minmax(0, 260px); gap: 12px 40px; padding: 28px 0; border-bottom: 1px solid var(--line); align-items: start; }
.row h3 { font-size: 24px; line-height: 1.2; letter-spacing: -.01em; }
.row .small { margin-top: 4px; }
@media (max-width: 860px) { .row { grid-template-columns: 1fr; } }
.swatch { height: 96px; background-color: var(--olive); background-image: linear-gradient(rgba(240,237,230,.22) 1px, transparent 1px), linear-gradient(90deg, rgba(240,237,230,.22) 1px, transparent 1px); background-size: 14px 14px; }
.swatch.s2 { background-color: var(--sage); background-image: linear-gradient(rgba(30,32,27,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(30,32,27,.18) 1px, transparent 1px); background-size: 7px 7px; }

/* process */
.proc { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: s; border-top: 1px solid var(--line); }
.proc li { counter-increment: s; padding: 24px 24px 24px 0; border-bottom: 1px solid var(--line); }
.proc li::before { content: "0" counter(s); display: block; font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 28px; }
.proc h3 { font-size: 19px; line-height: 1.3; margin-bottom: 8px; }
.proc p { font-size: 15px; line-height: 23px; color: var(--ink-muted); }
@media (max-width: 900px) { .proc { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .proc { grid-template-columns: 1fr; } }

/* spec lists */
.spec { list-style: none; padding: 0; }
.spec li { position: relative; padding: 13px 0 13px 34px; border-top: 1px solid var(--line); font-size: 16px; line-height: 24px; font-weight: 500; }
.spec li::before { content: ""; position: absolute; left: 7px; top: 22px; width: 7px; height: 7px; background: var(--accent); }
.spec li[data-n]::before { content: attr(data-n); left: 0; top: 13px; width: 22px; height: 22px; border-radius: 50%; background: var(--olive); color: var(--on-olive); font-size: 12px; font-weight: 600; line-height: 22px; text-align: center; }
.kv { display: grid; grid-template-columns: minmax(96px, auto) 1fr; gap: 6px 20px; font-size: 14px; line-height: 21px; }
.kv dt { color: var(--ink-muted); }
.kv dd { font-weight: 600; color: var(--accent); }

/* product page */
.crumbs { font-size: 13px; padding: 20px 0; color: var(--ink-muted); }
.crumbs a { color: inherit; text-underline-offset: 3px; }
.crumbs span[aria-hidden] { margin: 0 8px; }
.pd { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.pd-draw { background: var(--night); color: var(--on-night); display: grid; place-items: center; padding: clamp(24px, 5vw, 72px); min-height: 420px; border-top: 1px solid #383b34; }
.pd-draw svg { width: 100%; max-height: 560px; height: auto; }
.pd-card { background: var(--cream); padding: clamp(28px, 4.5vw, 64px); }
.pd-card > * + * { margin-top: 16px; }
.pd-card .spec { margin-top: 24px; }
.pd-foot { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.pd-foot a { display: block; color: var(--ink); font-weight: 600; }
@media (max-width: 900px) { .pd { grid-template-columns: 1fr; } .pd-draw { min-height: 300px; } }

/* cards / lists */
.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.post { text-decoration: none; display: block; padding-top: 20px; border-top: 3px solid var(--olive); min-width: 0; }
.post:nth-child(3n+2) { border-color: var(--sage); }
.post:nth-child(3n) { border-color: var(--ink); }
.post h3 { font-size: 21px; line-height: 1.25; margin: 10px 0 8px; }
.post:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
.post p { font-size: 15px; line-height: 23px; color: var(--ink-muted); }
@media (max-width: 860px) { .posts { grid-template-columns: 1fr; } }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font-size: 18px; font-weight: 600; line-height: 1.35; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-size: 24px; font-weight: 400; color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 22px; max-width: 68ch; font-size: 16px; line-height: 1.65; color: var(--ink-muted); }
.gloss { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 4px 40px; }
.gloss dt { font-weight: 600; font-size: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.gloss dd { padding-top: 18px; padding-bottom: 18px; border-top: 1px solid var(--line); color: var(--ink-muted); max-width: 64ch; }
@media (max-width: 720px) { .gloss { grid-template-columns: 1fr; } .gloss dd { border-top: 0; padding-top: 0; } }
.cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; }
.cols3 h3 { font-size: 20px; margin-bottom: 8px; padding-top: 18px; border-top: 3px solid var(--olive); }
.cols3 > div:nth-child(2) h3 { border-color: var(--sage); }
.cols3 > div:nth-child(3) h3 { border-color: var(--ink); }
.cols3 p { color: var(--ink-muted); font-size: 16px; }
@media (max-width: 860px) { .cols3 { grid-template-columns: 1fr; } }
.checks { list-style: none; padding: 0; columns: 2; column-gap: 48px; }
.checks li { break-inside: avoid; position: relative; padding: 12px 0 12px 26px; border-top: 1px solid var(--line); font-size: 16px; }
.checks li::before { content: ""; position: absolute; left: 2px; top: 22px; width: 7px; height: 7px; background: var(--accent); }
@media (max-width: 720px) { .checks { columns: 1; } }

/* form */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; }
.form .full { grid-column: 1 / -1; }
.form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form input, .form select, .form textarea { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 2px; padding: 12px 14px; }
.form textarea { min-height: 150px; resize: vertical; }
.form .hint { font-size: 13px; color: var(--ink-muted); margin-top: 6px; }
.form .hp { position: absolute; left: -9999px; }
.form-note { padding: 16px 20px; background: var(--surface); font-size: 15px; }
@media (max-width: 640px) { .form { grid-template-columns: 1fr; } }

/* cta + footer */
.cta-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 32px; align-items: end; }
.cta-grid .mail { font-size: clamp(20px, 2.4vw, 30px); font-weight: 600; text-underline-offset: 6px; }
@media (max-width: 860px) { .cta-grid { grid-template-columns: 1fr; } }
.ftr { background: var(--night); color: var(--on-night); border-top: 1px solid #383b34; }
.ftr-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 40px; padding-top: 64px; padding-bottom: 40px; }
.ftr h4 { font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--sage); margin-bottom: 14px; }
.ftr ul { list-style: none; padding: 0; }
.ftr li + li { margin-top: 8px; }
.ftr a { text-decoration: none; font-size: 15px; }
.ftr a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ftr .logo svg { height: 56px; }
.ftr-about p { margin-top: 18px; font-size: 14px; line-height: 22px; color: var(--sage); max-width: 36ch; }
.ftr-base { display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; padding-top: 20px; padding-bottom: 28px; border-top: 1px solid #383b34; font-size: 13px; color: var(--sage); }
@media (max-width: 860px) { .ftr-grid { grid-template-columns: 1fr 1fr; } .ftr-about { grid-column: 1 / -1; } }

/* chat */
.chat-btn { position: fixed; right: 20px; bottom: 20px; z-index: 60; font: inherit; font-size: 14px; font-weight: 600; background: var(--olive); color: var(--on-olive); border: 1px solid #c9ccae; border-radius: 2px; padding: 13px 18px; cursor: pointer; box-shadow: 0 0 0 4px rgba(30,32,27,.25); }
.chat-btn:hover { background: var(--cream); color: var(--night); }
.chat { position: fixed; right: 20px; bottom: 20px; z-index: 61; width: min(400px, calc(100vw - 24px)); height: min(600px, calc(100dvh - 40px)); display: none; flex-direction: column; background: var(--cream); color: var(--night); border: 1px solid var(--night); --ink: #1e201b; --ink-muted: #5a5d4f; --line: #d9d6c6; --border: #6f7260; --accent: #4b5320; --focus: #1e201b; --surface: #f8f6ee; color-scheme: light; }
.chat.open { display: flex; }
.chat-hd { background: var(--night); color: var(--on-night); padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chat-hd b { font-size: 15px; font-weight: 600; display: block; }
.chat-hd span { font-size: 12px; color: var(--sage); }
.chat-x { font: inherit; background: none; color: inherit; border: 1px solid #7d8068; border-radius: 2px; padding: 4px 10px; cursor: pointer; font-size: 13px; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 10px 14px; font-size: 14.5px; line-height: 1.5; white-space: pre-line; }
.msg a { color: var(--olive); font-weight: 600; }
.msg.bot { background: var(--surface); border: 1px solid var(--line); align-self: flex-start; }
.msg.me { background: var(--olive); color: var(--on-olive); align-self: flex-end; }
.msg.me a { color: inherit; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.chip { font: inherit; font-size: 13px; font-weight: 600; background: none; color: var(--night); border: 1px solid var(--border); border-radius: 2px; padding: 6px 10px; cursor: pointer; }
.chip:hover { background: var(--night); color: var(--on-night); }
.chat-form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 2px; background: #fff; color: var(--night); }
.chat-form button { font: inherit; font-size: 14px; font-weight: 600; background: var(--night); color: var(--on-night); border: 0; border-radius: 2px; padding: 0 16px; cursor: pointer; }
.chat-ft { font-size: 11.5px; line-height: 16px; color: var(--ink-muted); padding: 0 16px 12px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
  .draw-pre .sketch .ln { stroke-dashoffset: 0; } .draw-pre .sketch .dot { opacity: 1; }
}

@media (max-width: 560px) { .chat-btn { right: 12px; bottom: 12px; padding: 10px 14px; font-size: 13px; } .chat { right: 0; bottom: 0; width: 100vw; height: 100dvh; } }
