/* The main landmark receives route focus for assistive technology, not a page-wide ring. */
#main:focus,#main:focus-visible { outline:none; }
/* Compact masthead: a quiet wordmark, one action dock and a fine navigation line. */
.site-header { background:var(--surface); box-shadow:0 6px 24px #061c3905; }
.site-header .masthead { min-height:78px; gap:22px; }
.site-header .masthead .brand { width:190px; flex:none; padding:0; }
.site-header .masthead .nx-brand-logo { width:100%; height:auto; max-height:66px; object-fit:contain; }
.site-header .brand-line { display:block; border:0; padding:0; max-width:135px; font-size:10px; line-height:1.65; letter-spacing:.03em; }
.site-header .brand-line strong { display:inline; }
.site-header .head-actions { gap:8px; padding:4px; border:1px solid var(--line); border-radius:17px; background:var(--surface-soft); }
.site-header .head-actions .icon-button,.site-header .head-actions .language-picker { width:38px; height:38px; min-width:38px; border:0; border-radius:11px; background:transparent; color:var(--ink); box-shadow:none; }
.site-header .head-actions .icon-button:hover,.site-header .head-actions .language-picker:hover { background:var(--surface); }
.site-header .head-actions .icon-button svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.site-header .language-picker .km-language-flag { width:24px; height:24px; }
.site-header .head-actions .menu-toggle { display:inline-flex; background:var(--ink); color:var(--surface)!important; font-size:20px; }
.site-header .head-actions .menu-toggle:hover { background:var(--blue); color:#fff!important; }
.site-header .head-actions .boost-button { border:0; min-height:36px; background:var(--red); color:#fff; font-size:10px; padding:8px 12px; border-radius:9px; white-space:nowrap; }
.site-header .nav-border { border-color:var(--line); }
.site-header .navigation { min-height:43px; gap:28px; }
.site-header .navigation>a { font-size:11px; padding:11px 0; }
.review-inner { min-height:29px; }
.review-bar,.review-bar button { font-size:9px; }
.review-tools button { min-height:28px; }
/* Editorial rhythm: separate sections without making the page feel like stacked boxes. */
.km-section-divider { position:relative; height:1px; margin:36px 0; background:var(--line); overflow:visible; pointer-events:none; }
.km-section-divider::before { content:''; position:absolute; left:0; top:-1px; width:52px; height:3px; border-radius:2px; background:var(--red); opacity:.65; }
.km-section-divider::after { content:''; position:absolute; inset:0; background:linear-gradient(90deg,var(--red),var(--blue) 26%,transparent 80%); opacity:0; transform:scaleX(.05); transform-origin:left; }
.km-section-divider.is-revealed::after { animation:km-divider-trace .85s ease-out; }
.km-section-divider[data-direction=up]::after { transform-origin:right; }
@keyframes km-divider-trace { 0%{opacity:.1;transform:scaleX(.05)} 60%{opacity:.65} 100%{opacity:0;transform:scaleX(1)} }
.km-section-divider+section.content-section,.km-section-divider+.km-creator-invite,.km-section-divider+.kp-strip { margin-top:0; }
.km-section-divider+.kp-strip { border-top:0; padding-top:4px; }
.km-section-divider+.km-creator-invite { border-top:0; }
/* Small-looking controls retain a 36px hit area (44px for touch pointers). */
#main :is(.km-slider-controls,.nx-rail-controls,.nx-deck-controls) { gap:9px; }
#main :is(.km-slider-controls,.nx-rail-controls)>div { display:flex; gap:2px; }
#main :is(.km-slider-controls,.nx-rail-controls,.nx-deck-controls) button,#main #kp-logos-pause { width:36px; min-width:36px; height:36px; min-height:36px; padding:0; border:0; border-radius:9px; background:transparent; color:var(--muted); font-size:12px; line-height:1; box-shadow:none; }
#main :is(.km-slider-controls,.nx-rail-controls,.nx-deck-controls) button:hover,#main #kp-logos-pause:hover { background:var(--surface-soft); color:var(--ink); }
#main :is(.km-slide-position,.nx-rail-position,.nx-deck-controls>span) { font-size:9px; letter-spacing:1px; font-variant-numeric:tabular-nums; color:var(--muted); }
#main .km-slider-hero .km-slider-controls { padding:2px 20px; }
#main .km-slider-hero .km-slider-controls :is(button,.km-slide-position) { color:#bdccdc; }
#main .km-slider-hero .km-slider-controls button:hover { background:#ffffff12; color:white; }
#main .km-slider-latest .km-slider-controls { padding-block:0; }
#main .nx-rail-controls { margin-top:5px; }
#main .km-slide-progress { height:1px; opacity:.65; }
/* A shared bookshelf, with distinct plinths and air around every volume. */
.nx-scroll-collection[data-rail=books] { padding:24px; background:var(--surface); border-radius:18px; box-shadow:0 12px 34px #071f4305; }
#main .km-book-rail { grid-auto-columns:calc((100% - 96px)/5); gap:24px; padding:4px 2px 12px; align-items:stretch; }
#main .km-book-rail>.nx-book-card { position:relative; gap:14px; border:0; border-radius:0; background:transparent; padding:0; }
#main .km-book-rail>.nx-book-card:not(:last-child)::after { content:''; position:absolute; top:20px; right:-13px; bottom:12px; width:1px; background:var(--line); opacity:.8; }
#main .km-book-rail .nx-book-cover { display:flex; align-items:center; justify-content:center; width:100%; min-height:194px; padding:14px 10px 20px; border-radius:12px; background:linear-gradient(145deg,var(--surface-soft),var(--surface)); position:relative; overflow:hidden; }
#main .km-book-rail .nx-book-cover::after { content:''; position:absolute; width:70%; height:8px; bottom:12px; border-radius:50%; background:#071f4310; filter:blur(4px); }
#main .km-book-rail .nx-book-card:nth-child(3n+2) .nx-book-cover { background:linear-gradient(145deg,color-mix(in srgb,#b38b64 12%,var(--surface)),var(--surface)); }
#main .km-book-rail .nx-book-card:nth-child(3n+3) .nx-book-cover { background:linear-gradient(145deg,color-mix(in srgb,#7c8c88 13%,var(--surface)),var(--surface)); }
#main .km-book-rail .nx-book-cover .km-visual { width:112px; max-width:100%; height:157px; flex:none; border-radius:2px 5px 5px 2px; transform:perspective(800px) rotateY(-8deg) rotate(-2deg); box-shadow:4px 6px 0 -2px var(--line),8px 12px 15px #071f4320; transition:transform .25s; z-index:1; }
#main .km-book-rail .nx-book-card:nth-child(even) .nx-book-cover .km-visual { transform:perspective(800px) rotateY(8deg) rotate(2deg); }
#main .km-book-rail .nx-book-cover:hover .km-visual { transform:translateY(-4px); }
#main .km-book-rail .nx-book-copy { padding:0 2px; display:flex; flex:1; flex-direction:column; }
#main .km-book-rail .nx-book-copy h3 { font-family:Manrope,system-ui,sans-serif; font-size:15px; line-height:1.4; height:2.8em; margin:8px 0 6px; }
#main .km-book-rail .nx-book-copy>p { margin-bottom:7px; }
#main .km-book-rail .nx-card-tools { margin-top:auto; }
#main .km-book-rail .nx-download { min-height:36px; }
/* Footer: an editorial signature inspired by the reference, in Konekte m's navy/red palette. */
footer.km-footer { --footer-muted:#b8c5d8; margin-top:52px; padding:0 0 22px; background:#0b1728; color:#f4f7fc; position:relative; border-top:1px solid #26344a; }
html[data-theme=dark] footer.km-footer { background:#060f1c; }
.km-footer::before { content:''; position:absolute; top:-1px; left:0; width:28%; max-width:320px; height:2px; background:linear-gradient(90deg,#e5233d,#36649200); }
.km-footer-top { padding:22px 0; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid #ffffff12; gap:16px; }
.km-footer-signal { font-size:9px; letter-spacing:.16em; font-weight:700; display:flex; align-items:center; gap:9px; }
.km-footer-signal i { width:5px; height:5px; border-radius:50%; background:#ff4257; box-shadow:0 0 0 4px #e5233d15; }
.km-back-top { display:flex; align-items:center; gap:8px; font-size:10px; color:var(--footer-muted); padding:6px 0 6px 12px; border:0; background:transparent; min-height:36px; }
.km-footer svg { width:19px; height:19px; flex:none; fill:none; stroke:currentColor; stroke-width:1.65; stroke-linecap:round; stroke-linejoin:round; }
.km-back-top svg { width:16px; height:16px; }
.km-footer-grid { display:grid; grid-template-columns:1.12fr .85fr 1.15fr 1.45fr; gap:34px; padding:42px 0; align-items:start; }
.km-footer-logo { display:block; width:180px; max-width:100%; margin-top:-13px; }
.km-footer-logo img { width:100%; height:auto; display:block; background:transparent; }
.km-footer p { color:var(--footer-muted); font-size:12px; line-height:1.8; }
.km-footer h2 { font-family:Manrope,system-ui,sans-serif; font-size:14px; line-height:1.5; margin:0 0 20px; color:white; font-weight:700; letter-spacing:0; }
.km-footer-about>p { max-width:260px; margin:8px 0 20px; }
.km-footer-social { display:flex; flex-wrap:wrap; gap:7px; }
.km-footer-social a { width:34px; min-height:36px; display:grid; place-items:center; color:#e8eef6; border-radius:50%; background:#ffffff08; border:1px solid #ffffff12; transition:background .18s,transform .18s; }
.km-footer-social svg { width:16px; height:16px; }
.km-footer-social a:hover { background:#e5233d; border-color:#e5233d; transform:translateY(-2px); color:#fff; }
.km-footer-partner { margin-top:22px; padding-top:15px; border-top:1px solid #ffffff12; display:flex; align-items:center; gap:12px; color:#dbe6f4; font-size:11px; line-height:1.7; max-width:260px; }
.km-footer-partner svg { width:15px; }
.km-footer-explore { display:flex; flex-direction:column; align-items:start; }
.km-footer-explore>a { font-size:12px; min-height:33px; padding:5px 0; color:var(--footer-muted); line-height:1.6; }
.km-footer a:hover,.km-footer button:hover { color:#fff; }
.km-footer-contact address { font-style:normal; font-size:12px; display:flex; flex-direction:column; gap:18px; }
.km-footer-contact address>a,.km-footer-contact address>div { display:flex; gap:12px; align-items:start; color:var(--footer-muted); min-width:0; }
.km-footer-contact address svg { color:#fa6779; width:17px; height:17px; margin-top:4px; }
.km-footer-contact address small { font-size:9px; letter-spacing:.06em; display:block; color:#869bb6; margin-bottom:2px; }
.km-footer-contact address a,.km-footer-contact address span { overflow-wrap:anywhere; }
.km-footer-contact address>div>span>a { display:block; padding:3px 0; }
.km-footer-contact-link { display:inline-block; font-size:11px; margin-top:18px; min-height:32px; color:#dbe6f4; }
.km-footer-newsletter { background:#ffffff04; border:1px solid #ffffff12; border-radius:15px; padding:24px; }
.km-footer-kicker { font-size:8px; letter-spacing:.17em; color:#e995a2; font-weight:700; }
.km-footer-newsletter h2 { font-size:23px; line-height:1.25; letter-spacing:-.04em; margin:12px 0; }
.km-footer-newsletter>p { font-size:11px; margin:0 0 20px; }
.km-footer-newsletter form>label,.km-newsletter-options label:not(.km-check) { font-size:10px; font-weight:500; color:var(--footer-muted); margin:0 0 7px; display:block; }
.km-email-input { display:flex; border:1px solid #ffffff24; border-radius:8px; background:#ffffff07; overflow:hidden; }
.km-footer-newsletter .km-email-input input { min-width:0; width:100%; flex:1; margin:0; min-height:44px; padding:10px 12px; background:transparent; border:0; border-radius:0; color:#fff; font-size:16px; }
.km-footer-newsletter input::placeholder { color:#91a2b9; opacity:1; }
.km-email-input:focus-within { outline:2px solid #6bb1ff; outline-offset:2px; }
.km-email-input input:focus-visible { outline:0; }
.km-email-input button { width:42px; min-width:42px; border:0; background:#e5233d; color:#fff; margin:4px; border-radius:5px; display:grid; place-items:center; }
.km-email-input button:disabled { opacity:.45; cursor:wait; }
.km-newsletter-options { margin-top:13px; border:0; background:transparent; }
.km-newsletter-options summary { font-size:10px; color:#b8c5d8; padding:8px 0; cursor:pointer; line-height:1.7; }
.km-newsletter-options[open] summary { margin-bottom:10px; }
.km-footer-newsletter .km-newsletter-options input[type=tel] { color:white; background:#ffffff08; border:1px solid #ffffff24; font-size:16px; min-height:44px; margin:0 0 14px; }
.km-check { display:flex; align-items:start; gap:8px; font-weight:400; font-size:11px; line-height:1.6; color:#c1ccdc; margin:10px 0; cursor:pointer; }
.km-check input { width:15px; min-width:15px; height:15px; margin:2px 0 0; accent-color:#e5233d; padding:0; }
.km-footer p.km-newsletter-consent { font-size:9px; line-height:1.7; color:#9cacc3; margin:12px 0 8px; }
.km-footer p.km-newsletter-note { font-size:9px; line-height:1.7; color:#9cacc3; margin:0; }
#km-newsletter-status { color:#bde4d2; font-size:11px; }
#km-newsletter-status:empty { margin:0; }
#km-newsletter-status.is-error { color:#ffb7c0; }
.km-newsletter-cancel { min-height:32px; background:transparent; border:0; padding:0; color:#c1ccdc; text-decoration:underline; text-underline-offset:3px; font-size:10px; }
.km-footer-bottom { border-top:1px solid #ffffff12; padding-top:22px; display:flex; align-items:center; justify-content:space-between; gap:20px; color:#94a5be; font-size:10px; }
.km-footer-bottom>div { display:flex; flex-wrap:wrap; align-items:center; gap:8px 22px; }
.km-footer-bottom a,.km-footer-bottom button { color:var(--footer-muted); font-size:10px; background:transparent; border:0; padding:5px 0; min-height:32px; }
/* Real subscription records stay in the admin area. */
.km-subscriber-tools { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:20px 0; }
.km-subscriber-tools input { flex:1; min-width:180px; margin:0; }
.km-subscriber-row { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:18px; border:1px solid var(--line); background:var(--surface); border-radius:10px; margin-bottom:10px; }
.km-subscriber-row strong { display:block; overflow-wrap:anywhere; font-size:13px; }
.km-subscriber-row p { font-size:11px; color:var(--muted); margin:5px 0; }
.km-subscriber-row .chip { flex:none; }
.km-subscription-status { display:flex; align-items:center; gap:10px; font-size:12px; background:var(--surface-soft); border:1px solid var(--line); border-radius:10px; padding:16px; }
.km-contact-direct { display:flex; flex-direction:column; align-items:start; gap:10px; font-size:13px; margin:22px 0; overflow-wrap:anywhere; }
.nx-has-player footer.km-footer { padding-bottom:110px; }
@media(max-width:800px) { .nx-has-player footer.km-footer { padding-bottom:calc(190px + env(safe-area-inset-bottom)); } }
@media(max-width:1180px) {
 .site-header .brand-line { display:none; }
 .site-header .masthead { min-height:74px; gap:18px; }
 .site-header .masthead .brand { width:178px; }
 .km-footer-grid { gap:26px; grid-template-columns:1fr 1fr; }
 .km-footer-about>p { max-width:340px; }
 .km-footer-newsletter { max-width:460px; }
 #main .km-book-rail { grid-auto-columns:calc((100% - 48px)/3); }
}
@media(max-width:800px) {
 .site-header .head-actions { gap:6px; }
 .site-header .navigation { gap:24px; }
 .km-footer-grid { padding-block:32px; gap:32px; }
 .km-footer-bottom { align-items:start; flex-direction:column; gap:10px; }
 .km-section-divider { margin-block:28px; }
}
@media(max-width:560px) {
 .site-header .masthead { min-height:68px; gap:8px; }
 .site-header .masthead .brand { width:clamp(120px,calc(100vw - 184px),152px); }
 .site-header .masthead .nx-brand-logo { max-height:52px; }
 .site-header .head-actions { padding:0; gap:8px; border:0; background:transparent; }
 .site-header .head-actions .icon-button,.site-header .head-actions .language-picker { width:44px; min-width:44px; height:44px; background:var(--surface-soft); border-radius:12px; }
 .site-header .head-actions .menu-toggle { background:var(--ink); }
 .review-inner { min-height:29px; }
 .review-bar button { min-height:29px; }
 .review-inner>span,.review-bar button { font-size:8px; }
 .km-section-divider { margin-block:26px; }
 .nx-scroll-collection[data-rail=books] { padding:16px 12px 10px; }
 #main .km-book-rail { grid-auto-columns:calc((100% - 24px)/2); gap:24px; padding-inline:0; }
 #main .km-book-rail .nx-book-cover { min-height:155px; padding:12px 8px 18px; border-radius:9px; }
 #main .km-book-rail .nx-book-cover .km-visual { width:90px; height:126px; }
 #main .km-book-rail .nx-book-copy h3 { font-size:13px; height:2.8em; }
 #main .km-book-rail .nx-card-eyebrow { font-size:7px; letter-spacing:.4px; }
 #main .km-book-rail .nx-card-tools { gap:2px; }
 #main .km-book-rail .nx-download { padding:5px 3px; font-size:9px; min-width:0; }
 #main .km-book-rail .nx-icon { width:26px; min-width:26px; }
 #main .km-book-rail .nx-social { gap:2px; font-size:9px; }
 #main .km-book-rail .nx-social svg { width:11px; height:11px; }
 footer.km-footer { margin-top:32px; padding-bottom:calc(100px + env(safe-area-inset-bottom)); }
 .km-footer-top { padding-block:16px; }
 .km-footer-signal { font-size:8px; letter-spacing:.1em; }
 .km-back-top { font-size:9px; }
 .km-footer-grid { grid-template-columns:1fr; gap:30px; padding:30px 0; }
 .km-footer-logo { width:164px; }
 .km-footer-about>p { font-size:13px; max-width:330px; }
 .km-footer-social { gap:9px; }
 .km-footer-social a { width:40px; min-height:40px; }
 .km-footer-partner { margin-top:18px; max-width:none; }
 .km-footer h2 { font-size:15px; margin-bottom:15px; }
 .km-footer-explore { display:grid; grid-template-columns:1fr 1fr; gap:0 18px; border-top:1px solid #ffffff12; padding-top:25px; }
 .km-footer-explore h2 { grid-column:1/-1; }
 .km-footer-contact { padding-top:25px; border-top:1px solid #ffffff12; }
 .km-footer-contact address { font-size:13px; gap:16px; }
 .km-footer-newsletter { padding:22px; max-width:none; }
 .km-footer-newsletter h2 { font-size:26px; }
 .km-footer-bottom { font-size:9px; }
 .km-footer-bottom>div { gap:5px 16px; }
 .km-footer-bottom a,.km-footer-bottom button { font-size:9px; }
 .km-subscriber-row { padding:14px; flex-wrap:wrap; }
}
@media(max-width:360px) {
 #main .km-book-rail { grid-auto-columns:80%; }
 #main .km-book-rail .nx-book-cover { min-height:181px; }
 #main .km-book-rail .nx-book-cover .km-visual { width:105px; height:147px; }
 #main .km-book-rail .nx-book-copy h3 { font-size:15px; }
 .km-footer-social { gap:7px; }
}
@media(pointer:coarse) {
 #main :is(.km-slider-controls,.nx-rail-controls,.nx-deck-controls) button,#main #kp-logos-pause { width:44px; min-width:44px; height:44px; min-height:44px; font-size:12px; }
}
@media(prefers-reduced-motion:reduce) {
 .km-section-divider.is-revealed::after { animation:none; }
 #main .km-book-rail .nx-book-cover .km-visual,.km-footer-social a { transition:none; }
}
@media print { .site-header,.km-footer,.km-section-divider { display:none!important; } }
