@font-face{font-family:Wasam;src:url('./assets/arabic-regular.woff') format('woff');font-weight:400;font-display:swap}
@font-face{font-family:Wasam;src:url('./assets/arabic-bold.woff') format('woff');font-weight:700;font-display:swap}
:root{--paper:#f8fafb;--card:#fff;--ink:#173847;--muted:#647581;--line:#dce4e9;--rose:#994764;--navy:#10394b;--head:#10394b;font-family:Wasam,Tahoma,Arial,sans-serif;color:var(--ink);background:var(--paper);color-scheme:light}
*{box-sizing:border-box}body{margin:0;min-height:100vh;min-height:100svh;display:flex;flex-direction:column;background:var(--paper)}[hidden]{display:none!important}button,input{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer;line-height:1.5;font-weight:700}button:disabled{cursor:default;opacity:.45}a{color:inherit}h1,h2,h3,p{margin:0}:focus-visible{outline:3px solid var(--rose);outline-offset:4px}main:focus:not(:focus-visible),h1:focus:not(:focus-visible){outline:none}.skip-link{position:fixed;top:-100px;right:16px;z-index:10;background:white;padding:12px}.skip-link:focus{top:12px}
.mast{background:#fff;border-bottom:1px solid var(--line)}.mast-inner,footer>div{width:min(100% - 64px,1200px);margin:auto;display:flex;align-items:center;justify-content:space-between;gap:24px}.mast-inner{min-height:104px}.identity{display:flex;align-items:center;gap:20px;text-decoration:none}.refraf-logo{width:114px;height:77px;object-fit:contain}.identity-caption{border-inline-start:1px solid var(--line);padding-inline-start:20px;font-size:17px;font-weight:700;line-height:1.8}.identity-caption>span{display:block;font-size:13px;color:var(--muted);font-weight:400}.mast-actions{display:flex;align-items:center;gap:26px}.powered{display:flex;align-items:center;gap:10px}.powered img{width:52px;height:52px;border-radius:12px;border:1px solid #e8e7eb}.powered>span{font-size:12px;color:var(--muted);line-height:1.4}.powered strong{display:block;font-size:22px;color:var(--navy)}main{width:min(100% - 64px,1120px);margin:auto;flex:1;padding:64px 0 72px}
.entry-grid{display:grid;grid-template-columns:1.1fr 1fr;gap:clamp(40px,8vw,110px);align-items:center;max-width:1030px;margin:auto}.entry-copy{width:100%;max-width:460px}.eyebrow,.sample-type{font-size:14px;font-weight:700;color:var(--rose);line-height:1.7}.eyebrow{display:flex;align-items:center;gap:10px;margin-bottom:13px}.eyebrow:before{content:'';width:22px;height:2px;background:var(--rose)}h1{font-size:clamp(36px,4.7vw,58px);line-height:1.55;letter-spacing:-.035em;color:var(--head)}.entry-copy h1>span{color:var(--rose)}.intro{font-size:17px;line-height:1.9;color:var(--muted);margin:14px 0 24px}.entry-copy form{width:100%}label{font-size:14px;font-weight:700}.entry-copy input{display:block;width:100%;height:55px;padding:10px 16px;margin:8px 0 15px;border:1px solid #bccbd2;border-radius:10px;background:#fff;color:var(--ink);font:17px system-ui,sans-serif}.entry-copy input::placeholder{color:#7a8992}.primary,.outline-btn,.icon-btn,.zoom{min-height:46px;border-radius:10px;font-size:14px}.primary{display:flex;justify-content:center;align-items:center;width:100%;min-height:54px;border:1px solid var(--navy);background:var(--navy);color:white;padding:12px 20px;font-size:16px;box-shadow:0 4px 10px #10394b15}.primary:hover{background:#1e4f62}.text-btn{background:none;border:0;font-size:14px;color:var(--navy);padding:10px 3px;min-height:44px;text-decoration:underline;text-underline-offset:5px}.text-btn:hover{color:var(--rose)}.entry-note{margin-top:18px;font-size:13px;color:var(--muted)}.login-actions{display:flex;justify-content:space-between;gap:12px;margin-top:16px}.mail-notice{display:flex;align-items:center;gap:14px;background:#edf3f6;border:1px solid var(--line);padding:16px;border-radius:12px}.mail-symbol{font:28px system-ui;color:var(--rose)}.mail-notice strong{font-size:17px}#sent-to{font:14px/1.8 system-ui,sans-serif;color:var(--muted);overflow-wrap:anywhere}.mail-help{font-size:15px;line-height:1.8;margin:16px 0}.code-option{border-top:1px solid var(--line);padding-top:10px}.code-option summary{font-size:14px;cursor:pointer;color:var(--muted);padding:8px 0}.code-option label{display:block;margin-top:10px}
.sample-card{position:relative;border:1px solid #d9dfe4;border-radius:22px;background:white;overflow:hidden;box-shadow:0 20px 55px #1738470a}.sample-badge{position:absolute;z-index:2;top:18px;right:18px;background:#ffffffed;color:var(--navy);border:1px solid #fff;padding:6px 13px;border-radius:30px;font-size:13px}.shelf{height:350px;display:grid;place-items:center;overflow:hidden;background:radial-gradient(ellipse at 20% 10%,#ecdae3 0,transparent 60%),linear-gradient(145deg,#e8edf1,#cedfe5);position:relative}.shelf:before,.shelf:after{content:'';position:absolute;border:1px solid #fff9;border-radius:50%;width:440px;height:440px;left:-220px;bottom:-200px}.shelf:after{width:500px;height:500px;left:-250px;bottom:-230px}.paper-stack{position:relative;height:72%;aspect-ratio:480/628;transform:rotate(-7deg);filter:drop-shadow(10px 15px 12px #18344828);margin-top:22px}.paper-stack:before,.paper-stack:after{position:absolute;content:'';inset:0;background:#f8f6f2;transform:translate(9px,7px) rotate(5deg);border:1px solid #d0d4d3}.paper-stack:after{background:#fff;transform:translate(4px,3px) rotate(2deg)}.paper-stack img{width:100%;height:100%;object-fit:contain;position:relative;z-index:1;display:block}.sample-info{padding:22px 24px;display:flex;align-items:center;justify-content:space-between;gap:10px}.sample-info h2{font-size:20px;line-height:1.8}.small{font-size:14px;color:var(--muted);line-height:1.8}.outline-btn,.icon-btn,.zoom{background:white;border:1px solid #c8d4dc;color:var(--navy);padding:9px 15px}.outline-btn{white-space:nowrap}.outline-btn:hover,.icon-btn:not(:disabled):hover,.zoom:not(:disabled):hover{background:#edf3f6;border-color:#8ea8b5}
footer{border-top:1px solid var(--line);background:#fff;padding:22px 0;color:var(--muted);font-size:14px;line-height:1.7}.footer-credit{display:block;font-size:12px;margin-top:2px}footer a{text-underline-offset:5px;color:var(--navy)}#status{margin:20px auto 0;max-width:1030px;font-size:15px;line-height:1.8;padding:13px 17px;border-inline-start:3px solid #42798c;background:#edf3f6;border-radius:5px}#status.error{background:#fbecf0;color:#7c3049;border-color:var(--rose)}.library{max-width:1030px;margin:auto}.section-top{display:flex;align-items:center;justify-content:space-between;gap:20px}.section-top h1{font-size:36px;line-height:1.7}.library-intro{font-size:16px;color:var(--muted);margin-top:7px}.files{margin-top:32px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;align-items:start}.file{background:white;border:1px solid var(--line);border-radius:16px;overflow:hidden;display:flex;flex-direction:column;height:100%;box-shadow:0 6px 20px #10394b05}.file-cover{min-height:164px;padding:24px;display:flex;flex-direction:column;align-items:flex-start;gap:18px;position:relative;overflow:hidden;background:linear-gradient(145deg,#ecf2f5,#dce8ee);color:var(--navy)}.file:nth-child(even) .file-cover{background:linear-gradient(145deg,#faf1f4,#efdfe6);color:#7d3450}.file-cover:after{content:'';position:absolute;width:105px;height:130px;border:1px solid #ffffffb0;border-radius:7px;left:-22px;bottom:-35px;transform:rotate(-22deg);box-shadow:0 0 0 10px #ffffff20,0 0 0 20px #ffffff18}.file-cover>span:first-child{font:700 12px/1.4 system-ui,sans-serif;letter-spacing:2px;border:1px solid #ffffffa0;background:#ffffffa0;border-radius:5px;padding:5px 9px}.cover-title{font-size:20px;font-weight:700;line-height:1.6;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;position:relative;z-index:1;overflow-wrap:anywhere}.file-info{padding:20px 22px 16px;flex:1}.file h2{font-size:17px;line-height:1.8;overflow-wrap:anywhere}.file p{font-size:14px;color:var(--muted);line-height:1.8;margin-top:6px}.file>button{margin:0 22px 20px;background:var(--navy);color:white;border-color:var(--navy)}.file>button:hover{background:#1e4f62}.empty{grid-column:1/-1;font-size:16px;line-height:1.9;color:var(--muted);background:white;border:1px solid var(--line);border-radius:15px;padding:30px}#load-more{grid-column:1/-1;justify-self:center}
body.reading{background:#eef2f5}body.reading main{width:min(100% - 48px,1120px);padding-top:24px}.reading .mast-inner{min-height:82px}.reading .refraf-logo{width:90px;height:62px}.reader-top{display:flex;align-items:center;gap:24px;margin-bottom:16px}.reader-top h1{font-size:clamp(19px,2.5vw,26px);line-height:1.7;overflow-wrap:anywhere}.reader-top .text-btn{white-space:nowrap;font-size:14px;border:1px solid #c8d4dc;background:#fff;border-radius:9px;padding:8px 13px;text-decoration:none}.reader-controls{position:sticky;top:0;z-index:3;background:#ffffffed;backdrop-filter:blur(12px);display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border:1px solid #dce4e9;border-radius:12px;box-shadow:0 3px 8px #10394b04}.pager{display:flex;align-items:center;gap:12px}.icon-btn{min-width:65px;min-height:44px;padding:7px 10px}.page-label,.page-total{font-size:14px}.page-number{width:50px;height:42px;border:1px solid #c8d4dc;background:#f8fafb;border-radius:8px;text-align:center;color:var(--ink);font:17px system-ui,sans-serif}.zoom{min-height:44px;font-size:14px}.reading-track{height:3px;margin-top:9px;background:#dde5ea;border-radius:4px;overflow:hidden;direction:rtl}.reading-track span{height:100%;display:block;background:var(--rose);width:0}.sheet-wrap{overflow:auto;direction:ltr;max-width:100%;border:1px solid #dbe3e9;background:#e5ebf0;border-radius:10px;padding:24px 18px;margin:auto}.sheet{position:relative;margin:auto;background:white;box-shadow:0 8px 30px #17384710}.sheet canvas{display:block;width:100%;height:100%}#reader-progress{min-height:26px;text-align:center;font-size:14px;color:var(--muted)}
@media(min-width:1500px){main{padding-top:80px}.entry-grid{min-height:520px}}
@media(max-width:900px){.entry-grid{gap:38px}.shelf{height:310px}.sample-info{flex-wrap:wrap;gap:14px}.files{grid-template-columns:repeat(2,minmax(0,1fr))}.identity-caption>span{display:none}.identity-caption{font-size:15px}}
@media(max-width:700px){.mast-inner,footer>div{width:calc(100% - 36px);gap:12px}.mast-inner{min-height:84px}.refraf-logo{width:91px;height:62px}.identity{gap:10px}.identity-caption{border:0;padding:0;font-size:14px;max-width:64px;line-height:1.5}.mast-actions{gap:10px}.powered{gap:7px}.powered img{width:40px;height:40px;border-radius:9px}.powered>span{font-size:11px}.powered strong{font-size:18px}.mast-actions .text-btn{font-size:13px}.mast-actions:has(#signout:not([hidden])) .powered>span{display:none}main{width:min(100% - 40px,480px);padding:34px 0 40px}.entry-grid{display:flex;flex-direction:column;align-items:stretch;gap:32px}.entry-copy{max-width:none}.entry-copy h1{font-size:39px;line-height:1.5}.intro{font-size:16px;margin:12px 0 22px}.eyebrow{margin-bottom:9px}.sample-card{border-radius:16px;display:flex;min-height:150px}.sample-badge{display:none}.shelf{flex:0 0 34%;height:auto;min-height:166px}.paper-stack{height:auto;width:71%;margin-top:0}.sample-info{flex:1;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:16px;gap:7px}.sample-info h2{font-size:18px}.sample-info .outline-btn{min-height:40px;padding:6px 12px;font-size:13px}.small,.sample-type{font-size:13px}.footer-credit{font-size:11px}footer{font-size:12px;padding:18px 0}.section-top{gap:12px}.section-top h1{font-size:27px}.library-intro{font-size:15px}.files{grid-template-columns:1fr;margin-top:24px;gap:18px}.file-cover{min-height:150px}.file-info{padding:17px 20px 14px}.file>button{margin:0 20px 18px}.reading .mast-inner{min-height:76px}.reading .refraf-logo{width:82px;height:57px}.reading .identity-caption{font-size:13px}.reading .powered img{width:34px;height:34px}body.reading main{width:calc(100% - 20px);padding-top:18px}.reader-top{align-items:flex-start;flex-direction:column;gap:10px;padding-inline:6px;margin-bottom:14px}.reader-top h1{font-size:21px}.reader-top .text-btn{border:0;background:none;padding:2px 0;min-height:32px;text-decoration:underline}.reader-controls{padding:9px 8px;gap:8px;border-radius:10px}.pager{gap:7px}.page-label{display:none}.icon-btn{font-size:13px;min-width:54px;padding:7px 8px}.page-number{width:40px}.page-total{font-size:13px}.zoom{padding:7px 9px;font-size:12px}.sheet-wrap{padding:8px 3px;border-radius:6px}.reading-track{margin-top:7px}.empty{padding:22px}.entry-note{font-size:12px}}
@media(max-width:360px){.identity-caption{display:none}.powered img{width:35px;height:35px}.pager{gap:4px}.icon-btn{min-width:46px;padding:6px}.zoom{padding:6px}.reader-controls{gap:5px}.page-number{width:34px}.sample-info{padding:12px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

/* Product identity: Wasm is the reader; Refraf is its maker and this library's merchant. */
.wasm-identity{gap:14px}.wasm-app-logo{width:68px;height:68px;object-fit:contain;border-radius:15px;border:1px solid #e3e5e8}.wasm-wordmark{font-size:34px;line-height:1.3;font-weight:700;color:var(--navy)}.wasm-wordmark>span{display:block;font-size:13px;font-weight:400;color:var(--muted);margin-top:3px;letter-spacing:0}.maker{display:flex;align-items:center;gap:10px;text-decoration:none}.maker>span{font-size:12px;color:var(--muted)}.maker img{width:87px;height:59px;object-fit:contain}.reader-usage{text-align:center;font-size:13px;line-height:1.8;color:var(--muted);margin-top:20px}.sheet-wrap,.sheet canvas{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}.print-notice{display:none}.reading .wasm-app-logo{width:55px;height:55px}.reading .wasm-wordmark{font-size:29px}
@media(max-width:700px){.wasm-identity{gap:9px}.wasm-app-logo{width:53px;height:53px;border-radius:11px}.wasm-wordmark{font-size:28px}.wasm-wordmark>span{font-size:11px}.maker{gap:6px}.maker img{width:65px;height:46px}.maker>span{font-size:11px}.mast-actions:has(#signout:not([hidden])) .maker{display:none}.reading .wasm-app-logo{width:47px;height:47px}.reading .wasm-wordmark{font-size:26px}.reader-usage{font-size:12px;padding-inline:12px}}
@media(max-width:360px){.maker{flex-direction:column;gap:0}.maker img{height:36px;width:55px}.wasm-wordmark>span{font-size:10px}}
@media print{body.reading .mast,body.reading footer,body.reading #status,body.reading .reader-top,body.reading .reader-controls,body.reading .reading-track,body.reading #reader-progress,body.reading .sheet-wrap,body.reading .reader-usage{display:none!important}body.reading .print-notice{display:block!important;color:#000;font-size:18px;line-height:1.8}body.reading,body.reading main{background:white!important}}

/* One column keeps entry and reading focused on the next action. */
body { background: #faf9f7; }
.mast-inner { min-height: 74px; max-width: 1040px; }
.wasm-app-logo { width: 48px; height: 48px; }
.wasm-wordmark { font-size: 26px; }
.maker img { width: 64px; height: 46px; }
.entry-grid { display: block; max-width: 420px; min-height: 0; margin: clamp(16px,6vh,64px) auto; }
.entry-copy h1, .section-top h1 { font-size: clamp(29px,4vw,38px); line-height: 1.6; }
.entry-copy .intro { margin: 7px 0 26px; font-size: 16px; }
.sample-link { display: block; margin: 19px auto 0; }
.library { max-width: 760px; }
.files { display: grid; grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line); }
.file { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.file-info { padding: 18px 0; min-width: 0; }
.file > button { margin: 0; }
body.reading { background: #f5f5f3; }
.reader-controls { justify-content: center; gap: 16px; border-radius: 8px; box-shadow: none; }
.sheet-wrap { background: transparent; border: 0; padding-inline: 0; }
@media(max-width: 700px) { .entry-grid { margin: 18px auto; } .reader-controls { gap: 6px; } }

@font-face {
  font-family: 'Wasm Kufi';
  src: url('./assets/kufi-bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
.wasm-wordmark, .entry-copy h1, .section-top h1, .reader-top h1, .file h2 {
  font-family: 'Wasm Kufi', Wasam, sans-serif;
  letter-spacing: normal;
  line-height: 1.75;
}
.wasm-identity .wasm-app-logo { width: 78px; height: 78px; border: 0; border-radius: 14px; }
.mast-inner { padding-block: 10px; }
.wasm-wordmark > span { font-family: Wasam, sans-serif; }
.reading .wasm-identity .wasm-app-logo { width: 58px; height: 58px; }
@media (max-width: 700px) {
  .wasm-identity .wasm-app-logo { width: 62px; height: 62px; }
  .reading .wasm-identity .wasm-app-logo { width: 49px; height: 49px; }
}

/* The home artwork belongs to the entry screen only. */
body:has(#entry:not([hidden])) main { padding-block: 12px 28px; width: min(1120px, calc(100% - 32px)); }
body:has(#entry:not([hidden])) .wasm-app-logo { display: none; }
body:has(#entry:not([hidden])) .mast-inner { min-height: 54px; padding-block: 4px; }
body:has(#entry:not([hidden])) .wasm-wordmark { font-size: 18px; }
body:has(#entry:not([hidden])) .wasm-wordmark > span { display: inline; margin-inline-start: 8px; }
#entry { max-width: none; margin: 0; }
.home-toolbar { display: flex; gap: 20px; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.home-toolbar .entry-copy { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 12px 28px; flex: 1; max-width: none; }
.home-toolbar h1 { font-size: 21px; }
.home-toolbar #email-form { display: grid; grid-template-columns: auto minmax(100px,1fr) auto; align-items: center; gap: 10px; }
.home-toolbar #email, .home-toolbar .primary { height: 44px; min-height: 44px; margin: 0; }
.home-toolbar .intro { display: none; }
.home-toolbar .sample-link { margin: 0; white-space: nowrap; }
.home-brand { display: grid; place-items: center; padding-block: clamp(16px,4vh,42px); }
.home-brand img { display: block; width: min(100%, 61vh, 540px); height: auto; border-radius: 6%; }
@media (max-width: 700px) {
  .home-toolbar { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
  .home-toolbar .entry-copy { display: contents; }
  .home-toolbar h1 { grid-row: 1; grid-column: 1; font-size: 19px; }
  .home-toolbar .sample-link { grid-row: 1; grid-column: 2; }
  .home-toolbar form { grid-column: 1/-1; }
  .home-toolbar #email-form { grid-template-columns: minmax(0,1fr) auto; gap: 4px 8px; }
  .home-toolbar label { grid-column: 1/-1; }
  .home-toolbar .primary { padding-inline: 12px; font-size: 14px; }
  .home-brand img { width: min(100%, 440px); }
}

/* Entry, collection, and reading share one quiet masthead. */
.home-name, .mast .sample-link, .phone-preview { display: none; }
body:has(#entry:not([hidden])) .home-name,
body:has(#entry:not([hidden])) .mast .sample-link { display: block; }
body:has(#entry:not([hidden])) .wasm-identity { display: none; }
body:has(#entry:not([hidden])) main { display: grid; align-content: center; padding-block: 36px; }
#entry { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(32px,8vw,100px); width: min(100%,900px); margin: auto; }
#entry .home-brand { padding: 0; }
#entry .home-brand img { width: min(100%,326px); }
#entry .home-toolbar, #entry .entry-copy { display: block; width: 100%; border: 0; padding: 0; }
#entry h1 { font-size: clamp(24px,3vw,33px); }
#entry #email-form { display: block; }
#entry #email { margin: 6px 0 14px; height: 49px; }
#entry .primary { min-height: 49px; }
.methods { display: flex; gap: 4px; margin: 18px 0; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: #f1f2f1; }
.methods legend { position: absolute; clip-path: inset(100%); }
.methods label { flex: 1; padding: 9px 4px; text-align: center; border-radius: 8px; cursor: pointer; }
.methods input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.methods label:has(:checked) { background: white; color: var(--navy); box-shadow: 0 1px 3px #17384720; }
.methods label:focus-within { outline: 2px solid var(--rose); }
.entry-copy:has([value=phone]:checked) .phone-preview { display: block; }
#entry .entry-copy:has([value=phone]:checked) #email-form,
.entry-copy:has(#code-form:not([hidden])) .methods { display: none; }
.phone-preview p { color: var(--muted); font-size: 14px; }
footer .maker { text-decoration: none; }
@media(max-width:700px) {
  #entry { grid-template-columns: 1fr; gap: 22px; max-width: 420px; }
  #entry .home-brand img { width: min(48vw,200px); }
  body:has(#entry:not([hidden])) main { align-content: start; padding-block: 22px; }
}
@media print { footer { display: none; } }
