/* ---------------------------------------------------------------------
   1. Reading progress rail (fixed, 3px, above the sticky header)
   --------------------------------------------------------------------- */
.read-progress{
  position:fixed;inset:0 0 auto;height:3px;z-index:var(--z-fab);
  pointer-events:none;background:transparent;
}
.read-progress__bar{
  display:block;height:100%;width:0;border-radius:0 2px 2px 0;
  background:var(--grad-ribbon-saffron);box-shadow:0 0 0 1px rgba(255,255,255,.35);
}

/* ---------------------------------------------------------------------
   2. Hero
   --------------------------------------------------------------------- */
.legal-hero .page-hero__inner,
.page-hero--legal .page-hero__inner{align-items:start}
.page-hero--legal .dots-field{opacity:.22}


@media (min-width:900px){
  .legal-hero.page-hero--split .page-hero__inner{grid-template-columns:minmax(0,1.12fr) minmax(0,.88fr)}
}
.legal-hero .lead{max-width:56ch}
.legal-hero__note{
  display:flex;gap:10px;align-items:flex-start;margin-top:var(--sp-6);
  padding:12px 16px;border-radius:var(--r-md);
  border:1px dashed var(--saffron-300);background:var(--surface);
  color:var(--ink-700);font-size:var(--fs-sm);line-height:1.55;max-width:60ch;
}
.legal-hero__note svg{width:18px;height:18px;color:var(--saffron-700);flex:none;margin-top:2px}
.legal-hero__note b{color:var(--saffron-800)}

/* Document facts card. Sits in the hero aside on the two long documents
   and, as --inline, under the lead on the three shorter ones, so all five
   legal pages publish the same facts in the same words. */
.legal-facts{padding:clamp(20px,2vw,26px)}
.legal-facts--inline{
  margin-top:var(--sp-6);max-width:min(100%,440px);
  padding:clamp(18px,1.8vw,22px);
}
.legal-facts__title{
  font-family:var(--font-head);font-weight:600;font-size:13px;letter-spacing:var(--ls-eyebrow);
  text-transform:uppercase;color:var(--text-muted);margin:0 0 var(--sp-4);
  display:flex;align-items:center;gap:8px;
}
.legal-facts__title svg{width:16px;height:16px;color:var(--saffron-700)}
.legal-facts__list{margin:0;display:grid;gap:0}
.legal-facts__list>div{
  display:flex;flex-wrap:wrap;gap:4px var(--sp-4);justify-content:space-between;align-items:baseline;
  padding:10px 0;border-top:1px solid var(--line-soft);
}
.legal-facts__list>div:first-child{border-top:0;padding-top:0}
.legal-facts__list dt{font-size:var(--fs-sm);color:var(--text-muted);margin:0}
.legal-facts__list dd{
  margin:0;font-size:var(--fs-sm);font-weight:600;color:var(--ink-800);text-align:right;
}
.legal-facts__list time{font-variant-numeric:tabular-nums}
/* --text-muted, not --text-subtle: 12px needs 4.5:1 and --text-subtle is 3.82:1. */
.legal-facts__ver{
  display:inline-flex;align-items:center;gap:6px;margin-top:var(--sp-4);
  font-size:var(--fs-xs);color:var(--text-muted);
}
.legal-facts__ver::before{
  content:"";width:8px;height:8px;border-radius:50%;background:var(--forest-500);flex:none;
}

/* "Draft for review" note above the document body, on the three pages
   whose hero has no room for it. */
.draft-note{
  display:flex;gap:10px;align-items:flex-start;
  max-width:var(--container-narrow);margin:0 0 var(--sp-8);
  padding:12px 16px;border-radius:var(--r-md);
  border:1px solid var(--saffron-200);background:var(--saffron-50);
  font-size:var(--fs-sm);line-height:1.6;color:var(--ink-700);
}
.draft-note svg{width:18px;height:18px;color:var(--saffron-700);flex:none;margin-top:3px}
.draft-note b{color:var(--saffron-800)}

/* ---------------------------------------------------------------------
   3. "Short version" summary band
   --------------------------------------------------------------------- */
.legal-summary .card{display:flex;flex-direction:column;gap:var(--sp-3)}
.legal-summary .feature-tile h3{font-size:16.5px}
.legal-summary__foot{
  margin-top:clamp(24px,3vw,36px);display:flex;flex-wrap:wrap;gap:var(--sp-4);
  align-items:center;justify-content:space-between;
  border-top:1px solid var(--line);padding-top:var(--sp-6);
}
.legal-summary__foot p{margin:0;max-width:64ch;font-size:var(--fs-sm);color:var(--text-muted)}

/* ---------------------------------------------------------------------
   4. Table of contents (override: the shared .toc becomes a card)
   --------------------------------------------------------------------- */
.legal-layout .toc{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);
  padding:var(--sp-5) var(--sp-4);box-shadow:var(--sh-sm);
}
.legal-layout .toc ol{
  counter-reset:toc;padding-right:6px;
  /* Twenty or thirty entries never fit a sticky card, so the list scrolls.
     Keep a visible thin scrollbar and the two fades below as the affordance. */
  max-height:max(300px, calc(100vh - var(--header-h) - 224px));
  scrollbar-width:thin;scrollbar-color:var(--line-strong) transparent;
  overscroll-behavior:contain;
}
.legal-layout .toc ol::-webkit-scrollbar{width:8px}
.legal-layout .toc ol::-webkit-scrollbar-track{background:transparent}
.legal-layout .toc ol::-webkit-scrollbar-thumb{
  background:var(--line-strong);border-radius:var(--r-pill);
  border:2px solid var(--surface);
}
.legal-layout .toc ol::-webkit-scrollbar-thumb:hover{background:var(--forest-300)}
.legal-layout .toc ol a{
  display:grid;grid-template-columns:2.1em 1fr;gap:2px;line-height:1.38;padding:6px 8px;
}
/* --text-muted, not --text-subtle: these numerals are 14px body text. */
.legal-layout .toc ol a::before{
  counter-increment:toc;content:counter(toc) ".";
  color:var(--text-muted);font-variant-numeric:tabular-nums;font-weight:600;
}
.legal-layout .toc ol a.is-active::before{color:var(--saffron-800)}

/* Scroll fades: one over the first row, one over the last, each hidden
   when the list is already at that end (or short enough not to scroll).
   The page JS toggles .is-start / .is-end / .is-static. */
.legal-layout .toc__scroll{position:relative}
.legal-layout .toc__scroll::before,
.legal-layout .toc__scroll::after{
  content:"";position:absolute;left:0;right:8px;
  pointer-events:none;opacity:1;
  transition:opacity var(--dur-fast) var(--ease-out);
}
/* The top fade mirrors the bottom one and has to do the same job. The rows
   are not a uniform height (some entries wrap to two lines) and the card is
   not a whole number of rows tall, so whenever keepActiveInView moves the
   list, one edge lands mid-row. Snapping the top to a row boundary only
   moves the problem: it pushes the highlighted active row half out of the
   bottom. So the list is left where it keeps the active row whole and both
   edges carry a fade tall enough to read as "more above" / "more below"
   rather than as a stray fragment. 11px of solid --surface covers a clipped
   line's x-height; the rest fades out by 30px, the same as the bottom. */
.legal-layout .toc__scroll::before{
  top:0;height:30px;
  background:linear-gradient(to bottom, var(--surface) 45%, rgba(255,255,255,0));
}
.legal-layout .toc__scroll::after{
  bottom:0;height:30px;
  background:linear-gradient(to top, var(--surface) 45%, rgba(255,255,255,0));
}
.legal-layout .toc__scroll.is-start::before,
.legal-layout .toc__scroll.is-static::before{opacity:0}
.legal-layout .toc__scroll.is-end::after,
.legal-layout .toc__scroll.is-static::after{opacity:0}
.toc__foot{margin-top:var(--sp-4);padding-top:var(--sp-4);border-top:1px solid var(--line-soft)}
.toc__foot .btn{width:100%}
.toc__foot .btn svg{width:16px;height:16px}

/* Mobile "jump to section" select */
.toc-select{margin:0 0 var(--sp-6)}
.toc-select .field__label{display:block;margin-bottom:6px}

/* ---------------------------------------------------------------------
   5. The document itself
   --------------------------------------------------------------------- */
.legal-body{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-xl);
  padding:clamp(20px,3vw,48px);box-shadow:var(--sh-sm);
}
.legal-prose{max-width:74ch}
.legal-prose h2{
  display:flex;gap:.6em;align-items:flex-start;text-wrap:pretty;
  font-size:clamp(1.3rem,1.15rem + .7vw,1.65rem);
}
.legal-sec{scroll-margin-top:calc(var(--header-h) + 24px)}
.legal-sec+.legal-sec{
  margin-top:var(--sp-10);padding-top:var(--sp-10);border-top:1px solid var(--line-soft);
}
.legal-sec>h2:first-child{margin-top:0}
.legal-num{
  flex:none;display:inline-grid;place-items:center;min-width:1.85em;height:1.85em;padding:0 .35em;
  border-radius:var(--r-sm);background:var(--saffron-50);border:1px solid var(--saffron-200);
  color:var(--saffron-800);font-size:.62em;font-weight:700;font-variant-numeric:tabular-nums;
  margin-top:.28em;
}
/* Part headings sit directly above the first h2 of that part. */
.legal-part{
  margin:0 0 var(--sp-6);padding:10px 16px;border-radius:var(--r-md);
  background:var(--forest-50);border:1px solid var(--forest-100);
  font-family:var(--font-head);font-size:13px;font-weight:600;letter-spacing:var(--ls-eyebrow);
  text-transform:uppercase;color:var(--forest-700);
}
.legal-sec>.legal-part+h2{margin-top:0}
.legal-prose .callout{max-width:none}
.legal-prose dl{margin:var(--sp-5) 0}
.legal-prose dt{font-weight:600;color:var(--heading);margin-top:var(--sp-4)}
.legal-prose dd{margin:4px 0 0}
.legal-prose ol>li{margin-top:var(--sp-3)}
.legal-prose .callout+h3{margin-top:var(--sp-8)}
.legal-prose address{font-style:normal;line-height:1.75}

/* Definition-style list used for "what each setting does" */
.legal-deflist{list-style:none;padding:0;margin:var(--sp-5) 0;display:grid;gap:var(--sp-3)}
.legal-deflist>li{
  margin:0;padding:14px 16px;border-radius:var(--r-md);
  border:1px solid var(--line);background:var(--ink-50);
}
.legal-deflist b{color:var(--heading);display:block;margin-bottom:2px}

/* Contact block repeated at the end of the document */
.legal-contact{margin-top:var(--sp-8)}
.legal-contact address{font-style:normal;margin:0}
.legal-contact a{font-weight:600}
/* A bare .legal-contact carries no bottom margin and its address strips its
   own, so a following note would read as one more address line. */
.legal-prose .legal-contact+.fineprint{margin-top:var(--sp-6)}

/* ---------------------------------------------------------------------
   6. Data tables

   The table scrolls inside its own box, never the page. The first column
   is pinned, so the row label stays readable at 390px where the table is
   560px wide in a 314px viewport. One "cover" gradient is attached to the
   content and one shadow to the box, so the right edge shadow shows only
   while there is more table beyond it. Pure CSS, no scroll listener.
   --------------------------------------------------------------------- */
.table-scroll{
  --edge-shadow:rgba(18,43,17,.18);
  --edge-shadow-0:rgba(18,43,17,0);
  overflow-x:auto;-webkit-overflow-scrolling:touch;margin:var(--sp-6) 0;
  border:1px solid var(--line);border-radius:var(--r-md);
  background:
    linear-gradient(to left, var(--surface) 42%, rgba(255,255,255,0)) 100% 0 / 30px 100% no-repeat local,
    linear-gradient(to left, var(--edge-shadow), var(--edge-shadow-0)) 100% 0 / 16px 100% no-repeat scroll,
    var(--surface);
}
.table-scroll:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
/* border-collapse:separate, because a collapsed border on a sticky cell is
   painted by the table, not the cell, and stays behind while the cell moves. */
.table-scroll table{margin:0;min-width:560px;border-collapse:separate;border-spacing:0;width:100%}
.table-scroll th,.table-scroll td{border:0;border-bottom:1px solid var(--line-soft)}
.table-scroll tbody tr:last-child th,
.table-scroll tbody tr:last-child td{border-bottom:0}
/* Column headers only. A row header must not be pinned to the top. */
.table-scroll thead th{position:sticky;top:0;z-index:3}
/* Row labels stay put while the rest of the row scrolls under them. */
.table-scroll tbody th[scope="row"],
.table-scroll thead th:first-child{
  position:sticky;left:0;background:var(--surface-2);
  box-shadow:1px 0 0 var(--line);
}
.table-scroll tbody th[scope="row"]{z-index:2}
.table-scroll thead th:first-child{z-index:4}
/* --text-muted, not --text-subtle: this 12px line is the only scroll cue. */
.table-hint{
  display:block;margin:-12px 0 var(--sp-6);font-size:var(--fs-xs);color:var(--text-muted);
}
@media (min-width:768px){ .table-hint{display:none} }

/* ---------------------------------------------------------------------
   7. Dark band: exercise your rights
   --------------------------------------------------------------------- */
.rights-band__grid{
  display:grid;gap:clamp(24px,4vw,56px);grid-template-columns:minmax(0,1fr);align-items:start;
}
@media (min-width:900px){
  .rights-band__grid{grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr)}
}
.rights-card{padding:clamp(20px,2.4vw,30px)}
.rights-card h3{font-size:var(--fs-h4);margin-bottom:var(--sp-2)}
.rights-card__rows{margin:var(--sp-5) 0 0;display:grid;gap:0}
.rights-card__rows>div{
  display:flex;flex-wrap:wrap;gap:4px var(--sp-4);justify-content:space-between;
  padding:10px 0;border-top:1px solid var(--line-dark);font-size:var(--fs-sm);
}
.rights-card__rows dt{margin:0;color:var(--text-on-dark-muted)}
.rights-card__rows dd{margin:0;font-weight:600;color:#fff;text-align:right}
.rights-card__actions{display:flex;flex-wrap:wrap;gap:var(--sp-3);margin-top:var(--sp-6)}

.section--dark .stepper__item:not(:last-child)::before{background:rgba(255,255,255,.18)}

/* ---------------------------------------------------------------------
   8. Related-policy link cards. Five pages use these, which is why they
      are here rather than in any one page sheet (see sharedRequests:
      they belong next to the other card components in styles.css).
   --------------------------------------------------------------------- */
.policy-links{display:grid;gap:clamp(12px,1.6vw,18px);grid-template-columns:minmax(0,1fr)}
@media (min-width:640px){ .policy-links{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media (min-width:1100px){ .policy-links{grid-template-columns:repeat(4,minmax(0,1fr))} }
.policy-link{
  display:flex;gap:var(--sp-3);align-items:flex-start;text-decoration:none;
  padding:var(--sp-5);border:1px solid var(--line);border-radius:var(--r-lg);
  background:var(--surface);box-shadow:var(--sh-xs);
  transition:transform var(--dur-fast) var(--ease-hover),box-shadow var(--dur-fast) var(--ease-hover),border-color var(--dur-fast);
}
.policy-link:hover{transform:translateY(-3px);box-shadow:var(--sh-md);border-color:var(--saffron-200)}
.policy-link__icon{
  width:40px;height:40px;border-radius:var(--r-md);flex:none;display:grid;place-items:center;
  background:var(--saffron-50);color:var(--saffron-700);
}
.policy-link__icon svg{width:20px;height:20px}
.policy-link:nth-child(even) .policy-link__icon{background:var(--forest-50);color:var(--forest-600)}
.policy-link__body{display:flex;flex-direction:column;gap:4px;min-width:0}
.policy-link__body b{font-family:var(--font-head);font-size:15.5px;font-weight:600;color:var(--heading);line-height:1.35}
.policy-link__body span{font-size:13px;color:var(--text-muted);line-height:1.55}
.policy-link__go{width:17px;height:17px;color:var(--ink-400);flex:none;margin-top:12px;transition:transform var(--dur-fast) var(--ease-hover)}
.policy-link:hover .policy-link__go{transform:translateX(3px);color:var(--saffron-700)}

/* ---------------------------------------------------------------------
   9. The plain <section> document

   privacy-policy.html and terms.html number their clauses with the
   .legal-sec / .legal-num chrome in section 5 above. refund-policy.html
   and shipping-policy.html are shorter documents that use a plain
   `.prose > section` instead. These rules were byte-identical in
   refund-policy.css and shipping-policy.css; they live here so the two
   payment documents cannot drift apart.

   The .legal-sec rules in section 5 are more specific, so nothing here
   reaches privacy or terms.
   --------------------------------------------------------------------- */
.prose>section:first-child>h2{margin-top:0}
.prose section+section{margin-top:0}
.prose h2,
.prose section{scroll-margin-top:calc(var(--header-h) + 24px)}
.prose blockquote{
  background:var(--surface-2);border-radius:0 var(--r-md) var(--r-md) 0;
  padding:var(--sp-4) var(--sp-5);
}

/* "Key points at a glance" card in the hero aside of the two payment
   documents. The Document facts card in section 2 sits beside it. */
.glance{background:var(--surface)}
.glance h2{font-size:var(--fs-h4);margin:0 0 var(--sp-4)}
.glance ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--sp-3)}
.glance li{display:flex;gap:10px;margin:0;font-size:var(--fs-sm);line-height:1.6;color:var(--ink-700)}
.glance svg{width:18px;height:18px;color:var(--forest-500);flex:none;margin-top:3px}
.glance__foot{margin:var(--sp-5) 0 0;padding-top:var(--sp-4);border-top:1px solid var(--line-soft)}

.legal-address{
  font-style:normal;line-height:1.8;font-size:var(--fs-sm);
  border:1px solid var(--line);border-radius:var(--r-lg);
  background:var(--surface-2);padding:var(--sp-5);margin-top:var(--sp-5);
}
.legal-address b{color:var(--heading)}

/* ---------------------------------------------------------------------
   10. The official mark panel

   Shows the client's own logo render beside the copy, so a reader can
   compare it with whatever arrived in their inbox. The strip below is the
   version the two payment documents use inside the running prose;
   grievance.html promotes the same markup to a full-width card and
   overrides the chrome in its own sheet.

   The plate is deliberately light: workkar-logo.svg draws कर in green, so
   the reversed white-on-dark variant must not be used here.
   --------------------------------------------------------------------- */
.mark-panel{
  display:grid;gap:clamp(18px,2.4vw,28px);grid-template-columns:minmax(0,1fr);
  align-items:center;
  margin:var(--sp-6) 0;padding:clamp(18px,2.2vw,26px);
  border:1px solid var(--line);border-left:4px solid var(--forest-500);
  border-radius:var(--r-lg);background:var(--surface-2);box-shadow:var(--sh-xs);
}
@media (min-width:700px){ .mark-panel{grid-template-columns:minmax(180px,224px) minmax(0,1fr)} }
.mark-panel__art{margin:0;display:flex;flex-direction:column;gap:9px;align-items:flex-start}
.mark-panel__art img{
  display:block;width:100%;max-width:224px;height:auto;padding:10px;
  border:1px solid var(--line-soft);border-radius:var(--r-md);background:var(--surface);
}
/* --text-muted, not --text-subtle: 11px on --surface-2 needs 4.5:1. */
.mark-panel__art figcaption{font-size:var(--fs-2xs);color:var(--text-muted)}
.mark-panel__body .eyebrow{margin:0}
.mark-panel__body h3{margin:6px 0 var(--sp-3);font-size:var(--fs-h4)}
.mark-panel__body p{margin:0 0 var(--sp-3);max-width:62ch;font-size:var(--fs-sm);line-height:1.7;color:var(--ink-700)}
.mark-panel__body p:last-child{margin-bottom:0}
.mark-panel__body b{color:var(--heading)}

/* (a) .eyebrow uses --heading-accent #C2560A, which is 4.54:1 on pure white
   but only 4.37:1 on --surface-warm and 4.31:1 on --surface-2, so the 12px
   label misses AA on every tinted band. --saffron-800 is an existing token
   and clears 6:1 on all three grounds. .section--dark .eyebrow is more
   specific, so the saffron-300 on the dark band is untouched.
   The real fix is one character in styles.css:52. */


/* (b) .feature-tile p{color:var(--text-muted)} is declared after
   .section--dark p in styles.css and has the same specificity, so a
   .card.feature-tile inside a dark band renders body copy in dark ink on
   dark green: 2.68:1. styles.css already re-colours .feature-tile__icon on
   dark but not its paragraph. */


/* (c) Desktop header overflow. Fixed for good in styles.css section 24: the
   header now runs one 150px horizontal lockup, one "Partners" menu in place
   of "Recruiters" + "Institutes", and a "Hire talent" CTA, which fits inside
   the capped 1240px container at every desktop width. No override here. */

/* (d) styles.css sets .form-success{display:flex}, which beats the
   user-agent [hidden]{display:none} rule, so the "thank you" panel is on
   screen before anybody submits. This keeps it hidden until main.js reveals
   it. Live on every page with a form, not only these. */


/* ---------------------------------------------------------------------
   13. Print. "Print or save as PDF" is a headline feature of these pages,
       so the printed document must end at the last clause: no dark site
       footer printed as invisible grey text, no tricolour ribbon band, no
       orphan "also worth reading" heading over an empty row.
       styles.css already hides the header, the FABs and the cookie bar.
       refund-policy.css, shipping-policy.css and grievance.css each carried
       a near-copy of this block; the shared lines are all here now.
   --------------------------------------------------------------------- */
@media print{
  .read-progress,.toc,.toc-select,.toc__foot,
  .section--dark,.cta-band,.site-footer,.ribbon,
  .legal-related,.legal-summary__foot .btn,
  .announce,.util-bar,.breadcrumbs,.dots-field,
  .policy-links,.glance__foot,
  .page-hero__actions{display:none!important}   /* grievance.html has these */
  .page-hero{background:#fff;padding-block:0 12pt}
  .page-hero::after{display:none}
  .section{padding-block:10pt}
  .legal-layout{display:block}
  .prose{max-width:none;font-size:10.5pt;line-height:1.5;color:#000}
  .prose h2{break-after:avoid}
  .legal-address,.mark-panel,.draft-note{break-inside:avoid;background:none}
  .legal-body{border:0;box-shadow:none;padding:0;border-radius:0}
  .legal-prose{max-width:none;font-size:10.5pt;line-height:1.5;color:#000}
  .legal-prose h2{font-size:13pt;break-after:avoid}
  .legal-prose h3{font-size:11.5pt;break-after:avoid}
  .legal-sec+.legal-sec{margin-top:16pt;padding-top:16pt}
  .legal-facts,.callout,.legal-deflist>li,.table-scroll{break-inside:avoid}
  .table-scroll{overflow:visible;background:none;border-color:#999}
  .table-scroll table{min-width:0}
  .table-scroll thead th,.table-scroll tbody th[scope="row"]{position:static}
  .card{box-shadow:none}
  .legal-prose a[href^="http"]::after,
  .prose a[href^="http"]::after{content:" (" attr(href) ")";font-size:8.5pt;color:#444;word-break:break-all}
}

/* ---------------------------------------------------------------------
   14. Reduced motion
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion:reduce){
  .read-progress__bar{transition:none}
  .legal-layout .toc__scroll::before,
  .legal-layout .toc__scroll::after{transition:none}
  .policy-link,.policy-link__go{transition:none}
  .policy-link:hover{transform:none}
}
