/* Talqeen in a computer browser (html.web is set by web.js only outside the Android and iPhone apps; every rule here also needs a
   wide window). 1. The first screen for a signed out visitor: a calm column (headline, the app's own line and two buttons) beside
   the open mushaf, which fills the rest of the window. No card, no halo. */
.w-intro{display:none}
/* without the script (a reader such as Google's review): the description and the Privacy link as plain text above the app */
html:not(.web):not(.shell) .w-intro{display:block;max-width:40em;margin:0 auto;padding:24px 20px 0;font-family:var(--ui,sans-serif);color:var(--ink,#121216)}
html:not(.web):not(.shell) .w-h{font-size:28px;margin:0 0 8px}
html:not(.web):not(.shell) .w-about{margin:0 0 8px;line-height:1.5}
.w-raw-priv{margin:0}
html.web .w-raw-priv{display:none}    /* with the script, Privacy sits in the top line beside Sign in */
/* a phone or small window in a browser: the description sits under the top line, the page moves down by its height */
@media (max-width:1023px),(max-height:599px){
  html.web.guest-first:not(.gf-away) .w-intro:not([hidden]){pointer-events:none;display:block;position:fixed;z-index:41;left:var(--gf-l,0);width:var(--gf-w,100%);top:calc(var(--gf-t,0px) + max(10px,env(safe-area-inset-top)) + 50px);box-sizing:border-box;padding:2px 20px 0;background:var(--page,var(--bg))}
  html.web.guest-first:not(.gf-away) .w-intro .w-h,html.web.guest-first:not(.gf-away) .w-intro .w-acts{display:none}
  html.web.guest-first:not(.gf-away) .w-about{margin:0;font-size:13.5px;line-height:1.45;color:var(--muted);text-wrap:pretty}
  html.web.guest-first:not(.gf-away) .practice-screen{--stage-top:calc(max(10px,env(safe-area-inset-top)) + 58px + var(--w-about-h,0px))}
  html.web.guest-first:not(.gf-away) .gf-links{gap:2px}
  html.web.guest-first:not(.gf-away) .gf-link{font-size:14.5px;padding:0 5px}
}
a.gf-link.w-priv{display:inline-flex;align-items:center;text-decoration:none}
@media (min-width:1024px) and (min-height:600px){
  html.web.guest-first:not(.gf-away){--side:clamp(360px,29vw,560px);--gut:clamp(24px,2.6vw,56px);--pad:clamp(40px,4vw,72px)}
  html.web.guest-first:not(.gf-away) body{padding:0;overflow:hidden}
  html.web.guest-first:not(.gf-away) #app{position:fixed;top:0;bottom:0;left:var(--side);right:var(--gut);max-width:none!important;width:auto;min-height:0;margin:0!important;border:0;border-radius:0;box-shadow:none}
  html.web.guest-first:not(.gf-away)[dir=rtl] #app{left:var(--gut);right:var(--side)}
  html.web.guest-first:not(.gf-away) .screen.practice-screen{height:100dvh;--stage-top:clamp(64px,10vh,96px);--stage-bottom:clamp(28px,6vh,64px)}
  html.web.guest-first:not(.gf-away) .practice-screen .mushaf[data-side]:not(.aside){background-repeat:no-repeat;background-size:100% calc(100% - var(--stage-bottom))}
  html.web.guest-first:not(.gf-away) .practice-screen .mushaf[data-side=r]:not(.aside){background-image:linear-gradient(to right,color-mix(in srgb,var(--page-ink,#121216) 7%,transparent) 1px,color-mix(in srgb,var(--page-ink,#121216) 2.5%,transparent) 1px,transparent 14px)}
  html.web.guest-first:not(.gf-away) .practice-screen .mushaf[data-side=l]:not(.aside){background-image:linear-gradient(to left,color-mix(in srgb,var(--page-ink,#121216) 2.5%,transparent),transparent 14px)}

  /* the top line: wordmark at the column's corner, the Arabic switch and Sign in at the window's other corner */
  html.web.guest-first:not(.gf-away) .gf-top{left:0!important;width:100%!important;top:0!important;border-radius:0;background:transparent;pointer-events:none;
    padding:clamp(24px,4vh,40px) clamp(24px,3vw,48px) 0 var(--pad);align-items:center}
  html.web.guest-first:not(.gf-away) .gf-top[dir=rtl]{padding:clamp(24px,4vh,40px) var(--pad) 0 clamp(24px,3vw,48px)}
  html.web.guest-first:not(.gf-away) .gf-top>*{pointer-events:auto}
  html.web.guest-first:not(.gf-away) .gf-mark{font-size:30px}
  html.web.guest-first:not(.gf-away) .gf-links{gap:14px}
  html.web.guest-first:not(.gf-away) .gf-link{font-size:15px;color:var(--ink);opacity:.72}
  html.web.guest-first:not(.gf-away) .gf-link:hover{opacity:1}

  /* the column */
  html.web.guest-first:not(.gf-away) .w-intro:not([hidden]){pointer-events:none;display:flex;flex-direction:column;justify-content:center;position:fixed;z-index:30;top:0;bottom:0;left:0;width:var(--side);
    box-sizing:border-box;padding:0 clamp(24px,2.6vw,48px) 0 var(--pad)}
  html.web.guest-first:not(.gf-away)[dir=rtl] .w-intro{left:auto;right:0;padding:0 var(--pad) 0 clamp(24px,2.6vw,48px)}
  .w-h{margin:0;font-family:var(--display);font-weight:600;font-size:clamp(34px,3.3vw,56px);line-height:1.08;letter-spacing:-.025em;color:var(--ink);text-wrap:balance;max-width:11em}
  .w-intro[dir=rtl] .w-h{letter-spacing:0;line-height:1.35}
  .w-intro.wide .w-about{margin:22px 0 0;max-width:30em;font-size:clamp(16px,1.15vw,18.5px);line-height:1.55;color:var(--muted);text-wrap:pretty}
  .w-intro.wide .w-acts{height:56px;margin-top:34px;max-width:440px}

  /* the app's one line: the description says it on a computer */
  html.web.guest-first:not(.gf-away) .gf-bar{display:none}
  /* the app's two buttons, under the line: Memorise (gold) first and wider, Recite (black) beside it */
  html.web.guest-first:not(.gf-away) .practice-screen>.practice-bar{position:fixed;top:var(--w-acts-t);bottom:auto;left:var(--w-col-l);right:auto;width:var(--w-col-w);max-width:none;margin:0!important;padding:0;gap:12px;background:none;z-index:31}
  html.web.guest-first:not(.gf-away) .practice-bar>.mem-btn{order:1!important;flex:1.4 1 0;margin:0!important;height:56px;font-size:17px}
  html.web.guest-first:not(.gf-away) .practice-bar>.fab{order:2!important;flex:1 1 0;margin:0!important;height:56px;min-width:0}
  html.web.guest-first:not(.gf-away) .practice-bar>:is(.mem-btn,.fab):hover{filter:brightness(1.04)}
  /* while reciting or with a note, the bar keeps its own look in the column */
  html.web.guest-first:not(.gf-away) .practice-bar>.notice{position:static;order:0;flex-basis:100%}
}

/* 2. A lesson on a computer (the same column and page as the first screen). The column holds the back arrow, the surah's name, the time
   left and the guide's words; the open mushaf fills the rest; the lesson's own foot (step, Help, Again, Pause, Next) stays as it is,
   centred under the pages. No card, no halo. Room for translation and tafsir: the column. */
@media (min-width:1024px) and (min-height:600px){
  html.web:has(.lesson-screen){--side:clamp(320px,26vw,500px);--pad:clamp(36px,3.6vw,64px);--gut:clamp(20px,2vw,40px)}
  html.web:has(.lesson-screen) body{padding:0;overflow:hidden}
  html.web #app:has(.lesson-screen){position:fixed;top:0;bottom:0;left:var(--side);right:var(--gut);max-width:none!important;width:auto;min-height:0;margin:0;border:0;border-radius:0;box-shadow:none;overflow:visible}
  html.web[dir=rtl] #app:has(.lesson-screen){left:var(--gut);right:var(--side)}
  html.web .screen.lesson-screen{height:100dvh;overflow:visible;--stage-top:clamp(28px,5vh,56px)}
  html.web .lesson-screen .mushaf[data-side=r]:not(.aside){background-image:linear-gradient(to right,color-mix(in srgb,var(--page-ink,#121216) 7%,transparent) 1px,color-mix(in srgb,var(--page-ink,#121216) 2.5%,transparent) 1px,transparent 14px)}
  html.web .lesson-screen .mushaf[data-side=l]:not(.aside){background-image:linear-gradient(to left,color-mix(in srgb,var(--page-ink,#121216) 2.5%,transparent),transparent 14px)}

  html.web .lesson-screen .mushaf[data-side]:not(.aside){background-repeat:no-repeat;background-size:100% calc(100% - var(--stage-bottom))}
  /* the column: the header moves into it */
  html.web .lesson-screen>.lesson-top{position:fixed;top:0;bottom:0;left:0;right:auto;width:var(--side);box-sizing:border-box;
    display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:0;padding:0 clamp(20px,2.4vw,44px) 0 var(--pad);background:transparent;min-height:0}
  html.web[dir=rtl] .lesson-screen>.lesson-top{left:auto;right:0;padding:0 var(--pad) 0 clamp(20px,2.4vw,44px);align-items:flex-start}
  html.web .lesson-screen>.lesson-top>[data-action=leave]{position:absolute;top:clamp(20px,3.6vh,36px);inset-inline-start:calc(var(--pad) - 10px);width:44px;height:44px}
  html.web .lesson-screen>.lesson-top .page-card{position:static;display:block;width:100%;height:auto;min-height:0;padding:0;margin:0;text-align:start}
  html.web .lesson-screen>.lesson-top .page-card{flex:none}
  html.web .lesson-screen>.lesson-top .page-card .card-face{visibility:visible!important;position:static;inset:auto;display:block;padding:0;height:auto}
  html.web .lesson-screen>.lesson-top .card-text,html.web .lesson-screen>.lesson-top .card-line{display:flex;flex-direction:column;align-items:flex-start;height:auto;padding:0;gap:0}
  html.web .lesson-screen>.lesson-top #track-progress{position:static;display:block;height:3px;border-radius:2px}
  html.web .lesson-screen>.lesson-top .mean-link{position:static;margin-top:22px;inset:auto}
  html.web .lesson-screen #lesson-name{display:block;font-size:clamp(34px,3vw,52px)!important;line-height:1.05;letter-spacing:-.025em;margin:0}
  html.web .lesson-screen #lesson-time{display:block;margin-top:14px;font-size:16px}
  html.web .lesson-screen #track-progress{max-width:220px;margin-top:14px}
  html.web .lesson-screen .lesson-top .top-cap{position:static!important;inset:auto;display:block;margin:28px 0 0;padding:0!important;background:none!important;border:0;border-radius:0;
    text-align:start;font-size:clamp(18px,1.4vw,22px);line-height:1.45;color:var(--ink);max-width:22em;white-space:normal}
  html.web .lesson-screen .lesson-top .top-cap[hidden]{display:none}
  /* the guide's words show in the column, so the strip under the page keeps the step, Help and Skip intro */
  html.web .lesson-controls:has(.control-row.deck)>.caption{display:none}
  html.web .lesson-controls:has(.control-row.deck):has(>.caption:not([hidden])) .step-pill{visibility:visible}
  /* the foot: as it is, centred under the pages */
  html.web .lesson-screen>.lesson-controls{max-width:640px;margin-inline:auto}
}

/* 3. Signed in, on a computer (html.w-nav, set by web.js outside a lesson): the app's four places in a side column, the screen beside it.
   Home: the open mushaf fills the rest, its header and foot as they are; the menu button goes (the column is the menu). Surahs, a surah's
   lessons, Review, Settings and a lesson's end: one readable column of content, no card, no tab bar (the side column replaces it). */
.w-side{display:none}
@media (min-width:1024px) and (min-height:600px){
  html.web.w-nav{--side:clamp(240px,19vw,320px);--pad:clamp(32px,3vw,56px);--gut:clamp(20px,2vw,40px)}
  html.web.w-nav body{padding:0}
  html.web.w-nav .w-side:not([hidden]){display:flex;flex-direction:column;position:fixed;z-index:30;top:0;bottom:0;left:0;width:var(--side);box-sizing:border-box;padding:clamp(24px,4vh,40px) 20px 32px var(--pad);border-inline-end:1px solid var(--line)}
  html.web.w-nav[dir=rtl] .w-side{left:auto;right:0;padding:clamp(24px,4vh,40px) var(--pad) 32px 20px}
  .w-side .w-mark{display:block;direction:ltr;font-family:var(--display);font-size:30px;font-weight:700;letter-spacing:-1px;color:var(--ink);margin-bottom:clamp(40px,8vh,72px)}
  .w-side[dir=rtl] .w-mark{text-align:right}
  .w-side .w-mark i{font-style:normal;color:var(--gold)}
  .w-side ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}
  .w-side button{position:relative;display:flex;align-items:center;width:100%;min-height:48px;padding:0 14px;margin-inline-start:-14px;border:0;border-radius:12px;background:none;
    font:500 17px/1.2 var(--ui);color:var(--muted);text-align:start;cursor:pointer}
  .w-side button:hover{color:var(--ink);background:var(--card)}
  .w-side button.on{color:var(--ink);font-weight:650}
  .w-side button.on::before{content:'';position:absolute;inset-inline-start:0;top:14px;bottom:14px;width:3px;border-radius:2px;background:var(--gold)}
  .w-side button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

  /* home: the mushaf beside the column */
  html.web.w-nav #app:has(.practice-screen){position:fixed;top:0;bottom:0;left:var(--side);right:var(--gut);max-width:none!important;width:auto;min-height:0;margin:0;border:0;border-radius:0;box-shadow:none}
  html.web.w-nav[dir=rtl] #app:has(.practice-screen){left:var(--gut);right:var(--side)}
  html.web.w-nav .screen.practice-screen{height:100dvh}
  html.web.w-nav .practice-screen>.lesson-top{padding-inline:clamp(16px,2vw,32px) 0;background:transparent}
  html.web.w-nav .practice-screen>.lesson-top>[data-action=menu]{display:none}
  html.web.w-nav .practice-screen #practice-name{font-size:22px}
  html.web.w-nav .practice-screen .mushaf[data-side]:not(.aside){background-repeat:no-repeat;background-size:100% calc(100% - var(--stage-bottom))}
  html.web.w-nav .practice-screen .mushaf[data-side=r]:not(.aside){background-image:linear-gradient(to right,color-mix(in srgb,var(--page-ink,#121216) 7%,transparent) 1px,color-mix(in srgb,var(--page-ink,#121216) 2.5%,transparent) 1px,transparent 14px)}
  html.web.w-nav .practice-screen .mushaf[data-side=l]:not(.aside){background-image:linear-gradient(to left,color-mix(in srgb,var(--page-ink,#121216) 2.5%,transparent),transparent 14px)}

  /* every other screen: a readable column beside the side column */
  html.web.w-nav #app:not(:has(.practice-screen)){max-width:760px;min-height:100dvh;margin:0 auto 0 calc(var(--side) + clamp(32px,5vw,96px));border:0;border-radius:0;box-shadow:none;overflow:visible}
  html.web.w-nav[dir=rtl] #app:not(:has(.practice-screen)){margin:0 calc(var(--side) + clamp(32px,5vw,96px)) 0 auto}
  html.web.w-nav #app:not(:has(.practice-screen)) .screen{min-height:100dvh}
  html.web.w-nav #app .tabs{display:none}
  html.web.w-nav #app .top:has(>.brand){display:none}    /* the wordmark and Settings are in the side column */
  html.web.w-nav #app .screen:has(>.top>.brand)>.view{padding-top:clamp(28px,5vh,56px)}
  html.web.w-nav #app .top{padding-top:clamp(24px,4vh,40px)}
  html.web.w-nav #app .view>h1.title,html.web.w-nav #app .top h1{font-size:clamp(30px,2.4vw,40px);letter-spacing:-.02em}
}
