/* ਸੰਥਿਆ ਪੋਥੀ — Santhiya Pothi

   FIVE COLOURWAYS, three light and two dark. ਸਲੇਟੀ — cool paper — is the one the app
   opens on (user ruling 2026-11-09). ਚਿੱਟਾ is still there, one tap away.

   THE RULE EVERY ONE OF THEM MUST OBEY: the book prints ਵਿਸ਼੍ਰਾਮ red and ਯਮਕੀ blue,
   and a ground that kills either colour is not available to us. That is why there is
   no maroon and no green: a red mark on a maroon ground cannot be seen. ਨੀਲਾ is the
   one knowing departure — on deep blue the book's blue cannot be used, so it takes a
   bright cyan and the body text is pulled warm, so the two marks separate by hue and
   warmth rather than by lightness. */

/* ───────────── THE TYPE SCALE.
   Six sizes. The app had thirteen — 21 19 18 17.5 17 16.9 16 15 12 11.5 10.5 10 9.4 —
   four of them within a pixel of each other because headings were built with
   calc(var(--fs) * .97) instead of owning a size. Nothing is below 11.5px, and only
   the ਟਿੱਪਣ marker is allowed there: Gurmukhi hangs its ਲਗਾਂ-ਮਾਤ੍ਰਾਂ above and below
   the ਸਿਰੀ ਰੇਖਾ, so a ਬਿੰਦੀ or ਅੱਧਕ stops being readable long before the letters do. */
:root{
  --t-title:26px;   /* a screen title, the app name */
  --t-cat:21px;     /* a category — the top level of the app */
  --t-row:18px;     /* a pothi, a bani, a settings label */
  --t-body:15px;    /* a ਟਿੱਪਣ note, an index line, help */
  --t-meta:13px;    /* counts, subtitles, toolbar labels */
  --t-micro:11.5px; /* the ਟਿੱਪਣ marker, and nothing else */
  --icon:20px;      /* every nav icon, one size, in a 44pt box */
  --fs:18px;        /* the paath. The reader's slider moves this one, 15–30 */
  --lh:2.1;
}

/* ───────────── THE COLOURWAYS — a time-of-day family (ruled 2026-11-09).
   ਅੰਮ੍ਰਿਤ ਵੇਲਾ and ਰਾਤ were chosen and the rest built around them, because the app
   already groups its banis by the hour they are read. Bare :root carries ਅੰਮ੍ਰਿਤ ਵੇਲਾ
   so the very first paint is right before any script has run.

   TWO RULES EVERY ONE OBEYS.
   ੧ · A ground that kills either mark colour is not available to us — the book prints
       ਵਿਸ਼੍ਰਾਮ red and ਯਮਕੀ blue, so there is no maroon and no green here.
   ੨ · THE GRADIENT NEVER GOES BEHIND THE PAATH. `--band` is for furniture only — a rule,
       a button, a band under a title. ਨਿਤਨੇਮ is 2,135 lines and ਪੰਜ ਗ੍ਰੰਥੀ is 5,488, and a
       gradient behind them would change the contrast ratio as you scrolled, so no figure
       could be stated for it at all. The paper of a pothi is one colour.
   tools/check_contrast.py holds both ends of this honest. */

/* ੨ ਦਿਨ — the sun up. The brightest, for a lit room. */
/* ੩ ਸ਼ਾਮ — sunset. Deeper paper, for the Rehras hour. */
/* ═══════════════ ਰੰਗ — four zoned colourways (D83, D84, D88)
   The five time-of-day colourways are gone. These four replace them, and each is ZONED:
   one colour family at three depths — a band at the top, the ground you read on, and
   the bar at the foot — with one accent. The bands separate by depth, not by hue, so
   nothing competes with the Gurmukhi.
   Order is the cycle the button walks: light, light, dark, dark. */

/* ੧ ਪੋਥੀ — the pothi itself. Aged cream, deeper at the top and the foot, the page you
   read lifted to near-white. The gold is taken right down because the app's usual
   #d9b45a cannot hold on paper — it measures 4.40, under the floor. */
:root, :root[data-theme="pothi"]{
  --top:#ece2cd; --paper:#f7f1e4; --card:#fffdf6; --sink:#ece2cd;
  --ink:#241d14; --mute:#5f5343; --gold:#7d5c1c; --deep:#7d5c1c; --on-deep:#fffdf6;
  --rule:rgba(125,92,28,.28);
  --red:#9a2410; --blue:#15457f;
  --band:linear-gradient(90deg,#7d5c1c,#c39b48);
}
/* ੨ ਸੰਗਮਰਮਰ — the white marble of the parikrama. Cool and plain, with a deep sarovar
   blue as the only accent: no gold survives on marble. The most legible in daylight. */
:root[data-theme="marble"]{
  --top:#e2e7ec; --paper:#f1f4f7; --card:#ffffff; --sink:#e2e7ec;
  --ink:#141c25; --mute:#54606d; --gold:#1c5a7a; --deep:#1c5a7a; --on-deep:#ffffff;
  --rule:rgba(28,90,122,.26);
  --red:#9c2415; --blue:#1b4d86;
  --band:linear-gradient(90deg,#1c5a7a,#4f8ca8);
}
/* ੩ ਕਾਲਾ ਸੋਨਾ — true black and gold. The deepest, kindest on an OLED battery, and the
   closest to the parikrama at night. */
:root[data-theme="kala"]{
  /* ਕੇਸਰੀ ਸੋਨਾ — the owner's pick from five golds (2026-11-11). #e8c977 read as a wash
     rather than metal. This is warmer, with a kesari cast: 9.28 on this paper and 236
     RGB points from the ink, so it never blurs into the Gurbani the way ਚੰਪਾ #efdfae
     would have (55 points from the ink, and the best paper contrast of the five —
     which is exactly why a contrast check alone cannot choose a colour). */
  --top:#050505; --paper:#0e0e0e; --card:#171613; --sink:#030303;
  --ink:#f3ead6; --mute:#9d9a8e; --gold:#e6a938; --deep:#e6a938; --on-deep:#050505;
  --rule:rgba(230,169,56,.24);
  --red:#ff8a72; --blue:#6fc6f2;
  --band:linear-gradient(90deg,#e6a938,#8a6a24);
}
/* ੪ ਲੋਹਾ — neutral iron, no hue at all. The quietest; it lets the Gurmukhi carry
   everything. */
:root[data-theme="loha"]{
  /* ਲੋਹਾ IS IRON, so its accent is iron. It carried #d9b45a — warm gold lifted straight
     from ਕਾਲਾ ਸੋਨਾ — while its greys were properly neutral, so the two dark colourways
     read as the same scheme. The gilt edge made it obvious by putting the largest piece
     of accent on the screen, but the accent was wrong before the edge existed.
     #c3ccd4 is 11.24 against this paper, and keeps the ਯਮਕੀ blue unambiguous. */
  --top:#0b0b0c; --paper:#141516; --card:#1c1d1f; --sink:#080809;
  --ink:#ededee; --mute:#9a9b9e; --gold:#c3ccd4; --deep:#c3ccd4; --on-deep:#0b0b0c;
  --rule:rgba(195,204,212,.22);
  --red:#ff8a72; --blue:#6fc6f2;
  --band:linear-gradient(90deg,#c3ccd4,#6d757d);
}

:root[data-cue="on"] .wv{text-decoration:underline;text-decoration-thickness:1.5px;
  text-underline-offset:3px}
:root[data-cue="on"] .wy{text-decoration:underline dotted;text-decoration-thickness:1.5px;
  text-underline-offset:3px}

*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{height:100%}
/* ───────────────────────────────── the website's typography (D75)
   The app takes the charity website's faces so the two look like one thing.
   The Gurmukhi face was ALREADY the website's — ShaheediBungaGurmukhi.ttf IS Noto Serif
   Gurmukhi, and it is a variable font (wght 100–900). The only thing the app had wrong
   was the WEIGHT: the site sets Gurmukhi at 600, the app was using 400. So the furniture
   moves to 600 and not one byte of Gurmukhi is added.
   The two Latin faces are the site's own self-hosted woff2 — it pulled them off Google
   precisely so no third party sees a visitor's IP, and the app inherits that. */
@font-face{font-family:'Archivo';src:url('../fonts/archivo-latin.woff2') format('woff2');
  font-weight:100 900;font-display:swap}
@font-face{font-family:'JBMono';src:url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
  font-weight:100 800;font-display:swap}
:root{
  --gur:'SBG',serif;
  --sans:'Archivo','Helvetica Neue',Arial,sans-serif;
  --mono:'JBMono',ui-monospace,SFMono-Regular,Menlo,monospace;
}
/* the site's own rule, carried across: Gurmukhi is NEVER tracked — it breaks the
   ਸਿਰੀ ਰੇਖਾ. Written here as a floor so no later rule can reintroduce it. */
[lang="pa"], [lang="pa"] *{letter-spacing:0 !important}
.m{font-family:var(--mono)}
/* A browser resets font-weight on form controls, so `body{font-weight:600}` never
   reached a single button — the toolbar, the segments and every setting stayed at 400
   while the rest of the furniture moved. Found by measuring, not by looking. */
button,input,select,textarea{font-weight:inherit}

body{font-family:'SBG',serif;font-weight:600;background:var(--paper);color:var(--ink);
  -webkit-font-smoothing:antialiased;overflow:hidden}
@font-face{font-family:'SBG';src:url('../fonts/ShaheediBungaGurmukhi.ttf') format('truetype');
  font-display:block}
/* The Puratan face is declared but nothing uses it, so no device ever downloads it.
   It stays declared on purpose: the ਲੜੀਵਾਰ page in the book is set in it, and when
   larivaar gets its own face here this is the line that turns it on. */
@font-face{font-family:'SBP';src:url('../fonts/ShaheediBungaPuratan.ttf') format('truetype');
  font-display:block}

/* ───────────── furniture */
.nav{display:flex;align-items:center;gap:10px;padding:0 16px 9px;flex:none;
  border-bottom:.7px solid var(--rule)}
.nav .bk{color:var(--gold);font-size:var(--icon);padding:2px 4px;cursor:pointer}
.nav h1{flex:1;font-size:var(--t-title);font-weight:400;line-height:1.2}
.nav .r{font-size:var(--t-meta);color:var(--mute)}
/* These are real <button>s now (a span with role=button is not focusable in the same
   way and some readers skip it). A button carries the browser's own border, grey fill
   and Arial unless they are cleared — which is exactly how the reader's foot bar came
   to look broken. Clear them at the same time as making the swap, never after. */
.nav .ic, .navtop .ic{border:0;background:transparent;font:inherit}
.nav .ic{color:var(--gold);font-size:var(--icon);padding:3px 5px;cursor:pointer}

.screen{position:absolute;inset:0;display:none;flex-direction:column;background:var(--paper)}
.screen.on{display:flex}
.scroll{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch}

/* ───────────── library */
.ttl{text-align:center;font-size:var(--t-title);padding:2px 0 3px;line-height:1.2}
.lib{padding:4px 16px 20px}
/* THE FOUR LEVELS MUST NOT LOOK ALIKE. A category row, a pothi row and a bani card
   measured 73 / 73 / 74 px with the same 17px title — three levels, one object. */
#lib #lib /* a pothi row and a bani card are never on screen together — the card's fill and
   border already tell them apart, so they may share a height */
#shelf 
/* ───────────── bani cards (no progress ring — user ruling 2026-11-09) */
.cards{padding:11px 16px 22px}
.card{display:flex;align-items:center;gap:12px;background:var(--card);
  border:.8px solid var(--rule);border-radius:13px;padding:15px;margin-bottom:9px;
  cursor:pointer}
.card .ct{flex:1;min-width:0}
.card .nm{font-size:var(--t-row)}
.card .mt{font-size:var(--t-meta);color:var(--mute);margin-top:4px}
.card .rs{font-size:var(--t-meta);color:var(--gold);margin-top:5px}
.card .go{color:var(--gold);font-size:var(--icon)}
.grp{font-size:var(--t-meta);letter-spacing:.09em;color:var(--gold);padding:16px 2px 6px}

/* ───────────── reader */
/* The foot padding clears the size pill, which is fixed 58px up and about 44px tall.
   At 64px the last tuk of a bani ended underneath it — on a 360x640 phone the closing
   ਪਉੜੀ was half covered by a control, which is the one line you least want hidden. */
/* ───────────── ਸੁਨਹਿਰੀ ਕਿਨਾਰਾ — the gilt edge (owner's pick 2026-11-11)

   The paath is set FLUSH LEFT against a gilt edge, not centred. The charity's own
   printed Nitnem Pothi sets its running paath the same way: `.flow` there carries no
   text-align at all, and only the display opening is centred. The app was the odd one.

   The edge is painted as a background gradient on the text block rather than as an
   element, so it runs the exact height of the paath with nothing to keep in sync and
   no extra node in a list that can reach 781 tuks.

   IT IS NOT GOLD. It is var(--gold), which is each colourway's OWN accent — bronze in
   ਪੋਥੀ, deep blue in ਸੰਗਮਰਮਰ, bright gold in ਕਾਲਾ ਸੋਨਾ, warm gold in ਲੋਹਾ. The edge
   changes with the scheme because it is made of the scheme.

   The 21px between the edge and the first ਸਿਰੀ ਰੇਖਾ is deliberate and measured: at the
   first attempt the paath crowded the edge, and more than a letter's width of air is
   what stops it looking jammed against the margin. */
.body{padding:4px 15px calc(114px + var(--pager-h, 0px) + env(safe-area-inset-bottom)) 38px;
  background-image:linear-gradient(90deg,
    color-mix(in srgb, var(--gold) 92%, transparent) 0,
    color-mix(in srgb, var(--gold) 58%, transparent) 6px,
    color-mix(in srgb, var(--gold) 20%, transparent) 12px,
    transparent 17px),
  linear-gradient(90deg, transparent 15.8px, var(--gold) 15.8px, var(--gold) 17px, transparent 17px);
  background-repeat:no-repeat;background-size:17px 100%, 17px 100%}

/* the paath itself: flush left, hard against nothing */
.t{text-align:left}
.n{text-align:left;margin-left:0;margin-right:0}
/* the display opening — mangal, ॥ ਜਪੁ ॥ — stays centred, as the printed pothi sets it.
   Pulled back over the gutter so it centres on the page, not on the text block. */
.hd1,.hd2{margin-left:-11px}

/* THE LINE YOU ARE ON. The edge brightens beside it and the row takes a breath of the
   same accent — never a block of colour over the Gurbani. --sink was the obvious wash
   and it is wrong: it is near-black in ਕਾਲਾ ਸੋਨਾ, so the mark vanished on exactly the
   two colourways that most need it. A tint of the accent reads on every ground. */
.t.here{background:color-mix(in srgb, var(--gold) 10%, transparent)}
.t.here::before{content:'';position:absolute;left:0;width:17px;top:0;bottom:0;
  background:linear-gradient(90deg,
    color-mix(in srgb, var(--gold) 100%, transparent),
    color-mix(in srgb, var(--gold) 38%, transparent))}
.t{position:relative}
/* the ::before is drawn in the gutter, so the row must reach into it */
.t.here{margin-left:-38px;padding-left:38px;margin-right:-15px;padding-right:15px}
/* THE PAATH IS NOT FURNITURE. 600 suits a label and smothers a page of Gurbani, so
   every long passage — the tuks, the larivaar, a bachan — stays at 400. */
.t{font-size:var(--fs);line-height:var(--lh);margin-top:7px;font-weight:400}
.hd1,.hd2{text-align:center;line-height:1.95;margin-top:11px}
.hd1{font-size:var(--fs)}
.hd2{font-size:var(--fs);color:var(--gold)}
.n{font-size:var(--t-body);line-height:1.65;color:var(--mute);margin:3px 0 8px}
.n b{color:var(--gold);font-weight:400}
.n k{color:var(--red)}
.wv{color:var(--red)}
.wy{color:var(--blue)}
.tw sup{font-size:var(--t-micro);color:var(--gold);margin-left:1px;vertical-align:super;
  line-height:0}
/* THE DANDA NEVER LEAVES ITS WORD. At large type a wrapped tuk stranded the ॥ alone
   on the next line; it is bound to the last word and wraps hang instead. */
.t,.hd1,.hd2{text-wrap:pretty}
.nb{white-space:nowrap}
/* a pause is a mark, not a control — nothing opens when it is touched */

/* ───────────── the reader's foot bar: ਲੜੀਵਾਰ · ਨਿਸ਼ਾਨ · ਟਿੱਪਣ
   RESTORED 2026-11-11. A dead-CSS sweep took `.tb` and `.tb button` with it and left
   only the `.on` rule, so the three controls fell back to the browser's own buttons —
   26px tall, grey, Arial, bunched in the bottom-left corner. They are the only way to
   turn ਨਿਸ਼ਾਨ or ਟਿੱਪਣ off, and they carry the ਲੜੀਵਾਰ switch, so they are not decoration.

   The sizes are the app's, not the mockup's: the mockups set 10.5px type and 7px
   padding at mockup scale, which is below the 44px tap floor every other control in
   this app meets. --t-meta is already documented as the toolbar label size. */
.tb{flex:none;display:flex;gap:5px;padding:7px 14px calc(9px + env(safe-area-inset-bottom));
  border-top:.8px solid var(--rule);background:var(--sink)}
.tb button{flex:1;min-height:44px;border:.8px solid var(--rule);background:transparent;
  color:var(--mute);border-radius:9px;font-family:'SBG',serif;font-size:var(--t-meta);
  white-space:nowrap;cursor:pointer}
.tb button.on{background:var(--deep);border-color:var(--deep);color:var(--on-deep)}

/* The three toggles are a group; ਗ਼ਲਤੀ is an action, so a hairline sets it apart and
   it never takes the filled `.on` look — it is not a state you can be in. */
.tb .tbsep{flex:none;width:1px;align-self:stretch;margin:5px 3px;background:var(--rule)}
.tb button.rep{flex:0 0 auto;padding:0 13px;color:var(--gold);border-color:transparent}

/* ───────── the pager: on to the next reading
   It sits ABOVE the toolbar, not in it. The toolbar is about how the paath is shown;
   this is about which paath. Two targets the width of a thumb, and the name of where
   each one goes, because "›" alone does not say ਅੰਗ ੨ or ਰਾਗੁ ਆਸਾ. */
.pager{flex:none;display:flex;gap:7px;padding:7px 14px;background:var(--sink);
  border-top:.8px solid var(--rule)}
.pager[hidden]{display:none}
.pg{flex:1;min-height:44px;display:flex;align-items:center;gap:7px;
  border:.8px solid var(--rule);border-radius:10px;background:transparent;
  color:var(--ink);font-family:'SBG',serif;font-size:var(--t-meta);
  padding:0 11px;cursor:pointer;overflow:hidden}
.pg.next{justify-content:flex-end}
.pg .pgc{color:var(--gold);font-size:var(--icon);line-height:1;flex:none}
.pg .pgn{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
/* nowhere to go: the control stays in place so the bar does not jump, and says so */
.pg:disabled{opacity:.38;cursor:default}

/* an ang answered in ਖੋਜ is a destination, not a quotation — it carries no bani line
   above it and sits in the accent, so it does not read as another search hit */
.fi.ang .ft{color:var(--deep);font-size:var(--t-row)}

/* ───────── ਗ਼ਲਤੀ ਦੱਸੋ */
.rep-b{padding:14px 16px calc(24px + env(safe-area-inset-bottom))}
.rep-b .rl{font-size:var(--t-meta);color:var(--mute);margin:16px 0 6px;display:block}
.rep-b .rl:first-child{margin-top:2px}
/* the line as the reader sees it, quoted against the colourway's own edge so it is
   plainly THE TEXT and not something the form is asking them to write */
.rep-b .rq{font-size:var(--t-row);line-height:1.95;color:var(--ink);padding:11px 14px;
  background:var(--sink);border-radius:11px;
  box-shadow:inset 3px 0 0 var(--gold)}
.rep-b .rw{font-size:var(--t-meta);color:var(--mute);margin-top:7px}
.rep-b textarea{width:100%;box-sizing:border-box;min-height:104px;padding:11px 13px;
  border:.9px solid var(--rule);border-radius:11px;background:var(--card);color:var(--ink);
  font-family:'SBG',serif;font-size:var(--t-row);letter-spacing:0;resize:vertical;
  -webkit-appearance:none;appearance:none}
.rep-b textarea:focus{outline:2.5px solid var(--gold);outline-offset:1px}
.rbtn{width:100%;min-height:48px;margin-top:11px;border-radius:11px;cursor:pointer;
  font-family:'SBG',serif;font-size:var(--t-row)}
.rbtn.ghost{border:.9px solid var(--rule);background:transparent;color:var(--ink)}
.rbtn.go{border:0;background:var(--deep);color:var(--on-deep)}
.rpic{margin-top:11px}
.rpic img{width:100%;max-height:230px;object-fit:contain;border-radius:11px;
  border:.9px solid var(--rule);display:block;background:var(--sink)}
.rdrop{margin-top:7px;min-height:44px;width:100%;border:0;background:transparent;
  color:var(--mute);font-family:'SBG',serif;font-size:var(--t-meta);cursor:pointer}
.rnote{margin-top:12px;font-size:var(--t-meta);color:var(--gold);min-height:20px}

/* --pager-h is set from pager(): 0 when there is nowhere to go, its height when the
   pager is up. Without it the size pill sat ON TOP of the "next" button. */
.az{position:fixed;right:12px;
  bottom:calc(58px + var(--pager-h, 0px) + env(safe-area-inset-bottom));
  display:flex;align-items:center;background:var(--card);border:.9px solid var(--rule);
  border-radius:11px;overflow:hidden;box-shadow:0 2px 10px rgba(0,0,0,.08)}
.az button{border:0;background:transparent;color:var(--ink);font-family:'SBG',serif;
  padding:8px 14px;cursor:pointer}
/* these two are deliberately small and large — the size difference IS the label */
.az .s{font-size:15px}.az .l{font-size:22px}
.az i{width:.9px;align-self:stretch;background:var(--rule)}

/* ───────────── the card that rises: a pause's evidence, or a word note */
.sheet{position:fixed;left:0;right:0;bottom:0;background:var(--card);
  border-top:1.4px solid var(--gold);border-radius:16px 16px 0 0;
  padding:12px 18px calc(18px + env(safe-area-inset-bottom));
  box-shadow:0 -10px 30px rgba(0,0,0,.18);transform:translateY(102%);
  transition:transform .22s ease;z-index:30}
.sheet.up{transform:none}
/* The grab bar CLOSES the sheet, so it is a control, not an ornament — and it measured
   34x4. The visible bar stays a bar; the target around it is grown with a pseudo-element
   so the sheet does not gain a chunk of empty padding at its top edge. */
.sheet .grab{position:relative;width:34px;height:3.5px;background:var(--rule);
  border-radius:3px;margin:0 auto 11px;border:0;padding:0;display:block;cursor:pointer}
.sheet .grab::after{content:'';position:absolute;left:50%;top:50%;
  width:88px;height:44px;transform:translate(-50%,-50%)}
.sheet h3{display:flex;justify-content:space-between;align-items:baseline;
  font-size:var(--t-row);font-weight:400}
.sheet h3 i{font-style:normal;font-size:var(--t-meta);color:var(--mute)}
.sheet p{font-size:var(--t-body);line-height:1.72;margin-top:9px}
.sheet .src{display:block;font-size:var(--t-meta);color:var(--mute);margin-top:11px;
  padding-top:9px;border-top:.6px solid var(--rule)}
.veil{position:fixed;inset:0;background:rgba(0,0,0,.26);opacity:0;pointer-events:none;
  transition:opacity .22s;z-index:29}
.veil.up{opacity:1;pointer-events:auto}

/* ───────────── settings */
.set{padding:8px 16px 26px}
.srow{display:flex;justify-content:space-between;align-items:center;padding:14px 2px;
  border-bottom:.6px solid var(--rule)}
.srow .sl{font-size:var(--t-row)}
.srow .sd{font-size:var(--t-meta);color:var(--mute);margin-top:4px}
.seg{display:flex;border:.9px solid var(--rule);border-radius:9px;overflow:hidden}
.seg button{border:0;background:transparent;color:var(--mute);font-family:'SBG',serif;
  font-size:var(--t-meta);padding:7px 13px;cursor:pointer}
.seg button.on{background:var(--deep);color:var(--on-deep)}
.note{font-size:var(--t-body);color:var(--mute);line-height:1.65;padding:16px 2px 0}

/* ───────────── ਲੜੀਵਾਰ — one unbroken thread, and NO colour on it, ever */
/* headings are larivaar too — .t.lari let the ੴ mangal run off the right edge */
.lari{overflow-wrap:anywhere;word-break:break-word;line-height:calc(var(--lh) * 1.05)}
.t.lari{text-align:justify;text-align-last:center}

/* ───────────── ਸੰਥਿਆ — the tuk broken where it is meant to be broken */
.t.sa{margin-top:13px}
.t.sa .sg{line-height:calc(var(--lh) * .82)}

/* ───────────── ਅਭਿਆਸ */
/* a pause you placed, before the answer */
/* placed and right: the gold stays */
/* there and you did not place it. A dotted rule in the mark's own colour, not a box —
   with nothing guessed the page would otherwise be a wall of outlines. */

/* The size pill goes away completely rather than sitting faintly on the paath;
   a scroll brings it back, which is exactly when a reader reaches for it.
   NO opacity transition: a transition on a page the browser has backgrounded never
   advances, so the pill would stay solid over the text. Snapping always works. */
.az.dim{opacity:0;pointer-events:none}

/* ───────────── the five colourways, shown as what they actually look like */
.srow.col{flex-direction:column;align-items:stretch;gap:13px}
.swatches{display:flex;gap:10px}
.sw{flex:1;border:0;background:transparent;padding:0;cursor:pointer;
  font-family:'SBG',serif;text-align:center}
.sw .chip{height:46px;border-radius:10px;border:1px solid var(--rule);
  display:flex;align-items:center;justify-content:center;gap:3px;font-size:var(--t-row)}
/* a slip of the colourway's own gilt edge down the side of its chip */
.sw .chip{position:relative;overflow:hidden}
.sw .chip i{position:absolute;left:0;top:0;bottom:0;width:5px}
.sw.on .chip{outline:2px solid var(--gold);outline-offset:2px}
.sw .nm{display:block;font-size:var(--t-meta);color:var(--mute);margin-top:6px}
.sw.on .nm{color:var(--ink)}
.sw .chip b{font-weight:400}

/* ───────────── touch targets.
   Measured on a 375 pt screen: the back arrow was 14×31, the gear 19×28, the toolbar
   buttons 66×32. Apple's HIG and Android both ask for 44. A ਨਿਤਨੇਮ you must aim at is
   a ਨਿਤਨੇਮ you stop opening. The visible shapes are unchanged — the targets grow. */
.nav .bk, .nav .ic{min-width:44px;min-height:44px;display:flex;align-items:center}
.nav .bk{justify-content:flex-start;margin-left:-4px}
.nav .ic{justify-content:flex-end;margin-right:-4px}
.az button{min-height:44px;min-width:44px}
.seg button{min-height:40px}

/* keyboard: every control says where it is. Nobody tabs through a pothi on a phone,
   but the website build is opened on laptops and read with a screen reader. */
button:focus-visible, [role="button"]:focus-visible{
  outline:2.5px solid var(--gold); outline-offset:2px; border-radius:6px}

/* a screen that is waiting, or that failed — never a blank one */
.wait{text-align:center;color:var(--mute);font-size:var(--t-body);padding:46px 20px;line-height:1.7}

/* ───────────── J1 shelves on the library */

/* ───────────── ਤਤਕਰਾ · the index inside a bani */
.ixh{font-size:var(--t-meta);letter-spacing:.07em;color:var(--gold);padding:18px 16px 6px}
.ir{display:flex;align-items:center;gap:10px;padding:12px 16px;
  border-bottom:.6px solid var(--rule);min-height:48px;cursor:pointer}
.ir .no{width:38px;color:var(--gold);font-size:var(--t-body);flex:none}
.ir .tx{flex:1;font-size:var(--t-body);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.ir .mk{font-size:var(--t-meta);color:var(--mute);flex:none}
/* WHERE YOU ARE, marked the same way the reader marks it.
   This was var(--sink), which is a ZONE colour, not a highlight: measured against the
   page it sits on it is 33 RGB points apart in ਕਾਲਾ ਸੋਨਾ, 38 in ਲੋਹਾ and 39 in
   ਸੰਗਮਰਮਰ — invisible on three colourways out of four. A tint of the accent reads on
   every ground, and the bar on the left is the gilt edge of the reader carried over,
   so the two screens say "here" in the same language. */
.ir.here{background:color-mix(in srgb, var(--gold) 18%, transparent);
  box-shadow:inset 3px 0 0 var(--gold)}

/* ───────── ਖੋਜ */
/* The magnifier is drawn, not typed: no dingbat magnifier renders in every font, and a
   missing glyph would show as a box in the first place a reader looks. */
.nav .ic .mag{width:21px;height:21px;display:block}
.fbar{flex:none;padding:10px 16px 12px;background:var(--top);
  border-bottom:.8px solid var(--rule)}
.fbar input{width:100%;box-sizing:border-box;min-height:46px;padding:10px 14px;
  border:.9px solid var(--rule);border-radius:11px;background:var(--card);
  color:var(--ink);font-family:'SBG',serif;font-size:var(--t-row);
  /* NEVER letter-space this: a reader types Gurmukhi into it and spacing the letters
     breaks the ਸਿਰੀ ਰੇਖਾ as surely as it does in the paath. */
  letter-spacing:0;-webkit-appearance:none;appearance:none}
.fbar input::placeholder{color:var(--mute);opacity:1}
.fbar input:focus{outline:2.5px solid var(--gold);outline-offset:1px}

/* A result WRAPS. The index may ellipsis its rows because the ank identifies them, but
   a search result has to show the words that matched or it proves nothing. */
.fi{padding:12px 16px;border-bottom:.6px solid var(--rule);cursor:pointer}
.fi .fb{font-size:var(--t-meta);color:var(--mute);margin-bottom:3px}
.fi .ft{font-size:var(--t-body);line-height:1.75;color:var(--ink)}
/* The match is marked by a WASH, not by bolding: a heavier weight on one word in a
   line of Gurmukhi pulls the ਸਿਰੀ ਰੇਖਾ out of true.
   The word keeps the INK colour. Tinting it --deep as well as washing it behind was
   two marks for one job, and on the cream of ਪੋਥੀ it measured 3.42 — below AA. The
   wash alone says "this is what you searched for", and at 26% it is 107–143 RGB points
   from the row on every colourway while the ink reads at 8.26 or better. */
.fi .hit{color:var(--ink);font-weight:inherit;
  background:color-mix(in srgb, var(--gold) 26%, transparent);
  border-radius:4px;padding:1px 2px}
.fi:active{background:color-mix(in srgb, var(--gold) 10%, transparent)}

/* ───────────── ਅਭਿਆਸ bar. Two rows: what you are practising, and what to do next. */
.pbar{position:fixed;left:0;right:0;bottom:calc(53px + env(safe-area-inset-bottom));
  background:var(--card);border-top:.9px solid var(--rule);z-index:20}
/* ───────────── ਲੜੀਵਾਰ in the pothi's own hand.
   The Puratan face is legacy-encoded, so only `.pur` lines — which carry the
   legacy bytes — may be set in it. A Unicode line in this font is Latin rubbish. */
.lari.pur{font-family:'SBP',serif;letter-spacing:0}

/* ───────────── E2 · a tablet is not a wide phone.
   At iPad width an uncapped column runs the full screen, which is far too long a
   line to read. The paath keeps a comfortable measure and centres. */
@media (min-width: 620px){
  /* on a tablet the text would otherwise run the full width of the screen */
  .body, .lib, .cards, .set, #ix, #shelf,
  .plist, .dlist, .bwrap{max-width:600px;margin-left:auto;margin-right:auto}
}

/* ───────────── D3 · honour the viewer's own settings */
@media (prefers-reduced-motion: reduce){
  .sheet{transition:none}
  *{animation-duration:.001ms !important;transition-duration:.001ms !important}
}

/* ───────────── H1 · a long bani is 36,000 px of document. The browser may skip
   laying out what is far off screen, as long as it is told roughly how tall a tuk
   is, so scrolling and offsetTop stay honest. */
.t, .n{content-visibility:auto;contain-intrinsic-size:auto 44px}

/* ───────────── the cover.
   The first screen every launch, so it does two jobs: say what this is to someone
   who has never opened it, and get a daily reader back to their paath in one tap. */
.cres[hidden]{display:none}
/* eight colourways now, so the swatches wrap instead of squeezing */
.swatches{flex-wrap:wrap}
.sw{flex:0 0 calc(25% - 8px)}

/* ───────────── bookmarks on the ਤਤਕਰਾ */
.star{border:0;background:transparent;color:var(--rule);font-size:var(--icon);flex:none;
  min-width:44px;min-height:44px;cursor:pointer;line-height:1}
.star.on{color:var(--gold)}
/* when the phone's own size is in charge, the app's slider steps back */
:root[data-osfs="on"] #sg-fs{opacity:.4;pointer-events:none}
/* a unit is a landmark, not a box — it must not change how the paath looks */
.unit{display:contents}

/* ───────────── the category screen is the root, so it has no back arrow —
   but it still needs somewhere to put ⚙, which every other screen keeps in its nav. */
.navtop{display:flex;align-items:center;padding:0 12px;flex:none}
.navtop .sp{flex:1}
.navtop .ic{color:var(--gold);font-size:var(--icon);min-width:44px;min-height:44px;
  display:flex;align-items:center;justify-content:flex-end;cursor:pointer}

/* a heading inside settings — seven ungrouped rows exactly filled the screen */
.sgrp{font-size:var(--t-meta);letter-spacing:.09em;color:var(--gold);padding:20px 2px 2px}
.sgrp:first-child{padding-top:6px}

/* ───────────── E · the 60% of the category screen that was empty.
   Where you stopped is the only thing a daily reader wants from this screen, and the
   data already exists — it turns a directory into a front door. */

/* ───────────────────────────────── ਅੱਜ ਦਾ ਬਚਨ
   The one thing on the library screen that is different every morning. It sits above
   the shelves, and it is the only card there with the --band gradient on it — furniture
   only, never behind the paath. */

/* the bachan itself — one bachan, its number, nothing else */
.bwrap{padding:4px 16px 30px}
.bcard{padding:2px 0}
.bday{font-size:var(--t-micro);color:var(--gold)}
.btt{font-size:var(--t-cat);font-weight:400;margin:9px 0 0;line-height:1.35}
.bno{font-size:var(--t-micro);color:var(--mute);margin-top:7px}
/* the reader's own size and line height, exactly as in the pothi — the setting that
   makes the paath readable makes this readable too */
.btx{font-size:var(--fs);line-height:var(--lh);margin-top:20px;white-space:pre-wrap;font-weight:400}
.btx + .btx{margin-top:14px}
.bsrc{font-size:var(--t-micro);color:var(--mute);margin-top:26px;
  padding-top:14px;border-top:.8px solid var(--rule)}
/* the three forms, under the bachan where the comparing happens */
.bseg{margin-top:20px}
.seg.wide button{flex:1;padding:8px 10px}
/* the count. Days done only, never the gap — so it is a quiet fact, not a score, and
   it sits with the day at the top of the library rather than following the reader. */
.bdays{font-size:var(--t-micro);color:var(--mute);margin:-14px 0 22px;padding-left:2px}
.bdays:empty{display:none}
/* the next day that matters. A quiet line, never a label of its own — the event's name
   already says whether it is a ਗੁਰਪੁਰਬ, a ਦਿਵਸ, a ਜੋਤੀ ਜੋਤਿ or a ਸ਼ਹੀਦੀ ਦਿਵਸ. */
.bgp{display:flex;align-items:baseline;gap:8px;font-size:var(--t-meta);
  color:var(--mute);margin:-14px 0 6px;padding-left:2px}
.bgp:empty{display:none}
.bgp .gpg{color:var(--gold);font-size:var(--t-micro);flex:none}
.bgp .gpn{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bgp .gpw{flex:none;font-size:var(--t-micro)}
.bgp.now .gpn, .bgp.now .gpw{color:var(--gold)}
.bgp + .bdays{margin-top:0}
/* the share button. The card is drawn on the phone and handed to the system sheet —
   nothing is uploaded, so this is the only button in the app that reaches outward and
   it only ever does so because the reader pressed it. */
.bshare{display:block;width:100%;margin-top:14px;min-height:48px;
  background:transparent;color:var(--gold);border:.9px solid var(--rule);
  border-radius:9px;font-family:'SBG',serif;font-size:var(--t-row);cursor:pointer}
.bshare:disabled{color:var(--mute);cursor:default}

/* ═══════════════ the three tabs — ਅੱਜ · ਪੋਥੀਆਂ · ਦਿਹਾੜੇ (D78) */
.tabs{flex:none;display:flex;height:64px;border-top:.8px solid var(--rule);
  background:var(--sink)}
.tabs .tab{flex:1;display:flex;align-items:center;justify-content:center;font-weight:600;
  font-size:var(--t-body);color:var(--mute);cursor:pointer;min-height:44px}
.tabs .tab.on{color:var(--deep)}

/* ═══════════════ ਪੋਥੀਆਂ — the flat shelf, rows on gold hairlines */
.plist{padding:12px 0 24px}
/* the pothi rows are .card now; only the name size differs */
.prow{margin:0 16px 10px;min-height:72px}
.prow .pn{font-size:25px;line-height:1.24}
.shead{display:flex;align-items:center;gap:10px;margin:22px 16px 2px}
.shead span{font-size:var(--t-micro);color:var(--mute);white-space:nowrap}
.shead i{flex:1;height:1px;background:var(--rule)}
.soonrow{display:flex;align-items:baseline;gap:9px;padding:14px 16px;cursor:pointer;
  border-top:.8px solid rgba(128,128,128,.14);min-height:48px}
.soonrow .sn{font-size:var(--t-row);color:var(--mute)}
.soonrow u{flex:1;border-bottom:1px dotted var(--rule);text-decoration:none;transform:translateY(-5px)}

/* ═══════════════ ਦਿਹਾੜੇ — today, then what is coming */
.dlist{padding:2px 0 24px}
.dtoday{margin:2px 16px 18px;border-radius:14px;overflow:hidden;border:.8px solid var(--rule)}
.dtoday .dtx{padding:13px 15px 15px;background:var(--card)}
.dtoday .dk{font-size:var(--t-micro);color:var(--deep)}
.dtoday .dn{font-size:19px;line-height:1.4;margin-top:5px}
.drow{display:flex;gap:13px;padding:14px 16px;border-top:.8px solid rgba(128,128,128,.14)}
.drow .dd{width:52px;flex:none;font-size:var(--t-micro);color:var(--deep);
  line-height:1.5;padding-top:3px}
.drow .dn2{font-size:var(--t-body);line-height:1.45}
.drow .dc{font-size:var(--t-micro);color:var(--mute);margin-top:3px}
.dcount{margin:20px 16px 0;padding:15px;border-radius:12px;border:1px dashed var(--rule);
  text-align:center}
.dcount .dbig{font-size:var(--t-cat);color:var(--deep)}
.drow .dg{color:var(--deep);font-size:var(--t-micro);margin-right:7px}

/* ═══════════════ ਅੱਜ — the day's bachan owns this screen (D78) */
.bhero{margin:4px 0 20px;padding:20px 18px 22px;border-radius:16px;cursor:pointer;
  background:var(--card);border:.8px solid var(--rule);position:relative;overflow:hidden}
.bhero::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--band)}
.bhero .bhd{font-size:var(--t-micro);color:var(--deep);padding-left:6px}
.bhero .bht{font-size:var(--t-cat);line-height:1.34;margin-top:9px;padding-left:6px}
.bhero .bhn{font-size:var(--t-micro);color:var(--mute);margin-top:7px;padding-left:6px}
.bhero .bhx{font-weight:400;font-size:var(--t-body);line-height:1.95;color:var(--mute);
  margin-top:15px;padding-left:6px}
.bhero .bhgo{display:inline-block;margin:18px 0 0 6px;font-size:var(--t-body);
  color:var(--on-deep);background:var(--deep);border-radius:999px;padding:10px 26px}

/* ═══════════════ ਦਰਸ਼ਨ — the entrance (Phase 7, D70–D72, D87)
   The scene is the website's own and hangs its own canvas here. These rules only have
   to frame it: the overlay, the veil that lifts as you walk in, the hint and the gold
   thread that stands in for a loading bar. */
#darshan{position:fixed;inset:0;z-index:9000;background:#07060C;touch-action:none;
  transition:opacity .62s;--open:0}
#darshan.gone{opacity:0;pointer-events:none}
#darshan canvas{position:absolute !important;inset:0 !important;width:100% !important;
  height:100% !important;display:block;z-index:0}
/* the scene's own furniture, which it fills but the app does not show */
#darshan .d-scrim,#darshan .d-rail,#darshan .d-cue,#darshan .ch{
  position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
#darshan .d-veil{position:absolute;inset:0;background:#07060C;pointer-events:none;z-index:1}
#darshan .d-hint{position:absolute;left:0;right:0;bottom:88px;text-align:center;
  pointer-events:none;z-index:2;transition:opacity .3s}
#darshan .d-hint span{display:block;font-size:var(--t-body);color:rgba(255,255,255,.78)}
#darshan .d-hint i{display:block;font-style:normal;margin-top:10px;font-size:17px;
  color:#E8C977;animation:d-up 1.9s ease-in-out infinite}
#darshan .d-hint.nudge i{animation-duration:1.05s}
@keyframes d-up{0%,100%{transform:translateY(0);opacity:.5}50%{transform:translateY(-7px);opacity:1}}
#darshan .d-thread{position:absolute;left:50%;transform:translateX(-50%);bottom:64px;
  width:2px;height:0;background:linear-gradient(180deg,transparent,#E8C977);
  pointer-events:none;z-index:2}
/* the frozen arrival frame, which becomes the ground of ਅੱਜ (D72) */
.screen.lit{background-size:cover;background-position:center}
.screen.lit .scroll{background:linear-gradient(180deg,rgba(5,7,11,.30) 0%,
  rgba(5,7,11,.70) 34%,var(--paper) 82%)}


/* the colour cycle — one tap walks ਪੋਥੀ -> ਸੰਗਮਰਮਰ -> ਕਾਲਾ ਸੋਨਾ -> ਲੋਹਾ (D88).
   Two light then two dark, so the other kind is never more than two taps away.
   The pips say which of the four without needing a word for it. */
/* IN the header row, not floating over it — absolutely positioned it sat straight on
   top of the screen's own title. */
.cyc{flex:none;display:flex;gap:6px;align-items:center;
  background:transparent;border:0;cursor:pointer;padding:11px 10px;
  min-height:44px;min-width:44px;margin-left:-4px}
.cyc i{width:9px;height:9px;border-radius:50%;background:var(--mute);opacity:.45;
  transition:opacity .2s,transform .2s,background .2s}
.cyc i.lt{background:transparent;border:1.5px solid var(--mute)}
.cyc i.on{background:var(--deep);border-color:var(--deep);opacity:1;transform:scale(1.3)}

/* the zoning the four colourways are built on: a band at the top, the ground you read
   on, and the bar at the foot. */
.screen{background:var(--paper)}
.navtop,.nav{background:var(--top)}
.ttl,.tabs{background:var(--sink)}


/* a day on ਦਿਹਾੜੇ and a pothi still being made are both really tappable now, so they
   look it — and each one opens something rather than swallowing the tap. */
.drow{cursor:pointer;align-items:center}
.drow .db{flex:1;min-width:0}
/* the shelf's own arrow is solid --gold at 6.03; two arrows in one app match */
.drow .dgo{color:var(--gold);font-size:var(--icon);flex:none}
/* NO opacity: a faded token is a different colour, and --mute at .7 measured
   2.53-2.84 against AA 4.5. --mute solid clears it in every colourway. */
/* a topic, and a book inside it: the shelf's own row, with its second line back —
   here it earns its place, because "ਕਥਾ ਪੋਥੀ ਸਾਹਿਬ" alone does not say what is in it */
.prow .ps{font-size:var(--t-meta);color:var(--mute);margin-top:3px}
/* ਬਚਨ ਸੈਨ's 289, as an index. .here marks the one for today. */
.ir.bch .no{width:46px}
.ir.bch .tx{white-space:normal}

.soonrow .sw{margin-left:auto;font-size:var(--t-micro);color:var(--mute);
  white-space:nowrap}


/* the tab you are on. The style existed; nothing ever set the class, so all three
   looked identical and the main navigation had no "you are here". */
.tabs .tab{flex:1;display:flex;align-items:center;justify-content:center;
  font-family:'SBG',serif;font-weight:600;font-size:var(--t-body);color:var(--mute);
  background:transparent;border:0;cursor:pointer;min-height:44px;padding-bottom:10px;
  position:relative}
.tabs .tab.on{color:var(--deep)}
.tabs .tab.on::before{content:'';position:absolute;top:0;left:28%;right:28%;height:2px;
  background:var(--deep);border-radius:0 0 2px 2px}

/* A ਟਿੱਪਣ word is MARKED, not clickable — the note is printed under its own tuk, so
   there is nothing for a tap to open. The dotted rule and the small number tie the
   word to its note; they are not an invitation to press it.
   nowrap: measured at 30px, 18 of Japji Sahib's markers broke onto the next line away
   from the word they belong to. The marker is part of the word, never a token of its
   own. */
.tw{border-bottom:1.4px dotted var(--gold);white-space:nowrap}

/* the settings segments were between 33 and 73px wide and 40 tall */
.seg button{min-width:44px;min-height:44px}

/* ───────── narrow phones: the control goes UNDER its label.
   On a 360px screen the label and the control shared one row, and the control lost:
   measured "Simple Punjabi" at 60px of text in 48px, "English" 57 in 48, and both
   "Modern" and "Puratan" cut off. A settings control whose own name is sliced in half
   is worse than one that takes a second line. Full width also gives every button a
   wider tap target, not just a readable one. */
@media (max-width: 400px){
  .srow{flex-direction:column;align-items:stretch;gap:11px}
  .srow .seg{width:100%}
  .srow .seg button{flex:1;padding-left:4px;padding-right:4px}
}
