/* k.zone — shared styles. Single palette, no framework, no external fonts.
   Carried over from the 2026-08-22 landing prototype (approved); extended for the two-door home,
   the enterprise page and the contracts page. */
:root{--bg:#0b0e14;--panel:#11151f;--line:#232a3a;--txt:#e8ecf4;--dim:#8b94a8;
 --gold:#c4a365;--rust:#c4733f;--ok:#6fb08a;--glass:#fff;--mono:"SF Mono","JetBrains Mono",Menlo,Consolas,monospace;
 --sans:-apple-system,BlinkMacSystemFont,"Helvetica Neue","PingFang SC",sans-serif}
/* The enterprise side (Zone OS) is on warm paper; tuned on its own, not an inversion of the dark. */
body.light{--bg:#f6f4ef;--panel:#fffefb;--line:#e2ddd2;--txt:#16171b;--dim:#66645e;--gold:#9a6b12;--glass:#16171b}
linearGradient stop{stop-color:var(--glass)}
*{box-sizing:border-box;margin:0;padding:0}
body{background:var(--bg);color:var(--txt);font-family:var(--mono);
 letter-spacing:.02em;line-height:1.6;-webkit-font-smoothing:antialiased}
body.cn{letter-spacing:.04em;font-family:var(--mono),"PingFang SC","Hiragino Sans GB",sans-serif}
.wrap{max-width:900px;margin:0 auto;padding:0 24px}
a{color:inherit}

header{display:flex;align-items:center;gap:13px;padding:26px 0}
.mark{width:26px;height:26px;flex:none;color:var(--txt)}
h1{font-size:14px;font-weight:700;letter-spacing:.18em}
h1 a{text-decoration:none}
h1 .ed{color:var(--dim);font-weight:400;letter-spacing:.08em;margin-left:10px}
/* One header on every page (pm 2026-10-21): mark · k·zone · page name | Your Zone · Zone OS · The five rules · CN.
   The language button sits after the nav: 13px header gap + 9px = the nav's own 22px step. */
header nav{margin-left:auto;display:flex;align-items:center;gap:22px;font-size:11.5px}
#lang{margin-left:9px}
header nav a{color:var(--dim);text-decoration:none;transition:.2s}
header nav a:hover,header nav a.here{color:var(--txt)}
#lang{font:700 10px/1 var(--mono);letter-spacing:.06em;color:var(--dim);
 border:1px solid var(--line);background:none;padding:5px 7px;cursor:pointer;transition:.2s}
#lang:hover{color:var(--txt);border-color:var(--dim)}

.hero{display:grid;grid-template-columns:1fr 290px;gap:44px;align-items:center;padding:44px 0 32px}
.hero.solo{grid-template-columns:1fr;padding:54px 0 36px}
/* One hero headline on every page (kz 2026-10-22): 30px, regular weight, the accent words bold. The home page's three
   one-line beats beside the stage set the ceiling; the other two pages come down to it instead of each carrying a patch. */
.lede{font-size:clamp(22px,2.9vw,30px);font-weight:400;line-height:1.24}
.lede .g{color:inherit;font-weight:700}
/* Gold in a headline: only the Zone OS hero's one phrase (pm P2-12). It never breaks — the CN line split "长 / 成". */
body.light .lede .g{color:var(--gold);white-space:nowrap}
.sub{color:var(--dim);font-size:13.5px;margin-top:20px;max-width:52ch;line-height:1.85}
.stage{aspect-ratio:1;display:flex;align-items:center;justify-content:center;color:var(--txt)}
.stage svg{width:100%;height:auto;overflow:visible}

section{padding:58px 0;border-top:1px solid var(--line)}
.eyebrow{font-size:10px;color:var(--dim);letter-spacing:.32em;margin-bottom:20px}
.claim{font-size:clamp(19px,2.6vw,26px);font-weight:700;line-height:1.42;margin-bottom:9px}
.claim+p,.claim+ul{color:var(--dim);font-size:13px;max-width:62ch}
.stack{display:grid;gap:34px}
.stack p{color:var(--dim);font-size:13px;max-width:62ch}
.stack b,.note b,.door b,.card b{color:var(--txt);font-weight:600}
.engines{display:flex;flex-wrap:wrap;gap:9px;margin-top:22px}
.engines span{font-size:11px;color:var(--dim);border:1px solid var(--line);padding:5px 11px;letter-spacing:.06em}

/* Two doors on the home page */
.doors{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:8px}
.door{display:flex;flex-direction:column;text-decoration:none;border:1px solid var(--line);padding:24px 22px 22px;
 background:var(--panel);transition:.2s;
 clip-path:polygon(0 0,100% 0,100% calc(100% - 14px),calc(100% - 14px) 100%,0 100%)}
.door:hover,.door:focus-visible{border-color:var(--dim);outline:none}
.door .k{font-size:10px;color:var(--dim);letter-spacing:.32em}
.door .t{font-size:22px;font-weight:700;margin:10px 0 8px}
.door .t .g{color:var(--gold)}
.door p{color:var(--dim);font-size:12.5px;line-height:1.8;max-width:40ch}
/* .go: every link that stands on its own line — the doors' links, "the five rules in full", "back home" (pm P2-15).
   Underlines are for links inside a sentence only. */
.go{display:inline-block;font-size:11px;letter-spacing:.12em;font-weight:700;color:var(--txt);text-decoration:none}
@media(hover:hover){a.go:hover{text-decoration:underline;text-underline-offset:4px}}
.door .go{margin-top:auto;padding-top:18px}

/* The five rules: one row per rule, two columns of "what it looks like". First column 216px so every rule's name
   takes two lines at most (pm P2-23; 190 still broke "Facts and interpretation" into three). */
.rules{border-top:1px solid var(--line);margin-top:26px}
.ct{display:grid;grid-template-columns:216px 1fr 1fr;gap:18px;padding:18px 2px;border-bottom:1px solid var(--line);align-items:start}
.ct b{font-size:14px;letter-spacing:.02em}
.ct span{color:var(--dim);font-size:12.5px;line-height:1.75}
.ct .h{font-size:10px;color:var(--dim);letter-spacing:.28em}
.ct.head{padding:10px 2px}

/* Cards (three things / five screens) */
.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.cards.five{grid-template-columns:repeat(5,1fr)}
.card{border:1px solid var(--line);padding:16px 15px;background:var(--panel)}
.card .k{font-size:10px;color:var(--dim);letter-spacing:.28em}
.card b{display:block;font-size:14px;margin:8px 0 6px}
.card p{color:var(--dim);font-size:12px;line-height:1.75}

/* Loop (how growth works) */
.loop{display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:12px;color:var(--dim);margin-top:18px}
.loop span{border:1px solid var(--line);padding:6px 10px}
.loop i{color:var(--dim);font-style:normal}

/* Steps + comparison */
.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:6px}
.step{border-left:2px solid var(--gold);padding:2px 0 2px 14px}
.step b{display:block;font-size:14px;margin-bottom:5px}
.step p{color:var(--dim);font-size:12.5px;line-height:1.75}
table.cmp{width:100%;border-collapse:collapse;margin-top:26px;font-size:12.5px}
table.cmp th,table.cmp td{text-align:left;padding:11px 10px;border-bottom:1px solid var(--line);vertical-align:top;color:var(--dim)}
table.cmp th{font-size:10px;letter-spacing:.2em;color:var(--dim);font-weight:400}
table.cmp td:first-child{color:var(--txt);white-space:nowrap}
/* Our column: a 2px gold rule down its left edge, no fill (pm P2-12) */
table.cmp td.us,table.cmp th:last-child{color:var(--txt);border-left:2px solid var(--gold)}

/* Honesty box: the one block we will not let marketing soften */
.honest{border:1px solid var(--gold);padding:18px 20px;margin-top:8px;
 clip-path:polygon(0 0,100% 0,100% calc(100% - 10px),calc(100% - 10px) 100%,0 100%)}
.honest .k{font-size:10px;color:var(--gold);letter-spacing:.32em;margin-bottom:12px}
.honest li{color:var(--dim);font-size:12.5px;line-height:1.8;margin-left:18px}

pre{background:var(--panel);border:1px solid var(--line);padding:16px 18px;font-size:12.5px;
 overflow-x:auto;letter-spacing:0;
 clip-path:polygon(0 0,100% 0,100% calc(100% - 10px),calc(100% - 10px) 100%,0 100%)}
pre .c{color:var(--dim)}
.note{font-size:12px;color:var(--dim);margin-top:15px;max-width:62ch;line-height:1.8}
.cta{display:inline-block;margin-top:22px;font-size:12px;letter-spacing:.1em;color:var(--gold);text-decoration:none;border:1px solid var(--gold);padding:10px 16px;transition:.2s}
.cta:hover{background:color-mix(in srgb,var(--gold) 10%,transparent)}
/* One footer on every page: k.zone · Early access · by invitation · © 2026 */
footer{padding:40px 0 56px;color:var(--dim);font-size:11px;border-top:1px solid var(--line);display:flex;gap:18px;flex-wrap:wrap}
footer a{text-decoration:none}
footer .fr{margin-left:auto;opacity:.55}

@media(max-width:740px){
 .hero{grid-template-columns:1fr;gap:26px;padding-top:24px}
 .stage{max-width:200px;margin:0 auto;order:-1}
 .doors,.cards,.cards.five,.steps{grid-template-columns:1fr}
 .ct{grid-template-columns:1fr;gap:6px}
 .ct.head{display:none}
}
@media(prefers-reduced-motion:reduce){.stage polygon{transition:none!important}}

/* Screenshots: the product speaks before the copy does. Every frame keeps the app's own
   "Simulated agent · Synthetic data" bar — the label is in the pixels, not only in the caption. */
figure.shot{margin:26px 0 0;border:1px solid var(--line);background:var(--panel);padding:6px;
 clip-path:polygon(0 0,100% 0,100% calc(100% - 10px),calc(100% - 10px) 100%,0 100%)}
figure.shot img{display:block;width:100%;height:auto}
figure.shot figcaption{font-size:11px;color:var(--dim);padding:10px 6px 6px;letter-spacing:.04em}
figure.shot figcaption b{color:var(--txt);font-weight:600}
.shots{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:22px}
.shots figure.shot{margin:0}
.shots figure.shot.wide{grid-column:1/-1}
@media(max-width:740px){.shots{grid-template-columns:1fr}}

/* Zone OS growth strip: four stages, the tangram filling in */
.grow{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.gs{border:1px solid var(--line);background:var(--panel);padding:18px 15px}
.gs .mark{width:56px;height:56px;margin-bottom:14px}
.gs b{display:block;font-size:14px;margin-bottom:6px}
.gs p{color:var(--dim);font-size:12px;line-height:1.75}
@media (max-width:720px){.grow{grid-template-columns:1fr 1fr}}

/* Zone OS "once it is running": a day, one row per moment */
.day{border-top:1px solid var(--line)}
.dr{display:grid;grid-template-columns:96px 260px 1fr;gap:18px;padding:16px 2px;border-bottom:1px solid var(--line);align-items:baseline}
.dr .t{font-size:11px;color:var(--dim);letter-spacing:.16em}
.dr b{font-size:14px}
.dr p{color:var(--dim);font-size:12.5px;line-height:1.75}
.claim .g{color:inherit}
@media (max-width:720px){.dr{grid-template-columns:1fr;gap:4px}}

/* Home story hero: three lines light up as the tangram assembles and changes shape */
.hero.story-hero{grid-template-columns:1fr 400px}
.stage.wide{aspect-ratio:12.8/10.6}
.lede.story{white-space:nowrap}
@media(max-width:740px){.lede.story{white-space:normal}}
.lede.story>span{display:block;opacity:.28;transition:opacity .6s}
.lede.story>span.on{opacity:1}
#story .tag{font-family:var(--mono);font-size:.24px;fill:var(--dim);letter-spacing:.02em}
#story .tagbox{fill:var(--bg);stroke:var(--line);stroke-width:.025}
#story .cap{font-family:var(--mono);font-size:.34px;fill:var(--gold);letter-spacing:.12em}
#story .link{fill:none;stroke:var(--dim);stroke-width:.025;stroke-dasharray:.13 .1}
@media(max-width:740px){.hero.story-hero{grid-template-columns:1fr}.stage.wide{max-width:340px}}


/* Home: the Zone OS door is already paper — the two sides, side by side */
.door.paper{background:#f6f4ef;border-color:#f6f4ef;color:#16171b}
.door.paper p,.door.paper .k{color:#66645e}.door.paper .t .g,.door.paper .go{color:#9a6b12}
.door.paper:hover,.door.paper:focus-visible{background:#f6f4ef;border-color:#c9c2b2}

/* Your Zone: work / life / fun — hovering a card turns the hero tangram into that shape */
.fors{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;padding-bottom:24px}
.for{border:1px solid var(--line);background:var(--panel);padding:16px 15px;outline:none;transition:border-color .2s}
.for b{display:block;font-size:14px;margin-bottom:6px}
.for span{display:block;color:var(--dim);font-size:12px;line-height:1.75}
.for i{display:block;font-style:normal;color:var(--dim);font-size:11px;margin-top:8px;opacity:.85}
.for.on,.for:focus-visible{border-color:var(--gold)}
@media(max-width:740px){.fors{grid-template-columns:1fr}}

/* Zone OS hero: the big tangram filling in, piece by piece */
.stage .mark.big{width:100%;height:auto}
/* Zone OS hero: hairline edges, the plan's dashes finer still (kz 2026-10-21, same as the home page) */
.stage .mark.big polygon{stroke-width:.02}
.stage .mark.big polygon[stroke-dasharray]{stroke-width:.015}

/* Help button + chat (chat.js). The button is the cockpit's floating mark: 56px, the tangram's glass and hairline,
   half-transparent at rest, full while open. The red marker is a 45° square (no circles), shown until first opened. */
.kzfab{position:fixed;right:28px;bottom:28px;z-index:60;width:56px;height:56px;padding:0;border:0;background:none;
 color:var(--txt);cursor:pointer;-webkit-tap-highlight-color:transparent}
/* Opacity on the mark, not the button, so the red marker stays at full strength. */
.kzfab svg{display:block;width:100%;height:100%;overflow:visible;opacity:.6;transition:opacity .2s}
.kzfab-mark polygon{stroke:currentColor;stroke-width:1.6;stroke-linejoin:round}
.kzfab-mark .kzfab-thick{fill:none;stroke-opacity:.28;stroke-width:3.6}
.kzfab.on svg{opacity:1}
@media(hover:hover){.kzfab:hover svg{opacity:.85}}
.kzfab:focus-visible{outline:1px solid var(--gold);outline-offset:4px}
.kzfab-dot{position:absolute;top:2px;right:2px;width:9px;height:9px;background:#d0533f;transform:rotate(45deg);
 box-shadow:0 0 0 2px var(--bg)}
.kzfab-dot[hidden]{display:none}

/* Height follows the conversation, up to 600px (pm P2-20). */
.kzchat{position:fixed;right:28px;bottom:100px;z-index:61;width:392px;max-height:min(600px,calc(100vh - 140px));
 display:flex;flex-direction:column;background:var(--panel);border:1px solid var(--line);
 font-family:var(--sans);letter-spacing:0;
 --chat-lit:color-mix(in srgb,var(--txt) 22%,transparent);--chat-glass:color-mix(in srgb,var(--txt) 4%,transparent);
 clip-path:polygon(0 0,100% 0,100% calc(100% - 14px),calc(100% - 14px) 100%,0 100%)}
.kzchat[hidden]{display:none}
.kzchat button{border-radius:0}
.kzchat header{display:flex;align-items:center;gap:8px;padding:16px;border-bottom:1px solid var(--line);flex:none}
.kzchat-t{font-size:13px;font-weight:600}
.kzchat-x{margin-left:auto;align-self:center;width:16px;height:16px;padding:0;border:0;background:none;color:var(--dim);cursor:pointer}
.kzchat-x svg,.kzchat-add svg,.kzchat-remove svg{display:block;width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:square}
@media(hover:hover){.kzchat-x:hover,.kzchat-add:hover,.kzchat-remove:hover{color:var(--txt)}}
.kzchat-log{flex:1 1 auto;min-height:0;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:16px;overscroll-behavior:contain}
.kzchat-m{max-width:86%;font-size:14px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere;flex:none}
.kzchat-m.assistant{align-self:flex-start;color:var(--txt)}
.kzchat-m.user{align-self:flex-end;border:1px solid var(--line);background:var(--bg);padding:8px 16px}
.kzchat-m.pending{color:var(--dim);animation:kzblink 1.2s steps(2) infinite}
.kzchat-m.err{color:var(--dim)}
@keyframes kzblink{50%{opacity:.35}}
/* The two starters stack at one width — the wider one's (pm P2-14). */
.kzchat-q{display:grid;grid-template-columns:max-content;gap:8px}
.kzchat-q button{font:11px/1.6 var(--mono);letter-spacing:.04em;color:var(--txt);background:var(--chat-glass);border:1px solid var(--line);border-top-color:var(--chat-lit);
 padding:8px 16px;cursor:pointer;transition:border-color .2s;text-align:left}
@media(hover:hover){.kzchat-q button:hover{border-color:var(--gold)}}
.kzchat-in{display:flex;flex-direction:column;gap:8px;padding:16px;flex:none;min-width:0}
.kzchat-compose{display:flex;align-items:flex-end;gap:8px;min-width:0}
.kzchat-field{flex:1;min-width:0;display:flex;border:1px solid var(--line);border-top-color:var(--chat-lit);background:var(--chat-glass);
 clip-path:polygon(8px 0,100% 0,100% 100%,0 100%,0 8px);transition:border-color .2s}
.kzchat-field:focus-within,.kzchat-in.drag .kzchat-field{border-color:var(--dim)}
/* One line is 22 + 8 + 8 + 2 border = 40px, matching the send key; longer drafts grow upward. */
.kzchat-in textarea{width:100%;min-width:0;font:13px/22px var(--sans);letter-spacing:0;color:var(--txt);background:none;border:0;outline:none;resize:none;
 max-height:120px;padding:8px 16px;border-radius:0;overflow-y:auto}
.kzchat-in textarea::placeholder{color:var(--dim);opacity:1}
.kzchat-go{flex:none;width:40px;height:40px;display:flex;align-items:center;justify-content:center;padding:0;border:1px solid var(--line);border-top-color:var(--chat-lit);
 background:var(--chat-glass);color:var(--txt);cursor:pointer;clip-path:polygon(0 0,100% 0,100% calc(100% - 10px),calc(100% - 10px) 100%,0 100%);transition:border-color .2s,transform .2s}
.kzchat-go svg{display:block;width:21px;height:21px}
.kzchat-tools{display:flex;align-items:flex-start;gap:8px;min-width:0}
.kzchat-add{width:24px;height:24px;padding:2px;flex:none;border:0;background:none;color:var(--dim);cursor:pointer}
.kzchat-status{font-size:11px;line-height:24px;color:var(--dim);overflow-wrap:anywhere}
.kzchat-files[hidden],.kzchat-file-input[hidden],.kzchat-held[hidden]{display:none}
.kzchat-files,.kzchat-held{max-height:160px;overflow-y:auto;overscroll-behavior:contain}
.kzchat-attachments{display:flex;flex-direction:column;gap:8px;min-width:0;white-space:normal}
.kzchat-m .kzchat-attachments{margin-top:8px}
.kzchat-m .kzchat-attachments:first-child{margin-top:0}
.kzchat-file{display:flex;align-items:center;gap:8px;min-width:0;padding:8px;border:1px solid var(--line);font:11px/1.6 var(--mono)}
.kzchat-file img{width:32px;height:32px;object-fit:cover;flex:none}
.kzchat-file>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}
.kzchat-file small{font-size:10px;color:var(--dim);white-space:nowrap;flex:none}
.kzchat-remove{width:24px;height:24px;padding:4px;flex:none;border:0;background:none;color:var(--dim);cursor:pointer}
.kzchat-restore{display:block;margin-top:8px;border:0;background:none;padding:0;color:var(--txt);font:11px/1.6 var(--sans);text-align:left;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.kzchat button:disabled{opacity:.45;cursor:default}
.kzchat button:focus-visible{outline:1px solid var(--dim);outline-offset:-3px}
.kzchat-x:focus-visible,.kzchat-add:focus-visible,.kzchat-remove:focus-visible{outline-offset:2px}
@media(hover:hover){.kzchat-go:not(:disabled):hover{border-color:var(--dim)}}
.kzchat button:not(:disabled):active{transform:translateY(1px)}
@media(prefers-reduced-motion:reduce){.kzchat-m.pending{animation:none}}
body.light .kzchat{box-shadow:0 24px 64px rgba(0,0,0,.12)}   /* on paper the dark shadow went muddy (pm P2-20) */
@media(max-width:640px){
 .kzfab{right:18px;bottom:18px;width:52px;height:52px}
 .kzchat{left:10px;right:10px;bottom:82px;width:auto;max-height:min(70vh,calc(100vh - 110px))}
 .kzchat-in textarea{font-size:16px;padding:8px 12px}
}
@media(pointer:coarse){.kzchat-in textarea{font-size:16px}}
@supports(height:100dvh){.kzchat{max-height:min(600px,calc(100dvh - 140px))}
 @media(max-width:640px){.kzchat{max-height:min(70dvh,calc(100dvh - 110px))}}}

/* Your Zone: the chain of command (chain.js). Hairlines and the page's own panel; marks in one colour, no brand
   colours, no backplates — the chart names the tools, it does not advertise them (pm P1-10). Engines in the text
   colour at 32px, tools dim at 20px. A gold marker walks one order down the chain — the only colour here. */
.chain{margin-top:30px;overflow-x:auto;-webkit-overflow-scrolling:touch}
.chain-svg{display:block;width:100%;min-width:720px;height:auto}
.ch-lines polyline{fill:none;stroke:var(--line);stroke-width:1}
.ch-node path.f{fill:var(--panel);stroke:none}
.ch-node path.s{fill:none;stroke:var(--line);stroke-width:1;transition:stroke .3s}
.ch-node.hot path.s{stroke:var(--rust)}
.ch-node.kz path.s{stroke:var(--dim)}
.ch-tan polygon{stroke:var(--txt);stroke-width:.07;stroke-linejoin:round}
.eng{color:var(--txt)}
.tool{color:var(--dim)}
.ch-logo path,.ch-sil{fill:currentColor}
.ch-mono{font-family:var(--mono);font-weight:400;fill:currentColor;letter-spacing:.02em}
.ch-you{font:700 13px var(--mono);fill:var(--txt);letter-spacing:.12em}
.ch-kz{font:700 12px var(--mono);fill:var(--txt);letter-spacing:.16em}
.ch-name{font:11.5px var(--mono);fill:var(--txt);letter-spacing:.02em}
.ch-tname{font:9.5px var(--mono);fill:var(--dim)}
.ch-dot{fill:var(--rust)}
.kzfab[hidden]{display:none}

/* Phones: the header's own nav drops to a hairline row of three under the logo line (the same three links as the
   desktop, the current one in the text colour — no colour on tabs). Home is the logo, as on the desktop. */
@media(max-width:740px){
 .wrap>header{flex-wrap:wrap;padding:18px 0 0}
 .wrap>header #lang{margin-left:auto}
 .wrap>header nav{order:3;flex-basis:100%;margin:12px 0 0;display:grid;grid-template-columns:repeat(3,1fr);gap:0;
  border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
 /* .06em, not .12em: "The five rules" is 14 characters in a 114px third (342/3) — ~101px at .06em */
 .wrap>header nav a{display:block;text-align:center;padding:12px 0;font:11px/1 var(--mono);letter-spacing:.06em;white-space:nowrap}
 .wrap>header nav a+a{border-left:1px solid var(--line)}
 body.cn .wrap>header nav a{letter-spacing:.08em}
}

/* Your Zone hero: the owner's tangram game colours (cockpit #tansvg.hue — a 34% fill of one engine colour per piece,
   the full colour on the edge). Pieces are draggable; a held piece is lifted a little. */
#tg polygon{stroke:currentColor;cursor:grab;touch-action:none;transition:filter .2s,fill .5s,stroke .5s}
#tg polygon.held{cursor:grabbing;filter:brightness(1.25)}
@media(hover:hover){#tg polygon:hover{filter:brightness(1.15)}}
#tg .tg-A{fill:rgba(160,102,61,0.28);stroke:#a0663d}    /* big1 · copilot */
#tg .tg-B{fill:rgba(154,90,74,0.28);stroke:#9a5a4a}    /* big2 · channel */
#tg .tg-C{fill:rgba(122,110,143,0.28);stroke:#7a6e8f}   /* mid · discuss */
#tg .tg-D{fill:rgba(154,159,159,0.28);stroke:#9a9f9f}   /* sm1 · grok */
#tg .tg-E{fill:rgba(95,122,132,0.28);stroke:#5f7a84}   /* sq · codex */
#tg .tg-F{fill:rgba(95,130,104,0.28);stroke:#5f8268}    /* sm2 · antigravity */
#tg .tg-G{fill:rgba(154,132,86,0.28);stroke:#9a8456}    /* para · brass */
/* Each figure's own palette (your-zone.html PAL): the key's bow grey and shaft brass, the pine green with an orange
   trunk, the shark blue. These come after the piece colours above, so they win. */
#tg .c-grey{fill:rgba(154,159,159,0.28);stroke:#9a9f9f}
#tg .c-gold{fill:rgba(184,150,79,0.28);stroke:#b8964f}
#tg .c-green{fill:rgba(95,130,104,0.28);stroke:#5f8268}
#tg .c-orange{fill:rgba(160,102,61,0.28);stroke:#a0663d}
#tg .c-blue{fill:rgba(95,125,149,0.28);stroke:#5f7d95}

/* Zone OS: the page's tangrams (the hero and the growth strip) draw their edges in gold (kz 2026-10-21). */
body.light .stage .mark polygon,body.light .gs .mark polygon{stroke:var(--gold)}

/* A tangram outline being drafted (site.js draw, opts.anim): the mask's stroke grows along the edges. */
@keyframes kz-draw{to{stroke-dashoffset:0}}

/* Home story: thinner, silver-grey edges on the pieces (kz 2026-10-21: the white was too heavy). */
#story polygon{stroke:#aeb8c2;stroke-width:.03}

/* Home: no gold at all (kz 2026-10-21) — emphasis by weight instead. The three story lines are regular weight with
   the key words bold; the doors' titles and links are plain text. The paper door keeps Zone OS's own gold. */
body.home .claim .g{color:inherit;font-weight:700}
body.home .door:not(.paper) .t .g{color:inherit}
body.home #story .cap{fill:var(--dim)}

/* Chinese eyebrows: wide tracking reads as spaced-out characters; tighter (pm 2026-10-21) */
body.cn .eyebrow,body.cn .door .k,body.cn .ct .h,body.cn .card .k{letter-spacing:.18em}

/* Phones (pm review 2026-10-21): the comparison table stacks, each cell labelled with its column; the chain chart
   becomes a column; the language button gets a finger-sized hit area. */
.chain-m{display:none;position:relative}
@media(max-width:740px){
 #lang{padding:9px 10px}
 table.cmp,table.cmp tbody,table.cmp tr,table.cmp td{display:block;width:100%}
 table.cmp tr:first-child{display:none}
 table.cmp tr{padding:12px 0 14px;border-bottom:1px solid var(--line)}
 table.cmp td{border:0;padding:5px 0}
 table.cmp td:first-child{font-weight:700;white-space:normal;padding:0 0 6px}
 table.cmp td[data-col]::before{content:attr(data-col);display:block;font-size:10px;letter-spacing:.2em;color:var(--dim);margin-bottom:2px}
 table.cmp td.us{background:none;color:var(--txt);font-weight:600}
 .chain{overflow:visible}
 .chain-svg{display:none}
 .chain-m{display:flex;flex-direction:column;align-items:center}
 .cm-node{border:1px solid var(--line);background:var(--panel);padding:10px 20px;font:700 12px/1 var(--mono);letter-spacing:.12em}
 .cm-kz{display:flex;flex-direction:column;align-items:center;gap:8px;padding:14px 26px 12px;border-color:var(--dim)}
 .cm-kz .mark{width:40px;height:40px;color:var(--txt)}
 .cm-line{display:block;width:1px;height:18px;background:var(--line)}
 .cm-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;width:100%}
 .cm-cell{border:1px solid var(--line);background:var(--panel);padding:10px 4px 8px;display:flex;flex-direction:column;align-items:center;gap:6px;
  font:10px/1.2 var(--mono);color:var(--txt);text-align:center;min-width:0}
 .cm-cell span{font-size:9.5px;max-width:100%;overflow-wrap:anywhere}
 .cm-cell.tool{color:var(--dim)}
 .cm-cell svg,.cm-sil{display:block}
 .cm-sil{background:currentColor;-webkit-mask:var(--m) center/contain no-repeat;mask:var(--m) center/contain no-repeat}
 .cm-mono{font-size:18px;line-height:18px}
}

/* Zone OS growth strip: the plan's dashes at 56px are 0.4px — too faint to read (pm P2-22). */
.gs .mark polygon[stroke-dasharray]{stroke-width:.06;opacity:.5}

/* Phones: each rule's two columns carry their column name, as the comparison table does (pm P1-6); the install
   lines wrap instead of scrolling, so the repository name at the end stays in view (pm P2-16). */
@media(max-width:740px){
 .ct span[data-col]::before{content:attr(data-col);display:block;font-size:10px;letter-spacing:.28em;color:var(--dim);margin:6px 0 2px}
 body.cn .ct span[data-col]::before{letter-spacing:.18em}
 pre{white-space:pre-wrap;overflow-wrap:anywhere}
}
/* A hero animation that plays once (site.js data-cycle, story.js): a click on its stage plays it again. */
.replay{cursor:pointer}
@media(prefers-reduced-motion:reduce){.replay{cursor:auto}}
/* Tablets (741–1023px): the scattered tags of the home story reached past the screen edge for its first seconds and
   widened the page (834px → 855). Clip at the screen edge: the hero's box plus the wrap's 24px padding. */
.hero.story-hero{overflow-x:clip;overflow-clip-margin:24px}

/* The walking marker in the phone column (chain.js roundPx): rust, like the chart's; a lit cell borders in rust too. */
.cm-dot{position:absolute;left:-3.5px;top:-3.5px;width:7px;height:7px;background:var(--rust);opacity:0;pointer-events:none;z-index:2;transition:opacity .3s}
.cm-node,.cm-cell{transition:border-color .3s}
.cm-node.hot,.cm-cell.hot{border-color:var(--rust)}

/* Nav (kz 2026-10-21): k·zone · Your Zone · Zone OS. On desktop the logo already says k·zone, so that link only
   shows in the phone row, where it is the way home. */
header nav .nav-home{display:none}
@media(max-width:740px){.wrap>header nav .nav-home{display:block}}

/* Chain groups: ENGINES / DAILY AGENTS over the row; the phone column labels each grid */
.ch-group-bg{fill:var(--bg)}
.ch-group-t{font:10px var(--mono);fill:var(--dim);letter-spacing:.28em}
.cm-label{align-self:flex-start;font:10px/1 var(--mono);letter-spacing:.28em;color:var(--dim);margin:14px 0 8px}
.cm-grid+.cm-label{margin-top:14px}

/* Zone OS engine hero (engine.js): paper tints and hairlines inside; gold only on the light and the shell's edges. */
#engine{width:100%;height:auto;overflow:visible}
#engine .en-f{stroke:var(--dim);stroke-width:.7;stroke-linejoin:round}
#engine .en-top{fill:#efede7}#engine .en-right{fill:#d9d6ce}#engine .en-left{fill:#e4e1d9}
#engine .en-core .en-top{fill:#dedbd3}#engine .en-core .en-right{fill:#c6c2b9}#engine .en-core .en-left{fill:#d2cec6}
#engine .en-gearbody{fill:#e9e6df}
#engine .en-line{fill:none;stroke:var(--dim);stroke-width:.6;stroke-linejoin:round}
#engine .en-hub{fill:var(--gold);stroke:none}
#engine .en-light{fill:none;stroke:var(--gold);stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round}
#engine .en-back{fill:var(--bg)}
#engine .en-glass{stroke:var(--gold);stroke-width:.9;stroke-linejoin:round}
#engine .en-tA{fill:url(#gA)}#engine .en-tB{fill:url(#gB)}#engine .en-tC{fill:url(#gC)}

/* Zone OS 3D engine hero (engine3d.js): fills the stage; horizontal drags orbit, vertical swipes still scroll. */
#engine3d{width:100%;min-width:0;max-width:100%;aspect-ratio:1;display:block;touch-action:pan-y;cursor:grab}   /* min-width:0 — a flex item must not grow to the canvas's pixel width */
#engine3d:active{cursor:grabbing}
#engine3d[hidden]{display:none}
/* An SVG does not honour the hidden attribute by itself; without this the empty engine stage still took a column. */
svg[hidden]{display:none}
@media(max-width:740px){.stage.is3d{max-width:280px}}   /* the 3D hero earns a little more room on phones */
/* Zone OS hero, English: four short lines at a slightly smaller size so it mirrors the Chinese three without overflowing */
body:not(.cn) .zo-lede{max-width:none}

/* Home (kz 2026-10-21): graphite, between Your Zone's black and Zone OS's paper; the two doors stand out of it, one
   darker, one paper. Behind everything, the tangram's own cut lines — cells rotated, mirrored and thinned at random
   (img/home-lines.svg, generated with a fixed seed), so the pattern does not read as a repeat. */
body.home{--bg:#1d1f23;--panel:#24272c;--line:#33363c;
 }
body.home .door:not(.paper){background:#0b0e14;border-color:#0b0e14}
@media(hover:hover){body.home .door:not(.paper):hover{border-color:var(--dim)}}

/* Your Zone uses the KZone dark canvas; the faint tangram line field is unchanged. */
body.yz{--bg:#14161a}
/* Your Zone's accent is rust-silver, not brass (kz 2026-10-21): every var(--gold) on this page — the CTA, the selected card,
   the walking marker's trail, focus rings — turns rust. The key's own brass in the hero tangram stays. */
body.yz{--gold:#a39d92}   /* rust-silver: tarnished silver, a warm grey (kz 2026-10-21); the chain's walking marker stays rust orange */
/* Your Zone hero: the game's colours, oxidised — desaturated, pulled toward rust and patina (kz 2026-10-21) */

/* Zone OS: the same tangram line field, in ink on paper (kz 2026-10-21) */
body.light{}
/* Zone OS "how it grows": the engine's four stages in small isometric drawings (the hero's story) */
.gs .gi{width:96px;height:auto;display:block;margin:4px 0 20px;overflow:visible}
.gi polygon,.gi polyline{stroke-linejoin:round}
.gi-base.gi-top{fill:#efede7}.gi-base.gi-right{fill:#d9d6ce}.gi-base.gi-left{fill:#e4e1d9}
.gi-base{stroke:var(--dim);stroke-width:.9}
.gi-part{stroke:var(--dim);stroke-width:.8}
.gi-part.gi-top{fill:#ebe8e1}.gi-part.gi-right{fill:#cfcbc2}.gi-part.gi-left{fill:#dcd8cf}
.gi-core{stroke:var(--gold);stroke-width:1}
.gi-core.gi-top{fill:#e6dcc6}.gi-core.gi-right{fill:#c9b48b}.gi-core.gi-left{fill:#d8c7a2}
.gi-plan{fill:none;stroke:var(--gold);stroke-width:.9;stroke-dasharray:3 3;opacity:.55}
.gi-gear{fill:#e9e6df;stroke:var(--gold);stroke-width:.9}
.gi-hub{fill:var(--gold);stroke:none}
.gi-tile{stroke:var(--gold);stroke-width:1}
.gi-tile.gi-top{fill:#f3f1eb}.gi-tile.gi-right{fill:#ddd9cf}.gi-tile.gi-left{fill:#e8e4db}

/* The line field stays put while the page scrolls (kz 2026-10-21). A fixed pseudo-element rather than
   background-attachment:fixed, which iOS Safari ignores. */
body.home::before,body.yz::before,body.light::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
 background:url(img/home-lines.svg) center top/2240px 1920px}
body.light::before{background-image:url(img/paper-lines.svg)}

/* Sticky header on every page (kz 2026-10-21): the page colour behind it edge to edge, no rule under it. */
.wrap>header{position:sticky;top:0;z-index:50;background:var(--bg);box-shadow:0 0 0 100vmax var(--bg);clip-path:inset(0 -100vmax)}
/* Cut corners follow the cockpit spec (DESIGN-LANGUAGE §20.4, kz 2026-10-21): bottom right, and the notch stays OPEN —
   the clip simply ends the border; nothing is drawn on the diagonal. Sizes: buttons 6 · bubbles 8 · cards 10 · doors/panels 14. */
.card,.gs,.for{clip-path:polygon(0 0,100% 0,100% calc(100% - 10px),calc(100% - 10px) 100%,0 100%);background:var(--panel)}
/* "How it grows": no illustrations — a four-step hairline that fills as the Zone grows */
.gs-bar{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;margin:4px 0 18px}
.gs-bar i{display:block;height:2px;background:var(--line)}
.gs-bar i.on{background:var(--gold)}

/* Home doors (kz 2026-10-21): hover borders in each side's colour — rust-silver for Your Zone, rust-gold for Zone OS. */
body.home .doors .door{transition:border-color .2s;border-color:var(--dl);background:var(--fill)}
body.home .doors .door:not(.paper){--dl:#0b0e14;--fill:#0b0e14}
body.home .doors .door.paper{--dl:#f6f4ef;--fill:#f6f4ef}
@media(hover:hover){
 body.home .doors .door:not(.paper):hover{--dl:#a39d92}
 body.home .doors .door.paper:hover{--dl:#a8792b}
}
body.home .doors .door:not(.paper):focus-visible{--dl:#a39d92;outline:none}
body.home .doors .door.paper:focus-visible{--dl:#a8792b;outline:none}
/* Chat: the visitor's bubble and the quick replies are sender side — bottom-right cut */
.kzchat-m.user{clip-path:polygon(0 0,100% 0,100% calc(100% - 8px),calc(100% - 8px) 100%,0 100%)}
.kzchat-q button{clip-path:polygon(0 0,100% 0,100% calc(100% - 6px),calc(100% - 6px) 100%,0 100%)}
/* Nav (kz 2026-10-21): on every dark page Zone OS reads in rust-gold, dimmed until hovered — not lit yet */
body:not(.light) header nav a[href="zone-os.html"]{color:color-mix(in srgb,#a8792b 66%,var(--bg))}
body:not(.light) header nav a[href="zone-os.html"]:hover{color:#c4913f}
/* Inner pages on desktop: the home link becomes a left-pointing triangle, cap height of the nav text, one nav step
   (22px) before Your Zone. site.js snaps it to whole device pixels so the upright edge renders as a sharp vertical. */
@media(min-width:741px){
 body:not(.home) header nav .nav-home{display:block;width:8px;height:9px;font-size:0;
  background:currentColor;clip-path:polygon(100% 0,100% 100%,0 50%)}
}
/* CTA buttons (kz 2026-10-21): bottom-right cut like every sender-side control */
.cta{clip-path:polygon(0 0,100% 0,100% calc(100% - 6px),calc(100% - 6px) 100%,0 100%)}
/* On the Zone OS page its own nav item is lit: the page's rust-gold, the lit state of the home page's dim one */
body.light header nav a.here[href="zone-os.html"]{color:var(--gold)}
/* Your Zone hero (kz 2026-10-21): starts as the home page's colourless glass tangram — silver hairline, white glass at
   the home gradients' weights (gA/gB/gC) — then the game colours fade in. Flat rgba so fill and stroke interpolate. */
#tg polygon{transition:filter .2s,fill .9s,stroke .9s}
#tg.raw polygon{stroke:#aeb8c2}
#tg.raw polygon.tg-A,#tg.raw polygon.tg-E{fill:rgba(255,255,255,.13)}
#tg.raw polygon.tg-C,#tg.raw polygon.tg-F{fill:rgba(255,255,255,.08)}
#tg.raw polygon.tg-B,#tg.raw polygon.tg-D,#tg.raw polygon.tg-G{fill:rgba(255,255,255,.05)}

/* Home: one line under the doors to the Zone OS scenes, for a visitor who wants to see it before reading on. */
.watch{margin-top:18px;text-align:right}
@media(max-width:740px){.watch{text-align:left}}
