/* ==========================================================================
   Local Edit — shared site theme
   --------------------------------------------------------------------------
   One canonical stylesheet for all four tools in this suite.

   The tokens below follow the house WebView palette (ExamPix / SuroTEK /
   VentWell) so these tools sit alongside the rest of the product family
   rather than looking like a bolt-on.

   This file is copied verbatim into every tool directory by
   `npm run theme`. `npm run audit` verifies the four copies are
   byte-identical, so the tools cannot drift apart visually.
   ========================================================================== */

:root {
  --brand: #7C3AED;
  --brand-dark: #6D28D9;
  --brand-darker: #5B21B6;
  --tint: #F5F3FF;

  --ink: #1F1B2E;
  --ink-soft: #4A4358;
  --muted: #6B6478;
  --line: #E5E1F0;
  --line-strong: #D3CCE6;
  --bg: #FFFFFF;
  --bg-alt: #FAF9FF;

  --success-bg: #ECFDF5;
  --success-line: #A7F3D0;
  --success-ink: #065F46;
  --warn-bg: #FFFBEB;
  --warn-line: #FDE68A;
  --warn-ink: #92400E;
  --error-bg: #FEF2F2;
  --error-line: #FECACA;
  --error-ink: #991B1B;
  --info-bg: #EFF6FF;
  --info-line: #BFDBFE;
  --info-ink: #1E40AF;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  --color-brand: var(--brand);
  --color-text: var(--ink);
  --color-muted: var(--muted);
  --color-surface: var(--bg-alt);
  --color-border: var(--line);
  --color-bg: var(--bg);

  --shadow-sm: 0 1px 2px rgba(31, 27, 46, .05);
  --shadow: 0 2px 10px rgba(31, 27, 46, .06);
  --shadow-md: 0 8px 24px rgba(31, 27, 46, .09);

  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --maxw: 1080px;
  --transition: 160ms ease;
}

@media (prefers-reduced-motion: reduce) {
  :root { --transition: 0ms; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Reset --------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg, canvas { max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 var(--space-3); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.1vw, 1.85rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 var(--space-4); }
ul, ol { margin: 0 0 var(--space-4); padding-left: 1.25rem; }
li { margin-bottom: var(--space-2); }
a { color: var(--brand-dark); }
a:hover { color: var(--brand-darker); }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-6) 0; }

code, kbd, samp, pre {
  font-family: var(--mono);
  font-size: .86em;
}
code {
  background: var(--tint);
  padding: .12em .4em;
  border-radius: 5px;
  color: var(--brand-darker);
}
pre {
  background: var(--ink);
  color: #EDEBF5;
  padding: var(--space-4);
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: .85rem;
  line-height: 1.6;
}
pre code { background: none; color: inherit; padding: 0; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff;
  padding: var(--space-3) var(--space-4);
  border-radius: 0 0 var(--radius-sm) 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; color: #fff; }

/* --- Layout -------------------------------------------------------------- */

.container {
  width: min(var(--maxw), 100% - 2.5rem);
  margin-inline: auto;
}
.container--wide { width:100%; max-width:1240px; margin:0 auto; padding:0 var(--space-4); box-sizing:border-box; }
.container--narrow { width: min(760px, 100% - 2.5rem); }

.section { padding-block: var(--space-7); }
.section--tint { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section--flush { padding-block: var(--space-5); }

.section__title { margin-bottom: var(--space-2); }
.section__lead {
  color: var(--ink-soft);
  max-width: 62ch;
  margin-bottom: var(--space-5);
}
.section__actions {
  display: flex; gap: var(--space-3); flex-wrap: wrap;
  margin-top: var(--space-5);
}

.grid { display: grid; gap: var(--space-4); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* --- Header -------------------------------------------------------------- */

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); min-height: 68px; flex-wrap: wrap;
  width: 100%; max-width: 1240px; margin: 0 auto;
  padding: 0 var(--space-4); box-sizing: border-box;
}
.brand {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-2) 0;
  text-decoration: none; color: var(--ink);
}
.brand__logo-img { height:34px; width:auto; max-width:190px; display:block; }


/* --- Hero ---------------------------------------------------------------- */

.hero {
  background:
    radial-gradient(1100px 420px at 12% -12%, var(--tint), transparent 62%),
    linear-gradient(180deg, var(--bg-alt), var(--bg));
  border-bottom: 1px solid var(--line);
  padding: var(--space-7) 0;
}
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: var(--space-6);
  align-items: center;
}
.hero__eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--brand-dark);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: var(--space-1) var(--space-3);
  margin-bottom: var(--space-4);
}
.hero__title { margin-bottom: var(--space-4); }
.hero__lead {
  font-size: 1.05rem; color: var(--ink-soft);
  max-width: 60ch; margin-bottom: var(--space-5);
}
.hero__actions { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-4); }
.hero__meta { font-size: .85rem; color: var(--muted); margin: 0; }
.hero__visual { min-width: 0; }

.feature-list { list-style: none; padding: 0; margin: 0 0 var(--space-5); }
.feature-list li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: var(--space-3);
  color: var(--ink-soft);
}
.feature-list li::before {
  content: "";
  position: absolute; left: .2rem; top: .62em;
  width: 7px; height: 7px; border-radius: 2px;
  background: var(--brand);
}
.feature-list strong { color: var(--ink); }

/* --- Buttons ------------------------------------------------------------- */

.btn {
  font: inherit; font-weight: 650;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: .62rem 1.15rem;
  cursor: pointer; text-decoration: none;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); color: #fff; }
.btn--ghost { background: var(--bg); color: var(--brand-dark); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--tint); border-color: var(--brand); color: var(--brand-darker); }
.btn--plain { background: var(--bg-alt); color: var(--ink); border-color: var(--line); }
.btn--plain:hover { background: var(--tint); color: var(--brand-darker); }
.btn--lg { padding: .8rem 1.5rem; font-size: 1rem; }
.btn--sm { padding: .4rem .75rem; font-size: .84rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

.link {
  color: var(--brand-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
}
.link:hover { color: var(--brand-darker); text-decoration-color: var(--brand); }

.linkbtn {
  font: inherit; color: var(--brand-dark); background: none;
  border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.linkbtn:hover { color: var(--brand-darker); }

/* --- Cards --------------------------------------------------------------- */

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.card--flat { box-shadow: none; }
.card--raised { box-shadow: var(--shadow); }
.card__title { font-size: 1.02rem; margin-bottom: var(--space-2); }
.card__sub { color: var(--muted); font-size: .87rem; margin-bottom: var(--space-4); }
.card__body { color: var(--ink-soft); font-size: .93rem; }
.card__foot {
  margin-top: var(--space-4); padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  font-size: .88rem;
}
.card--tool { display: flex; flex-direction: column; gap: var(--space-3); }
.card--tool .card__body { flex: 1; }

/* --- Link grid ----------------------------------------------------------- */

.linkgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--space-3);
}
.linkcard {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
  text-decoration: none;
  color: var(--ink);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.linkcard:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
  color: var(--ink);
}
.linkcard strong { font-size: .98rem; color: var(--brand-darker); }
.linkcard span { font-size: .85rem; color: var(--muted); }

/* --- Steps --------------------------------------------------------------- */

.steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  counter-reset: step;
}
.step {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
}
.step__number {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--tint); color: var(--brand-darker);
  font-weight: 700; font-size: .85rem;
  margin-bottom: var(--space-3);
}
.step__title { font-size: .98rem; margin-bottom: var(--space-2); }
.step__text { font-size: .89rem; color: var(--ink-soft); margin: 0; }

/* --- Chips --------------------------------------------------------------- */

.chip {
  display: inline-flex; align-items: center; gap: var(--space-2);
  background: var(--bg); border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  border-radius: 999px; padding: .3rem .75rem;
  font-size: .84rem; font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.chip:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--tint);
}
.chip.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.chip--brand { background: var(--tint); border-color: var(--line-strong); color: var(--brand-darker); }
.chip--action { color: var(--brand-dark); cursor: pointer; }
.chip-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  padding: .15rem .5rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-alt);
  color: var(--ink-soft);
  white-space: nowrap;
}
.badge--verified {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}
.badge--not-verified, .badge--example {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}
.badge--pill { border-radius: 999px; }
.badge--success { background: var(--success-bg); border-color: var(--success-line); color: var(--success-ink); }
.badge--primary { background: var(--tint); border-color: var(--line); color: var(--brand-dark); }

/* --- Form fields --------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field__label {
  font-size: .82rem; font-weight: 650; color: var(--ink-soft);
  display: flex; align-items: baseline; gap: var(--space-2);
}
.field__hint { font-size: .8rem; color: var(--muted); line-height: 1.45; margin: 0; }

input[type="text"], input[type="number"], input[type="email"], input[type="url"],
input[type="search"], input[type="date"], select, textarea {
  font: inherit; font-size: .93rem; color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: .55rem .65rem;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--tint);
  outline: none;
}
input::placeholder, textarea::placeholder { color: #A9A3B8; }
textarea { min-height: 140px; resize: vertical; font-family: var(--mono); font-size: .85rem; line-height: 1.6; }
select {
  padding-right: 1.75rem;
}

.switch {
  display: flex; gap: var(--space-3); align-items: flex-start;
  cursor: pointer; font-size: .9rem;
}
.switch input { margin-top: .28rem; width: 16px; height: 16px; accent-color: var(--brand); flex: none; }
.switch__text { display: flex; flex-direction: column; }
.switch__text small { color: var(--muted); font-size: .8rem; line-height: 1.45; }

/* --- Tabs (Unified Quick-Select Pill Bar matching Photo Resizer) -------- */

.tabs {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
  margin-bottom: var(--space-4);
  padding: var(--space-2) var(--space-3);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.tab {
  appearance: none;
  flex: none;
  font: inherit;
  font-size: .84rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: .32rem .85rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}
.tab:hover {
  background: var(--tint);
  border-color: var(--brand);
  color: var(--brand-dark);
}
.tab[aria-selected="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.25);
}

.segmented {
  display: inline-flex; gap: 2px;
  background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px;
}
.segmented button {
  font: inherit; font-size: .84rem; font-weight: 650; color: var(--muted);
  background: none; border: 0; border-radius: 999px;
  padding: .32rem .8rem; cursor: pointer;
}
.segmented button[aria-pressed="true"] {
  background: var(--bg); color: var(--ink); box-shadow: var(--shadow-sm);
}

/* --- Dropzone ------------------------------------------------------------ */

.dropzone {
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-alt);
  padding: var(--space-7) var(--space-5);
  text-align: center; cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.dropzone:hover { border-color: var(--brand); background: var(--tint); }
.dropzone.is-over { border-color: var(--brand); background: var(--tint); border-style: solid; }
.dropzone__icon { color: var(--brand); }
.dropzone__title { font-size: 1.05rem; font-weight: 650; margin: var(--space-3) 0 var(--space-2); }
.dropzone__sub { color: var(--muted); font-size: .92rem; margin: 0; }

.privacy-note {
  display: flex; gap: var(--space-3); align-items: flex-start;
  background: var(--success-bg);
  border: 1px solid var(--success-line);
  color: var(--success-ink);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  font-size: .87rem;
}
.privacy-note svg { flex: none; margin-top: .2rem; }
.privacy-note p { margin: 0; }
.privacy-note--hero { margin-bottom: var(--space-5); }

/* --- Notices ------------------------------------------------------------- */

.notice {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-alt);
  padding: var(--space-3) var(--space-4);
  font-size: .88rem;
}
.notice--info { background: var(--info-bg); border-color: var(--info-line); color: var(--info-ink); }
.notice--warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }
.notice--error { background: var(--error-bg); border-color: var(--error-line); color: var(--error-ink); }
.notice--success { background: var(--success-bg); border-color: var(--success-line); color: var(--success-ink); }
.notice__title { font-weight: 700; margin-bottom: var(--space-1); }
.notice ul { margin: 0; padding-left: 1.1rem; }

/* --- Stats --------------------------------------------------------------- */

.stats {
  display: grid; gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat__value {
  font-size: 1.3rem; font-weight: 700; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.stat__label {
  font-size: .72rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; font-weight: 650;
}
.stat--good .stat__value { color: var(--success-ink); }
.stat--warn .stat__value { color: var(--warn-ink); }

/* --- Tables -------------------------------------------------------------- */

.table-wrap {
  overflow: auto; max-height: 480px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.table {
  border-collapse: collapse; width: 100%; font-size: .86rem;
}
.table th, .table td {
  padding: .5rem .65rem; text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.table th {
  position: sticky; top: 0; z-index: 1;
  background: var(--bg-alt);
  font-weight: 650; color: var(--ink-soft); font-size: .76rem;
  text-transform: uppercase; letter-spacing: .05em;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--bg-alt); }
.table td.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: .82rem; }
.table td.debit { color: var(--error-ink); }
.table td.credit { color: var(--success-ink); }
.table--zebra tbody tr:nth-child(even) { background: var(--bg-alt); }

/* --- Tool layout --------------------------------------------------------- */

.tool {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--space-5);
  align-items: start;
}
.tool__aside { position: sticky; top: 84px; }

.panel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.panel__head {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  flex-wrap: wrap;
}
.panel__title { font-size: 1rem; margin: 0; }
.panel__body { padding: var(--space-5); }
.panel__foot {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: center;
}

.result {
  background: var(--ink);
  color: #E7E4F0;
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  font-family: var(--mono);
  font-size: .84rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}
.result--light { background: var(--bg-alt); color: var(--ink); border: 1px solid var(--line); }

.copy-row { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }

/* --- FAQ ----------------------------------------------------------------- */

.faq { max-width: 76ch; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: var(--space-4) 0;
}
.faq summary {
  font-weight: 650; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; gap: var(--space-4);
  align-items: flex-start;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; color: var(--brand); font-size: 1.2rem; line-height: 1;
  flex: none;
}
.faq details[open] summary::after { content: "−"; }
.faq details > p { margin: var(--space-3) 0 0; color: var(--ink-soft); }

/* --- Footer -------------------------------------------------------------- */

.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding: var(--space-5) 0;
}
.footer__inner {
  display: flex; justify-content: space-between; gap: var(--space-4);
  flex-wrap: wrap; font-size: .87rem; color: var(--muted);
}
.footer__inner p { margin: 0; }
.footer nav { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.footer nav a { color: var(--ink-soft); text-decoration: none; }
.footer nav a:hover { color: var(--brand-dark); text-decoration: underline; }

/* --- Utilities ----------------------------------------------------------- */

.stack > * + * { margin-top: var(--space-4); }
.stack-sm > * + * { margin-top: var(--space-2); }
.row { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: center; }
.row--end { justify-content: flex-end; }
.row--between { justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.text-center { text-align: center; }
.mono { font-family: var(--mono); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.hidden, [hidden] { display: none !important; }

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .tool { grid-template-columns: 1fr; }
  .tool__aside { position: static; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .hero { padding-block: var(--space-6) var(--space-5); }
  .card, .panel__body { padding: var(--space-4); }
}

@media print {
  .site-header, .site-footer, .btn, .tabs { display: none !important; }
  body { background: #fff; }
  .panel { border: 1px solid #ccc; box-shadow: none; }
}



/* ExamPix.in shared page header */

/* Site Header Navigation & Dropdowns */
.site-header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}
.nav-link {
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  padding: .48rem .75rem;
  border-radius: 999px;
  transition: color var(--transition, 0.15s ease), background-color var(--transition, 0.15s ease);
  white-space: nowrap;
}
.nav-link:hover, .nav-link:focus-visible {
  color: var(--brand-dark);
  background: var(--tint);
}
.nav-link.is-active {
  color: var(--brand-dark);
  background: var(--tint);
  font-weight: 700;
}
.tools-dropdown { position:relative; font-size:.92rem; }
.tools-dropdown > summary { list-style:none; cursor:pointer; color:var(--ink); font-weight:700; border:1px solid var(--line-strong); border-radius:999px; padding:.48rem .9rem; background:var(--bg); }
.tools-dropdown > summary::-webkit-details-marker { display:none; }
.tools-dropdown > summary::after { content:''; display:inline-block; width:7px; height:7px; margin:0 0 3px .55rem; border-right:1.8px solid var(--brand-dark); border-bottom:1.8px solid var(--brand-dark); transform:rotate(45deg); vertical-align:middle; transition:transform 140ms ease; }
.tools-dropdown[open] > summary::after { transform:rotate(225deg); }
.tools-dropdown[open] > summary { border-color:var(--brand); color:var(--brand-dark); }
.tools-dropdown__panel { position:absolute; right:0; top:calc(100% + .55rem); z-index:60; width:min(19rem, calc(100vw - 2rem)); padding:.4rem; background:var(--bg); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow-md); }
.tools-dropdown__panel a { display:block; padding:.7rem .8rem; border-radius:var(--radius-sm); color:var(--ink-soft); text-decoration:none; }
.tools-dropdown__panel a:hover, .tools-dropdown__panel a:focus-visible { background:var(--tint); color:var(--brand-dark); }
.hero__inner { display:block; max-width:1240px; }
.hero__content { max-width:900px; }
.hero__lead { margin-bottom:0; }

.tools-dropdown.is-active > summary {
  border-color: var(--brand);
  color: var(--brand-dark);
  background: var(--tint);
}
.nav-link--mobile-only {
  display: none !important;
}
@media (max-width: 48rem) {
  .site-header__nav {
    gap: .25rem;
  }
  .nav-link {
    font-size: .82rem;
    padding: .32rem .5rem;
  }
  .nav-link--desktop-only {
    display: none;
  }
  .nav-link--mobile-only {
    display: block !important;
  }
}
@media (max-width: 42rem) {
  .site-header__inner {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    padding-block: .45rem;
    min-height: 54px;
    gap: .5rem;
  }
  .brand {
    display: flex;
    align-items: center;
    flex: 0 1 auto;
    justify-content: flex-start;
    text-align: left;
    min-width: 0;
  }
  .brand__logo-img {
    height: 28px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    display: block;
  }
  .tools-dropdown {
    margin: 0;
    flex: 0 0 auto;
    font-size: .85rem;
    position: relative;
  }
  .tools-dropdown > summary {
    padding: .36rem .75rem;
    font-size: .84rem;
    white-space: nowrap;
  }
  .tools-dropdown__panel {
    position: absolute;
    right: 0;
    left: auto;
    width: min(17.5rem, calc(100vw - 1.5rem));
    max-width: calc(100vw - 1.5rem);
    box-sizing: border-box;
    overflow-x: hidden;
  }
}

/* Modern 4-Column Footer */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding: var(--space-6) 0 var(--space-5);
  margin-top: var(--space-7);
  font-size: .9rem;
  color: var(--muted);
}
.site-footer__inner {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.site-footer__block { margin: 0; }
.site-footer__logo { height: 36px; width: auto; display: block; margin-bottom: var(--space-2); }
.site-footer__powered { margin: var(--space-2) 0 0; color: var(--ink-soft); line-height: 1.5; font-size: 0.88rem; }
.site-footer__links {
  list-style: none;
  margin: 0 0 var(--space-3);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  text-align: left;
  align-items: flex-start;
}
.site-footer__links li { margin: 0; }
.site-footer__links a { text-decoration: none; font-weight: 500; color: var(--ink-soft); }
.site-footer__links a:hover { color: var(--brand); text-decoration: underline; }
.site-footer__contact { margin: var(--space-2) 0 0; font-size: .88rem; }
.back-to-top { position:fixed; right:max(1rem,env(safe-area-inset-right)); bottom:max(1rem,env(safe-area-inset-bottom)); z-index:1000; display:grid; place-items:center; width:2.9rem; height:2.9rem; padding:0; border:1px solid var(--line-strong); border-radius:50%; background:var(--brand); color:#fff; box-shadow:0 8px 24px rgba(31,27,46,.2); font:700 1.45rem/1 var(--font); cursor:pointer; opacity:0; visibility:hidden; transform:translateY(.5rem); transition:opacity .18s ease,transform .18s ease,visibility .18s; }
.back-to-top.is-visible { opacity:1; visibility:visible; transform:translateY(0); }
.back-to-top:hover { background:var(--brand-dark); }
.back-to-top:focus-visible { outline:3px solid var(--brand-dark); outline-offset:3px; }
@media (prefers-reduced-motion:reduce) { .back-to-top { transition:none; } }


/* Floating back-to-top control: round shape with project base color and top arrow icon */
.back-to-top {
  position: fixed;
  right: max(1.5rem, calc(env(safe-area-inset-right) + 1rem));
  bottom: max(6.25rem, calc(env(safe-area-inset-bottom) + 5.75rem));
  z-index: 1000;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--brand, #7C3AED);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px) scale(0.9);
  transition: opacity .25s ease, transform .25s cubic-bezier(0.16, 1, 0.3, 1), visibility .25s ease, background-color .2s ease, box-shadow .2s ease;
}
.back-to-top:hover {
  background: var(--brand-dark, #6D28D9);
  color: #ffffff;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.55);
}
.back-to-top:active {
  transform: translateY(0) scale(0.95);
  background: var(--brand-darker, #5B21B6);
}
.back-to-top:focus-visible {
  outline: 3px solid rgba(124, 58, 237, 0.5);
  outline-offset: 3px;
}
.back-to-top svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
  transition: transform .2s ease;
}
.back-to-top:hover svg {
  transform: translateY(-2px);
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
@media (prefers-reduced-motion: reduce) {
  .back-to-top, .back-to-top svg { transition: none; }
}