:root {
  color-scheme: light;
  --base: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef2f7;
  --paper: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: rgba(15, 23, 42, 0.1);
  --line-strong: rgba(15, 23, 42, 0.18);
  --accent: #0ea5e9;
  --accent-strong: #0369a1;
  --accent-soft: rgba(14, 165, 233, 0.11);
  --success: #10b981;
  --danger: #e11d48;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 42% 0%, rgba(14, 165, 233, 0.14), transparent 34rem),
    linear-gradient(180deg, #fbfdff 0%, var(--base) 48%, #eef4fb 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  color: inherit;
}

a {
  text-decoration: none;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 22px;
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

output {
  display: block;
  min-height: 42px;
  padding: 11px 12px;
  color: #475569;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
}

.app-shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
}

.tool-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 0;
  overflow: auto;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(22px);
}

.tool-rail {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  color: #f8fafc;
  background:
    radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.16), transparent 18rem),
    #0f172a;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  font-size: 16px;
  font-weight: 850;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #06121a;
  background: linear-gradient(135deg, #67e8f9, #38bdf8);
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 16px 32px rgba(56, 189, 248, 0.2);
  font-weight: 950;
}

.rail-label,
.eyebrow {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.tool-nav {
  display: grid;
  align-content: start;
  gap: 6px;
}

.tool-nav-item {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 56px;
  padding: 10px 12px;
  color: #d4d4d8;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.tool-nav-item:hover,
.tool-nav-item.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line-strong);
}

.tool-nav-item.is-active {
  box-shadow: inset 3px 0 0 var(--accent), 0 12px 28px rgba(0, 0, 0, 0.22);
}

.tool-nav-item span {
  font-size: 14px;
  font-weight: 850;
}

.tool-nav-item small {
  color: var(--faint);
  font-size: 12px;
  font-weight: 650;
}

.rail-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.14), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 8px;
}

.rail-card span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.rail-card strong {
  font-size: 20px;
}

.rail-card a {
  display: inline-flex;
  justify-content: center;
  min-height: 38px;
  padding: 9px 12px;
  color: #06121a;
  background: var(--accent);
  border-radius: 8px;
  font-weight: 850;
}

.workspace-canvas {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
  max-width: 1280px;
  width: 100%;
  justify-self: center;
  padding: 22px;
}

.landing-view {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: clamp(16px, 5vw, 40px);
}

.workspace-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  min-height: 0;
  padding: 18px;
  color: #f8fafc;
  background:
    radial-gradient(circle at 84% 12%, rgba(56, 189, 248, 0.24), transparent 18rem),
    linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(24, 24, 27, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
}

.workspace-topbar h1 {
  max-width: 660px;
  font-size: clamp(24px, 3vw, 38px);
}

.hero-copy {
  max-width: 620px;
  margin-top: 8px;
  color: #cbd5e1;
  font-size: 14px;
}

.top-actions {
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 8px;
  white-space: nowrap;
}

.top-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 750;
}

.account-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
  margin-top: 0;
  padding: 8px 10px;
  color: #475569;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 750;
  white-space: normal;
}

.account-bar span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.workspace-canvas .access-card,
.workspace-canvas .access-card.access-active {
  grid-template-columns: 1fr;
  grid-template-areas:
    "badge"
    "copy"
    "mode"
    "email"
    "password"
    "verify"
    "submit"
    "output";
}

.workspace-canvas .access-card.access-active {
  grid-template-areas:
    "badge"
    "copy"
    "output";
}

.account-bar a {
  color: var(--accent);
}

.access-hub {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.32fr);
  gap: 12px;
  align-items: stretch;
  width: 100%;
}

.email-card,
.ai-pro-banner,
.tool-card,
.canvas-stage,
.seo-strip article,
.price-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.access-card {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto minmax(220px, 0.9fr);
  grid-template-areas:
    "badge copy mode output"
    "email password submit output"
    "verify verify verify verify";
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-color: rgba(56, 189, 248, 0.18);
}

.access-card .step-label {
  grid-area: badge;
}

.auth-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent-strong);
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}
.auth-link:hover { color: var(--accent); }

.access-card > div:not(.auth-mode):not(.verification-code-field) {
  grid-area: copy;
}

.access-card .auth-mode {
  grid-area: mode;
}

.access-card label:nth-of-type(1) {
  grid-area: email;
}

.access-card label:nth-of-type(2) {
  grid-area: password;
}

.access-card .primary-button {
  grid-area: submit;
}

.access-card output {
  grid-area: output;
}

.access-card .verification-code-field {
  grid-area: verify;
}

.access-card .secondary-button {
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
}

.access-card .secondary-button:hover {
  background: #f1f5f9;
}

.access-hub .account-bar {
  grid-column: 1 / -1;
}

.access-hub .access-card {
  grid-template-columns: auto minmax(190px, 0.9fr) auto minmax(220px, 1fr);
  grid-template-areas:
    "badge copy mode output"
    "email password submit output";
  min-height: 100%;
}

.upgrade-card {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 100%;
  padding: 14px;
  background:
    linear-gradient(145deg, rgba(14, 165, 233, 0.12), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.upgrade-card span {
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.upgrade-card strong {
  font-size: 22px;
}

.upgrade-card p {
  font-size: 12px;
}

.upgrade-card .secondary-button {
  color: #075985;
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.2);
}

.tools-unlocked .upgrade-card,
.tools-unlocked .pricing-matrix {
  display: none;
}

.ai-pro-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  overflow: hidden;
  border-color: rgba(14, 165, 233, 0.22);
  background:
    radial-gradient(circle at 92% 12%, rgba(14, 165, 233, 0.18), transparent 16rem),
    linear-gradient(145deg, #ffffff 0%, #f6fbff 100%);
}

.ai-pro-copy {
  display: grid;
  gap: 8px;
}

.ai-pro-copy h2 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.08;
}

.ai-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ai-feature-grid article {
  display: grid;
  gap: 6px;
  min-height: 86px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(14, 165, 233, 0.16);
  border-radius: 8px;
}

.ai-feature-grid span {
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ai-feature-grid strong {
  font-size: 13px;
  line-height: 1.25;
}

.ai-pro-cta {
  justify-self: start;
}

.access-card.access-active {
  border-color: rgba(52, 211, 153, 0.32);
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.1), rgba(255, 255, 255, 0.96));
}

.access-card.access-active label,
.access-card.access-active button,
.access-card.access-active .auth-mode {
  display: none;
}

.access-card.access-active {
  grid-template-columns: auto minmax(190px, 1fr) minmax(260px, 1fr);
  grid-template-areas: "badge copy output";
}

.access-hub .access-card.access-active {
  grid-template-columns: auto minmax(180px, 1fr) minmax(260px, 1.4fr);
  grid-template-areas: "badge copy output";
  align-items: center;
}

.step-label {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  padding: 0 9px;
  color: #ffffff;
  background: var(--accent, #ef4444);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.access-card.access-active .step-label {
  background: var(--success);
}

.access-card h2 {
  margin-bottom: 2px;
  font-size: 17px;
}

.access-copy {
  font-size: 13px;
}

.auth-mode {
  display: inline-flex;
  min-height: 40px;
  padding: 4px;
  background: #eef2f7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.auth-mode button {
  min-width: 70px;
  padding: 0 10px;
  color: #475569;
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 850;
}

.auth-mode button.is-active {
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(14, 165, 233, 0.22);
}

label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 780;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

/* Checkboxes/radios must not inherit the full-width 44px text-input box,
   which turned them into oversized circles/squares (was breaking Redact). */
input[type="radio"],
input[type="checkbox"] {
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  padding: 0;
  margin: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  flex: 0 0 auto;
  accent-color: var(--accent, #4f46e5);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(56, 189, 248, 0.7);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

textarea {
  min-height: 132px;
  padding-top: 12px;
  resize: vertical;
  line-height: 1.5;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 15px;
  color: #ffffff;
  background: linear-gradient(135deg, #67e8f9, #38bdf8);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(56, 189, 248, 0.18);
  font-weight: 850;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(56, 189, 248, 0.25);
}

.primary-button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.canvas-stage {
  display: grid;
  gap: 18px;
  min-height: 300px;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(14, 165, 233, 0.12), transparent 18rem),
    rgba(255, 255, 255, 0.88);
}

.stage-empty {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 180px;
  padding: 22px;
  background:
    radial-gradient(circle at 78% 22%, rgba(14, 165, 233, 0.16), transparent 18rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.82));
  border: 1px dashed rgba(14, 165, 233, 0.34);
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 0 0 1px rgba(14, 165, 233, 0.05),
    0 24px 70px rgba(14, 165, 233, 0.13);
  overflow: hidden;
}

.stage-empty::after {
  display: none;
}

.security-badge {
  grid-column: 1 / -1;
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  color: #065f46;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 850;
}

.security-badge::before {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #ffffff;
  background: var(--success);
  border-radius: 7px;
  content: "✓";
}

.security-badge span {
  color: #047857;
  text-transform: uppercase;
}

.security-badge strong {
  color: #064e3b;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.canvas-stage.is-dragging .stage-empty,
.stage-empty.is-dragging {
  border-color: var(--accent);
  background-color: rgba(56, 189, 248, 0.06);
}

.dropzone-icon {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  color: #06121a;
  background: linear-gradient(135deg, #67e8f9, #38bdf8);
  border-radius: 8px;
  box-shadow: 0 22px 42px rgba(56, 189, 248, 0.22);
  font-size: 42px;
  font-weight: 650;
}

.stage-empty h2 {
  max-width: 520px;
  margin-bottom: 10px;
  font-size: 28px;
}

.stage-empty p:not(.eyebrow) {
  max-width: 650px;
}

.bento-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: minmax(92px, auto);
  gap: 10px;
  margin-top: 8px;
}

.bento-card {
  display: grid;
  align-content: space-between;
  gap: 12px;
  min-height: 96px;
  padding: 12px;
  color: var(--ink);
  text-align: left;
  background:
    radial-gradient(circle at 90% 12%, rgba(56, 189, 248, 0.12), transparent 7rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.bento-card:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.34);
  transform: translateY(-2px);
}

.bento-large {
  grid-column: span 2;
}

.bento-tall {
  grid-row: span 2;
}

.bento-grid span,
.seo-strip span,
.rail-card span,
.price-card span,
.trust-row span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.bento-grid strong {
  font-size: 15px;
  line-height: 1.18;
}

.bento-grid small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.file-board {
  display: grid;
  gap: 16px;
}

/* has-files rules are redefined later in the production stylesheet with
   collapsed padding, so the legacy "align-content: start" entries below
   would shadow the new spacing fix. Keep them as a safe no-op fallback.
   See the canvas-stage.has-files block near line 2721 for the real rule. */
.canvas-stage.has-files {
  /* intentionally minimal */
}

.canvas-stage.has-files .stage-empty {
  /* intentionally minimal */
}

.ai-recommendation-card[hidden] {
  display: none;
}

.ai-recommendation-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  color: #f8fafc;
  background:
    radial-gradient(circle at 90% 16%, rgba(56, 189, 248, 0.24), transparent 14rem),
    linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(24, 24, 27, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.2);
}

.ai-recommendation-card h2 {
  margin-bottom: 0;
}

.ai-recommendation-card p {
  color: #cbd5e1;
}

.ai-recommendation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ai-recommendation-actions a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  font-weight: 850;
}

.board-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

#fileBoardCount {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  color: #334155;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 850;
}

.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(154px, 1fr));
  gap: 14px;
}

.thumbnail-grid article {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 206px;
  padding: 12px;
  color: #0f172a;
  background: linear-gradient(180deg, #ffffff, #f1f5f9);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.13);
}

.thumbnail-grid article::before {
  display: block;
  height: 112px;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.1) 16%, transparent 16% 22%, rgba(15, 23, 42, 0.08) 22% 72%, transparent 72%),
    repeating-linear-gradient(180deg, rgba(15, 23, 42, 0.16) 0 1px, transparent 1px 13px);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 6px;
  content: "";
}

.thumbnail-grid .empty-thumb {
  color: var(--ink);
  background: #ffffff;
  border-color: var(--line);
  box-shadow: none;
}

.thumbnail-grid .empty-thumb::before {
  display: none;
}

.asset-icon {
  display: inline-grid;
  width: 42px;
  height: 48px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #f43f5e, #fb7185);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 950;
}

.thumbnail-grid strong {
  overflow: hidden;
  color: inherit;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thumbnail-grid p {
  color: #475569;
  font-size: 12px;
}

.empty-thumb p {
  color: var(--muted);
}

.seo-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.seo-strip article {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.seo-strip strong {
  font-size: 14px;
  line-height: 1.45;
}

.pricing-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.pricing-head {
  grid-column: 1 / -1;
}

.pricing-head h2 {
  max-width: 760px;
  font-size: clamp(24px, 3vw, 34px);
}

.price-card {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 260px;
  padding: 18px;
  background:
    radial-gradient(circle at 90% 0%, rgba(14, 165, 233, 0.1), transparent 12rem),
    rgba(255, 255, 255, 0.92);
}

.price-card strong {
  color: #0f172a;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1;
}

.price-card p {
  min-height: 66px;
}

.featured-price {
  color: #f8fafc;
  background:
    radial-gradient(circle at 88% 12%, rgba(103, 232, 249, 0.28), transparent 14rem),
    linear-gradient(145deg, #0f172a, #172554);
  border-color: rgba(56, 189, 248, 0.42);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.26);
  transform: translateY(-4px);
}

.featured-price strong,
.featured-price p {
  color: #f8fafc;
}

.secondary-light-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  color: #075985;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 8px;
  font-weight: 850;
}

.trust-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trust-row span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 10px;
  color: #065f46;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 8px;
}

.workspace-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.1);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding-bottom: 4px;
}

.panel-head h2 {
  font-size: 24px;
}

.privacy-note {
  color: #64748b;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.35;
  text-align: right;
}

.tool-stack { display: block; }

.tool-card {
  display: none;
  grid-template-columns: minmax(220px, 0.42fr) minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding: 16px;
}

.tool-card.is-active {
  display: grid;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.tool-actions .primary-button,
.tool-actions .secondary-button {
  flex: 1 1 160px;
}

.free-note {
  flex: 2 1 260px;
  color: var(--muted);
  font-size: 12px;
}

.pro-chip {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ea580c);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  vertical-align: middle;
}

.ocr-formats-card {
  display: grid;
  gap: 12px;
  margin-top: 8px;
  padding: 14px;
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 12px;
}

.ocr-formats-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.ocr-formats-head h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 850;
}

.ocr-formats-head p {
  margin: 4px 0 0;
  font-size: 12px;
}

.ocr-formats-count {
  flex: 0 0 auto;
  margin-top: 2px;
  padding: 3px 8px;
  color: #0369a1;
  background: #e0f2fe;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.ocr-formats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}

.ocr-format {
  display: grid;
  gap: 4px;
  padding: 12px 12px 13px 12px;
  text-align: left;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: transform 130ms ease, border-color 130ms ease, box-shadow 130ms ease, background 130ms ease, opacity 130ms ease;
}

.ocr-format strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 850;
}

.ocr-format span:nth-child(3) {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.ocr-format-ico {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  margin-bottom: 2px;
  color: #0c4a6e;
  background: var(--accent-soft);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 950;
}

.ocr-format .soon {
  display: inline-block;
  padding: 1px 6px;
  color: #ffffff;
  background: #94a3b8;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 850;
  font-style: normal;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.ocr-format:hover:not(:disabled):not(.is-placeholder) {
  border-color: rgba(14, 165, 233, 0.5);
  background: #f8fbff;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.ocr-format-primary {
  background: linear-gradient(180deg, #ecfeff 0%, #ffffff 100%);
  border-color: rgba(14, 165, 233, 0.4);
}

.ocr-format-primary .ocr-format-ico {
  background: linear-gradient(135deg, #67e8f9, #38bdf8);
  color: #062a3a;
}

.ocr-format:disabled,
.ocr-format.is-placeholder {
  cursor: not-allowed;
  opacity: 0.55;
  filter: grayscale(0.45);
  background: #f8fafc;
}

.ocr-format.is-placeholder:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--line);
}

.ocr-format:not(.is-placeholder):disabled::after {
  content: "Pro required";
  justify-self: start;
  margin-top: 2px;
  padding: 2px 6px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ea580c);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.ocr-format.is-ready:not(:disabled) {
  box-shadow: inset 0 0 0 2px rgba(14, 165, 233, 0.3);
}

.tool-header {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  align-self: center;
}

.tool-card .primary-button {
  align-self: stretch;
  min-width: 168px;
}

.tool-card output {
  grid-column: 1 / -1;
}

.ocr-limit-note {
  margin: 4px 0 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 13px;
  font-weight: 600;
}
.ocr-limit-note strong {
  color: #c2410c;
}
.tool-card output[hidden],
.tool-card output:empty {
  display: none;
}

.tool-header > span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #06121a;
  background: var(--accent);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 950;
}

.assistant-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pro-chip {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  color: #075985;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 900;
}

.file-drop {
  position: relative;
  min-height: 82px;
  padding: 16px;
  color: #334155;
  background:
    radial-gradient(circle at 90% 20%, rgba(56, 189, 248, 0.08), transparent 8rem),
    #f8fafc;
  border: 1px dashed rgba(56, 189, 248, 0.36);
  border-radius: 8px;
}

.file-drop span {
  display: grid;
  min-height: 46px;
  place-items: center;
  color: #0f172a;
  font-weight: 850;
}

.text-input {
  margin: 0;
}

.input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #334155;
  font-size: 13px;
  font-weight: 760;
}

.check-row input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

.locked-tool {
  position: relative;
  opacity: 1;
}

.tools-unlocked .locked-tool {
  opacity: 1;
}

.chat-log {
  display: grid;
  gap: 10px;
  max-height: 360px;
  min-height: 190px;
  overflow: auto;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.chat-message {
  width: fit-content;
  max-width: 92%;
  padding: 10px 12px;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
}

.chat-message.user {
  justify-self: end;
  color: #ffffff;
  background: var(--accent);
  border-color: transparent;
}

.chat-message.meta {
  justify-self: center;
  color: var(--muted);
  background: transparent;
  border-color: transparent;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-prompts button {
  min-height: 34px;
  padding: 0 10px;
  color: #334155;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 780;
}

.paywall-modal[hidden] {
  display: none;
}

.paywall-modal {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 50% 36%, rgba(14, 165, 233, 0.22), transparent 22rem),
    rgba(2, 6, 23, 0.58);
  backdrop-filter: blur(16px);
}

.paywall-dialog {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(560px, 100%);
  padding: clamp(22px, 4vw, 34px);
  color: #f8fafc;
  background:
    radial-gradient(circle at 88% 12%, rgba(56, 189, 248, 0.22), transparent 14rem),
    linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(24, 24, 27, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 34px 90px rgba(2, 6, 23, 0.42);
}

.paywall-dialog p {
  color: #cbd5e1;
}

.paywall-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-size: 22px;
}

.paywall-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.paywall-plans article {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.paywall-plans span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.paywall-plans strong {
  font-size: 20px;
}

.paywall-plans p {
  color: #cbd5e1;
  font-size: 12px;
}

.popular-plan {
  background: linear-gradient(145deg, rgba(14, 165, 233, 0.24), rgba(255, 255, 255, 0.08)) !important;
  border-color: rgba(56, 189, 248, 0.34) !important;
}

.secondary-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  font-weight: 850;
}

.feedback-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  color: #f8fafc;
  background:
    radial-gradient(circle at 88% 14%, rgba(56, 189, 248, 0.22), transparent 14rem),
    linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(39, 39, 42, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.2);
}

.feedback-copy {
  display: grid;
  gap: 8px;
}

.feedback-copy h2 {
  margin-bottom: 0;
}

.feedback-copy p {
  color: #cbd5e1;
}

.feedback-form {
  display: grid;
  gap: 12px;
}

.feedback-form label {
  color: #e2e8f0;
}

.feedback-form input,
.feedback-form select,
.feedback-form textarea {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.13);
}

.feedback-form input::placeholder,
.feedback-form textarea::placeholder {
  color: #94a3b8;
}

.feedback-actions {
  display: grid;
  gap: 10px;
}

.feedback-actions output {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .access-hub {
    grid-template-columns: 1fr;
  }

  .access-hub .access-card.access-active {
    grid-template-columns: auto minmax(180px, 1fr) minmax(260px, 1.4fr);
  }

  .tool-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .bento-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pricing-matrix {
    grid-template-columns: 1fr;
  }

  .featured-price {
    transform: none;
  }
}

@media (max-width: 820px) {
  .app-shell {
    display: block;
  }

  .tool-rail,
  .workspace-panel {
    position: relative;
    height: auto;
    overflow: visible;
  }

  .workspace-canvas {
    grid-column: auto;
    grid-row: auto;
  }

  .tool-rail {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .tool-nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .tool-nav-item {
    flex: 0 0 154px;
  }

  .rail-card {
    display: none;
  }

  .workspace-canvas {
    padding: 14px;
  }

  .workspace-topbar,
  .access-card,
  .workspace-panel,
  .stage-empty {
    display: grid;
    grid-template-columns: 1fr;
  }

  .workspace-topbar,
  .workspace-panel,
  .access-card,
  .upgrade-card {
    padding: 12px;
  }

  .workspace-topbar h1 {
    font-size: 24px;
    line-height: 1.08;
  }

  .hero-copy {
    font-size: 13px;
  }

  .upgrade-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: auto;
  }

  .upgrade-card span,
  .upgrade-card p {
    grid-column: 1;
  }

  .upgrade-card strong {
    font-size: 18px;
  }

  .upgrade-card .secondary-button {
    grid-column: 2;
    grid-row: 1 / span 3;
    min-height: 38px;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .privacy-note {
    text-align: left;
  }

  .access-card,
  .access-card.access-active {
    grid-template-areas:
      "badge"
      "copy"
      "mode"
      "email"
      "password"
      "verify"
      "submit"
      "output";
  }

  .access-hub .access-card,
  .access-hub .access-card.access-active {
    grid-template-columns: 1fr;
    grid-template-areas:
      "badge"
      "copy"
      "mode"
      "email"
      "password"
      "verify"
      "submit"
      "output";
  }

  .access-hub .access-card.access-active {
    grid-template-areas:
      "badge"
      "copy"
      "output";
  }

  .bento-grid,
  .ai-feature-grid,
  .paywall-plans,
  .seo-strip,
  .pricing-matrix {
    grid-template-columns: 1fr;
  }

  .bento-large,
  .bento-tall {
    grid-column: auto;
    grid-row: auto;
  }

  .canvas-stage {
    min-height: auto;
  }

  .security-badge {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .input-grid,
  .chat-form {
    grid-template-columns: 1fr;
  }
}

.legal-page {
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 0%, rgba(14, 165, 233, 0.12), transparent 30rem),
    var(--base);
}

.legal-page main {
  display: grid;
  gap: 24px;
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(34px, 7vw, 82px) 0;
}

.legal-hero {
  display: grid;
  gap: 12px;
  text-align: left;
}

.legal-hero h1 {
  font-size: clamp(36px, 7vw, 64px);
}

.legal-hero p:not(.eyebrow) {
  max-width: 720px;
  font-size: 16px;
}

.legal-card {
  display: grid;
  gap: 14px;
  padding: clamp(22px, 5vw, 42px);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  text-align: left;
}

.legal-card h2 {
  margin-top: 12px;
  margin-bottom: 0;
  font-size: 22px;
}

.legal-card h2:first-child {
  margin-top: 0;
}

.legal-card p,
.legal-card li {
  color: #475569;
  font-size: 15px;
  line-height: 1.75;
  text-align: left;
}

.legal-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

@media (max-width: 680px) {
  .legal-page .site-header {
    align-items: center;
    flex-direction: row;
    padding: 0 12px;
  }

  .legal-page .main-nav {
    flex-wrap: nowrap;
  }
}

/* PDFGuru-inspired traffic page refresh */
.app-shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}

.tool-rail {
  position: sticky;
  z-index: 20;
  top: 0;
  grid-column: auto;
  grid-row: auto;
  display: flex;
  height: auto;
  min-height: 74px;
  align-items: center;
  gap: 22px;
  padding: 14px 28px;
  overflow-x: auto;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  border-right: 0;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  flex: 0 0 auto;
  color: #111827;
}

.brand-mark {
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 14px 30px rgba(239, 68, 68, 0.18);
}

.tool-nav {
  display: flex;
  flex: 1 1 auto;
  gap: 8px;
  min-width: 720px;
  overflow-x: auto;
}

.tool-nav .rail-label {
  display: none;
}

.tool-nav-item {
  flex: 0 0 auto;
  width: auto;
  min-height: 42px;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 8px 12px;
  color: #334155;
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.08);
}

.tool-nav-item small {
  display: none;
}

.tool-nav-item:hover,
.tool-nav-item.is-active {
  color: #0f172a;
  background: #ffffff;
  border-color: rgba(239, 68, 68, 0.22);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.tool-nav-item.is-active {
  box-shadow: inset 0 -3px 0 #ef4444, 0 12px 28px rgba(15, 23, 42, 0.08);
}

.workspace-canvas {
  grid-column: auto;
  grid-row: auto;
  max-width: 1180px;
  gap: 22px;
  padding: 28px 22px 64px;
}

.workspace-topbar {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  min-height: 0;
  padding: 42px 22px 22px;
  color: var(--ink);
  text-align: center;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.workspace-topbar h1 {
  max-width: 760px;
  margin: 0 auto;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 0.95;
}

.hero-copy {
  max-width: 720px;
  margin: 16px auto 0;
  color: #475569;
  font-size: 17px;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.hero-metrics span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  color: #334155;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 850;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.top-actions {
  position: absolute;
  top: 18px;
  right: 28px;
}

.top-actions a {
  color: #334155;
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
}

.canvas-stage {
  order: 1;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.stage-empty {
  grid-template-columns: 1fr;
  justify-items: center;
  min-height: 330px;
  padding: 32px;
  text-align: center;
  background: #ffffff;
  border: 2px dashed rgba(239, 68, 68, 0.26);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.1);
}

.dropzone-icon {
  width: 86px;
  height: 86px;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #f97316);
  border-radius: 999px;
  box-shadow: 0 22px 45px rgba(239, 68, 68, 0.22);
}

.stage-empty h2 {
  max-width: 720px;
  font-size: clamp(28px, 4vw, 44px);
}

.bento-grid {
  width: 100%;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 18px;
}

.bento-card {
  min-height: 112px;
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.bento-card:hover {
  background: #fff7ed;
  border-color: rgba(239, 68, 68, 0.24);
}

.workspace-panel {
  order: 2;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.access-hub {
  grid-template-columns: minmax(0, 1fr) 220px;
}

.tool-card {
  grid-template-columns: minmax(220px, 0.55fr) minmax(260px, 1fr) auto;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: none;
}

.tool-header > span,
.step-label {
  color: #ffffff;
  background: #ef4444;
}

.primary-button {
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 14px 32px rgba(239, 68, 68, 0.18);
}

.primary-button:hover {
  box-shadow: 0 18px 42px rgba(239, 68, 68, 0.24);
}

/* Hide the native file input chrome: the input still overlays the whole drop
   zone (focusable for keyboard, invisible), so a click anywhere opens the OS
   picker — no duplicate "Choose File" button, no tab-order regression. */
.file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.tnum { font-variant-numeric: tabular-nums; }

.pricing-matrix,
.feedback-panel {
  order: 3;
}

.feedback-panel {
  background: #0f172a;
  border-radius: 8px;
}

@media (max-width: 980px) {
  .tool-rail {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 12px 16px;
  }

  .tool-nav {
    width: 100%;
    min-width: 0;
  }

  .top-actions {
    position: static;
    justify-content: center;
    max-width: 100%;
    margin-top: 16px;
  }

  .workspace-topbar {
    padding-top: 24px;
  }

  .bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .access-hub {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .workspace-canvas,
  .workspace-topbar,
  .workspace-panel,
  .access-hub,
  .account-bar,
  .access-card,
  .upgrade-card,
  .panel-head,
  .tool-stack,
  .tool-card,
  .tool-actions,
  .canvas-stage,
  .stage-empty,
  .file-board,
  .pricing-matrix,
  .price-card,
  .feedback-panel {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .workspace-canvas {
    padding: 18px 12px 42px;
  }

  .workspace-panel,
  .access-hub,
  .account-bar,
  .access-card,
  .upgrade-card,
  .panel-head,
  .tool-card,
  .tool-actions,
  .pricing-matrix {
    grid-template-columns: 1fr;
  }

  .account-bar,
  .panel-head,
  .tool-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .tool-card .primary-button,
  .tool-actions .primary-button,
  .tool-actions .secondary-button {
    min-width: 0;
    width: 100%;
  }

  .price-card {
    display: grid;
    grid-template-columns: 1fr;
  }

  .workspace-topbar h1 {
    font-size: 42px;
  }

  .hero-copy {
    font-size: 15px;
  }

  .top-actions {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .stage-empty {
    padding: 22px 14px;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }
}

.admin-page {
  background: #f8fafc;
}

.admin-shell {
  display: grid;
  gap: 22px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.admin-topbar .top-actions {
  position: static;
}

.admin-hero {
  display: grid;
  gap: 10px;
  padding: 34px 0 10px;
}

.admin-hero h1 {
  font-size: clamp(36px, 6vw, 68px);
}

.admin-hero p:not(.eyebrow) {
  max-width: 680px;
  font-size: 16px;
}

.admin-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.admin-login-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.admin-login-form output {
  grid-column: 1 / -1;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.feedback-table {
  display: grid;
  gap: 12px;
}

.feedback-record,
.feedback-empty {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
}

.feedback-record-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.feedback-record-head span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 8px;
  color: #991b1b;
  background: #fee2e2;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.feedback-record dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.feedback-record div {
  min-width: 0;
}

.feedback-record dt {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.feedback-record dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  color: #334155;
  font-size: 12px;
}

@media (max-width: 760px) {
  .admin-login-form,
  .feedback-record dl {
    grid-template-columns: 1fr;
  }

  .admin-topbar,
  .admin-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Workspace-first single-column refactor */
body {
  background: #f8fafc;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(14, 165, 233, 0.35);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  background: rgba(248, 250, 252, 0.94);
  border-bottom: 1px solid #e2e8f0;
  backdrop-filter: blur(16px);
}
/* Issue 1: constrain header inner content to the same 1100px centered track as
   .site-footer so the top and bottom nav/link containers share one width. */
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
}
.tool-card { scroll-margin-top: 64px; }
.footer-help { width: 100%; margin: 0; color: var(--muted, #64748b); font-size: 13.5px; }
.footer-help a { color: var(--brand, #4f46e5); text-decoration: none; }
.footer-help a:hover { text-decoration: underline; }

.site-header .brand {
  min-height: 36px;
  color: #0f172a;
}

.site-header .brand-mark {
  width: 28px;
  height: 28px;
  color: #ffffff;
  background: #0f172a;
  border-radius: 7px;
  box-shadow: none;
}

.site-header .main-nav {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 16px;
  white-space: nowrap;
}

.site-header .main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  color: #334155;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.site-header .main-nav a:hover {
  color: #075985;
  background: #e0f2fe;
  border-color: rgba(14, 165, 233, 0.28);
}

.site-header .main-nav a[aria-current="page"] {
  color: #075985;
  background: #e0f2fe;
  border-color: rgba(14, 165, 233, 0.28);
}

.header-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.free-pill {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 12px;
  color: #64748b;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.free-pill[hidden],
.admin-feedback-link[hidden] {
  display: none;
}

.ghost-button,
.text-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.ghost-button.account-button {
  max-width: min(280px, 38vw);
  overflow: hidden;
  color: #075985;
  background: #e0f2fe;
  border-color: rgba(14, 165, 233, 0.28);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-button {
  min-height: auto;
  padding: 0;
  color: #0369a1;
  background: transparent;
  border: 0;
}

.app-shell {
  display: block;
  min-height: calc(100vh - 48px);
}

.workspace-canvas {
  display: grid;
  width: min(860px, calc(100vw - 32px));
  max-width: 860px;
  gap: 16px;
  margin: 0 auto;
  padding: 28px 0 96px;
}

.workstation-card {
  position: relative;
  display: grid;
  overflow: visible;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.tool-switcher-row {
  position: relative;
  display: flex;
  height: 56px;
  align-items: center;
  gap: 14px;
  padding: 8px 14px;
  border-bottom: 1px solid #e2e8f0;
}
.tool-back {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border: 1px solid #e2e8f0; border-radius: 8px;
  background: #f8fafc; color: #334155;
  text-decoration: none; font-size: 13px; font-weight: 600; cursor: pointer;
}
.tool-back:hover { color: #075985; background: #e0f2fe; border-color: rgba(14, 165, 233, 0.28); }
.tool-current-name { font-size: 16px; font-weight: 700; color: #0f172a; }
.ocr-format-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 4px; }
.ocr-format-btn {
  padding: 7px 12px; border: 1px solid #e2e8f0; border-radius: 8px;
  background: #f8fafc; color: #334155; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.ocr-format-btn:hover { color: #075985; background: #e0f2fe; border-color: rgba(14, 165, 233, 0.28); }
.ocr-format-btn.is-active { color: #0f172a; background: #fff; border-color: #4f46e5; box-shadow: inset 0 0 0 1px #4f46e5; }

.tool-combobox {
  display: inline-flex;
  width: 100%;
  height: 40px;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  color: #0f172a;
  text-align: left;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-weight: 850;
}

.tool-combobox-icon {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  color: #ffffff;
  background: #0ea5e9;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 900;
}

.tool-combobox-caret {
  margin-left: auto;
  color: #64748b;
}

.tool-popover {
  position: absolute;
  z-index: 60;
  top: 50px;
  left: 8px;
  width: 320px;
  max-width: calc(100vw - 32px);
  max-height: 60vh;
  overflow: auto;
  padding: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.tool-filter-label input {
  min-height: 40px;
  margin-bottom: 8px;
}

.tool-popover-sections,
.tool-popover section {
  display: grid;
  gap: 6px;
}

.tool-popover h2 {
  margin: 6px 8px 2px;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

[data-tool-option] {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  color: #0f172a;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 760;
}

.tool-option-disabled {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  color: #94a3b8;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 760;
  cursor: not-allowed;
}

[data-tool-option]:hover,
[data-tool-option][aria-selected="true"] {
  background: #f1f5f9;
}

[data-tool-option] span,
.tool-option-disabled span {
  margin-left: auto;
  padding: 2px 6px;
  color: #0369a1;
  background: #e0f2fe;
  border-radius: 999px;
  font-size: 11px;
}

.canvas-stage {
  display: grid;
  gap: 10px;
  padding: 16px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

/* Collapse spacing above the file list once a PDF is uploaded so no blank
   gap appears between the tool switcher row and the first file card. */
.canvas-stage.has-files {
  align-content: start;
  gap: 8px;
  min-height: 0;
  padding-top: 8px;
  padding-bottom: 4px;
}

.canvas-stage.has-files .stage-empty {
  display: none;
}

.stage-empty {
  position: relative;
  display: grid;
  min-height: 300px;
  place-items: center;
  padding: 28px;
  text-align: center;
  background: #ffffff;
  border: 2px dashed #94a3b8;
  border-radius: 12px;
  box-shadow: none;
}

.canvas-stage.is-dragging .stage-empty,
.stage-empty.is-dragging {
  background: #e0f2fe;
  border-color: #0ea5e9;
}

.stage-empty.is-collapsed {
  min-height: 96px;
  padding: 12px;
}

.stage-empty.is-collapsed .dropzone-default {
  display: none;
}

.station-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.dropzone-default,
.dropzone-processing,
.dropzone-error {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.dropzone-icon {
  width: 32px;
  height: 32px;
  color: #64748b;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.stage-empty h1 {
  color: #0f172a;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
}

.choose-files-button {
  min-height: 42px;
  padding: 0 18px;
}

.progress-track {
  width: min(260px, 70vw);
  height: 8px;
  overflow: hidden;
  background: #e2e8f0;
  border-radius: 999px;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: #0ea5e9;
  border-radius: inherit;
  transition: width 160ms ease;
}

.file-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  min-height: 96px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.file-strip-main {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.file-strip-main strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-strip-main span,
.workspace-status {
  color: #64748b;
  font-size: 13px;
}

.workspace-status {
  margin: 0;
}

.export-progress {
  display: grid;
  gap: 8px;
  padding: 10px 12px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.export-progress[hidden] {
  display: none;
}

.export-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #334155;
  font-size: 12px;
  font-weight: 850;
}

.export-progress .progress-track {
  width: 100%;
}

/* Indeterminate progress for long server-side tasks (OCR) with no real progress
   signal. The segment slides continuously instead of pinning at a percentage, so
   it reads as "working" rather than "stuck at 88%". */
.progress-track span.is-indeterminate {
  width: 35%;
  transition: none;
  animation: export-indeterminate 1.4s ease-in-out infinite;
}

@keyframes export-indeterminate {
  0%   { margin-left: -40%; }
  100% { margin-left: 100%; }
}

.workspace-panel {
  display: grid;
  gap: 14px;
  padding: 0 16px 16px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.workspace-panel.has-files {
  gap: 10px;
  padding-top: 8px;
  padding-bottom: 10px;
}

.tool-card {
  display: none;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.tool-card.is-active {
  display: grid;
}

.tool-header,
.file-drop {
  display: none;
}

.tool-card .primary-button {
  width: 100%;
  min-height: 48px;
}

.tool-card output {
  min-height: 40px;
  border-color: #e2e8f0;
}

.smart-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  color: #0369a1;
  background: #e0f2fe;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 750;
}

.pdf-path-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: #1e293b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 10px;
}

.pdf-path-hint-icon {
  font-size: 16px;
  line-height: 1;
}

.pdf-path-hint-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}

.pdf-path-hint-body strong {
  font-weight: 700;
}

.pdf-path-hint-detail {
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

.pdf-path-hint [data-path-switch],
.pdf-path-hint [data-path-classify] {
  flex: 0 0 auto;
  white-space: nowrap;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  color: #64748b;
  font-size: 14px;
}

.trust-strip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trust-strip svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.auth-modal {
  position: fixed;
  z-index: 130;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.42);
}

.auth-dialog {
  position: relative;
  width: min(460px, 100%);
  max-width: calc(100vw - 32px);
  overflow: hidden;
  padding: 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.24);
}

.auth-dialog .access-hub {
  grid-template-columns: 1fr;
  min-width: 0;
}

.auth-dialog .upgrade-card {
  display: grid;
}

.tools-unlocked .auth-dialog .upgrade-card {
  display: none;
}

.auth-dialog .access-card,
.auth-dialog .access-hub .access-card,
.auth-dialog .access-card.access-active,
.auth-dialog .access-hub .access-card.access-active {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "badge"
    "copy"
    "mode"
    "email"
    "password"
    "verify"
    "submit"
    "output";
  min-width: 0;
}

.auth-dialog .access-card.access-active,
.auth-dialog .access-hub .access-card.access-active {
  grid-template-areas:
    "badge"
    "copy"
    "output";
}

.auth-dialog .account-bar,
.auth-dialog .auth-mode,
.auth-dialog .access-card label,
.auth-dialog .access-card input,
.auth-dialog .access-card output,
.auth-dialog .access-card .primary-button {
  min-width: 0;
  width: 100%;
}

.auth-dialog .auth-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-dialog .account-bar {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) auto;
}

.export-preview-modal[hidden] {
  display: none;
}

.export-preview-modal {
  position: fixed;
  z-index: 110;
  inset: 0;
  display: grid;
  place-items: start center;
  align-content: center;
  padding: 16px 10px;
  overflow-x: hidden;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(14px);
}

.export-preview-dialog {
  position: relative;
  display: grid;
  width: 100%;
  max-width: 960px;
  max-height: min(calc(100vh - 32px), 900px);
  gap: 14px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 20px 18px;
  box-sizing: border-box;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.24);
}

.export-preview-box {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.export-preview-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: #ffffff;
  background: #0f172a;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 900;
}

.export-preview-box strong,
.export-preview-box span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.export-preview-box span {
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
}

.export-preview-sample {
  max-height: 220px;
  margin: 0;
  overflow: auto;
  padding: 12px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.export-preview-html {
  display: grid;
  gap: 10px;
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.export-preview-html[hidden] {
  display: none;
}

.export-preview-html h3 {
  margin: 0;
  color: #0f172a;
  font-size: 13px;
}

.export-preview-html p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.conversion-preview-lines {
  display: grid;
  gap: 6px;
}

.conversion-preview-lines div {
  padding: 8px 10px;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.45;
}

.conversion-preview-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
}

.conversion-preview-table th,
.conversion-preview-table td {
  padding: 8px;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  text-align: left;
  vertical-align: top;
}

.conversion-preview-table th {
  color: #475569;
  background: #f1f5f9;
  font-weight: 850;
}

.export-preview-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.export-preview-dialog .secondary-button {
  color: #0f172a;
  background: #ffffff;
  border-color: #e2e8f0;
}

/* Two-pane compare: original (left) vs converted (right), both fully paginated */
.export-preview-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.export-preview-compare.single-result {
  grid-template-columns: 1fr;
}

.export-preview-pane {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.export-preview-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 18px;
  color: #0f172a;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.export-preview-pane-body {
  position: relative;
  display: grid;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 140px;
  max-height: 520px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px;
  box-sizing: border-box;
  background:
    linear-gradient(45deg, #f1f5f9 25%, transparent 25%) 0 0 / 20px 20px,
    linear-gradient(-45deg, #f1f5f9 25%, transparent 25%) 0 10px / 20px 20px,
    linear-gradient(45deg, transparent 75%, #f1f5f9 75%) 10px -10px / 20px 20px,
    linear-gradient(-45deg, transparent 75%, #f1f5f9 75%) -10px 0 / 20px 20px,
    #e2e8f0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.export-preview-result-host {
  display: grid;
  gap: 10px;
}

.export-preview-page-tag {
  color: #475569;
  font-size: 11px;
  font-weight: 750;
  text-align: center;
  margin-top: 4px;
}

.export-preview-page-note {
  color: #b91c1c;
  font-size: 12px;
  font-weight: 650;
  text-align: center;
  padding: 8px;
}

.export-preview-canvas {
  display: block;
  max-width: 100%;
  height: auto;
  width: auto;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
}

.export-preview-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #334155;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(3px);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
}

.export-preview-loading[hidden] {
  display: none;
}

.export-preview-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.export-preview-dual--single {
  grid-template-columns: 1fr;
}

.export-preview-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  min-width: 0;
}

.export-preview-pane[hidden] {
  display: none;
}

.export-preview-pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.export-preview-pane-label {
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
}

.export-preview-result-doc {
  display: grid;
  gap: 10px;
}

.export-preview-result-doc[hidden] {
  display: none;
}

/* Dual-pane preview: the two content boxes (source PDF canvas and the converted
   output) must stay the SAME height so the "Converted output" panel lines up
   with the original PDF panel.
   Root cause of the old asymmetry: `.export-preview-canvas-wrap` is a flex child
   of its column-flex pane, so its default `min-height: auto` let it expand to the
   PDF.js canvas's natural (full-page) height; the grid then stretched the result
   pane to that same tall height, but the result's inner box was hard-capped at a
   shorter fixed height -> it looked ~half the source.
   Fix: let the source grow to the page height (capped with max-height so huge
   pages still scroll) and let the result flex-fill the *same* pane height, with
   `min-height: 0` on both flex children so they can actually shrink/scroll. */
.export-preview-dual .export-preview-canvas-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 82vh;
  overflow: auto;
}
.export-preview-dual .export-preview-result-doc {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 82vh;
  overflow: auto;
}

/* The converted output is shown as an extracted text/HTML sample (non-PDF
   exports like Word/PPT); lay it out as a flex column so the sample fills the
   (equal-height) pane and scrolls independently. */
.export-preview-result-doc {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.export-preview-result-doc .export-preview-sample,
.export-preview-result-doc .export-preview-html {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  margin: 0;
}

@media (max-width: 720px) {
  .export-preview-compare {
    grid-template-columns: 1fr;
  }
  .export-preview-dual {
    grid-template-columns: 1fr;
  }
  .export-preview-dialog {
    max-width: 100%;
  }
}

.mobile-action-bar,
.tool-sheet,
.tool-sheet-backdrop {
  display: none;
}

@media (max-width: 767px) {
  .site-header {
    padding: 0 12px;
  }

  .site-header .brand span:last-child {
    display: none;
  }

  .site-header [data-open-auth] {
    display: none;
  }

  .free-pill {
    max-width: 148px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .workspace-canvas {
    width: min(100% - 24px, 720px);
    padding-top: 16px;
    padding-bottom: 92px;
  }

  .tool-popover {
    display: none;
  }

  .file-strip {
    grid-template-columns: 1fr;
  }

  .mobile-action-bar {
    position: fixed;
    z-index: 55;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -16px 40px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(16px);
  }

  .tool-bottom-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 12px;
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-weight: 850;
  }

  .tool-sheet-backdrop {
    position: fixed;
    z-index: 90;
    inset: 0;
    display: block;
    background: rgba(15, 23, 42, 0.32);
  }

  .tool-sheet {
    position: fixed;
    z-index: 91;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    max-height: 76vh;
    overflow: auto;
    gap: 10px;
    padding: 10px 14px calc(18px + env(safe-area-inset-bottom));
    background: #ffffff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -24px 70px rgba(15, 23, 42, 0.22);
  }

  .tool-sheet-handle {
    justify-self: center;
    width: 44px;
    height: 5px;
    background: #cbd5e1;
    border-radius: 999px;
  }

  .tool-sheet h2 {
    margin: 0;
    font-size: 18px;
  }
}

/* ---- batch / scan conversion panels (Word & PPT cards) ---- */
.batch-convert-panel {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed #cbd5e1;
}

.batch-details > summary {
  cursor: pointer;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.batch-details[open] > summary {
  margin-bottom: 10px;
}

.batch-body {
  display: grid;
  gap: 10px;
}

.batch-body .file-drop--compact {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.batch-field {
  display: grid;
  gap: 4px;
  color: #475569;
  font-size: 12px;
  font-weight: 750;
}

.batch-field select {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
}

.batch-body output {
  color: #475569;
  font-size: 12px;
  font-weight: 650;
  white-space: pre-wrap;
}

/* ------------------------------------------------------------------ */
/* Dedicated pricing page (pricing.html)                               */
/* Shares the homepage content width: min(860px, 100% - 32px)          */
/* ------------------------------------------------------------------ */

.pricing-page {
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 0%, rgba(14, 165, 233, 0.12), transparent 30rem),
    linear-gradient(180deg, #fbfdff 0%, var(--base) 48%, #eef4fb 100%);
}

.pricing-page main {
  display: grid;
  gap: 24px;
  width: min(860px, calc(100% - 32px));
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(34px, 7vw, 82px) 0 96px;
}

.pricing-page .legal-hero h1 {
  font-size: clamp(32px, 5.4vw, 52px);
}

.plan-section {
  display: grid;
  gap: 14px;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.plan-card {
  min-height: 0;
  gap: 12px;
  padding: 22px;
}

.price-card .plan-badge {
  justify-self: start;
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 10px;
  color: #075985;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.01em;
}

.price-card .plan-badge-strong {
  color: #0f172a;
  background: linear-gradient(135deg, #67e8f9, #38bdf8);
  border-color: rgba(56, 189, 248, 0.5);
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-size: clamp(34px, 4.4vw, 44px);
}

.plan-price small {
  color: var(--muted);
  font-size: 15px;
  font-weight: 750;
}

.featured-price .plan-price small {
  color: #cbd5e1;
}

.plan-sub {
  min-height: 0;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.featured-price .plan-sub {
  color: #cbd5e1;
}

.plan-features {
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.plan-features li {
  position: relative;
  padding-left: 24px;
  color: #334155;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
}

.plan-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 14px;
  height: 14px;
  background: rgba(16, 185, 129, 0.16);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.4);
}

.plan-features li::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 7px;
  width: 5px;
  height: 3px;
  border-left: 2px solid #059669;
  border-bottom: 2px solid #059669;
  transform: rotate(-45deg);
}

.featured-price .plan-features li {
  color: #e2e8f0;
}

.featured-price .plan-features li::before {
  background: rgba(103, 232, 249, 0.18);
  box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.45);
}

.featured-price .plan-features li::after {
  border-color: #67e8f9;
}

.plan-cta {
  width: 100%;
  min-height: 48px;
}

.price-card .plan-note {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
  text-transform: none;
}

.featured-price .plan-note {
  color: #cbd5e1;
}

.plan-compare {
  gap: 16px;
}

.compare-scroll {
  overflow-x: auto;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.compare-table th,
.compare-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.compare-table thead th {
  color: #0f172a;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.compare-table thead th:nth-child(2),
.compare-table thead th:nth-child(3),
.compare-table tbody td {
  text-align: center;
  white-space: nowrap;
}

.compare-table tbody th {
  color: #334155;
  font-weight: 700;
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: 0;
}

.compare-table thead th:last-child {
  color: #075985;
  background: rgba(14, 165, 233, 0.08);
  border-radius: 8px 8px 0 0;
}

.compare-table tbody td:last-child {
  color: #0f172a;
  font-weight: 750;
  background: rgba(14, 165, 233, 0.05);
}

.faq-list {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.faq-list strong {
  display: block;
  margin-bottom: 4px;
  color: #0f172a;
  font-size: 15px;
  font-weight: 850;
}

.faq-list p {
  margin: 0;
  color: #475569;
  font-size: 15px;
  line-height: 1.75;
}

.faq-list a {
  color: var(--accent-strong);
  font-weight: 750;
}

.plan-final-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.plan-final-actions .primary-button,
.plan-final-actions .secondary-button {
  min-height: 48px;
  padding: 0 22px;
}

@media (max-width: 720px) {
  .plan-grid {
    grid-template-columns: 1fr;
  }

  .featured-price {
    transform: none;
  }

  .plan-final-actions .primary-button,
  .plan-final-actions .secondary-button {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .pricing-page .site-header {
    align-items: center;
    flex-direction: row;
    padding: 0 12px;
  }

  .pricing-page .main-nav {
    flex-wrap: nowrap;
  }
}

/* ===== DocFlow landing view ===== */
.landing-view {
  display: block;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 40px 20px 64px;
}
.landing-view[hidden],
.workspace-view[hidden] {
  display: none !important;
}
.workspace-view {
  display: block;
}

.landing-hero {
  position: relative;
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
  padding: 56px 24px 48px;
  border-radius: 22px;
  color: #f8fafc;
  background:
    radial-gradient(1200px 380px at 50% -10%, rgba(56, 189, 248, 0.35), transparent 60%),
    linear-gradient(160deg, #0b1120 0%, #0f172a 52%, #111c33 100%);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}
.landing-hero .eyebrow {
  display: inline-flex;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.32);
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.landing-hero h1 {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(30px, 5.2vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.02em;
}
.landing-sub {
  margin: 0;
  max-width: 52ch;
  color: #cbd5e1;
  font-size: clamp(15px, 2.2vw, 18px);
}
.landing-search {
  width: min(440px, 100%);
  margin-top: 8px;
}
.landing-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-size: 15px;
}
.landing-search input::placeholder {
  color: #94a3b8;
}

.category-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 28px 0 18px;
}
.category-nav button {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
  transition: all 0.15s ease;
}
.category-nav button:hover {
  border-color: #94a3b8;
}
.category-nav button.is-active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  gap: 16px;
}
.tool-tile {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid #e7edf5;
  background: #fff;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.tool-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.12);
  border-color: #cbd5e1;
}
.tool-tile-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 850;
  color: #fff;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
}
.tool-tile-icon.pdf-accent {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
}
.tool-tile-icon.image-accent {
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
}
.tool-tile-icon.text-accent {
  background: linear-gradient(135deg, #34d399, #059669);
}
.tool-tile-body {
  display: grid;
  gap: 4px;
}
.tool-tile-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 850;
  color: #0f172a;
}
.tool-tile-desc {
  font-size: 13px;
  line-height: 1.5;
  color: #64748b;
}
.pro-badge {
  display: inline-flex;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.14);
  color: #0369a1;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tool-grid-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #64748b;
  padding: 40px 0;
}

.tool-hint {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.mode-row .check-row {
  margin: 0;
}

.ocr-result {
  display: grid;
  gap: 8px;
}
.ocr-result[hidden] {
  display: none;
}
.ocr-result-actions {
  display: flex;
  gap: 8px;
}
.ocr-result-actions button {
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid var(--line, #e2e8f0);
  background: #fff;
  color: #334155;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.ocr-result-actions button:hover {
  border-color: #94a3b8;
}
.ocr-result textarea {
  width: 100%;
  resize: vertical;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--line, #e2e8f0);
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #0f172a;
  background: #f8fafc;
}

/* ---- Workbench shared UI: page editor, sorter, redaction overlay ---- */
.page-editor {
  margin: 4px 0 10px;
}
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  border: 1px dashed var(--line-strong, rgba(15, 23, 42, 0.18));
  border-radius: 12px;
  background: var(--surface-2, #f8fafc);
}
.thumb-cell {
  position: relative;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  background: #fff;
  padding: 6px;
  cursor: grab;
  text-align: center;
}
.thumb-cell.dragging {
  opacity: 0.4;
  border-color: var(--accent, #0ea5e9);
}
.thumb-cell canvas {
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}
.thumb-label {
  display: block;
  margin-top: 4px;
  font: 11px/1.2 ui-sans-serif, system-ui, sans-serif;
  color: var(--muted, #64748b);
}
.thumb-actions {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.thumb-cell:hover .thumb-actions { opacity: 1; }
.thumb-actions button {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--line-strong, rgba(15, 23, 42, 0.18));
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  color: #0f172a;
}
.thumb-actions button:hover { background: #fff; border-color: var(--accent, #0ea5e9); }

.canvas-stage {
  position: relative;
  display: inline-block;
  margin: 8px 0;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  line-height: 0;
}
.select-overlay {
  position: absolute;
  cursor: crosshair;
  line-height: 0;
}
.select-box {
  position: absolute;
  display: none;
  border: 2px dashed var(--danger, #e11d48);
  background: rgba(225, 29, 72, 0.14);
}
.diff-wrap {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.diff-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 10px;
  flex-wrap: wrap;
}
.diff-toolbar #diffPageLabel {
  font-size: 13px;
  color: var(--muted, #64748b);
  min-width: 84px;
  text-align: center;
}
.diff-toolbar #diffExportButton { margin-left: auto; }
.diff-page {
  display: flex;
  gap: 14px;
  width: 100%;
  flex-wrap: wrap;
}
.diff-pane {
  flex: 1 1 380px;
  min-width: 320px;
}
.diff-pane canvas {
  width: 100%;
  height: auto;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 8px;
  background: #fff;
}
.sign-pad {
  width: 100%;
  height: 160px;
  border: 1px solid var(--line-strong, rgba(15, 23, 42, 0.18));
  border-radius: 10px;
  background: #fff;
  touch-action: none;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 8px;
  align-items: center;
  margin: 6px 0;
  font: 13px/1.3 ui-sans-serif, system-ui, sans-serif;
}
.field-row label { color: var(--muted, #64748b); }
.field-row input,
.field-row select {
  padding: 8px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 8px;
  font: 13px ui-sans-serif, system-ui, sans-serif;
}
.batch-list {
  margin: 8px 0;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  padding: 6px;
}
.batch-list .batch-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.batch-list .batch-item:nth-child(odd) { background: var(--surface-2, #f8fafc); }

/* =====================================================================
   Layout refresh (structure only — palette untouched)
   Homepage: 2-column hero + browser mockup, "Toolbox Hub" grid w/ tags.
   Tool page: app top bar + left "Config & Actions" sidebar + preview.
   ===================================================================== */

/* ---- Brand tagline (all pages) ---- */
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand-tagline {
  margin-left: 10px;
  padding-left: 12px;
  border-left: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
@media (max-width: 900px) {
  .brand-tagline { display: none; }
}

/* ---- Shared content width ---- */
.landing-view {
  width: min(1240px, 100%);
  max-width: 1240px;
  margin-inline: auto;
  padding: 40px clamp(16px, 4vw, 40px) 88px;
}
.legal-page main { width: min(1180px, calc(100% - 48px)); max-width: 1180px; }
.toolbox-head,
.landing-hero { scroll-margin-top: 72px; }

/* ---- Homepage hero: two columns ---- */
.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
  justify-items: start;
  text-align: left;
  padding: clamp(28px, 4vw, 54px);
}
.landing-hero .hero-copy-col { display: grid; gap: 18px; justify-items: start; min-width: 0; }
.landing-hero h1 {
  max-width: 26ch;
  text-align: left;
  font-size: clamp(26px, 2.7vw, 34px);
  line-height: 1.12;
}
.landing-hero h1 em { font-style: normal; color: #7dd3fc; }
.landing-hero .landing-sub { max-width: 48ch; }
.landing-hero .trust-badge-row { margin-top: 6px; justify-content: flex-start; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.hero-cta {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: 8px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #04121c;
  font-size: 15px;
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 14px 30px rgba(14, 165, 233, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 20px 40px rgba(14, 165, 233, 0.45); }
.hero-cta-ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(148, 163, 184, 0.4);
  color: #e2e8f0;
  box-shadow: none;
}
.hero-cta-ghost:hover { background: rgba(255, 255, 255, 0.16); box-shadow: none; }

/* ---- Hero visual: browser mockup ---- */
.hero-visual { display: grid; width: 100%; justify-self: stretch; place-items: center; }
.mock-window {
  width: min(520px, 100%);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.94));
  box-shadow: 0 30px 70px rgba(2, 6, 23, 0.55);
}
.mock-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid rgba(148, 163, 184, 0.18); }
.mock-dot { width: 10px; height: 10px; border-radius: 50%; }
.mock-red { background: #f87171; }
.mock-amber { background: #fbbf24; }
.mock-green { background: #34d399; }
.mock-address { flex: 1; height: 16px; margin-left: 8px; border-radius: 999px; background: rgba(148, 163, 184, 0.18); }
.mock-body { display: grid; gap: 22px; padding: 20px 16px 24px; }
.mock-flow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.mock-node {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
  font-size: 11.5px;
  font-weight: 750;
}
.mock-node-icon {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 5px;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #04121c;
  font-size: 9px;
  font-weight: 900;
}
.mock-arrow { color: #64748b; font-size: 13px; font-weight: 900; }
.mock-device {
  display: grid;
  width: 96px;
  height: 66px;
  place-items: center;
  justify-self: center;
  border: 2px solid rgba(56, 189, 248, 0.5);
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.08);
  color: #38bdf8;
  font-size: 26px;
  font-weight: 900;
}

/* ---- Toolbox Hub header + search ---- */
.toolbox-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 48px 0 4px;
}
.toolbox-head-copy h2 { margin: 0 0 4px; color: #0f172a; font-size: clamp(22px, 3vw, 30px); }
.toolbox-head-copy p { margin: 0; color: #64748b; font-size: 14px; }
.toolbox-head .landing-search { width: min(320px, 100%); margin: 0; }
.toolbox-head .landing-search input {
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
}
.toolbox-head .landing-search input::placeholder { color: #94a3b8; }
.category-nav { justify-content: flex-start; margin: 18px 0 20px; }

/* ---- Tool tiles ---- */
.tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tool-tile {
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 20px;
  background: #f8fafc;
  border-color: #e2e8f0;
}
.tool-tile-head { display: flex; align-items: center; gap: 12px; }
.tool-tile-desc { min-height: 38px; }
.tool-tile-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.tile-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.tile-tag-privacy { border: 1px solid rgba(14, 165, 233, 0.25); background: rgba(14, 165, 233, 0.12); color: #0369a1; }
.tile-tag-alt { border: 1px solid rgba(245, 158, 11, 0.28); background: rgba(245, 158, 11, 0.14); color: #b45309; }

/* ---- Workspace: top bar + 2-column config/preview ---- */
.workspace-canvas { width: min(1180px, 100%); max-width: 1180px; }
.ws-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}
.back-to-hub { color: #0369a1; font-size: 14px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.back-to-hub:hover { text-decoration: underline; }
.ws-file {
  min-width: 0;
  overflow: hidden;
  color: #475569;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ws-file-tag { color: #94a3b8; }
.ws-file strong { color: #0f172a; }
.ws-file-meta { margin-left: 6px; color: #64748b; }
.secure-mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.workstation-card {
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  grid-template-areas: "switcher switcher" "panel canvas";
  align-items: start;
}
.workstation-card > .tool-switcher-row { grid-area: switcher; }
.workstation-card > .workspace-panel { grid-area: panel; padding: 16px; border-right: 1px solid #e2e8f0; align-content: start; }
.workstation-card > .canvas-stage { grid-area: canvas; }

.config-head { display: grid; gap: 4px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #e2e8f0; }
.config-title { margin: 0; color: #0f172a; font-size: 13px; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; }
.config-active { margin: 0; color: #64748b; font-size: 13px; }
.config-active strong { color: #0369a1; }
.config-usage { margin: 4px 0 0; color: #64748b; font-size: 12px; line-height: 1.5; }
.config-usage:empty { display: none; }
.config-guarantee {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  color: #047857;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.stage-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding: 10px 12px;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}
.usage-dialog { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 20px; }
.usage-dialog[hidden] { display: none; }
.usage-dialog-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,0.55); }
.usage-dialog-panel { position: relative; width: min(440px, 100%); background: var(--surface, #fff); border: 1px solid var(--line, #e2e8f0); border-radius: 16px; padding: 22px 24px; box-shadow: 0 20px 60px rgba(15,23,42,0.25); }
.usage-dialog-panel h2 { margin: 0 0 10px; color: var(--ink, #0f172a); }
.usage-dialog-panel p { margin: 0 0 10px; color: var(--ink-soft, #475569); line-height: 1.55; }
.usage-dialog-close { position: absolute; top: 10px; right: 12px; border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--muted, #64748b); cursor: pointer; }

@media (max-width: 980px) {
  .landing-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .landing-hero .hero-copy-col { justify-items: center; }
  .landing-hero h1 { max-width: 24ch; text-align: center; }
  .landing-hero .landing-sub { text-align: center; }
  .landing-hero .trust-badge-row { justify-content: center; }
  .hero-visual { order: -1; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .workstation-card { grid-template-columns: 1fr; grid-template-areas: "switcher" "panel" "canvas"; }
  .workstation-card > .workspace-panel { border-top: 1px solid #e2e8f0; border-right: 0; }
}

@media (max-width: 620px) {
  .tool-grid { grid-template-columns: 1fr; }
  .toolbox-head { flex-direction: column; align-items: stretch; }
  .toolbox-head .landing-search { width: 100%; }
  .ws-topbar { flex-wrap: wrap; }
  .ws-file { order: 3; width: 100%; }
}

/* ---- Workspace: empty-state guidance ---- */
.dropzone-sub {
  margin: 6px 0 0;
  max-width: 46ch;
  color: var(--muted, #64748b);
  font-size: 14px;
  line-height: 1.5;
}

/* ---- Compress: level radio cards ---- */
.level-cards {
  border: 0;
  padding: 0;
  margin: 0 0 4px;
  display: grid;
  gap: 10px;
}
.level-cards legend {
  padding: 0;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
}
.level-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px 14px 44px;
  border: 1.5px solid var(--line, #e2e8f0);
  border-radius: 12px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.level-card:hover { border-color: #c7d2fe; }
.level-card input { position: absolute; left: 16px; top: 17px; width: 18px; height: 18px; accent-color: var(--brand, #4f46e5); }
.level-card:has(input:checked) {
  border-color: var(--brand, #4f46e5);
  background: #f5f3ff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}
.level-card-body { display: flex; flex-direction: column; gap: 2px; }
.level-card-body strong { font-size: 15px; color: var(--ink, #0f172a); }
.level-card-body strong em {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: var(--brand, #4f46e5);
  background: #eef2ff;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}
.level-card-body small { font-size: 12.5px; color: var(--muted, #64748b); line-height: 1.45; }

/* ---- Compress: estimate + CTA hint + status ---- */
.tool-estimate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--line, #e2e8f0);
  font-size: 13px;
}
.estimate-label { color: var(--muted, #64748b); }
.estimate-value { font-weight: 700; color: var(--ink, #0f172a); }
.tool-cta-hint {
  margin: -6px 0 0;
  font-size: 13px;
  color: var(--muted, #64748b);
}
.tool-cta-hint::before { content: "↑ "; color: var(--brand, #4f46e5); }
.tool-status {
  margin-top: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.45;
  border: 1px solid transparent;
}
.tool-status[data-state="loading"] { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.tool-status[data-state="success"] { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.tool-status[data-state="error"] { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.tool-status[data-state="quota"] { background: #fffbeb; border-color: #fde68a; color: #b45309; }

/* ---- Security guarantee checklist ---- */
.trust-strip {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 20px;
  background: #f8fafc;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 14px;
}
.trust-title { margin: 0; font-size: 17px; color: var(--ink, #0f172a); }
.guarantee-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.guarantee-checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--ink-soft, #334155); }
.guarantee-checklist .check {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: #dcfce7; color: #16a34a;
  font-size: 12px; font-weight: 700;
}
[data-cloud-tool-list] { color: #0f172a; font-weight: 700; }
.canvas-stage .page-editor { background: #fff; border: 1px solid var(--line, #e2e8f0); border-radius: 12px; padding: 12px; }

/* ---- Redact page preview (right-hand canvas area) ---- */
/* The redaction editor lives in the wide right-hand stage; keep the page canvas
   centred and fit-to-width so it is never clipped or stuck to the far left. */
.redact-stage-wrap { width: 100%; }
.redact-stage-wrap > .canvas-stage {
  position: relative;
  display: block;
  padding: 0;
  background: transparent;
}
.redact-stage-wrap canvas {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.12);
}

/* ---- FAQ ---- */
.faq-section { max-width: 920px; margin: 40px auto 0; padding: 0 20px; }
.faq-head { text-align: center; margin-bottom: 22px; }
.faq-head h2 { margin: 6px 0 0; font-size: 26px; color: var(--ink, #0f172a); }
.faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.faq-item {
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  background: var(--surface, #fff);
  padding: 4px 16px;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink, #0f172a);
  padding: 12px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 20px; color: var(--muted, #64748b); }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: 0 0 14px; color: var(--ink-soft, #475569); font-size: 14px; line-height: 1.6; }

/* ---- Footer ---- */
.site-footer {
  max-width: 1100px;
  margin: 56px auto 0;
  padding: 28px 20px 40px;
  border-top: 1px solid var(--line, #e2e8f0);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px 28px;
}
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted, #64748b); font-size: 14px; }
.footer-brand .brand-mark { background: linear-gradient(135deg, #ef4444, #f97316); color: #fff; box-shadow: 0 14px 30px rgba(239, 68, 68, 0.18); }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin-left: 0; }
.footer-nav a { color: var(--ink-soft, #334155); text-decoration: none; font-size: 14px; border: 1px solid transparent; border-radius: 8px; padding: 4px 8px; }
.footer-nav a:hover { color: #075985; background: #e0f2fe; border-color: rgba(14, 165, 233, 0.28); }
.footer-help { width: 100%; margin: 0; color: var(--muted, #64748b); font-size: 13.5px; text-align: center; }
.footer-copy { width: 100%; margin: 0; color: var(--muted, #94a3b8); font-size: 12.5px; text-align: center; }

@media (max-width: 720px) {
  .faq-grid { grid-template-columns: 1fr; }
  .footer-nav { margin-left: 0; }
}

/* ---- Redact tool: modes, patterns, results, options, compliance ---- */
/* The config panel lives in the dark workspace, so every control below is
   driven by theme vars (--surface / --line / --ink / --accent) instead of
   hard-coded light colours. */

/* Custom radio/checkbox marks — scoped so native controls elsewhere stay put. */
#redact-tool input[type="radio"],
#redact-tool input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  display: inline-grid;
  place-content: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 1.5px solid #64748b;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
#redact-tool input[type="checkbox"] { border-radius: 5px; }
#redact-tool input[type="radio"]::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent, #6366f1);
  transform: scale(0);
  transition: transform 0.12s ease;
}
#redact-tool input[type="checkbox"]::before {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-1px) rotate(-45deg) scale(0);
  transition: transform 0.12s ease;
}
#redact-tool input[type="radio"]:checked { border-color: var(--accent, #6366f1); }
#redact-tool input[type="radio"]:checked::before { transform: scale(1); }
#redact-tool input[type="checkbox"]:checked {
  background: var(--accent, #6366f1);
  border-color: var(--accent, #6366f1);
}
#redact-tool input[type="checkbox"]:checked::before { transform: translateY(-1px) rotate(-45deg) scale(1); }
#redact-tool input[type="radio"]:focus-visible,
#redact-tool input[type="checkbox"]:focus-visible {
  box-shadow: 0 0 0 3px var(--accent-soft, rgba(99, 102, 241, 0.25));
}

/* Mode selector — two even chips per row */
#redact-tool .mode-seg {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
#redact-tool .mode-seg .mode-seg-label {
  grid-column: 1 / -1;
  padding: 0;
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted, #9fb0c3);
}
#redact-tool .mode-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line, rgba(148, 163, 184, 0.16));
  border-radius: 10px;
  background: var(--surface-3, #1e293b);
  color: var(--ink, #e8eef6);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
#redact-tool .mode-opt:hover { border-color: var(--accent-strong, #818cf8); }
#redact-tool .mode-opt.is-active,
#redact-tool .mode-opt:has(input:checked) {
  border-color: var(--accent, #6366f1);
  background: var(--accent-soft, rgba(99, 102, 241, 0.18));
  color: var(--accent-strong, #818cf8);
}

/* Section label */
#redact-tool .panel-label {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted, #9fb0c3);
}

/* Pattern picker */
#redact-tool .pattern-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  margin-top: 8px;
}
#redact-tool .pattern-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 6px;
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--ink, #e8eef6);
  cursor: pointer;
}
#redact-tool .pattern-grid label:hover { background: var(--surface-3, #1e293b); }

/* Free-text fields inside the panel */
#redact-tool .custom-regex,
#redact-tool .search-field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #9fb0c3);
}
#redact-tool .custom-regex input,
#redact-tool .search-field input,
#redact-tool .scope-pages input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  color: var(--ink, #e8eef6);
  background: var(--surface-3, #1e293b);
  border: 1px solid var(--line, rgba(148, 163, 184, 0.16));
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
#redact-tool .custom-regex input:focus,
#redact-tool .search-field input:focus,
#redact-tool .scope-pages input:focus {
  outline: none;
  border-color: var(--accent, #6366f1);
  box-shadow: 0 0 0 3px var(--accent-soft, rgba(99, 102, 241, 0.25));
}
#redact-tool .scope-pages input { width: 112px; min-height: 38px; }
#redact-tool .redact-auto .ghost-button,
#redact-tool .redact-search .ghost-button { margin-top: 12px; }

/* Manual mode pagination */
#redact-tool .page-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 10px;
}
#redact-tool .page-nav #redactPageLabel {
  min-width: 88px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted, #9fb0c3);
}
#redact-tool .page-nav .ghost-button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line, rgba(148, 163, 184, 0.16));
  border-radius: 8px;
  background: var(--surface-3, #1e293b);
  color: var(--ink, #e8eef6);
  font-size: 12.5px;
  font-weight: 600;
}
#redact-tool .page-nav .ghost-button:hover { border-color: var(--accent-strong, #818cf8); }

/* Scan results */
#redact-tool .scan-results {
  margin-top: 12px;
  border: 1px solid var(--line, rgba(148, 163, 184, 0.16));
  border-radius: 12px;
  background: var(--surface-2, #121d33);
  overflow: hidden;
}
#redact-tool .scan-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line, rgba(148, 163, 184, 0.16));
  background: var(--surface-3, #1e293b);
  font-size: 12.5px;
  color: var(--ink, #e8eef6);
}
#redact-tool .link-btn {
  border: 0;
  background: none;
  color: var(--accent-strong, #818cf8);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  padding: 0;
}
#redact-tool .scan-list { list-style: none; margin: 0; padding: 4px; max-height: 260px; overflow: auto; }
#redact-tool .scan-item label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--ink, #e8eef6);
  cursor: pointer;
}
#redact-tool .scan-item label:hover { background: var(--surface-3, #1e293b); }
#redact-tool .scan-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
  color: var(--ink, #e8eef6);
  white-space: nowrap;
}
#redact-tool .scan-badge.conf-high { background: rgba(34, 197, 94, 0.18); color: #86efac; }
#redact-tool .scan-badge.conf-medium { background: rgba(234, 179, 8, 0.18); color: #fde047; }
#redact-tool .scan-badge.conf-low,
#redact-tool .scan-badge.conf-custom { background: var(--accent-soft, rgba(99, 102, 241, 0.18)); color: var(--accent-strong, #818cf8); }
#redact-tool .scan-type { font-weight: 600; color: var(--ink, #e8eef6); }
#redact-tool .scan-page { color: var(--muted, #9fb0c3); }
#redact-tool .scan-text {
  color: var(--muted, #9fb0c3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

/* Options — grouped card with a label above each row of choices */
#redact-tool .redact-options {
  margin-top: 4px;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line, rgba(148, 163, 184, 0.16));
  border-radius: 12px;
  background: var(--surface-2, #121d33);
}
#redact-tool .opt-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink, #e8eef6);
}
#redact-tool .opt-key {
  flex: 0 0 100%;
  margin-bottom: -2px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #9fb0c3);
}
#redact-tool .opt-choice {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 6px 12px;
  border: 1px solid var(--line, rgba(148, 163, 184, 0.16));
  border-radius: 999px;
  background: var(--surface-3, #1e293b);
  color: var(--ink, #e8eef6);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
#redact-tool .opt-choice:hover { border-color: var(--accent-strong, #818cf8); }
#redact-tool .opt-choice:has(input:checked) {
  border-color: var(--accent, #6366f1);
  background: var(--accent-soft, rgba(99, 102, 241, 0.18));
  color: var(--accent-strong, #818cf8);
}
#redact-tool .scope-pages {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted, #9fb0c3);
  font-size: 12.5px;
  font-weight: 600;
}
#redact-tool .opt-check {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 4px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink, #e8eef6);
  cursor: pointer;
}

/* Compliance */
#redact-tool .compliance-box {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line, rgba(148, 163, 184, 0.16));
  border-radius: 12px;
  background: var(--surface-2, #121d33);
}

/* ---- Invoice / Receipt Batch Generator ---- */
/* Tool cards hide .file-drop by default (other tools use the global dropzone);
   the invoice card needs its template + data pickers visible & clickable. */
body.invoice-tool-active #workflowDropzone { display: none; }
#invoice-tool .tool-header { display: flex; }
#invoice-tool .file-drop { display: block; cursor: pointer; }
#invoice-tool .file-drop span { pointer-events: none; }
#invoice-tool .file-drop.is-filled { border-color: var(--accent, #2563eb); background: rgba(37,99,235,0.08); }
.text-input.checkbox-inline { display: inline-flex; align-items: center; gap: 8px; }
.text-input.checkbox-inline input { width: auto; margin: 0; }
.tool-hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
  padding: 1px 5px; border-radius: 5px;
}
#redact-tool .compliance-box h4 { margin: 0 0 10px; font-size: 13px; color: var(--ink, #e8eef6); }
#redact-tool .compliance-box .guarantee-checklist li { font-size: 12.5px; color: var(--muted, #9fb0c3); }
#redact-tool .tool-hint { color: var(--muted, #9fb0c3); font-size: 12px; line-height: 1.5; }

/* B16 (review-ui-1): generous padding gives comfortable tap targets without
   overlapping neighbours. The negative margin was removed so adjacent hover
   backgrounds no longer collide (nav gap is now 16px). */
.site-header .main-nav a { padding: 8px 12px; margin: 0; }
.footer-nav a { display: inline-flex; align-items: center; padding: 14px 10px; margin: -14px -10px; }
.back-to-hub { display: inline-flex; align-items: center; padding: 14px 8px; margin: -14px -8px; }

