/* ketabekya site styles. Most layout is inline in the HTML; this file holds resets, responsive rules and states. */
*{box-sizing:border-box}
body{margin:0;color:#0F1A10;-webkit-font-smoothing:antialiased}
a{color:#003200;text-decoration:none}
a:hover{color:#0F1A10}
img{max-width:100%}
/* Sticky header. Its background stretches across the whole screen, and anchor links stop just below it. */
:root{--header-h:88px}
@media (max-width:819px){:root{--header-h:92px}}
html{scroll-padding-top:var(--header-h)}
header[data-header]{position:sticky;top:0;z-index:40}
header[data-header]::before{content:"";position:absolute;z-index:-1;top:0;bottom:0;left:50%;width:100vw;margin-left:-50vw;background:#F6F6F1}
.kb-desk{display:contents}
.kb-mob{display:none}
@media (max-width:819px){.kb-desk{display:none}.kb-mob{display:contents}}
[hidden]{display:none!important}
input:focus,select:focus{outline:2px solid #C8F03C;outline-offset:2px}
button:focus-visible,a:focus-visible{outline:2px solid #C8F03C;outline-offset:2px}
button[type=submit]:hover{background:#D9F76B!important}
button[type=submit][disabled]{opacity:.6;cursor:wait}
#kb-menu:not([hidden]){display:block}
/* Marketplace steps: plain numbered text. Three columns on wide screens, stacked on phones. */
.kb-flow{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:56px;align-items:start}
.kb-step{display:flex;flex-direction:column;gap:12px}
@media (max-width:819px){.kb-flow{grid-template-columns:1fr;gap:40px}}
/* Small highlighted note under a marketplace step. */
.kb-note{align-self:flex-start;padding:6px 14px;border-radius:999px;background:#C8F03C;color:#003200;font-size:14px;font-weight:600;line-height:1.5}
/* A small book illustration above each step, animated by animate.js. */
.kb-art{display:block;align-self:flex-start;width:auto;height:clamp(96px,15.5vh,150px);max-width:100%;overflow:visible;margin-bottom:8px}
.kb-art text{font-family:Geist,sans-serif}
[dir=rtl] .kb-art text{font-family:'IBM Plex Sans Arabic',sans-serif}
/* Horizontal scroll mode, switched on by animate.js: the section is pinned and the steps travel sideways. */
.kb-hscroll .kb-how{min-height:calc(100vh - var(--header-h));justify-content:center;padding-block:20px!important;gap:clamp(20px,3.5vh,40px)!important}
.kb-hscroll .kb-flow{display:flex;gap:96px}
.kb-hscroll .kb-step{flex:0 0 min(600px,56vw);gap:clamp(10px,2vh,20px)}
.kb-hscroll .kb-step h3{font-size:clamp(40px,4.5vw,60px)!important}
.kb-hscroll .kb-step p{font-size:20px!important;max-width:520px}
/* The section after a hero sits above it, so the hero circle slides behind it while scrolling. */
section:has(>div>[data-hero=orb])+section{position:relative;z-index:1}
/* Phones: the hero mockup is smaller so the circle shows around it, and the floating cards sit where they cover no text:
   the price over the blank book covers, the pickup card in the empty space above the app's tab bar. */
@media (max-width:599px){.kb-mock{zoom:.86}.kb-float-price{top:390px!important}.kb-float-truck{bottom:74px!important}}
@media (max-width:359px){.kb-mock{zoom:.74}}
/* Email check messages. */
#kb-form input[aria-invalid=true],.kb-select-btn[aria-invalid=true]{box-shadow:inset 0 0 0 2px #C8F03C}
.kb-suggest{min-height:44px;padding:0 4px;border:0;background:none;color:#fff;font:inherit;font-weight:700;text-decoration:underline;cursor:pointer}
/* School dropdown (built by main.js) */
.kb-school-row{position:relative;display:flex;gap:8px}
.kb-school-row .kb-select{flex:1;min-width:0}
/* With "Other" chosen, the dropdown shrinks and the text box takes the rest of the same row. */
.kb-school-row.has-other .kb-select{flex:0 0 auto}
.kb-school-row.has-other .kb-select-btn{padding:0 14px}
/* Very narrow phones: only the arrow stays, to leave room for typing. */
@media (max-width:359px){.kb-school-row.has-other .kb-select-btn{width:52px;justify-content:center;padding:0}.kb-school-row.has-other .kb-select-btn span{display:none}}
.kb-school-row input[name=school_other]{flex:1;min-width:0;width:auto!important;padding:0 14px!important}
.kb-select-native{position:absolute!important;inset-inline-start:0;bottom:0;width:1px!important;height:1px!important;opacity:0;pointer-events:none}
.kb-select-btn{width:100%;height:56px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 18px;border:0;border-radius:16px;background:#fff;color:#0F1A10;text-align:start;cursor:pointer}
.kb-select-btn[data-empty]{color:#6B7269}
.kb-select-btn svg{flex:none;color:#003200;transition:transform .2s ease}
.kb-select-btn[aria-expanded=true] svg{transform:rotate(180deg)}
.kb-select-list{position:absolute;z-index:20;inset-inline:0;bottom:calc(100% + 8px);display:grid;grid-template-columns:1fr 1fr;gap:4px;margin:0;padding:6px;list-style:none;background:#fff;color:#0F1A10;border-radius:16px;box-shadow:0 18px 44px rgba(0,20,0,.28)}
.kb-select-list li{min-width:0;min-height:44px;display:flex;align-items:center;gap:12px;padding:4px 12px;line-height:1.3;border-radius:10px;cursor:pointer}
.kb-select-list li.is-active{background:#EEF1E6}
.kb-select-list li[aria-selected=true]{background:#C8F03C;color:#003200}
@media (prefers-reduced-motion:no-preference){.kb-select-list:not([hidden]){animation:kb-drop .18s ease-out}}
@keyframes kb-drop{from{opacity:0;transform:translateY(6px)}}
/* Launch ticket: a slanted stub with stamp-style perforated ends, at the top of the hero. */
.kb-ticket{align-self:flex-start;flex:none;width:232px;height:76px;margin:4px 0 6px;color:#003200}
.kb-ticket-body{position:relative;display:grid;grid-template-columns:158px 74px;align-items:center;justify-items:center;width:100%;height:100%;transform:rotate(-6deg)}
[dir=rtl] .kb-ticket-body{transform:rotate(6deg)}
.kb-ticket svg{position:absolute;inset:0;width:100%;height:100%}
[dir=rtl] .kb-ticket svg{transform:scaleX(-1)}
.kb-ticket-main,.kb-ticket-stub{position:relative}
.kb-ticket-main{display:flex;flex-direction:column;align-items:center;gap:2px}
.kb-ticket-lead{font:500 10px/1.4 'Geist Mono',monospace;text-transform:uppercase;letter-spacing:.14em}
.kb-ticket strong{font:400 32px/1 Gloock,serif}
.kb-ticket-stub{font:400 20px/1 Gloock,serif}
[dir=rtl] .kb-ticket-lead{font:700 12px/1.4 'IBM Plex Sans Arabic',sans-serif;letter-spacing:0}
[dir=rtl] .kb-ticket strong{font:700 28px/1.25 'IBM Plex Sans Arabic',sans-serif}
/* Ambassador label: plain text with a marker stroke behind the key words. */
.kb-mark{display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px;margin:0;font-size:16px;line-height:1.5}
.kb-mark-key{position:relative;display:inline-block;padding:4px 12px;color:#003200;font-size:18px}
.kb-mark-key svg{position:absolute;inset:0;width:100%;height:100%;transform:rotate(-1.5deg)}
[dir=rtl] .kb-mark-key svg{transform:scaleX(-1) rotate(-1.5deg)}
.kb-mark-key strong{position:relative;font-weight:700}
.kb-mark-note{color:#4C554B;font-weight:500}
/* Ambassador hero: centred headline over a wide scorecard (deliberately unlike the home page). */
.kb-amb-hero{max-width:1240px;margin:0 auto;padding:56px 24px 88px}
.kb-amb-intro{display:flex;flex-direction:column;align-items:center;gap:26px;text-align:center}
.kb-amb-intro .kb-mark{justify-content:center}
/* Full-screen ambassador numbers. */
.kb-kpi{background:#003200;color:#fff;overflow:hidden;overflow:clip}
.kb-score{min-height:calc(100vh - var(--header-h));min-height:calc(100svh - var(--header-h));max-width:1440px;margin:0 auto;padding:12px 24px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(16px,3vh,56px);text-align:center}
.kb-score-who{display:flex;align-items:center;gap:14px;text-align:start}
.kb-score-avatar{width:56px;height:56px;flex:none;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#C8F03C;color:#003200;font:400 24px Gloock,serif}
.kb-score-name{display:flex;flex-direction:column;gap:2px;font-size:15px;color:#D5E6CF}
.kb-score-name strong{font-size:20px;color:#fff}
/* Quiet caption under the badge: the ambassador figures are sample content. It sits close to the badge. */
.kb-score-note{margin:calc(10px - clamp(16px,3vh,56px)) 0 0;font-size:13px;line-height:1.4;color:#D5E6CF}
@media (max-width:819px){.kb-score-note{margin-top:calc(8px - clamp(16px,2.5vh,32px))}}
.kb-score-stats{align-self:stretch;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.kb-score-stat{display:flex;flex-direction:column;align-items:center;gap:12px}
.kb-score-num{font:400 clamp(72px,min(19vw,14vh),220px)/.95 Gloock,serif;letter-spacing:-.03em;color:#C8F03C;font-variant-numeric:tabular-nums}
.kb-score{--avail:calc(100vh - var(--header-h));--note-w:min(92vw,calc(var(--avail) * 1.17),1360px)}
/* Room reserved for the handwritten note (its height, its tilt and a clear gap), so it never crowds the text around it. */
.kb-score-stats{padding-top:calc(var(--note-w) * .345)}
/* The earnings figure, crossed out with a note drawn above it as pen strokes (SVG in the HTML). */
.kb-money{position:relative;display:inline-block}
.kb-money-strike{position:absolute;left:-6%;width:112%;top:30%;height:40%;pointer-events:none}
.kb-money-note{position:absolute;left:50%;bottom:calc(100% + var(--note-w) * .022);width:var(--note-w);height:auto;overflow:visible;transform:translateX(calc(-50% + .64%)) rotate(-2.5deg)} /* the .64% centres the strokes, not just the box */
[dir=rtl] .kb-money-note{width:calc(var(--note-w) * .92);bottom:calc(100% + var(--note-w) * .062);transform:translateX(calc(-50% - .52%)) rotate(-2.5deg)}
/* Arabic tails hang lower than English letters, so the note sits higher. */
@media (min-width:820px){[dir=rtl] .kb-score{--note-w:min(92vw,calc(var(--avail) * 1.1),1360px)}[dir=rtl] .kb-score-stats{padding-top:calc(var(--note-w) * .372)}}
.kb-score-label{font-size:clamp(16px,1.8vw,24px);line-height:1.4;color:#D5E6CF}
.kb-score-rank{min-height:56px;display:flex;align-items:center;gap:12px;padding:12px 28px;border-radius:999px;background:#C8F03C;color:#003200;font-size:18px;font-weight:600}
.kb-score-rank span{font-family:'Material Symbols Rounded';font-weight:400;font-size:26px;line-height:1}
@media (max-width:819px){.kb-score{gap:clamp(16px,2.5vh,32px);padding:24px 20px}.kb-score{--note-w:min(94vw,calc(var(--avail) * .48))}.kb-score-stats{grid-template-columns:1fr;gap:clamp(10px,2vh,24px);padding-top:0}.kb-money{margin-top:calc(var(--note-w) * .34 + 4px)}[dir=rtl] .kb-money{margin-top:calc(var(--note-w) * .37)}.kb-score-stat{gap:4px}.kb-score-num{font-size:clamp(52px,min(28vw,8.4vh),130px)}}
/* Room inside the text reveal masks so descenders and Arabic dots are not clipped. */
.kb-line-mask,.kb-word-mask{padding-block:.18em;padding-inline:.06em;margin-inline:-.06em}
/* The negative margins cancel that padding so text does not move when the original markup returns. */
.kb-line-mask{position:relative!important;top:-.18em;margin-bottom:-.36em}
.kb-word-mask{margin-block:-.18em;vertical-align:top}
/* Hides intro elements until animate.js takes over (class set in each page head, removed after 2.5s at the latest). */
.kb-anim:not(.kb-header-seen) [data-header],.kb-anim [data-hero]{opacity:0}
