:root {
  --bg: oklch(0.985 0.006 252);
  --paper: oklch(1 0 0);
  --surface: oklch(0.965 0.014 252);
  --surface-blue: oklch(0.945 0.027 252);
  --ink: oklch(0.205 0.022 252);
  --muted: oklch(0.49 0.025 252);
  --line: oklch(0.875 0.017 252);
  --primary: oklch(0.53 0.17 255);
  --primary-hover: oklch(0.45 0.17 255);
  --primary-soft: oklch(0.94 0.04 255);
  --danger: oklch(0.55 0.18 28);
  --danger-soft: oklch(0.965 0.03 28);
  --success: oklch(0.49 0.13 154);
  --success-soft: oklch(0.945 0.05 154);
  --warning: oklch(0.68 0.16 78);
  --warning-soft: oklch(0.965 0.055 78);
  --shadow-card: 0 1px 2px oklch(0.2 0.02 252 / 0.08);
  --shadow-card-hover: 0 10px 22px oklch(0.32 0.08 252 / 0.12);
  --radius-card: 14px;
  --radius-control: 10px;
  --content: 1540px;
  --font-sans: Inter, "MiSans", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(720px 520px at 0% 14%, oklch(0.92 0.045 253 / 0.72), transparent 66%),
    radial-gradient(860px 620px at 100% 28%, oklch(0.91 0.05 251 / 0.72), transparent 62%),
    linear-gradient(180deg, oklch(0.982 0.008 252), oklch(0.965 0.018 252));
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

a {
  color: inherit;
  text-decoration: none;
}

[id] {
  scroll-margin-top: 92px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid oklch(0.72 0.13 255 / 0.45);
  outline-offset: 3px;
}

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 100;
  padding: 8px 12px;
  color: white;
  background: var(--primary);
  border-radius: 8px;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 24px;
  background: oklch(1 0 0 / 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: block;
  width: 132px;
  height: 38px;
  min-width: 150px;
  overflow: hidden;
  background: url("/static/brand/docorca-logo-nav-v1.png?v=20260809-docorca-logo-1") left center / 132px auto no-repeat;
  transition: opacity 160ms ease;
}

.brand:hover {
  opacity: 0.78;
}

.brand > * {
  display: none;
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 28px;
  font-size: 14px;
  font-weight: 650;
}

.nav-tools a {
  padding: 20px 15px;
  color: oklch(0.32 0.02 252);
  transition: color 160ms ease, background 160ms ease;
}

.nav-tools a:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.local-badge {
  padding: 4px 9px;
  color: var(--muted);
  background: var(--surface);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
}

html[data-plan="paid"] .local-badge {
  color: oklch(0.36 0.1 78);
  background: oklch(0.94 0.075 84);
}

.ghost-link {
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  transition:
    color 200ms cubic-bezier(0.25, 1, 0.5, 1),
    opacity 120ms cubic-bezier(0.25, 1, 0.5, 1);
}

.ghost-link:hover {
  color: var(--primary-hover);
}

.ghost-link:active {
  opacity: 0.72;
}

.language-picker {
  position: relative;
}

.language-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 2px;
  font-family: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 160ms ease;
}

.language-trigger:hover,
.language-trigger[aria-expanded="true"] {
  color: var(--primary);
}

.language-caret {
  font-size: 10px;
  transition: transform 160ms ease;
}

.language-trigger[aria-expanded="true"] .language-caret {
  transform: rotate(180deg);
}

.language-menu {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 60;
  display: grid;
  min-width: 132px;
  padding: 5px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 4px 8px oklch(0.22 0.025 252 / 0.12);
}

.language-menu[hidden] {
  display: none;
}

.language-menu a {
  padding: 7px 9px;
  color: var(--ink);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  transition: color 160ms ease, background-color 160ms ease;
}

.language-menu a:hover,
.language-menu a:focus-visible {
  color: var(--primary);
  background: var(--primary-soft);
}

.language-menu a[aria-current="page"] {
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 750;
}

.account-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0;
  font-family: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
}

.account-menu {
  position: relative;
}

.account-nav-link.is-authenticated {
  gap: 7px;
}

.account-nav-link.is-authenticated::before {
  content: attr(data-initial);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid oklch(0.78 0.07 255);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

.account-nav-link.is-authenticated::after {
  content: "";
  width: 6px;
  height: 6px;
  margin: -3px 1px 0 0;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.account-nav-link.is-authenticated[aria-expanded="true"]::after {
  margin-top: 3px;
  transform: rotate(225deg);
}

.account-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 70;
  width: min(300px, calc(100vw - 32px));
  padding: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: 0 4px 8px oklch(0.22 0.025 252 / 0.14);
}

.account-popover::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 24px;
  width: 10px;
  height: 10px;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  transform: rotate(45deg);
}

.account-popover[hidden] {
  display: none;
}

.account-popover-profile {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 2px 2px 14px;
}

.account-popover-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid oklch(0.78 0.07 255);
  border-radius: 50%;
  font-size: 16px;
  font-weight: 800;
}

.account-popover-identity {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding-top: 1px;
}

.account-popover-identity strong {
  font-size: 15px;
  line-height: 1.35;
}

.account-popover-identity > span:not(.account-popover-entitlement) {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-popover-entitlement {
  width: fit-content;
  max-width: 100%;
  margin-top: 3px;
  padding: 4px 7px;
  color: oklch(0.37 0.12 255);
  background: var(--primary-soft);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

html[data-plan="paid"] .account-popover-entitlement {
  color: oklch(0.36 0.1 78);
  background: var(--warning-soft);
}

.account-popover-links {
  display: grid;
  gap: 3px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.account-popover-links a,
.account-popover-logout {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease;
}

.account-popover-links a:hover,
.account-popover-links a:focus-visible,
.account-popover-logout:hover,
.account-popover-logout:focus-visible {
  color: var(--primary);
  background: var(--primary-soft);
}

#account-popover-membership {
  color: var(--primary);
}

.account-popover-logout {
  width: 100%;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
}

.account-popover-logout:disabled {
  color: var(--muted);
  cursor: wait;
}

.premium-nav-link {
  color: var(--primary);
}

.ghost-link.is-current {
  color: var(--primary);
}

.ghost-link.is-current:hover {
  color: var(--primary-hover);
}

.ghost-link.account-nav-link:hover,
.ghost-link.account-nav-link:focus-visible {
  color: oklch(0.34 0.18 255);
}

.ghost-link.account-nav-link:active {
  color: oklch(0.68 0.16 255);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .ghost-link,
  .account-nav-link.is-authenticated::after,
  .account-popover-links a,
  .account-popover-logout {
    transition: none;
  }
}

.premium-nav-link.needs-attention {
  padding: 5px 9px;
  color: oklch(0.36 0.1 78);
  background: var(--warning-soft);
  border-radius: 8px;
}

.app-menu {
  display: grid;
  grid-template-columns: repeat(3, 4px);
  gap: 4px;
  padding: 8px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.app-menu span {
  width: 4px;
  height: 4px;
  background: oklch(0.32 0.02 252);
  border-radius: 50%;
}

main {
  width: min(calc(100% - 48px), var(--content));
  margin: 0 auto;
}

.subpage-body {
  min-height: 100vh;
}

.subpage-main {
  width: min(calc(100% - 48px), 1240px);
  min-height: calc(100vh - 148px);
  padding: 52px 0 72px;
}

.subpage-heading {
  margin-bottom: 24px;
}

.subpage-heading h1 {
  margin: 12px 0 7px;
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.subpage-heading p {
  max-width: 68ch;
  margin: 0;
  color: var(--muted);
  text-wrap: pretty;
}

.back-link {
  color: var(--primary);
  font-size: 13px;
  font-weight: 750;
}

.back-link:hover {
  color: var(--primary-hover);
}

.subpage-main .membership-section,
.subpage-main .account-center {
  max-width: none;
  margin: 0;
}

.account-heading-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.purchase-empty a {
  margin-top: 5px;
  color: var(--primary);
  font-weight: 750;
}

.purchase-empty a:hover,
footer a:hover {
  color: var(--primary-hover);
}

.hero {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  width: 100%;
  max-width: 1180px;
  min-height: 224px;
  margin: 16px auto 0;
  padding: 26px 64px 22px;
  text-align: center;
  background-color: oklch(0.975 0.011 252);
  background-image:
    linear-gradient(90deg, oklch(0.97 0.014 252 / 0.08), oklch(0.99 0.004 252 / 0.44) 32%, oklch(0.99 0.004 252 / 0.44) 68%, oklch(0.97 0.014 252 / 0.08)),
    url("/assets/hero-documents-v2.webp");
  background-position: center;
  background-size: cover;
  border: 1px solid oklch(0.89 0.018 252);
  border-radius: 16px;
  overflow: hidden;
}

.hero-kicker,
.section-label {
  margin: 0 0 5px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1.14;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero-subtitle {
  max-width: none;
  margin: 7px 0 0;
  color: oklch(0.42 0.025 252);
  font-size: 17px;
  font-weight: 500;
  white-space: nowrap;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.category-pill {
  min-height: 36px;
  padding: 0 18px;
  color: oklch(0.38 0.022 252);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  font-weight: 750;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.category-pill:hover {
  color: var(--primary);
  transform: translateY(-1px);
}

.category-pill.is-active {
  color: white;
  background: oklch(0.23 0.02 252);
  border-color: oklch(0.23 0.02 252);
}

.tool-grid-section {
  padding: 12px 0 52px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
}

.tool-card {
  position: relative;
  min-height: 204px;
  padding: 24px;
  background: var(--paper);
  border: 1px solid oklch(0.88 0.014 252);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.tool-card:hover {
  border-color: oklch(0.76 0.05 252);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}

.tool-card:focus-visible {
  outline: 3px solid oklch(0.67 0.14 255);
  outline-offset: 3px;
}

.tool-card.is-selected {
  border-color: oklch(0.68 0.11 255);
  box-shadow: 0 0 0 3px oklch(0.86 0.06 255 / 0.65);
}

.tool-card.is-hidden {
  display: none;
}

.tool-icon {
  display: block;
  width: 64px;
  height: 64px;
  margin: -4px 0 0 -5px;
  transform-origin: 50% 58%;
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tool-icon img {
  display: block;
  width: 100%;
  height: 100%;
}

.tool-card:hover .tool-icon,
.tool-card:focus-visible .tool-icon {
  transform: translateY(-2px) scale(1.025);
}

.tool-card h3 {
  margin: 16px 0 8px;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.tool-card p {
  max-width: 25ch;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

.workbench {
  max-width: 1180px;
  padding: 28px;
  margin: 8px auto 32px;
  background: oklch(1 0 0 / 0.86);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 42px oklch(0.28 0.05 252 / 0.08);
}

.membership-promo {
  position: relative;
  max-width: 1180px;
  min-height: 238px;
  padding: 30px 34px;
  margin: 0 auto 58px;
  overflow: hidden;
  isolation: isolate;
  background: oklch(0.905 0.055 252);
  border-radius: var(--radius-card);
}

.membership-promo-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.membership-promo-copy {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(52%, 560px);
  min-height: 178px;
  min-width: 0;
  justify-content: center;
  flex-direction: column;
}

.membership-promo h2 {
  max-width: 100%;
  margin: 0;
  font-size: clamp(1.65rem, 2.1vw, 2rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.membership-promo-copy > div > p {
  max-width: 50ch;
  margin: 10px 0 0;
  color: oklch(0.4 0.04 252);
  font-size: 0.94rem;
  text-wrap: pretty;
}

.membership-promo-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.membership-promo-benefits li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.83rem;
  font-weight: 700;
}

.membership-promo-benefits span {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  color: white;
  background: var(--success);
  border-radius: 50%;
  font-size: 0.68rem;
}

.membership-promo-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}

.membership-promo-actions > span {
  color: oklch(0.39 0.06 252);
  font-size: 0.82rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.workbench-header,
.file-list-header,
.file-actions,
.result-stage {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.workbench h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

#workbench-description {
  max-width: 560px;
  margin: 6px 0 0;
  color: var(--muted);
}

.retention-note {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  color: oklch(0.45 0.1 58);
  background: var(--warning-soft);
  border-radius: 9px;
  font-size: 13px;
  font-weight: 750;
}

.tool-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 14px;
}

.tool-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 15px;
  color: oklch(0.36 0.022 252);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  cursor: pointer;
  font-weight: 750;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.tool-chip:hover {
  color: var(--primary);
  border-color: oklch(0.75 0.06 255);
}

.tool-chip.is-active {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: oklch(0.75 0.07 255);
}

.drop-zone {
  min-height: 260px;
  padding: 28px;
  background: var(--paper);
  border: 2px dashed oklch(0.78 0.06 255);
  border-radius: 14px;
  transition: border-color 160ms ease, background 160ms ease;
}

.drop-zone.is-dragging {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.drop-zone-empty {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  min-height: 200px;
  max-width: 820px;
  margin: 0 auto;
}

.upload-icon,
.success-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 13px;
  font-size: 13px;
  font-weight: 900;
}

.drop-zone h3,
.result-stage h3 {
  margin: 0 0 4px;
  font-size: 20px;
  letter-spacing: -0.015em;
}

.drop-zone p,
.result-stage p {
  margin: 0;
  color: var(--muted);
}

.primary-button,
.secondary-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-control);
  font-weight: 850;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 120ms ease;
}

.primary-button {
  color: white;
  background: var(--primary);
}

.primary-button:hover {
  background: var(--primary-hover);
}

.primary-button:active,
.secondary-button:active,
.danger-button:active {
  transform: translateY(1px);
}

.primary-button:disabled {
  color: oklch(0.67 0.014 252);
  background: oklch(0.91 0.014 252);
  cursor: not-allowed;
}

.secondary-button {
  color: var(--ink);
  background: var(--surface);
}

.secondary-button:hover {
  background: var(--surface-blue);
}

.danger-button {
  color: var(--danger);
  background: var(--danger-soft);
}

.file-stage {
  min-height: 204px;
}

.file-list-header strong,
.file-list-header span {
  display: block;
}

.file-list-header span {
  color: var(--muted);
  font-size: 13px;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 22px;
}

.icon-button:hover {
  color: var(--ink);
  background: var(--surface);
}

.file-list {
  max-height: 190px;
  padding: 0;
  margin: 18px 0;
  overflow: auto;
  list-style: none;
  border-top: 1px solid var(--line);
}

.file-list li {
  display: grid;
  grid-template-columns: 28px 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.tool-options {
  display: grid;
  max-width: 860px;
  gap: 8px;
  padding: 16px;
  margin: 0 0 18px;
  background: var(--surface);
  border-radius: 10px;
}

#ocr-tool-options {
  width: calc(100% - 56px);
  max-width: none;
  margin: 0 auto 18px;
  background: var(--surface-blue);
}

.password-options,
.advanced-tool-options {
  display: grid;
  max-width: 520px;
  gap: 8px;
}

.password-options > label,
.advanced-tool-options > label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
}

.password-options > input,
.password-options > select,
.advanced-tool-options > input,
.advanced-tool-options > select {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid oklch(0.72 0.035 252);
  border-radius: 10px;
  font: inherit;
}

.password-options > input:focus-visible,
.password-options > select:focus-visible,
.advanced-tool-options > input:focus-visible,
.advanced-tool-options > select:focus-visible {
  border-color: var(--primary);
  outline: 3px solid oklch(0.84 0.07 255);
  outline-offset: 1px;
}

.tool-options p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.ocr-output-options {
  padding: 0;
  margin: 0;
  border: 0;
}

.ocr-output-options legend {
  padding: 0;
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.ocr-output-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 9px;
}

.ocr-output-choice {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  min-height: 72px;
  padding: 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.ocr-output-choice:hover {
  border-color: oklch(0.69 0.09 255);
}

.ocr-output-choice:has(input:checked) {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.ocr-output-choice:focus-within {
  outline: 3px solid oklch(0.72 0.13 255 / 0.4);
  outline-offset: 2px;
}

.ocr-output-choice input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--primary);
}

.ocr-output-choice span,
.ocr-output-choice strong,
.ocr-output-choice small {
  display: block;
}

.ocr-output-choice strong {
  margin-bottom: 3px;
  font-size: 14px;
}

.ocr-output-choice small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.ocr-output-choice em {
  padding: 2px 6px;
  color: var(--primary-hover);
  background: var(--paper);
  border-radius: 6px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.ocr-expectation {
  display: flex;
  gap: 10px;
  padding-top: 12px;
  margin-top: 10px;
  color: oklch(0.39 0.035 252);
  border-top: 1px solid oklch(0.84 0.035 252);
}

.ocr-expectation-icon {
  display: grid;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  place-items: center;
  color: var(--primary);
  background: var(--paper);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}

.tool-options .ocr-expectation p {
  max-width: 105ch;
  color: inherit;
  font-size: 13px;
  line-height: 1.6;
  text-wrap: pretty;
}

.ocr-expectation p + p {
  margin-top: 3px;
}

.ocr-expectation strong {
  color: var(--ink);
}

.file-index {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 900;
}

.file-type {
  font-weight: 850;
  color: var(--primary);
}

.file-name {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-actions {
  justify-content: flex-end;
}

.processing-timer {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  margin-top: 16px;
  color: var(--ink);
  background: var(--surface-blue);
  border-radius: 12px;
}

.processing-pulse {
  position: relative;
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
}

.processing-pulse::after {
  position: absolute;
  inset: 0;
  background: var(--primary);
  border-radius: inherit;
  content: "";
  animation: ocr-pulse 1.6s ease-out infinite;
}

.processing-timer-copy {
  flex: 1;
  min-width: 0;
}

.processing-timer-copy strong {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
}

.processing-timer-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.processing-timer-copy progress {
  display: block;
  width: min(100%, 440px);
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
  accent-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, white);
  border: 0;
  border-radius: 999px;
}

.processing-timer-copy progress::-webkit-progress-bar {
  background: color-mix(in srgb, var(--primary) 12%, white);
  border-radius: 999px;
}

.processing-timer-copy progress::-webkit-progress-value {
  background: var(--primary);
  border-radius: 999px;
  transition: width 240ms ease;
}

.processing-cancel {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 12px;
}

.processing-elapsed {
  display: flex;
  flex: 0 0 auto;
  align-items: baseline;
  justify-content: flex-end;
  gap: 4px;
  min-width: 92px;
  color: var(--primary-hover);
  font-variant-numeric: tabular-nums;
}

.processing-elapsed strong {
  font-size: 29px;
  line-height: 1;
}

.processing-elapsed span {
  font-size: 12px;
  font-weight: 750;
}

.result-stage {
  min-height: 186px;
}

.success-icon {
  color: var(--success);
  background: var(--success-soft);
}

.result-copy {
  flex: 1;
}

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

.status-message {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 12px;
  margin-top: 14px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 650;
}

.state-page {
  width: min(760px, calc(100% - 48px));
  min-height: calc(100vh - 190px);
  padding: 88px 0 64px;
  margin: 0 auto;
}

.state-page h1 {
  margin: 8px 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.045em;
}

.state-page > p:not(.section-label) {
  max-width: 660px;
  color: var(--muted);
  line-height: 1.75;
}

.state-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.status-board {
  padding: 8px 22px;
  margin-top: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.status-board > div {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 92px;
}

.status-board p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.status-dot {
  width: 12px;
  height: 12px;
  background: var(--muted);
  border-radius: 50%;
}

.status-dot.is-operational { background: var(--success); }
.status-dot.is-affected { background: var(--danger); }
.state-page-note { margin-top: 14px; font-size: 13px; }

.admin-main {
  width: min(1320px, calc(100% - 48px));
  padding: 48px 0 80px;
  margin: 0 auto;
}

.admin-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.admin-overview > div {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
}

.admin-overview span { display: block; color: var(--muted); font-size: 13px; }
.admin-overview strong { display: block; margin-top: 8px; font-size: 28px; }

.admin-panel {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.admin-monitoring {
  padding: 22px 26px;
  margin: 18px 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.admin-monitoring h2 { margin: 0 0 10px; font-size: 18px; }
.monitoring-row { display: flex; align-items: center; gap: 16px; padding: 12px 0; justify-content: space-between; }
.monitoring-row + .monitoring-row { border-top: 1px solid var(--line); }
.monitoring-row > div { display: grid; gap: 3px; }
.monitoring-row span { color: var(--muted); font-size: 12px; }
.monitoring-state { padding: 5px 8px; border-radius: 8px; font-size: 12px; }
.monitoring-ok { color: var(--success); background: var(--success-soft); }
.monitoring-warning { color: oklch(0.42 0.11 70); background: oklch(0.95 0.055 82); }
.monitoring-critical { color: var(--danger); background: oklch(0.95 0.04 25); }

.admin-panel > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.admin-panel h2, .admin-panel h3 { margin: 0; }
.admin-panel header p { margin: 6px 0 0; color: var(--muted); }
.admin-filters { display: flex; gap: 12px; }
.admin-filters label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.admin-filters select { min-width: 150px; padding: 9px 32px 9px 10px; border: 1px solid var(--line); border-radius: 9px; }
.admin-ticket { padding: 22px 0; border-bottom: 1px solid var(--line); }
.admin-ticket:last-child { border-bottom: 0; }
.admin-ticket > header { display: flex; justify-content: space-between; gap: 16px; }
.admin-ticket header p, .admin-ticket-message { color: var(--muted); }
.admin-ticket-message { max-width: 900px; white-space: pre-wrap; line-height: 1.7; }
.admin-ticket-attachments { display: flex; flex-wrap: wrap; gap: 9px; margin: 12px 0 4px; }
.admin-ticket-attachments a { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
.admin-ticket-attachments a:hover { border-color: var(--primary); }
.admin-ticket-attachments img { display: block; width: 120px; height: 86px; object-fit: cover; }
.admin-ticket dl { display: grid; grid-template-columns: 110px 1fr; max-width: 900px; gap: 5px 12px; font-size: 13px; }
.admin-ticket dt { color: var(--muted); }
.admin-ticket dd { margin: 0; overflow-wrap: anywhere; }
.admin-ticket-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.admin-ticket-actions button { min-height: 36px; padding: 7px 11px; }
.ticket-status { align-self: flex-start; padding: 5px 9px; color: var(--primary-hover); background: var(--primary-soft); border-radius: 999px; font-size: 12px; font-weight: 800; }
.ticket-resolved, .ticket-closed { color: var(--success); background: var(--success-soft); }
.ticket-rejected { color: var(--danger); background: var(--danger-soft); }
.admin-status { color: var(--muted); font-size: 13px; }

.affiliate-main {
  width: min(1240px, calc(100% - 48px));
  min-height: calc(100vh - 148px);
  padding: 52px 0 80px;
}

.affiliate-heading {
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.affiliate-heading h1 {
  max-width: 820px;
  margin: 16px 0 12px;
  font-size: 40px;
  line-height: 1.16;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.affiliate-heading > p {
  max-width: 76ch;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  text-wrap: pretty;
}

.affiliate-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 28px 0 0;
  padding: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.affiliate-facts > div {
  min-width: 160px;
  padding: 17px 22px;
}

.affiliate-facts > div + div { border-left: 1px solid var(--line); }
.affiliate-facts dt { color: var(--muted); font-size: 12px; }
.affiliate-facts dd { margin: 3px 0 0; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }

.affiliate-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 48px;
  align-items: start;
  padding-top: 44px;
}

.affiliate-content { min-width: 0; }
.affiliate-section { padding: 0 0 36px; }
.affiliate-section + .affiliate-section { padding-top: 36px; border-top: 1px solid var(--line); }
.affiliate-section h2 { margin: 0 0 18px; font-size: 24px; letter-spacing: -0.02em; }
.affiliate-section p { max-width: 72ch; margin: 0; color: var(--muted); line-height: 1.75; }

.affiliate-steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: affiliate-step;
}

.affiliate-steps li {
  display: grid;
  grid-template-columns: 36px 160px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  padding: 16px 0;
  counter-increment: affiliate-step;
}

.affiliate-steps li + li { border-top: 1px solid var(--line); }
.affiliate-steps li::before { content: counter(affiliate-step); color: var(--primary); font-weight: 850; font-variant-numeric: tabular-nums; }
.affiliate-steps strong { font-size: 15px; }
.affiliate-steps span { color: var(--muted); }

.affiliate-rule-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 22px;
  color: oklch(0.33 0.02 252);
  line-height: 1.7;
}

.affiliate-rule-list li::marker { color: var(--primary); }
.affiliate-disclosure { padding: 26px; background: var(--primary-soft); border-radius: var(--radius-card); }
.affiliate-disclosure + .affiliate-section { border-top: 0; }
.affiliate-disclosure h2 { font-size: 18px; }

.affiliate-portal {
  position: sticky;
  top: 84px;
  min-height: 220px;
  padding: 26px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.affiliate-loading,
.affiliate-note,
.affiliate-empty-line { color: var(--muted); }
.affiliate-empty { display: grid; gap: 16px; justify-items: start; }
.affiliate-empty p { margin: 0; color: var(--muted); }
.affiliate-empty .primary-button { display: inline-flex; align-items: center; }
.affiliate-application h2,
.affiliate-dashboard h2 { margin: 0; font-size: 22px; }
.affiliate-note { margin: 7px 0 20px; line-height: 1.65; }

.affiliate-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.affiliate-field { display: grid; gap: 6px; }
.affiliate-field-wide { grid-column: 1 / -1; }
.affiliate-field label { font-size: 13px; font-weight: 720; }
.affiliate-field input,
.affiliate-field textarea,
.affiliate-field select,
.affiliate-link-controls input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  font: inherit;
}

.affiliate-field textarea { min-height: 108px; resize: vertical; }
.affiliate-field input:focus-visible,
.affiliate-field textarea:focus-visible,
.affiliate-field select:focus-visible,
.affiliate-link-controls input:focus-visible { outline: 3px solid oklch(0.72 0.13 255 / 0.45); outline-offset: 2px; border-color: var(--primary); }
.affiliate-consent { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); line-height: 1.55; }
.affiliate-consent input { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 2px; }
.affiliate-form-actions { display: flex; align-items: center; gap: 12px; }
.affiliate-form-status { margin: 0; color: var(--muted); font-size: 13px; }
.affiliate-form-status.is-error { color: var(--danger); }

.affiliate-account-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.affiliate-status { padding: 5px 9px; color: var(--primary-hover); background: var(--primary-soft); border-radius: 999px; font-size: 12px; font-weight: 800; }
.affiliate-approved { color: var(--success); background: var(--success-soft); }
.affiliate-rejected,
.affiliate-suspended { color: var(--danger); background: var(--danger-soft); }
.affiliate-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 22px 0; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.affiliate-metrics > div { padding: 15px; background: var(--surface); }
.affiliate-metrics dt { color: var(--muted); font-size: 12px; }
.affiliate-metrics dd { margin: 4px 0 0; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.affiliate-link-block { display: grid; gap: 8px; }
.affiliate-link-controls { display: flex; gap: 8px; }
.affiliate-link-controls input { min-width: 0; font-size: 12px; }
.affiliate-link-controls button { flex: 0 0 auto; }
.affiliate-subheading { margin: 30px 0 10px; font-size: 16px; }
.affiliate-empty-line { margin: 0; font-size: 13px; line-height: 1.6; }
.affiliate-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.affiliate-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.affiliate-table th,
.affiliate-table td { padding: 10px 11px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
.affiliate-table th { color: var(--muted); background: var(--surface); font-weight: 700; }
.affiliate-table tbody tr:last-child td { border-bottom: 0; }
.affiliate-code-cell { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.affiliate-money-cell { font-variant-numeric: tabular-nums; font-weight: 750; }

.admin-affiliate-panel { margin-top: 18px; }
.admin-affiliate-list { display: grid; }
.admin-affiliate { padding: 22px 0; border-bottom: 1px solid var(--line); content-visibility: auto; contain-intrinsic-size: 190px; }
.admin-affiliate:last-child { border-bottom: 0; }
.admin-affiliate > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.admin-affiliate h3 { font-size: 16px; }
.admin-affiliate header p,
.admin-affiliate-summary { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.admin-affiliate-facts { display: flex; flex-wrap: wrap; gap: 18px; margin: 16px 0; }
.admin-affiliate-facts span { color: var(--muted); font-size: 12px; }
.admin-affiliate-facts strong { margin-left: 4px; color: var(--ink); font-variant-numeric: tabular-nums; }
.admin-affiliate-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.admin-affiliate-actions label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.admin-affiliate-actions input,
.admin-affiliate-actions select { min-height: 38px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; font: inherit; }
.admin-affiliate-actions input:focus-visible,
.admin-affiliate-actions select:focus-visible,
.admin-filters select:focus-visible { outline: 3px solid oklch(0.72 0.13 255 / 0.45); outline-offset: 2px; border-color: var(--primary); }
.affiliate-code-claim { display: grid; gap: 8px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.affiliate-code-claim label { color: var(--ink); font-size: 13px; font-weight: 750; }
.affiliate-code-controls { display: flex; gap: 8px; }
.affiliate-code-controls input { min-width: 0; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; font: inherit; text-transform: uppercase; }
.affiliate-code-controls input:focus-visible { outline: 3px solid oklch(0.72 0.13 255 / 0.45); outline-offset: 2px; border-color: var(--primary); }
.affiliate-code-status { min-height: 20px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.affiliate-code-status.is-error { color: var(--danger); }
.admin-commission-summary { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.admin-commission-summary span { padding: 7px 10px; background: var(--surface); border-radius: 8px; font-size: 12px; font-variant-numeric: tabular-nums; }

.status-error {
  color: var(--danger);
  background: var(--danger-soft);
}

.status-processing {
  color: var(--primary);
  background: var(--primary-soft);
}

.status-success {
  color: var(--success);
  background: var(--success-soft);
}

.process-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0;
  margin: 20px 0 0;
  list-style: none;
}

.process-rail li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.process-rail li > span {
  z-index: 1;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 11px;
}

.process-rail li.is-active {
  color: var(--primary);
}

.process-rail li.is-active > span {
  color: white;
  background: var(--primary);
  border-color: var(--primary);
}

.membership-section,
.account-center {
  max-width: 1180px;
  padding: 36px;
  margin: 0 auto 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.membership-section {
  background: linear-gradient(145deg, var(--paper), oklch(0.965 0.025 252));
  border-color: oklch(0.82 0.045 252);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.membership-section.is-active {
  border-color: oklch(0.69 0.1 154);
}

.membership-section.needs-attention {
  border-color: var(--warning);
  box-shadow: 0 0 0 3px var(--warning-soft);
}

.membership-heading,
.account-heading,
.purchase-records-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.membership-heading h2,
.account-heading h2 {
  margin: 2px 0 0;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.membership-heading p:last-child,
.account-heading p:last-child {
  max-width: 62ch;
  margin: 8px 0 0;
  color: var(--muted);
}

.membership-state,
.account-id {
  flex: 0 0 auto;
  padding: 7px 10px;
  color: oklch(0.38 0.08 255);
  background: var(--primary-soft);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 750;
}

.membership-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.68fr) minmax(0, 1.72fr);
  gap: 22px;
  margin-top: 28px;
}

.membership-benefit-panel {
  padding: 24px;
  color: oklch(0.25 0.035 252);
  background: oklch(0.94 0.034 252);
  border-radius: 12px;
}

.membership-benefit-panel h3 {
  margin: 0;
  font-size: 18px;
}

.membership-benefit-panel ul {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 20px 0;
  list-style: none;
}

.membership-benefit-panel li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
}

.membership-benefit-panel li span {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  place-items: center;
  color: white;
  background: var(--success);
  border-radius: 50%;
  font-size: 12px;
}

.membership-benefit-panel p {
  margin: 0;
  color: oklch(0.42 0.035 252);
  font-size: 13px;
}

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

.pricing-loading {
  display: grid;
  min-height: 246px;
  grid-column: 1 / -1;
  place-items: center;
  color: var(--muted);
  background: var(--surface);
  border-radius: 12px;
}

.plan-option {
  display: flex;
  min-width: 0;
  min-height: 246px;
  padding: 22px;
  align-items: stretch;
  flex-direction: column;
  color: var(--ink);
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.plan-option:hover {
  background: oklch(0.975 0.012 252);
  border-color: oklch(0.67 0.11 255);
  transform: translateY(-2px);
}

.plan-option:active {
  transform: translateY(1px);
}

.plan-option.is-recommended {
  background: oklch(0.955 0.034 252);
  border: 1px solid var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.plan-option-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.plan-option-heading strong {
  font-size: 17px;
}

.recommended-label {
  padding: 3px 7px;
  color: oklch(0.33 0.09 78);
  background: oklch(0.9 0.12 84);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 24px;
}

.plan-price strong {
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.plan-price span,
.plan-description {
  color: var(--muted);
  font-size: 12px;
}

.plan-description {
  min-height: 60px;
  margin-top: 15px;
  line-height: 1.65;
}

.plan-option-action {
  display: inline-grid;
  min-width: 88px;
  min-height: 38px;
  padding: 0 18px;
  margin-top: 20px;
  align-self: flex-start;
  place-items: center;
  color: white;
  background: var(--primary);
  border-radius: 9px;
  font-weight: 750;
  text-align: center;
}

.plan-option:hover .plan-option-action {
  background: var(--primary-hover);
}

.pricing-status,
.dialog-status {
  margin: 16px 0 0;
  color: var(--success);
  font-size: 14px;
  font-weight: 700;
}

.pricing-status:empty,
.dialog-status:empty {
  display: none;
}

.entitlement-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 28px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.entitlement-grid > div {
  min-width: 0;
  padding: 22px;
}

.entitlement-grid > div + div {
  border-left: 1px solid var(--line);
}

.entitlement-grid dt {
  color: var(--muted);
  font-size: 12px;
}

.entitlement-grid dd {
  margin: 7px 0 0;
  font-size: 17px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.account-security {
  margin-top: 34px;
  border-top: 1px solid var(--line);
}

.security-heading {
  padding: 28px 0 18px;
}

.security-heading h3,
.password-reset-panel h2 {
  margin: 0;
  font-size: 20px;
}

.security-heading p,
.password-reset-panel > p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.security-email-row,
.security-password-form,
.security-sessions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.account-danger-zone {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 0 4px;
  margin-top: 6px;
  border-top: 1px solid var(--line);
  justify-content: space-between;
}

.account-danger-zone > div {
  display: grid;
  max-width: 720px;
  gap: 5px;
}

.account-danger-zone span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.security-email-row > div:first-child,
.security-form-heading,
.session-row > div {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 4px;
}

.security-email-row span,
.security-form-heading span,
.session-row span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.security-status {
  padding: 6px 9px;
  border-radius: 8px;
  font-weight: 750;
}

.security-status[data-state="success"] {
  color: oklch(0.36 0.09 154);
  background: oklch(0.94 0.04 154);
}

.security-status[data-state="pending"] {
  color: oklch(0.38 0.07 75);
  background: oklch(0.95 0.055 82);
}

.security-password-form {
  align-items: end;
}

.security-password-form label,
.password-reset-form label {
  display: grid;
  min-width: 170px;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.security-password-form input,
.password-reset-form input {
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font: inherit;
}

.security-password-form input:focus-visible,
.password-reset-form input:focus-visible {
  border-color: var(--primary);
  outline: 3px solid var(--focus-ring);
  outline-offset: 1px;
}

.security-form-status {
  min-width: 150px;
  color: var(--muted);
  font-size: 12px;
}

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

.session-list {
  width: 100%;
}

.session-list > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.session-row {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}

.session-row + .session-row {
  border-top: 1px solid var(--line);
}

.session-row .danger-button {
  flex: 0 0 auto;
}

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

.session-current-badge {
  padding: 3px 7px;
  border-radius: 7px;
  background: oklch(0.94 0.06 151);
  color: oklch(0.34 0.09 151) !important;
  font-size: 11px !important;
  font-weight: 700;
  line-height: 1.2;
}

.security-link-notice {
  width: fit-content;
  padding: 9px 12px;
  margin-top: 14px;
  color: oklch(0.34 0.08 154);
  background: oklch(0.94 0.04 154);
  border-radius: 9px;
  font-weight: 750;
}

.password-reset-panel {
  max-width: 720px;
}

.password-reset-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.password-reset-form .primary-button,
.password-reset-form .security-form-status {
  align-self: center;
}

.auth-dialog {
  overscroll-behavior: contain;
}

.purchase-records {
  margin-top: 28px;
}

.purchase-records-heading {
  align-items: center;
}

.purchase-records-heading h3 {
  margin: 0;
  font-size: 18px;
}

.purchase-records-heading span {
  color: var(--muted);
  font-size: 12px;
}

.purchase-empty {
  display: grid;
  min-height: 150px;
  margin-top: 14px;
  place-content: center;
  gap: 7px;
  color: var(--muted);
  text-align: center;
  background: var(--surface);
  border-radius: 12px;
}

.purchase-empty strong {
  color: var(--ink);
}

.purchase-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
}

.purchase-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

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

.purchase-table th {
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
}

.order-status {
  color: var(--success);
  font-weight: 750;
}

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

.table-action-link {
  padding: 0;
  color: var(--primary);
  background: none;
  border: 0;
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.table-action-link:hover {
  text-decoration: underline;
}

.account-operations {
  margin-top: 34px;
  border-top: 1px solid var(--line);
}

.operations-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 28px;
  padding-top: 2px;
}

.ticket-form {
  --ticket-action-width: 128px;
  display: grid;
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

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

.ticket-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ticket-form input,
.ticket-form select,
.ticket-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
}

.ticket-form textarea {
  min-height: 116px;
  resize: vertical;
}

.ticket-bug-fields {
  display: grid;
  gap: 12px;
}

.ticket-bug-notice {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--primary-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.ticket-bug-notice strong { font-size: 13px; }

.ticket-bug-notice span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
}

.ticket-image-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.ticket-form .ticket-image-button {
  display: inline-flex;
  order: 2;
  flex: 0 0 var(--ticket-action-width);
  width: var(--ticket-action-width);
  min-height: 44px;
  height: 44px;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  color: var(--primary);
  background: var(--paper);
  border: 1px solid var(--primary);
  cursor: pointer;
}

.ticket-form .ticket-image-button:hover { background: var(--primary-soft); }
.ticket-form .ticket-image-button:active { transform: translateY(1px); }
.ticket-form .ticket-image-button:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.ticket-image-button-icon { font-size: 18px; font-weight: 700; line-height: 1; }
.ticket-image-help { order: 1; flex: 1 1 260px; color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.5; }

.ticket-image-preview,
.ticket-attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.ticket-image-item {
  position: relative;
  width: 112px;
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.ticket-image-item img { display: block; width: 100%; height: 72px; object-fit: cover; }

.ticket-image-item figcaption {
  padding: 6px 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-image-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 50%;
  place-items: center;
  cursor: pointer;
}

.ticket-image-remove:hover { color: var(--danger); border-color: var(--danger); }
.ticket-image-remove:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

.ticket-form input:focus-visible,
.ticket-form select:focus-visible,
.ticket-form textarea:focus-visible {
  border-color: var(--primary);
  outline: 3px solid var(--focus-ring);
  outline-offset: 1px;
}

.ticket-form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ticket-form #ticket-submit {
  order: 2;
  width: var(--ticket-action-width);
  min-height: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0 12px;
}

#ticket-form-status {
  order: 1;
  color: var(--muted);
  font-size: 12px;
}

.ticket-history .security-form-heading {
  padding: 4px 0 12px;
}

.ticket-list {
  display: grid;
  max-height: 480px;
  gap: 10px;
  overflow-y: auto;
}

.ticket-empty {
  padding: 24px;
  margin: 0;
  color: var(--muted);
  text-align: center;
  background: var(--surface);
  border-radius: 12px;
}

.ticket-card {
  padding: 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.ticket-attachment-list { margin-top: 10px; }
.ticket-attachment-list a { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
.ticket-attachment-list a:hover { border-color: var(--primary); }
.ticket-attachment-list img { display: block; width: 68px; height: 54px; object-fit: cover; }

.ticket-card-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  justify-content: space-between;
}

.ticket-card-heading > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.ticket-card-heading > div span,
.ticket-meta {
  color: var(--muted);
  font-size: 11px;
}

.ticket-card-heading strong {
  overflow-wrap: anywhere;
}

.ticket-state {
  flex: 0 0 auto;
  padding: 5px 7px;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
}

.ticket-state-resolved {
  color: var(--success);
  background: var(--success-soft);
}

.ticket-state-rejected,
.ticket-state-closed {
  color: var(--muted);
  background: var(--surface);
}

.ticket-meta,
.ticket-note {
  margin: 9px 0 0;
  overflow-wrap: anywhere;
}

.ticket-note {
  font-size: 12px;
  line-height: 1.55;
}

.payment-result-main {
  display: grid;
  width: min(calc(100% - 48px), 720px);
  min-height: calc(100vh - 132px);
  padding: 64px 0;
  margin: 0 auto;
  place-items: center;
}

.payment-result-panel {
  width: 100%;
  padding: 56px 48px;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.payment-result-icon {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  place-items: center;
  color: var(--success);
  background: var(--success-soft);
  border-radius: 50%;
  font-size: 32px;
  font-weight: 900;
}

.payment-result-panel h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.payment-result-panel p {
  max-width: 52ch;
  margin: 12px auto 0;
  color: var(--muted);
}

.payment-result-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.legal-main {
  width: min(calc(100% - 48px), 1120px);
  min-height: calc(100vh - 148px);
  padding: 52px 0 72px;
}

.legal-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.legal-heading h1 {
  margin: 12px 0 8px;
  font-size: 36px;
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.legal-heading > p {
  margin: 0;
  color: var(--muted);
}

.policy-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}

.legal-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: 84px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.legal-toc strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

.legal-toc a {
  display: block;
  padding: 7px 0;
  color: var(--muted);
  font-size: 13px;
}

.legal-toc a:hover {
  color: var(--primary);
}

.legal-article {
  padding: 34px 40px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.legal-article section + section {
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

.legal-article h2 {
  margin: 0 0 12px;
  font-size: 21px;
  line-height: 1.3;
}

.legal-article h3 {
  margin: 18px 0 8px;
  font-size: 16px;
}

.legal-article p,
.legal-article li {
  max-width: 74ch;
  color: oklch(0.34 0.022 252);
}

.legal-article p {
  margin: 0 0 12px;
}

.legal-article ul,
.legal-article ol {
  display: grid;
  gap: 8px;
  padding-left: 22px;
  margin: 10px 0 0;
}

.legal-article a,
.contact-note a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.legal-callout {
  padding: 15px 17px;
  margin: 18px 0 0;
  color: oklch(0.34 0.045 252);
  background: var(--primary-soft);
  border-left: 3px solid var(--primary);
  border-radius: 0 9px 9px 0;
}

.contact-panel {
  max-width: 760px;
  padding: 30px 34px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.contact-panel h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.contact-note {
  margin: 0 0 22px;
  color: var(--muted);
}

.contact-form {
  display: grid;
  gap: 18px;
}

.contact-field {
  display: grid;
  gap: 7px;
}

.contact-field label {
  font-size: 13px;
  font-weight: 750;
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  padding: 11px 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  font: inherit;
}

.contact-field textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-field input:focus-visible,
.contact-field textarea:focus-visible {
  border-color: var(--primary);
  outline: 3px solid oklch(0.72 0.13 255 / 0.24);
}

.contact-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.contact-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.contact-status.is-success {
  color: var(--success);
  font-weight: 700;
}

.contact-status.is-error {
  color: var(--danger);
  font-weight: 700;
}

.guide-body {
  background:
    linear-gradient(180deg, oklch(0.982 0.008 252), oklch(0.968 0.015 252));
}

.guide-main {
  width: min(calc(100% - 48px), 1120px);
  min-height: calc(100vh - 148px);
  padding: 38px 0 72px;
}

.guide-breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
}

.guide-breadcrumb a {
  color: var(--primary);
  font-weight: 700;
}

.guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.75fr);
  gap: 24px;
  padding: 44px 46px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.guide-hero h1,
.overview-hero h1 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.guide-hero > div > p,
.overview-hero p {
  max-width: 62ch;
  margin: 16px 0 24px;
  color: var(--muted);
  font-size: 17px;
  text-wrap: pretty;
}

.guide-hero aside {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  min-height: 196px;
  padding: 24px;
  color: oklch(0.27 0.04 252);
  background: var(--primary-soft);
  border-left: 3px solid var(--primary);
  border-radius: 0 10px 10px 0;
}

.guide-hero aside strong {
  color: var(--primary-hover);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide-process,
.guide-expect,
.guide-faq,
.guide-related,
.overview-guide article > section {
  padding-top: 32px;
  margin-top: 32px;
  border-top: 1px solid var(--line);
}

.guide-main h2 {
  margin: 0 0 16px;
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.guide-process ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: guide-step;
}

.guide-process li {
  min-height: 112px;
  padding: 20px 24px;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  counter-increment: guide-step;
}

.guide-process li + li {
  border-left: 1px solid var(--line);
}

.guide-process li::before {
  display: block;
  margin-bottom: 12px;
  color: var(--primary);
  content: "0" counter(guide-step);
  font-size: 13px;
  font-weight: 850;
}

.guide-expect p,
.overview-guide article > section > p {
  max-width: 75ch;
  margin: 0;
  color: oklch(0.34 0.022 252);
}

.guide-faq dl {
  margin: 0;
}

.guide-faq dl > div {
  display: grid;
  grid-template-columns: minmax(220px, 0.38fr) minmax(0, 1fr);
  gap: 28px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.guide-faq dt {
  font-weight: 800;
}

.guide-faq dd {
  margin: 0;
  color: var(--muted);
}

.guide-related > div,
.overview-tools > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 30px;
}

.guide-related a {
  display: grid;
  gap: 4px;
  min-height: 100px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  overflow-wrap: anywhere;
  transition: transform 160ms ease;
}

.guide-related a:hover {
  color: var(--primary);
  transform: translateX(6px);
}

.guide-related a span {
  color: var(--muted);
  font-size: 13px;
}

.overview-hero {
  padding: 52px 0 36px;
}

.overview-hero h1 {
  max-width: 20ch;
}

.overview-guide article > section:first-of-type {
  margin-top: 0;
}

.seo-discovery {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 64px;
  max-width: 1180px;
  padding: 44px 0 56px;
  margin: 56px auto 12px;
  border-top: 1px solid var(--line);
}

.seo-discovery h2 {
  max-width: 15ch;
  margin: 0;
  font-size: 31px;
  line-height: 1.16;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.seo-discovery-intro > p {
  max-width: 48ch;
  margin: 12px 0 20px;
  color: var(--muted);
}

.seo-guide-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.seo-guide-links a {
  color: var(--primary);
  font-size: 13px;
  font-weight: 750;
}

.seo-guide-links a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.seo-quick-answers {
  margin: 0;
}

.seo-quick-answers > div {
  display: grid;
  grid-template-columns: minmax(160px, 0.42fr) minmax(0, 1fr);
  gap: 24px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
}

.seo-quick-answers dt {
  font-weight: 800;
}

.seo-quick-answers dd {
  margin: 0;
  color: var(--muted);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: min(calc(100% - 48px), var(--content));
  padding: 24px 0 34px;
  margin: 0 auto;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
}

.footer-links a {
  font-weight: 650;
}

.is-hidden {
  display: none !important;
}

.auth-dialog {
  width: min(calc(100% - 40px), 460px);
  max-height: calc(100dvh - 40px);
  padding: 0;
  overflow: auto;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-radius: 16px;
  box-shadow: 0 24px 64px oklch(0.18 0.035 252 / 0.28);
}

.auth-dialog::backdrop {
  background: oklch(0.18 0.025 252 / 0.56);
}

.auth-dialog-panel {
  position: relative;
  padding: 30px;
}

.auth-close {
  position: absolute;
  top: 17px;
  right: 17px;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 9px;
  place-items: center;
  cursor: pointer;
  font-size: 23px;
  line-height: 1;
}

.auth-close:hover {
  color: var(--ink);
  background: var(--surface-blue);
}

.auth-kicker {
  color: var(--primary);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.auth-dialog h2 {
  margin: 5px 42px 0 0;
  font-size: 25px;
  letter-spacing: -0.025em;
}

.auth-intro {
  margin: 9px 0 20px;
  color: var(--muted);
  font-size: 14px;
}

.auth-google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 9px 14px;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 750;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.auth-google-button svg {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
}

.auth-google-button:hover,
.auth-google-button:focus-visible {
  color: var(--primary);
  background: var(--surface-blue);
  border-color: oklch(0.66 0.11 255 / 0.55);
}

.auth-google-button:active {
  color: var(--primary-hover);
  background: var(--primary-soft);
}

.auth-provider-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 15px 0;
  color: var(--muted);
  font-size: 12px;
}

.auth-provider-divider::before,
.auth-provider-divider::after {
  height: 1px;
  background: var(--line);
  content: "";
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 20px;
  background: var(--surface);
  border-radius: 11px;
}

.auth-tabs button {
  min-height: 38px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 750;
}

.auth-tabs button.is-active {
  color: var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow-card);
}

.auth-tabs button:hover:not(.is-active) {
  color: var(--ink);
  background: oklch(0.96 0.012 255);
}

.auth-form {
  display: grid;
  gap: 15px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 750;
}

.auth-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.auth-form input:focus-visible {
  border-color: var(--primary);
  outline: 3px solid oklch(0.72 0.13 255 / 0.24);
  outline-offset: 0;
}

.auth-form small {
  color: var(--muted);
  font-weight: 550;
}

.auth-text-action {
  width: fit-content;
  padding: 2px 0;
  margin: 0 auto;
  color: var(--primary);
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.auth-text-action:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-status {
  min-height: 21px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.auth-status[data-type="error"] {
  color: var(--danger);
}

.auth-submit {
  width: 100%;
  min-height: 44px;
}

.account-auth-gate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  min-height: 220px;
  padding: 36px;
}

.account-auth-copy {
  max-width: 720px;
}

.account-auth-copy h2 {
  margin: 6px 0 8px;
  font-size: 27px;
  letter-spacing: -0.025em;
}

.account-auth-copy p {
  margin: 0;
  color: var(--muted);
}

.account-auth-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.account-logout {
  border: 0;
  cursor: pointer;
}

.spin {
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes ocr-pulse {
  0% { opacity: 0.48; transform: scale(1); }
  78%, 100% { opacity: 0; transform: scale(2.25); }
}

@media (max-width: 1250px) {
  .tool-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .nav-tools {
    display: none;
  }

  .hero {
    padding-inline: 32px;
  }

  .hero-subtitle {
    max-width: 720px;
    white-space: normal;
  }

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

  .drop-zone-empty,
  .membership-layout {
    grid-template-columns: 1fr;
  }

  .membership-promo-copy {
    width: min(62%, 520px);
  }

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

  .entitlement-grid > div:nth-child(3) {
    border-left: 0;
  }

  .entitlement-grid > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-toc {
    position: static;
  }
}

@media (max-width: 640px) {
  main {
    width: min(calc(100% - 28px), var(--content));
  }

  .hero {
    min-height: 0;
    margin-top: 12px;
    padding: 26px 20px 22px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

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

  .workbench {
    padding: 18px;
  }

  .membership-promo {
    padding: 22px;
  }

  .membership-promo-art {
    object-position: 62% center;
    opacity: 0.32;
  }

  .membership-promo-copy {
    width: 100%;
  }

  .membership-promo-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .membership-section,
  .account-center {
    padding: 22px;
  }

  .legal-main {
    width: min(calc(100% - 28px), 1120px);
    padding-top: 34px;
  }

  .legal-article,
  .contact-panel {
    padding: 24px 20px;
  }

  .membership-heading,
  .account-heading,
  .plan-options {
    grid-template-columns: 1fr;
  }

  .membership-heading,
  .account-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .entitlement-grid > div + div,
  .entitlement-grid > div:nth-child(3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .workbench-header,
  .file-list-header,
  .file-actions,
  .result-stage,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
