/* KS Companion public site. Navy and gold brand, modern sans type, one accent. */
:root{color-scheme:dark;-webkit-text-size-adjust:100%;text-size-adjust:100%;--bg:#0a101d;--surface:#111a2d;--surface-2:#17233b;--border:#24324c;--border-strong:#33445f;--text:#f1ece2;--muted:#a4aec1;--gold:#e8c46c;--gold-soft:#e8c46c22;--radius:16px;--wrap:1160px;--gutter:clamp(16px,4vw,32px);font:16px/1.65 ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;background:var(--bg);color:var(--text);scrollbar-color:var(--border-strong) var(--bg);scrollbar-width:auto}
*{box-sizing:border-box}
body{margin:0;background:var(--bg)}
img{max-width:100%}
a{color:var(--gold);text-underline-offset:.22em;text-decoration-thickness:1px}
a:hover{color:#fff}
a:active{opacity:.85}
a:focus-visible,summary:focus-visible,.guide-table-scroll:focus-visible{outline:3px solid #c7f36b;outline-offset:4px;border-radius:6px}
h1,h2,h3{line-height:1.15;letter-spacing:-.02em;overflow-wrap:anywhere}
h1{font-size:clamp(2.5rem,5.4vw,4.25rem);font-weight:800;margin:14px 0 20px;max-width:13ch}
h2{font-size:clamp(1.6rem,3vw,2.25rem);font-weight:780;margin:0 0 14px}
h3{font-size:1.1rem;font-weight:720;margin:0 0 6px}
p{margin:0 0 16px}
.lead{font-size:clamp(1.05rem,1.6vw,1.2rem);color:#d9d6cf;max-width:56ch;margin-bottom:28px}
.muted{color:var(--muted);font-size:.9rem}
.eyebrow{color:var(--gold);font-size:.78rem;font-weight:750;text-transform:uppercase;letter-spacing:.14em;margin:0}
.skip{position:absolute;top:-90px;left:12px;background:var(--surface);padding:12px 16px;border-radius:10px;z-index:20}
.skip:focus{top:10px}

/* Header: brand, one link, one action. Full-width bar with a centred row. */
header{position:sticky;top:0;z-index:10;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px max(var(--gutter),calc((100% - var(--wrap))/2));background:#0a101dd9;-webkit-backdrop-filter:saturate(1.4) blur(14px);backdrop-filter:saturate(1.4) blur(14px);border-bottom:1px solid var(--border)}
header nav{display:flex;align-items:center;gap:8px 20px;flex-wrap:wrap}
header nav a:not(.button){color:var(--text);text-decoration:none;font-weight:600;font-size:.95rem}
header nav a:not(.button):hover{color:var(--gold)}
.brand{display:inline-flex;align-items:center;gap:10px;color:var(--text);text-decoration:none;font-weight:800;letter-spacing:-.01em}
.brand img{border-radius:9px}

/* Buttons */
.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:12px 22px;border-radius:12px;border:1px solid var(--gold);background:var(--gold);color:#141007;font-weight:750;text-decoration:none;box-shadow:0 10px 28px -12px #e8c46c99;transition:background .15s,transform .15s,box-shadow .15s}
.button:hover{background:#f3d78f;color:#141007;transform:translateY(-1px)}
.button.ghost{background:transparent;color:var(--text);border-color:var(--border-strong);box-shadow:none}
.button.ghost:hover{border-color:var(--gold);color:var(--gold)}
.button.small{min-height:40px;padding:8px 16px;font-size:.92rem;border-radius:10px}
.text-link{display:inline-flex;align-items:center;gap:6px;font-weight:650;text-decoration:none}
.text-link::after,.card-cta::after{content:"→";transition:transform .15s}
.text-link:hover::after{transform:translateX(3px)}

/* Page width */
main,footer{max-width:var(--wrap);margin:0 auto;padding-inline:var(--gutter)}
main{overflow-x:clip}

/* Home hero */
.hero{position:relative;isolation:isolate;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.08fr);gap:clamp(32px,5vw,64px);align-items:center;padding:clamp(48px,8vw,96px) 0 clamp(56px,8vw,88px)}
.hero::before{content:"";position:absolute;inset:-10% -20% auto 30%;height:120%;background:radial-gradient(closest-side,#e8c46c1f,transparent 70%),radial-gradient(closest-side at 80% 30%,#3b82f61a,transparent 70%);pointer-events:none;z-index:-1}
.hero-actions{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:28px}
.hero-points{display:flex;flex-wrap:wrap;gap:10px 22px;list-style:none;padding:0;margin:0;color:var(--muted);font-size:.92rem}
.hero-points li{display:inline-flex;align-items:center;gap:8px}
.hero-points li::before{content:"";width:18px;height:18px;border-radius:50%;background:var(--gold-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23e8c46c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat}
.hero-media img{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover;border-radius:24px;border:1px solid var(--border-strong);box-shadow:0 40px 80px -30px #000c,0 0 0 8px #ffffff06}

/* Sections */
.section{padding:clamp(56px,8vw,96px) 0;border-top:1px solid var(--border)}
.section-head{max-width:640px;margin-bottom:clamp(28px,4vw,44px)}
.section-head .eyebrow{margin-bottom:12px}
.section-head p:last-child{color:var(--muted);margin:0}

/* Island spotlight */
.spotlight-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:clamp(28px,4vw,56px);align-items:center;margin-bottom:28px}
.spotlight .shot{margin:0}
.step-list{list-style:none;counter-reset:step;padding:0;margin:0;display:grid;gap:26px}
.step-list li{counter-increment:step;display:grid;grid-template-columns:40px 1fr;column-gap:16px}
.step-list li::before{content:counter(step);grid-row:span 2;display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:var(--gold-soft);color:var(--gold);font-weight:800;border:1px solid #e8c46c40}
.step-list p{color:var(--muted);margin:0}

/* Screenshot frame */
.shot{margin:28px 0 36px}
.shot-frame{display:block;padding:0 8px 8px;border-radius:18px;background:linear-gradient(180deg,#1c2945,#121b30);border:1px solid var(--border-strong);box-shadow:0 30px 70px -28px #000d,0 0 60px -24px #e8c46c26;overflow:hidden}
a.shot-frame{cursor:zoom-in;transition:transform .2s,border-color .2s}
a.shot-frame:hover{border-color:#e8c46c66;transform:translateY(-2px)}
.shot-bar{display:flex;gap:6px;padding:11px 6px}
.shot-bar span{width:10px;height:10px;border-radius:50%;background:#ef857a}
.shot-bar span+span{background:#e8c46c}
.shot-bar span+span+span{background:#7fcf94}
.shot-frame img{display:block;width:100%;height:auto;border-radius:10px}
.shot figcaption{color:var(--muted);font-size:.92rem;margin-top:14px;max-width:68ch}

/* Tool cards: the whole card is one link */
.tool-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:20px}
.tool-card{display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;color:var(--text);text-decoration:none;transition:transform .2s,border-color .2s,box-shadow .2s}
.tool-card:hover{color:var(--text);transform:translateY(-3px);border-color:#e8c46c55;box-shadow:0 24px 48px -28px #000}
.tool-thumb{display:block;width:100%;height:auto;aspect-ratio:16/10;object-fit:cover;border-bottom:1px solid var(--border);background:var(--surface-2)}
.tool-body{display:flex;flex-direction:column;flex:1;padding:18px 20px 20px}
.kicker{color:var(--gold);font-size:.85rem;font-weight:600;margin-bottom:6px}
.tool-body p{color:var(--muted);font-size:.94rem;margin:0 0 16px}
.card-cta{margin-top:auto;display:inline-flex;gap:6px;color:var(--gold);font-weight:650;font-size:.92rem}
.tool-card:hover .card-cta::after{transform:translateX(3px)}

/* FAQ */
.faq-list{display:grid;gap:12px;max-width:820px}
.faq details{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:0 20px}
.faq details[open]{border-color:var(--border-strong)}
.faq summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:16px;padding:18px 0;font-weight:680}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+";flex:none;display:grid;place-items:center;width:28px;height:28px;border-radius:8px;background:var(--surface-2);color:var(--gold);font-weight:700;transition:transform .2s}
.faq details[open] summary::after{transform:rotate(45deg)}
.faq details p{color:var(--muted);margin:0 0 18px;max-width:70ch}

/* Closing band */
.cta-band{margin:clamp(24px,4vw,40px) 0 clamp(56px,8vw,96px);padding:clamp(36px,6vw,64px) clamp(20px,5vw,56px);text-align:center;border-radius:28px;border:1px solid var(--border-strong);background:radial-gradient(120% 140% at 50% 0%,#e8c46c1c,transparent 60%),linear-gradient(180deg,var(--surface-2),var(--surface))}
.cta-band p{max-width:58ch;margin:0 auto 24px;color:#d9d6cf}
.cta-band .muted{margin:22px auto 0}

/* Footer */
footer{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-start;gap:20px 40px;padding-block:36px 48px;border-top:1px solid var(--border);font-size:.9rem}
.footer-brand p{color:var(--muted);margin:10px 0 0}
footer nav,.footer-links{display:flex;flex-wrap:wrap;gap:10px 22px}
footer a:not(.brand){color:var(--muted);text-decoration:none}
footer a:not(.brand):hover{color:var(--gold)}

/* Guide and information pages */
.guide-page{max-width:860px}
.page-hero{padding:clamp(32px,6vw,64px) 0 8px}
.breadcrumb{display:flex;flex-wrap:wrap;gap:6px;font-size:.85rem;color:var(--muted);margin-bottom:28px}
.breadcrumb a{color:var(--muted)}
.breadcrumb a:hover{color:var(--gold)}
.guide-page h1{font-size:clamp(2.1rem,4.6vw,3.25rem);max-width:20ch}
.guide-page .lead{max-width:62ch}
.page-hero .button{margin-bottom:18px}
.guide-section{border-top:1px solid var(--border);padding:36px 0}
.guide-section h2{font-size:clamp(1.4rem,2.6vw,1.75rem)}
.guide-section p,.worked-example p{max-width:70ch;color:#dcd8cf}
.guide-section li{padding:4px 0}
.guide-page h2,.guide-page h3{scroll-margin-top:84px}
.guide-page ol{padding-left:24px}
.guide-page li{padding-left:4px}
.guide-screens .shot:last-child{margin-bottom:8px}
.related .tool-grid{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));margin-top:20px}
.guide-contents{display:flex;flex-wrap:wrap;gap:10px;margin:8px 0 4px}
.guide-contents a{padding:8px 14px;border-radius:999px;border:1px solid var(--border-strong);text-decoration:none;font-size:.9rem;font-weight:600}
.guide-contents a:hover{border-color:var(--gold)}
.worked-example{border-top:1px solid var(--border);padding-top:36px}
.worked-example h3{margin-top:32px}
.guide-image{display:block;width:100%;height:auto;margin:28px 0;border:1px solid var(--border);border-radius:14px}
.layout-comparison{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin:28px 0}
.layout-comparison figure{margin:0;min-width:0}
.layout-comparison img{display:block;width:100%;height:auto;border:1px solid var(--border);border-radius:14px;background:var(--surface)}
.layout-comparison figcaption{padding:14px 0}
.layout-comparison figcaption p{margin:6px 0;font-size:.95rem}

/* Tables */
.guide-table-scroll{max-width:100%;overflow-x:auto;margin:22px 0;border:1px solid var(--border);border-radius:14px;background:var(--surface)}
.guide-table-scroll table{border-collapse:collapse;width:100%;font-variant-numeric:tabular-nums;font-size:.93rem}
.guide-table-scroll caption{text-align:left;font-weight:700;color:var(--gold);padding:14px 16px 4px}
.guide-table-scroll th,.guide-table-scroll td{border-bottom:1px solid var(--border);padding:11px 16px;text-align:left;vertical-align:top}
.guide-table-scroll tr:last-child>*{border-bottom:0}
.guide-table-scroll thead th{background:var(--surface-2);color:var(--muted);font-size:.8rem;text-transform:uppercase;letter-spacing:.06em;font-weight:700}
.guide-table-scroll tbody th{font-weight:550}
.guide-table-scroll tbody tr:hover{background:#ffffff05}
.guide-table-scroll:not(.reference) tbody tr:last-child{background:var(--gold-soft)}

/* Scrollbars */
*::-webkit-scrollbar{width:12px;height:12px}
*::-webkit-scrollbar-track{background:var(--bg)}
*::-webkit-scrollbar-thumb{background:var(--border-strong);border:3px solid var(--bg);border-radius:8px}

/* Tablet */
@media(max-width:900px){.hero,.spotlight-grid{grid-template-columns:1fr}.hero-media{order:-1}.hero::before{inset:0 -30% auto -30%}}
/* Phone */
@media(max-width:600px){
header{padding-block:10px;gap:10px}
.brand{font-size:.95rem}
.brand img{width:32px;height:32px}
header nav{gap:14px}
.hero{padding-top:28px}
.hero-actions .button{flex:1 1 100%}
.hero-media img{border-radius:18px}
.tool-grid,.related .tool-grid{grid-template-columns:1fr}
.layout-comparison{grid-template-columns:1fr}
.shot-frame{padding:0 5px 5px;border-radius:14px}
.shot-bar{padding:8px 4px}
.shot-bar span{width:8px;height:8px}
.guide-table-scroll th,.guide-table-scroll td{padding:9px 10px}
.guide-table-scroll table{font-size:.86rem}
.cta-band{border-radius:20px}
}
@media(max-width:480px){header nav .nav-link{display:none}header .button.small{padding:8px 12px;font-size:.86rem}}
.brand,header .button{white-space:nowrap}
@media(max-width:400px){header .brand-name{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}
@media(forced-colors:active){.button,.tool-card,.shot-frame,.faq details{border:1px solid CanvasText}a:focus-visible{outline-color:Highlight}}
/* Freshness: updated dates, latest codes, release notes */
.updated{display:inline-flex;align-items:center;gap:8px;margin:4px 0 0;color:var(--muted);font-size:.88rem}
.updated::before{content:"";width:8px;height:8px;border-radius:50%;background:#7fcf94;box-shadow:0 0 0 4px #7fcf9422}
.latest-codes h3{margin-top:28px}
.latest-codes td:first-child{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:700;color:var(--gold);letter-spacing:.02em}
.update-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:20px;margin-bottom:28px}
.update-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:22px 22px 20px}
.update-card time,.release-list time{color:var(--gold);font-size:.82rem;font-weight:650}
.update-card h3{margin:8px 0}
.update-card p{color:var(--muted);font-size:.94rem;margin:0}
.release-list{list-style:none;padding:0!important;margin:8px 0 0;border-left:2px solid var(--border);display:grid;gap:8px}
.release-list li{position:relative;padding:20px 0 20px 28px!important}
.release-list li::before{content:"";position:absolute;left:-7px;top:26px;width:12px;height:12px;border-radius:50%;background:var(--bg);border:2px solid var(--gold)}
.release-list h2{font-size:clamp(1.25rem,2.4vw,1.5rem);margin:6px 0 10px}
.release-list p{color:#dcd8cf;max-width:68ch;margin:0}

/* Practical guide content uses the shared public-site tokens. */
.message-example{margin:24px 0;padding:clamp(16px,3vw,24px);background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);min-width:0}
.message-example pre{font:inherit;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;padding:16px;background:var(--bg);border-radius:8px;border:1px solid var(--border);user-select:text}
.copy-message{font:inherit;cursor:pointer;min-height:44px}
.copy-message[hidden]{display:none}
.copy-message:disabled{cursor:wait;opacity:.65}
.copy-status{min-height:3.3em;color:var(--muted);font-size:.9rem}
.practical-guide .guide-contents{display:flex;flex-wrap:wrap;gap:12px 20px;margin:20px 0}
.fortune-scene-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,155px),1fr));gap:16px}
.fortune-scene-card{display:flex;flex-direction:column;min-width:0;border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;background:var(--surface);text-decoration:none}
.fortune-scene-card img{width:100%;height:auto;aspect-ratio:3/5;object-fit:contain;background:var(--bg)}
.fortune-scene-card span{padding:12px;font-weight:650;color:var(--text);overflow-wrap:anywhere}
.fortune-scene-card:hover{border-color:var(--gold)}
.message-example pre:focus-visible,.copy-message:focus-visible,.fortune-scene-card:focus-visible{outline:2px solid var(--gold);outline-offset:4px}
