/* THE SAREE ATLAS — E15.3.2 Phase 3: editorial integration, navigation and visual polish.
   Loaded last on every public page (tools/e15_shell.py). Selective refinements only; no redesign. */

/* ---------- Glossary: on phones each entry reads as a stacked definition (term above its meaning) ----------
   The shared phone rule gave every scrollable table min-width:430px, so inside a 360 px column the
   plain-English meanings ran off the edge and were clipped. Desktop keeps the two-column table. */
@media (max-width:640px){
  .table-scroll:has(> .glossary-table){overflow:visible;border:0;border-radius:0;margin:14px 0 26px}
  .glossary-table{min-width:0!important;width:100%;display:block;border:1px solid var(--e-line);border-radius:var(--e-radius-lg);background:var(--e-card)}
  .glossary-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .glossary-table tbody,.glossary-table tr{display:block}
  .glossary-table tr{padding:13px 16px 14px;border-top:1px solid var(--e-line)}
  .glossary-table tbody tr:first-child{border-top:0}
  .glossary-table td{display:block;width:auto!important;padding:0!important;border:0!important;background:none!important}
  .glossary-table td:first-child{font:600 1.08rem/1.25 var(--e-display);color:var(--e-garnet);margin:0 0 3px}
  .glossary-table td+td{font:400 .95rem/1.6 var(--e-text);color:var(--e-ink-2)}
  .glossary-table tr:target{background:var(--e-ivory)}
}

/* ---------- Saree Care: a tapped Jump To topic settles just below the sticky strip (two offsets used to stack) ---------- */
.care-topic{scroll-margin-top:36px}

/* ---------- Collect menu: The Coveted Ten's own Patan Patola photograph (it showed the Regional Atlas back-view
   illustration), framed so the model's head stays in the 4:3 card ---------- */
.am-feature img[src*="coveted-01-patan-patola"]{object-position:50% 5%}

/* ---------- Three educational studies: Before the weave (Fabrics), Parsi Gara (Motifs), Handloom or powerloom
   (Verification). Same reading column, figures and caption voice as the E15.3 editorial illustrations. ---------- */
.e332-study{margin:18px 0 34px;max-width:780px}
.e332-study p{max-width:68ch}
.e332-lead{font:400 1.12rem/1.6 var(--e-display);color:var(--e-ink)}
.e332-feature{padding:24px 26px 20px;background:var(--e-card);border:1px solid var(--e-line);border-radius:var(--e-radius-lg)}
.e332-feature .eyebrow{color:var(--e-garnet)!important;margin-bottom:6px}
.e332-feature-title{margin:0 0 10px;font:600 1.5rem/1.25 var(--e-display);color:var(--e-ink)}
.e332-h{margin:30px 0 8px;font:600 1.2rem/1.3 var(--e-display);color:var(--e-ink)}
.e332-step{margin:0 0 6px;font:600 .74rem/1.3 var(--e-text);letter-spacing:.16em;text-transform:uppercase;color:var(--e-garnet)}
a.e332-gl{color:inherit;text-decoration:underline dotted;text-decoration-color:var(--e-garnet);text-underline-offset:3px}
a.e332-gl:hover,a.e332-gl:focus-visible{color:var(--e-garnet)}
/* the four questions — a numbered strip that replaces the dense route diagram */
.e332-study .e332-steps{list-style:none;counter-reset:e332;display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:18px 0 20px;padding:0}
.e332-study .e332-steps li{margin:0;counter-increment:e332;padding:14px 14px 13px;background:var(--e-card);border:1px solid var(--e-line);border-radius:var(--e-radius)}
.e332-steps li::before{content:counter(e332,decimal-leading-zero);display:block;font:600 .72rem var(--e-text);letter-spacing:.14em;color:var(--e-zari)}
.e332-steps b{display:block;margin:4px 0 4px;font:600 1.05rem/1.25 var(--e-display);color:var(--e-garnet)}
.e332-steps span{display:block;font-size:.88rem;line-height:1.5;color:var(--e-ink-2)}
/* figures */
.e332-figure{margin:22px 0 24px}
.e332-figure img{display:block;width:100%;height:auto;border-radius:6px;background:var(--e-sand,#efe7dc);cursor:zoom-in}
.e332-figure figcaption{margin-top:8px;font-size:.86rem;line-height:1.5;color:var(--e-ink-2)}
.e332-figure figcaption b{color:var(--e-ink);font-weight:650}
.e332-figure--diagram img{background:#fff;border:1px solid var(--e-line)}
.e332-pair{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:22px 0 24px}
.e332-pair .e332-figure{margin:0}
.e332-plate-row{display:grid;grid-template-columns:3fr 2fr;gap:20px;align-items:center;margin:22px 0}
.e332-plate-row .e332-figure{margin:0}
.e332-plate-text p{font-size:.96rem}
/* questions at the counter, the qualification and the deeper layer */
.e332-ask{margin:24px 0 14px;padding:16px 20px;background:#FFF8EA;border:1px solid #E8D3A6;border-radius:var(--e-radius-lg)}
.e332-ask .eyebrow{color:var(--e-garnet)!important;margin-bottom:6px}
.e332-ask ul{margin:0;padding-left:18px}.e332-ask li{margin:4px 0;line-height:1.55}
.e332-ask p:last-child{margin-bottom:0}
.e332-ask-close{margin:10px 0 0;font-style:italic;color:var(--e-ink-2)}
.e332-qualify{padding-left:14px;border-left:3px solid var(--e-zari);color:var(--e-ink-2)}
.e332-more{margin:18px 0 6px;border-top:1px solid var(--e-line);border-bottom:1px solid var(--e-line)}
.e332-more>summary{cursor:pointer;list-style:none;padding:14px 28px 14px 0;position:relative;font:600 1.02rem/1.35 var(--e-display);color:var(--e-garnet)}
.e332-more>summary::-webkit-details-marker{display:none}
.e332-more>summary::after{content:"+";position:absolute;right:4px;top:11px;font:400 1.3rem var(--e-text);color:var(--e-garnet)}
.e332-more[open]>summary::after{content:"–"}
.e332-more-body{padding:0 0 10px}
.e332-credit{margin:14px 0 0;font-size:.76rem;font-style:italic;color:var(--e-muted)}
p.e332-crosslink{margin:12px 0 0;font-size:.93rem}
p.e332-crosslink a{font-weight:600;color:var(--e-garnet)}
@media (max-width:760px){
  .e332-study .e332-steps{grid-template-columns:1fr 1fr;gap:8px}
  .e332-study .e332-steps li{padding:11px 11px 10px}
  .e332-steps span{font-size:.84rem}
  .e332-plate-row{grid-template-columns:1fr;gap:10px}
}
@media (max-width:600px){
  .e332-feature{padding:18px 16px 16px}
  .e332-feature-title{font-size:1.3rem}
  .e332-lead{font-size:1.05rem}
  .e332-pair{grid-template-columns:1fr;gap:18px}
}
.e332-frame{display:block;position:relative}
/* Twist and ply on phones: the diagram's own labels become unreadably small, so its three drawings (cropped strips)
   are shown with HTML labels instead; the full diagram stays on wider screens and in the lightbox. */
.e332-study .e332-yarnrows{display:none;list-style:none;margin:18px 0 22px;padding:0}
@media (max-width:600px){
  .e332-study .e332-yarnrows{display:block}
  .e332-study .e332-yarnrows li{margin:0 0 14px;padding:0 0 12px;border-bottom:1px solid var(--e-line)}
  .e332-yarnrows img{display:block;width:100%;height:auto;margin:0 0 8px;background:#F8F5EF;border-radius:4px}
  .e332-yarnrows b{display:block;font:600 1rem/1.3 var(--e-display);color:var(--e-garnet)}
  .e332-yarnrows span{display:block;font-size:.88rem;line-height:1.5;color:var(--e-ink-2)}
  .e332-silk .e332-figure--diagram{display:none}
}
/* the teaching plates carry labels along their lower edge: the enlarge badge sits top right instead, and on phones
   the plates use the card's full width */
.e332-figure--plate .lb-badge{top:10px;bottom:auto}
@media (max-width:600px){.e332-feature .e332-figure--plate .e332-frame{margin:0 -12px}.e332-feature .e332-figure--plate .e332-frame img{border-radius:3px}}
/* the two feature cards span the page column like the reference entries and illustrated modules around them;
   their prose keeps the reading measure */
.e332-study.e332-feature{max-width:none}
.e332-loom>.e332-figure--plate{max-width:880px}

/* ---------- Price strips: the indicative range reads first and its grade uses the strip's full width (it was held to
   27ch, a narrow column inside a full-width strip, wrapping to six lines on phones) ---------- */
.atlas-price-fact .atlas-price-grade{max-width:62ch}
.atlas-price-fact>strong{display:block;font-size:1.02rem;letter-spacing:.005em}

/* ---------- Hall of Fame: "How recognition works" and the worked example — spacing and legibility only (values,
   rules and calculations unchanged). Desktop: roomier rows, the points column given its own width. Phones: each
   recognition is a card with its points beside the name, and the explanation set off below. ---------- */
.hf-page .hf-table th,.hf-page .hf-table td{padding:15px 14px}
.hf-page .hf-table thead th{padding-top:10px;padding-bottom:10px}
.hf-page .hf-table tbody th{width:28%;line-height:1.3}
.hf-page .hf-table td:nth-child(2){width:7.5em;line-height:1.2;font-variant-numeric:lining-nums}
.hf-page .hf-table td:nth-child(3){line-height:1.6;color:var(--e-ink-2)}
.hf-page .hf-example td{padding-top:11px;padding-bottom:11px;line-height:1.5}
.hf-page .hf-example td:last-child{vertical-align:top}
.hf-page table.hf-example{border-collapse:separate;border-spacing:0;padding:6px 20px 8px}
.hf-page .hf-example tr:last-child td{border-bottom:0}
.hf-page .hf-small{line-height:1.6}
@media (max-width:640px){
  .hf-page table.hf-table.e-stack tr{display:grid;grid-template-columns:1fr auto;column-gap:14px;align-items:baseline;padding:14px 16px 15px;margin-bottom:12px}
  .hf-page table.hf-table.e-stack tbody th{width:auto!important;padding:0!important}
  .hf-page table.hf-table.e-stack td:nth-child(2){width:auto!important;padding:0!important;font:600 1.35rem/1.1 var(--e-display);font-variant-numeric:lining-nums;color:var(--e-garnet);text-align:right!important;white-space:nowrap}
  .hf-page table.hf-table.e-stack td:nth-child(2)::before{display:none}
  .hf-page table.hf-table.e-stack td:nth-child(3){grid-column:1/-1;margin-top:10px;padding:10px 0 0!important;border-top:1px solid var(--e-line)!important;font-size:.92rem;line-height:1.6}
  .hf-page table.hf-table.e-stack td:nth-child(3)::before{margin:0 0 4px}
  .hf-page .hf-example td{font-size:.9rem}
  .hf-page table.hf-example{padding:4px 14px 6px}
}

/* ---------- Page endings: the further-reading line and closing notes that sit directly in <main> after the article
   share one centred column (the reading CTA used to sit flush against the left edge, beside centred notes) ---------- */
main>.e-related-cta,main>.e82-pricing-note,main>aside[style*="max-width:970px"]{width:calc(100% - 32px);max-width:970px;margin-left:auto;margin-right:auto;box-sizing:border-box}
main>.e82-pricing-note{margin-top:24px;margin-bottom:24px}
main>.ct-pricenote--foot{margin-top:clamp(28px,4vw,44px)!important}

/* ---------- Regional Atlas, Patan Patola: the original double-ikat photograph with the approved Rajkot single-ikat
   portrait as a comparison — stacked in the entry's image column at every width (side by side left each only about
   165 px wide on a phone); each keeps its own proportion and opens in the lightbox. ---------- */
.e34-ikat-pair{display:grid;gap:14px}
.e34-ikat-pair .entry-figure{margin:0}
.e34-ikat-pair .entry-figure figcaption{display:block;padding:10px 14px 12px;font-size:.86rem;line-height:1.45;color:var(--e-ink-2,#4a3f39)}
.e34-ikat-pair .entry-figure figcaption b{display:block;font:600 1.02rem/1.25 var(--e-display);color:var(--e-garnet)}
.e34-ikat-pair .entry-figure figcaption span{display:block;margin-top:2px}
@media (max-width:600px){.e34-ikat-pair{gap:12px}.e34-ikat-pair .entry-figure figcaption{padding:9px 13px 11px}}

/* ---------- Price & Value band table (register #7): on wider screens the indicative range stays on one line and its
   column takes the width it needs (every range used to wrap in a 135 px column); phones keep their scrolling table ---------- */
@media (min-width:641px){
  .pv-bands td.pv-band,.pv-bands thead th:nth-child(2){white-space:nowrap}
  .pv-bands td.pv-band{padding-right:20px;font-variant-numeric:tabular-nums}
}

/* ---------- Floating document action on desktop (register #19): the phone's floating button, a little further from
   the corner, appearing only while the page's own Download button is out of view (assets/atlas-export.js) ---------- */
.atlas-pdf-fab--desk{right:28px;bottom:28px;min-height:44px;padding:0 20px 0 16px;font-size:.88rem}
.atlas-pdf-fab--desk:hover,.atlas-pdf-fab--desk:focus-visible{background:var(--e-garnet);outline:2px solid var(--e-zari-2);outline-offset:2px}
html.atlas-pdf-fab-on body:has(.atlas-pdf-fab--desk){padding-bottom:88px}

/* ---------- Floating document action: the Buyer's Field Guide's two-item choice (Pocket Guide / Seller Checklist)
   opens just above the button; same oxblood-and-gold vocabulary as the button itself ---------- */
.atlas-pdf-fab-menu{position:fixed;z-index:86;right:max(14px,env(safe-area-inset-right,0px));bottom:calc(74px + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:2px;min-width:230px;padding:6px;border:1px solid rgba(201,169,97,.7);border-radius:14px;background:var(--e-card);box-shadow:0 14px 34px -12px rgba(57,7,19,.45)}
.atlas-pdf-fab-menu[hidden]{display:none}
.atlas-pdf-fab-menu--desk{right:28px;bottom:84px}
.atlas-pdf-fab-menu button{display:block;width:100%;padding:12px 14px;border:0;border-radius:10px;background:none;color:var(--e-ink);font:600 .9rem/1.3 var(--e-text);text-align:left;cursor:pointer}
.atlas-pdf-fab-menu button:hover,.atlas-pdf-fab-menu button:focus-visible{background:var(--e-ivory);color:var(--e-garnet);outline:none}
html.lb-open .atlas-pdf-fab-menu,body.am-locked .atlas-pdf-fab-menu,body.pdf-sheet-open .atlas-pdf-fab-menu{display:none}

/* ---------- Saree Circle, Plan & invite: the Date field on iPhone Safari. WebKit draws date inputs with a native
   appearance and an intrinsic minimum width that ignores width:100%, so the field ran past the form's right edge
   while its neighbours fitted. Without the native box it sizes like them; tapping it still opens the native date
   picker and the value keeps the device's own date format. ---------- */
.field input[type=date]{display:block;width:100%;max-width:100%;min-width:0;height:48px;box-sizing:border-box;-webkit-appearance:none;appearance:none;line-height:1.3;color:inherit;font:inherit}
.field input[type=date]::-webkit-date-and-time-value{text-align:left;margin:0;min-height:1.3em}
.field input[type=date]::-webkit-datetime-edit{padding:0}
.field input[type=date]::-webkit-calendar-picker-indicator{margin-left:auto}

/* ---------- Motifs & Techniques, Parsi Gara (staging correction): a standard embroidery entry beside Chikankari,
   Kantha and Zardozi; in its "Parsi Gara · Closer look" accordion the full model photograph stands beside the notes on
   wider screens and above them on phones ---------- */
.e34-gara-cols{display:grid;grid-template-columns:minmax(220px,300px) minmax(0,1fr);gap:34px;align-items:start}
.e34-gara-cols .e34-gara-portrait{max-width:none;margin:4px 0 0}
.e34-gara-text>p:first-child{margin-top:0}
@media (max-width:760px){.e34-gara-cols{display:block}.e34-gara-cols .e34-gara-portrait{max-width:260px;margin:4px 0 20px}}
/* Posebook: a pose's Share sits beside "Add to my shot list" (assets/e15/e15-3-1.js) */
.e1532-pose-tools{margin:10px 0 0}.e1532-pose-tools .pb-shot{margin-top:0;align-self:stretch}
/* Saree Circle: the dedication before the chapter links — a quiet editorial note, no card */
.e1532-dedication{max-width:36rem;margin:56px auto 8px;padding:0 var(--e-gutter);text-align:center}.e1532-dedication::before{content:"";display:block;width:40px;height:1px;background:var(--e-garnet);margin:0 auto 18px;opacity:.55}.e1532-dedication p{margin:0;font:italic 500 1.16rem/1.6 var(--e-display);color:var(--e-ink-2)}.e1532-dedication strong{font-weight:600;color:var(--e-garnet)}
