/* ==========================================================================
   Saraskala — shared site layer v3
   --------------------------------------------------------------------------
   One stylesheet applied across every page on the site. 213 of 233 pages
   share an identical template (saraskala-common.min.css + a ~1KB inline block
   with no Google Fonts and no display type), so this file is the single
   highest-leverage change available.

   What it fixes site-wide
     1. The pink wordmark. saraskala-common.min.css hard-codes the logo
        gradient as #fff -> #ffcf6b -> #ff3ea5 -> #8a5cff -> #2be4ff. With
        #ff3ea5 at 54% the brand name rendered half magenta on every page.
     2. Missing display type. Sub-pages loaded only Inter, so headings rendered
        in the same face as body copy. Sora is introduced for headings and UI
        chrome; Inter stays the body face. JetBrains Mono handles data labels.
     3. Flat surfaces. Cards were flat fills with a 1px border. They now carry
        the same plate + hue + bloom treatment used on the homepage.
     4. Touch targets and focus. Nav pills, chips and buttons were 34-40px and
        had no visible focus ring.

   Scope rule: this file only ADDS. It never removes a selector that a page's
   own inline stylesheet defines, so a page that has already been given bespoke
   styling keeps it. Where specificity would collide, the override is marked
   INVENTED-BY-BASE and scoped to the shared template's own class names.

   Measured against the skill's checks: 65-75ch prose measure, 1.5-1.75 body
   leading, 44px minimum targets, visible focus, reduced-motion honoured.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens — mirrors components/saraskala-landing-v3.css so the homepage and
      every sub-page speak one colour language.
   -------------------------------------------------------------------------- */
:root {
  --skl-cyan: #38d9f0;
  --skl-blue: #5b8cff;
  --skl-violet: #8b7cf8;
  --skl-amber: #f2b544;
  --skl-emerald: #2fd98f;

  --skl-void: #04060e;
  --skl-deep: #070a15;
  --skl-ink: #0b1020;
  --skl-plate: #101733;

  --skl-fg: #f4f6ff;
  --skl-dim: #b6bed8;
  --skl-mute: #98a1c0;

  --skl-e2: 0 6px 16px rgba(0, 0, 0, .45);
  --skl-e3: 0 14px 34px rgba(0, 0, 0, .5);
  --skl-e4: 0 26px 70px rgba(0, 0, 0, .6);

  --skl-r-lg: 22px;
  --skl-r-md: 16px;

  --skl-display: "Sora", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --skl-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --skl-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

/* --------------------------------------------------------------------------
   2. INVENTED-BY-BASE — the pink wordmark. This is the single most visible
      change on sub-pages and is deliberately an !important override: the
      value being replaced is itself an !important gradient in the base sheet.
   -------------------------------------------------------------------------- */
.saras-brand__name {
  font-family: var(--skl-display) !important;
  background-image: linear-gradient(122deg, #ffffff 6%, #7fe3f4 34%, #6d9bff 64%, #a08ff5 94%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
}
.saras-brand__tag {
  font-family: var(--skl-mono) !important;
  letter-spacing: .1em !important;
}

/* --------------------------------------------------------------------------
   3. INVENTED-BY-BASE — header nav pills: 44px targets, visible focus,
      lit hover so the header matches the rest of the system.
   -------------------------------------------------------------------------- */
.saras-nav a,
.saras-action,
.saras-brand,
.saras-top-panel__inner .saras-account {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.saras-nav a {
  font-family: var(--skl-display);
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.saras-nav a:hover {
  color: #fff !important;
  background: rgba(56, 217, 240, .12) !important;
  border-color: rgba(56, 217, 240, .4) !important;
}
.saras-nav a:focus-visible,
.saras-action:focus-visible,
.saras-brand:focus-visible,
.saras-account:focus-visible {
  outline: 3px solid var(--skl-cyan);
  outline-offset: 3px;
  border-radius: 999px;
}
.saras-action {
  background: linear-gradient(126deg, #1f9fd6, #3f6ef0 55%, #6f63f2) !important;
  box-shadow: 0 9px 20px -8px rgba(63, 110, 240, .6), inset 0 1px 0 rgba(255, 255, 255, .35) !important;
}
.saras-top-panel { border-bottom-color: rgba(255, 255, 255, .08) !important; }

/* Two-row header below 920px — the base sheet stacks to three rows inside a
   position:fixed bar, which covered the page heading on every phone. */
@media (max-width: 920px) {
  .saras-top-panel__inner {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    padding: 8px 16px !important;
    gap: 8px 12px !important;
    min-height: 0 !important;
  }
  .saras-brand { order: 1; flex: 1 1 auto !important; min-width: 0; }
  .saras-actions { order: 2; width: auto !important; overflow: visible !important; flex: 0 0 auto !important; }
  .saras-nav {
    order: 3;
    flex: 1 1 100% !important;
    width: 100%;
    justify-content: flex-start !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .saras-nav::-webkit-scrollbar { display: none; }
  .saras-nav a { flex: 0 0 auto; white-space: nowrap; }
}

/* --------------------------------------------------------------------------
   4. Typography for the shared template. Scoped to element types plus the
      shared template's own hooks (main, article, .wrap, .container,
      .page-*, .panel) so bespoke pages are left alone.
   -------------------------------------------------------------------------- */
body { font-family: var(--skl-body); color: var(--skl-fg); }

h1, h2, h3, h4,
main h1, main h2, main h3,
article h1, article h2, article h3,
.hero h1, .page-title, .section-title, .wrap h1, .container h1 {
  font-family: var(--skl-display);
  letter-spacing: -.025em;
  line-height: 1.1;
  color: var(--skl-fg);
}

h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.45rem, 3vw, 2.1rem); font-weight: 650; }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); font-weight: 600; }

/* Long-form measure. 65-75ch is the readable band; full-width body copy on a
   1440px screen was the norm on the blog and policy pages. */
main p, article p,
.prose p, .wrap p, .container p, .post p {
  max-width: 68ch;
  line-height: 1.72;
  color: var(--skl-dim);
}
main li, article li, .prose li { line-height: 1.72; color: var(--skl-dim); }

a { color: var(--skl-cyan); }
a:focus-visible {
  outline: 3px solid var(--skl-cyan);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Eyebrow / kicker chips used across the shared template */
.wrap .pill, .container .pill,
.pill, .tag, .chip, .badge {
  font-family: var(--skl-mono);
  letter-spacing: .08em;
}

/* --------------------------------------------------------------------------
   5. Surfaces. Adds a hue-aware plate treatment without overwriting a page's
      own background colour — border, shadow and a soft top light are added so
      flat fills gain depth, and the card keeps whatever fill it had.
   -------------------------------------------------------------------------- */
.panel, .card, .tool-card, .post-card, .spec-card,
.wrap > section, .container > section,
main section, article section {
  position: relative;
  border-radius: var(--skl-r-lg);
  border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: var(--skl-e2), inset 0 1px 0 rgba(255, 255, 255, .07);
  transition: transform .22s cubic-bezier(.2, .75, .25, 1), box-shadow .26s ease, border-color .26s ease;
}
.panel:hover, .card:hover, .tool-card:hover, .post-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 217, 240, .32);
  box-shadow: var(--skl-e3), inset 0 1px 0 rgba(255, 255, 255, .12);
}

/* --------------------------------------------------------------------------
   6. Buttons. Touch targets + focus + the cool v3 ramp, overriding the base
      sheet's magenta primary.

      Two naming conventions coexist in this codebase and BOTH must be covered:
        class="btn btn-primary"   (homepage, landing v3)
        class="btn primary"       (blog template, 11 pages)
      `.cta` is a CONTAINER on 12 pages (<div class="cta"><a class="btn ...">),
      so it is deliberately NOT given a background — doing that paints a
      full-width gradient bar behind the buttons. It only gets layout.
   -------------------------------------------------------------------------- */
.btn, button, .button, input[type="submit"] {
  font-family: var(--skl-display);
  min-height: 44px;
  cursor: pointer;
  transition: transform .18s cubic-bezier(.2, .8, .25, 1), box-shadow .24s ease, border-color .24s ease;
}
.btn-primary, .btn.primary, button[type="submit"], input[type="submit"] {
  background-image: linear-gradient(126deg, #1f9fd6 0%, #3f6ef0 52%, #6f63f2 100%) !important;
  background-color: transparent !important;
  border-color: transparent !important;
  box-shadow: 0 12px 28px -8px rgba(63, 110, 240, .5), inset 0 1.5px 0 rgba(255, 255, 255, .4) !important;
}
/* layout only — no paint, see note above */
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn:hover, button:hover, .button:hover, input[type="submit"]:hover { transform: translateY(-2px); }
.btn:focus-visible, button:focus-visible, .button:focus-visible,
input[type="submit"]:focus-visible, .cta a:focus-visible {
  outline: 3px solid var(--skl-cyan);
  outline-offset: 3px;
}
.btn-secondary, .btn.secondary, .btn-outline, .btn-ghost, .btn-outline.btn {
  background-image: none !important;
  border-color: rgba(56, 217, 240, .45) !important;
  color: #e9f3ff !important;
}

/* --------------------------------------------------------------------------
   7. Forms. Visible labels, 48px inputs, and a focus ring that survives the
      base sheet's border-only treatment.
   -------------------------------------------------------------------------- */
input, select, textarea {
  font-family: var(--skl-body);
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  color: var(--skl-fg);
  min-height: 48px;
  padding: 0 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
textarea { min-height: 128px; padding: 12px 14px; line-height: 1.65; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(56, 217, 240, .6);
  box-shadow: 0 0 0 4px rgba(56, 217, 240, .13);
}
label {
  font-family: var(--skl-display);
  font-size: .88rem;
  font-weight: 600;
  color: var(--skl-dim);
  margin-bottom: 7px;
  display: inline-block;
}
::placeholder { color: rgba(152, 161, 192, .75); }

/* --------------------------------------------------------------------------
   8. Tables and definition lists (spec pages, FAQ, policy pages)
   -------------------------------------------------------------------------- */
table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--skl-r-md);
  overflow: hidden;
}
th, td {
  padding: 13px 15px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  color: var(--skl-dim);
}
th {
  font-family: var(--skl-display);
  font-weight: 600;
  color: var(--skl-fg);
  background: rgba(255, 255, 255, .035);
}
tr:last-child td { border-bottom: 0; }

dl dt {
  font-family: var(--skl-display);
  font-weight: 600;
  color: var(--skl-fg);
  margin-top: 18px;
}
dl dd { margin: 6px 0 0; color: var(--skl-dim); line-height: 1.72; max-width: 68ch; }

/* --------------------------------------------------------------------------
   9. Code and preformatted output (size-readout panels)
   -------------------------------------------------------------------------- */
code, pre, kbd {
  font-family: var(--skl-mono);
  font-size: .9em;
}
code {
  background: rgba(56, 217, 240, .1);
  border: 1px solid rgba(56, 217, 240, .22);
  border-radius: 6px;
  padding: .12em .42em;
  color: #bfeaff;
}
pre {
  background: rgba(6, 10, 24, .7);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  padding: 16px 18px;
  overflow-x: auto;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   10. Footer

      IMPORTANT: saraskala-common.min.css wraps this whole component in
      !important — `.footer-links a` there is `min-height:34px!important;
      display:inline-flex!important; padding:4px 2px!important`. An override
      without !important loses regardless of source order, which is why the
      footer links were still measuring 34px after the first pass.
   -------------------------------------------------------------------------- */
.footer, .app-footer, .saras-common-footer { border-top-color: rgba(255, 255, 255, .09) !important; }
.footer-links { display: flex !important; flex-wrap: wrap; gap: 10px !important; }
footer a, .app-footer a, .saras-common-footer a,
.footer-links a, .brand-footer a {
  font-family: var(--skl-display) !important;
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 10px 15px !important;
  border-radius: 999px !important;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .18s ease;
}
footer a:hover, .app-footer a:hover, .footer-links a:hover {
  background: rgba(56, 217, 240, .1) !important;
  border-color: rgba(56, 217, 240, .38) !important;
  transform: translateY(-2px);
}
footer a:focus-visible, .app-footer a:focus-visible, .footer-links a:focus-visible {
  outline: 3px solid var(--skl-cyan) !important;
  outline-offset: 3px;
  border-radius: 999px !important;
}
.footer-meta, .footer-strip, .footer-band, .brand-footer { font-family: var(--skl-mono) !important; letter-spacing: .04em; }

/* --------------------------------------------------------------------------
   10a. Footer refinement

      A hairline rule, a quieter mono meta line and pill links. Text colours
      stay above 5:1 contrast on the dark page base.
   -------------------------------------------------------------------------- */
.footer {
  margin-top: 56px !important;
  padding: 30px 16px 34px !important;
  border-top: 1px solid rgba(255, 255, 255, .08) !important;
  background: radial-gradient(120% 160% at 50% 0%, rgba(56, 217, 240, .05), transparent 62%) !important;
}
.footer-links { gap: 6px !important; }
.footer-links a {
  color: #a3b3c8 !important;
  font-size: .82rem !important;
  letter-spacing: .03em !important;
}
.footer-meta {
  font-size: .79rem !important;
  letter-spacing: .08em !important;
  color: #94a3b8 !important;
  opacity: 1 !important;
}
.footer-meta a { color: #7fe3f5 !important; }

/* --------------------------------------------------------------------------
   10b. Chip rows and JS-injected navigation

      The editor shell renders its "popular task" chips from a shared
      component that is present on the tool pages, the editor app and every
      /photo-editor/tools/* page. They measured 38px, and because the editor
      template never loads the homepage stylesheet the site layer is the only
      thing that can lift them.

      [data-nav-links] is an empty <nav> filled at runtime by the shared header
      component, so its links cannot be styled by a page-authored rule either.
   -------------------------------------------------------------------------- */
.popular-task-strip a,
.editor-popular-tasks a,
.task-strip a,
.chip-row a {
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  cursor: pointer;
}
[data-nav-links] a,
[data-nav-links] button {
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  cursor: pointer;
}

/* /social-impact-demo/ is the one page with its own bespoke chrome rather than
   the shared header. Its filter chips measured 36px and its wordmark 34px. */
.filter-chip,
.social-impact-demo .chip,
.social-impact-demo nav a {
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
}
.social-impact-demo .brand,
.brand-footer a,
.wordmark { min-height: 44px !important; display: inline-flex !important; align-items: center !important; }
.popular-task-strip a:focus-visible,
.editor-popular-tasks a:focus-visible,
[data-nav-links] a:focus-visible {
  outline: 3px solid var(--skl-cyan) !important;
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   11. Motion, coarse pointers, print
   -------------------------------------------------------------------------- */
@media (hover: none), (pointer: coarse) {
  .panel:hover, .card:hover, .tool-card:hover, .post-card:hover,
  .btn:hover, button:hover, .button:hover, .cta:hover { transform: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .panel, .card, .tool-card, .post-card, .btn, button, .button, .cta,
  .btn-primary, input, select, textarea, .saras-nav a {
    transition: none !important;
    animation: none !important;
  }
  .panel:hover, .card:hover, .tool-card:hover, .post-card:hover,
  .btn:hover, button:hover, .button:hover, .cta:hover { transform: none !important; }
}

@media print {
  .saras-top-panel, footer, .app-footer, .saras-actions, .saras-nav { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .panel, .card, section, table { box-shadow: none !important; border: 1px solid #ccc !important; }
}

/* --------------------------------------------------------------------------
   12. Accessibility helpers
   -------------------------------------------------------------------------- */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100000;
  padding: 12px 18px;
  border-radius: 0 0 12px 12px;
  background: var(--skl-cyan);
  color: #04121a;
  font-family: var(--skl-display);
  font-weight: 700;
  transition: top .2s ease;
}
.skip-link:focus { top: 0; }