* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

:root {
  --ink: #111316;
  --ink-soft: #303842;
  --muted-strong: #5e6875;
  --line: color-mix(in srgb, var(--border) 72%, #ffffff 28%);
  --glass: color-mix(in srgb, var(--surface) 84%, transparent);
  --tint: color-mix(in srgb, var(--brand-secondary) 10%, #ffffff 90%);
  --tint-strong: color-mix(in srgb, var(--brand-secondary) 18%, #ffffff 82%);
  --accent-soft: color-mix(in srgb, var(--brand-accent) 16%, #ffffff 84%);
  --shadow-sm: 0 10px 28px rgba(17, 19, 22, 0.08);
  --shadow-md: 0 18px 48px rgba(17, 19, 22, 0.12);
  --shadow-lg: 0 28px 80px rgba(17, 19, 22, 0.16);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --max-page: 1180px;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.10), transparent 26rem),
    radial-gradient(circle at 84% 10%, rgba(249, 115, 22, 0.10), transparent 22rem),
    linear-gradient(180deg, #ffffff 0%, var(--page-bg) 44%, #f6f7f9 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  min-height: 100%;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand-secondary) 38%, transparent);
  outline-offset: 3px;
}

.site-header {
  align-items: center;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72) inset;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 clamp(18px, 4vw, 48px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand-mark {
  align-items: center;
  color: var(--brand-primary);
  display: inline-flex;
  font-size: 20px;
  font-weight: 850;
  gap: 10px;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark::before {
  background:
    linear-gradient(135deg, var(--brand-secondary), var(--brand-accent)),
    var(--brand-primary);
  border-radius: 8px;
  box-shadow: 0 12px 24px color-mix(in srgb, var(--brand-secondary) 22%, transparent);
  content: "";
  height: 28px;
  width: 28px;
}

.site-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.site-nav form {
  margin: 0;
}

.site-nav a,
.site-nav button {
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--ink-soft);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  line-height: 1;
  padding: 10px 12px;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.site-nav a:hover,
.site-nav button:hover {
  background: var(--tint);
  color: var(--brand-primary);
  transform: translateY(-1px);
}

.site-nav .nav-cta,
.button {
  align-items: center;
  background: linear-gradient(135deg, var(--brand-secondary), color-mix(in srgb, var(--brand-secondary) 70%, var(--brand-accent) 30%));
  border: 0;
  border-radius: 999px;
  box-shadow: 0 16px 34px color-mix(in srgb, var(--brand-secondary) 22%, transparent);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 850;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  text-decoration: none;
  transition: box-shadow 180ms ease, transform 180ms ease, filter 180ms ease;
}

.button:hover,
.site-nav .nav-cta:hover {
  color: #ffffff;
  filter: saturate(1.05);
  transform: translateY(-2px);
  box-shadow: 0 20px 42px color-mix(in srgb, var(--brand-secondary) 28%, transparent);
}

.button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.2);
  opacity: 0.48;
  transform: none;
}

.button-muted {
  background: linear-gradient(135deg, #606b79, #2f3741);
  box-shadow: 0 16px 34px rgba(47, 55, 65, 0.18);
}

.button-soft {
  background:
    linear-gradient(180deg, #ffffff, color-mix(in srgb, var(--brand-secondary) 7%, #ffffff 93%)),
    #ffffff;
  border: 1px solid color-mix(in srgb, var(--brand-secondary) 30%, var(--line) 70%);
  box-shadow: none;
  color: var(--brand-primary);
}

.button-soft:hover {
  color: var(--brand-primary);
  box-shadow: 0 14px 30px color-mix(in srgb, var(--brand-secondary) 12%, transparent);
}

main {
  min-height: calc(100vh - 76px);
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(36px, 6vw, 72px);
  padding: clamp(34px, 5vw, 58px) clamp(20px, 4vw, 44px) 26px;
}

.footer-shell {
  display: grid;
  gap: clamp(24px, 4vw, 42px);
  grid-template-columns: minmax(260px, 1.45fr) repeat(4, minmax(140px, 1fr));
  margin: 0 auto;
  max-width: var(--max-page);
}

.portal-writer .footer-shell,
.portal-admin .footer-shell {
  grid-template-columns: minmax(260px, 1.6fr) repeat(2, minmax(160px, 0.7fr));
}

.footer-brand {
  display: grid;
  gap: 16px;
}

.footer-brand .brand-mark {
  width: fit-content;
}

.footer-brand p,
.footer-bottom,
.footer-links a,
.footer-links span {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.footer-brand p {
  margin: 0;
  max-width: 420px;
}

.footer-links {
  display: grid;
  gap: 9px;
}

address.footer-links {
  font-style: normal;
}

.footer-links h2 {
  color: var(--brand-primary);
  font-size: 13px;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.footer-links a {
  text-decoration: none;
  transition: color 160ms ease, transform 160ms ease;
}

.footer-links a:hover {
  color: var(--brand-secondary);
  transform: translateX(2px);
}

.footer-bottom {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin: 32px auto 0;
  max-width: var(--max-page);
  padding-top: 18px;
}

.hero,
.panel,
.auth-panel {
  margin: 0 auto;
  max-width: var(--max-page);
  padding: clamp(48px, 7vw, 86px) clamp(20px, 4vw, 44px);
}

.auth-panel {
  max-width: 560px;
}

.panel-narrow {
  max-width: 860px;
}

.hero-shell,
.dashboard-hero,
.split-workspace,
.humanizer-workbench,
.order-layout,
.seo-hero {
  align-items: stretch;
  display: grid;
  gap: clamp(24px, 4vw, 44px);
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
}

.dashboard-hero,
.seo-hero {
  align-items: center;
}

.hero-copy,
.panel-lede {
  animation: rise-in 420ms ease both;
}

.hero h1,
.panel h1,
.auth-panel h1 {
  color: var(--brand-primary);
  font-size: clamp(44px, 7vw, 72px);
  letter-spacing: 0;
  line-height: 0.95;
  margin: 10px 0 20px;
  max-width: 980px;
}

.panel h1,
.auth-panel h1 {
  font-size: clamp(36px, 5vw, 56px);
}

.hero p,
.panel p,
.auth-panel p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.72;
  max-width: 760px;
}

.lede {
  color: var(--ink-soft);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.6;
}

.eyebrow {
  align-items: center;
  color: var(--brand-secondary);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  gap: 8px;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

.eyebrow::before {
  background: linear-gradient(135deg, var(--brand-secondary), var(--brand-accent));
  border-radius: 999px;
  content: "";
  height: 8px;
  width: 8px;
}

.hero-actions,
.action-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.text-link {
  color: var(--brand-primary);
  font-weight: 850;
  text-decoration: none;
}

.text-link:hover {
  color: var(--brand-secondary);
}

.product-preview,
.workspace-panel,
.subscription-panel,
.quote-panel,
.compact-form,
.text-output,
.table-shell,
.metric-card,
.timeline-card {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 94%, #ffffff 6%), var(--surface)),
    #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.product-preview {
  display: grid;
  gap: 16px;
  min-height: 360px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.product-preview::before {
  background: linear-gradient(135deg, var(--tint-strong), var(--accent-soft));
  content: "";
  height: 120px;
  inset: 0 0 auto 0;
  position: absolute;
}

.preview-bar,
.preview-card,
.preview-output {
  position: relative;
}

.preview-bar {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.preview-dots {
  display: flex;
  gap: 6px;
}

.preview-dots span {
  background: rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  height: 10px;
  width: 10px;
}

.preview-pill {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  color: var(--brand-primary);
  font-size: 12px;
  font-weight: 850;
  padding: 8px 10px;
}

.preview-card,
.preview-output {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 18px;
}

.preview-card h2,
.preview-output h2 {
  color: var(--brand-primary);
  font-size: 18px;
  letter-spacing: 0;
  margin: 0 0 10px;
}

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

.preview-lines span {
  background: linear-gradient(90deg, #dfe7f1, #f1f5f9);
  border-radius: 999px;
  height: 10px;
}

.preview-lines span:nth-child(2) {
  width: 86%;
}

.preview-lines span:nth-child(3) {
  width: 64%;
}

.trust-strip,
.step-strip,
.status-timeline {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-top: 30px;
}

.trust-item,
.step-item,
.status-step {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
}

.trust-item strong,
.step-item strong,
.status-step strong {
  color: var(--brand-primary);
  display: block;
  font-size: 24px;
  line-height: 1.1;
}

.trust-item span,
.step-item span,
.status-step span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 750;
  margin-top: 6px;
}

.workspace-grid,
.feature-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin-top: 32px;
}

.blog-category-grid {
  display: grid;
  gap: clamp(28px, 5vw, 52px);
  margin-top: 34px;
}

.category-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.category-picker a {
  background: color-mix(in srgb, #ffffff 84%, var(--tint) 16%);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--brand-primary);
  font-size: 14px;
  font-weight: 850;
  padding: 10px 14px;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.category-picker a:hover,
.category-picker a:focus {
  border-color: color-mix(in srgb, var(--brand-secondary) 58%, var(--line) 42%);
  box-shadow: 0 12px 30px rgba(17, 19, 22, 0.08);
  transform: translateY(-1px);
}

.blog-category-section {
  scroll-margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}

.workspace-card,
.feature-card {
  background: linear-gradient(180deg, #ffffff, color-mix(in srgb, var(--surface) 96%, var(--tint) 4%));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 14px 40px rgba(17, 19, 22, 0.07);
  color: inherit;
  display: block;
  padding: 22px;
  position: relative;
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.workspace-card::before,
.feature-card::before {
  background: linear-gradient(135deg, var(--brand-secondary), var(--brand-accent));
  border-radius: 999px;
  content: "";
  display: block;
  height: 10px;
  margin-bottom: 18px;
  width: 42px;
}

.workspace-card:hover,
a.workspace-card:hover,
.feature-card:hover {
  border-color: color-mix(in srgb, var(--brand-secondary) 42%, var(--line) 58%);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.workspace-card h2,
.feature-card h2,
.section-header h2 {
  color: var(--brand-primary);
  font-size: 22px;
  letter-spacing: 0;
  line-height: 1.15;
  margin: 0 0 10px;
}

.workspace-card p,
.feature-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
}

.workspace-panel {
  padding: clamp(20px, 3vw, 28px);
}

.subscription-panel {
  align-items: center;
  background:
    linear-gradient(135deg, var(--tint-strong), #ffffff 58%),
    var(--surface);
  display: flex;
  gap: 22px;
  justify-content: space-between;
  margin: 30px 0;
  padding: clamp(20px, 3vw, 28px);
}

.subscription-panel h2,
.text-output h2 {
  color: var(--brand-primary);
  font-size: 24px;
  margin: 0 0 10px;
}

.subscription-panel p {
  margin: 0;
}

.workspace-panel h2 {
  color: var(--brand-primary);
  font-size: 24px;
  margin: 0 0 12px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

form p {
  display: grid;
  gap: 7px;
  margin: 0;
}

label {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 850;
}

input,
select,
textarea {
  background:
    linear-gradient(180deg, #ffffff, color-mix(in srgb, var(--surface) 94%, var(--tint) 6%));
  border: 1px solid color-mix(in srgb, var(--line) 84%, var(--brand-secondary) 16%);
  border-radius: var(--radius-md);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 10px 24px rgba(17, 19, 22, 0.04);
  color: var(--text);
  font: inherit;
  min-height: 48px;
  outline: none;
  padding: 12px 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
  width: 100%;
}

select {
  appearance: none;
  background-image:
    linear-gradient(180deg, #ffffff, color-mix(in srgb, var(--surface) 94%, var(--tint) 6%)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: 0 0, right 14px center;
  background-repeat: no-repeat;
  background-size: auto, 18px;
  padding-right: 46px;
}

textarea {
  line-height: 1.55;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: color-mix(in srgb, var(--brand-secondary) 58%, var(--line) 42%);
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--brand-secondary) 13%, transparent),
    0 14px 32px rgba(17, 19, 22, 0.08);
}

input:disabled,
select:disabled,
textarea:disabled {
  background: color-mix(in srgb, var(--surface) 78%, #ffffff 22%);
  color: var(--muted);
  cursor: not-allowed;
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 72%, #ffffff 28%);
}

.compact-form {
  margin-top: 20px;
  padding: clamp(20px, 3vw, 28px);
}

.form-section {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 16px;
  padding-top: 22px;
}

.form-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.form-section h2 {
  color: var(--brand-primary);
  font-size: 24px;
  margin: 4px 0 0;
}

.field-block {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field-block small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.field-block .errorlist,
.compact-form .errorlist,
.workspace-panel .errorlist {
  color: #b42318;
  display: grid;
  font-size: 14px;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.field-row {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.choice-grid ul,
.choice-grid > div:not(.errorlist) {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.choice-grid li,
.choice-grid > div:not(.errorlist) > div {
  display: flex;
  min-width: min(190px, 100%);
}

.choice-grid-tight li,
.choice-grid-tight > div:not(.errorlist) > div {
  min-width: min(140px, 100%);
}

.choice-grid li label,
.choice-grid > div:not(.errorlist) > div label {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(17, 19, 22, 0.05);
  cursor: pointer;
  display: flex;
  gap: 10px;
  min-height: 48px;
  padding: 12px 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
  width: 100%;
}

.choice-grid input[type="radio"],
.choice-grid input[type="checkbox"] {
  accent-color: var(--brand-secondary);
  min-height: auto;
  width: auto;
}

.choice-grid li label:has(input:checked),
.choice-grid > div:not(.errorlist) > div label:has(input:checked) {
  border-color: color-mix(in srgb, var(--brand-secondary) 58%, var(--line) 42%);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--brand-secondary) 14%, transparent);
  color: var(--brand-primary);
  transform: translateY(-1px);
}

.choice-grid li label:hover,
.choice-grid > div:not(.errorlist) > div label:hover {
  border-color: color-mix(in srgb, var(--brand-secondary) 36%, var(--line) 64%);
}

.derived-words,
.order-price-preview {
  background: linear-gradient(135deg, var(--tint), #ffffff);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: grid;
  gap: 8px;
  padding: 16px;
}

.derived-words span,
.order-price-preview span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.derived-words strong,
.order-price-preview strong {
  color: var(--brand-primary);
  font-size: 24px;
}

.order-price-preview {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand-secondary) 9%, #ffffff 91%), #ffffff);
}

.order-price-preview small {
  color: var(--muted);
  line-height: 1.45;
}

.account-fields {
  background: color-mix(in srgb, var(--tint) 52%, #ffffff 48%);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
}

.payment-panel,
.credit-pack-panel {
  margin-top: 20px;
}

.payment-options {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.payment-options form {
  margin: 0;
}

.payment-option-button {
  align-items: flex-start;
  border-radius: var(--radius-md);
  flex-direction: column;
  gap: 4px;
  min-height: 70px;
  text-align: left;
}

.payment-option-button small {
  color: color-mix(in srgb, #ffffff 76%, var(--brand-primary) 24%);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  max-width: 260px;
}

.payment-options-compact {
  gap: 8px;
}

.payment-options-compact .button {
  min-height: 40px;
  padding: 9px 12px;
}

.payment-options-compact .payment-option-button {
  min-height: 52px;
  min-width: 150px;
}

.payment-options-compact .payment-option-button small {
  max-width: 190px;
}

.payment-method-field {
  gap: 12px;
}

.payment-method-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.payment-method-card {
  align-items: flex-start;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(17, 19, 22, 0.05);
  cursor: pointer;
  display: flex;
  gap: 12px;
  min-height: 92px;
  padding: 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.payment-method-card input {
  accent-color: var(--brand-secondary);
  margin-top: 3px;
  min-height: auto;
  width: auto;
}

.payment-method-card span {
  display: grid;
  gap: 5px;
}

.payment-method-card strong {
  color: var(--brand-primary);
}

.payment-method-card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.payment-method-card:has(input:checked) {
  border-color: color-mix(in srgb, var(--brand-secondary) 58%, var(--line) 42%);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--brand-secondary) 14%, transparent);
  transform: translateY(-1px);
}

.payment-method-card:hover {
  border-color: color-mix(in srgb, var(--brand-secondary) 36%, var(--line) 64%);
}

.credit-pack-grid {
  margin-top: 12px;
}

.credit-pack-card {
  align-content: start;
  gap: 12px;
}

.credit-pack-card strong {
  color: var(--brand-primary);
  font-size: 15px;
}

.humanizer-page {
  --brand-secondary: #0f766e;
  --brand-accent: #d97706;
  --tint: color-mix(in srgb, #0f766e 9%, #ffffff 91%);
  --tint-strong: color-mix(in srgb, #0f766e 16%, #fff7ed 84%);
  padding-top: clamp(16px, 2.5vw, 30px);
}

.humanizer-hero {
  display: grid;
  justify-items: center;
  margin: 0 auto;
  max-width: 1120px;
  text-align: center;
}

.humanizer-hero h1 {
  color: #111827;
  font-size: clamp(38px, 5.4vw, 70px);
  line-height: 1;
  margin: 8px 0 14px;
  max-width: 1080px;
}

.humanizer-hero .lede {
  color: var(--muted);
  font-size: clamp(17px, 1.8vw, 22px);
  line-height: 1.5;
  margin: 0;
  max-width: 850px;
}

.humanizer-usage-inline {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.humanizer-usage-inline > span {
  background: color-mix(in srgb, #ffffff 82%, #f0fdfa 18%);
  border: 1px solid color-mix(in srgb, #99f6e4 55%, var(--line) 45%);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 850;
  padding: 8px 14px;
}

.humanizer-usage-inline {
  margin-top: 12px;
}

.humanizer-usage-inline > span {
  display: inline-flex;
  gap: 8px;
}

.humanizer-usage-inline strong {
  color: #0f766e;
  font-size: inherit;
}

.humanizer-shell {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.humanizer-controls {
  align-items: start;
  border-top: 1px solid var(--line);
  display: grid;
  gap: clamp(16px, 3vw, 34px);
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.7fr);
  padding-top: 18px;
}

.humanizer-controls > .field-block {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr);
}

.humanizer-controls > .field-block > label {
  color: var(--ink-soft);
  font-size: 16px;
  margin-top: 13px;
}

.humanizer-style-control li,
.humanizer-style-control > div:not(.errorlist) > div {
  min-width: auto;
}

.humanizer-style-control li label,
.humanizer-style-control > div:not(.errorlist) > div label {
  border-radius: 999px;
  box-shadow: none;
  min-height: 48px;
  padding: 12px 18px;
}

.humanizer-style-control li label:has(input:checked),
.humanizer-style-control > div:not(.errorlist) > div label:has(input:checked) {
  background: #0f766e;
  color: #ffffff;
}

.humanizer-strength-control > div:not(.errorlist),
.humanizer-strength-control ul {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  gap: 0;
  overflow: hidden;
}

.humanizer-strength-control li,
.humanizer-strength-control > div:not(.errorlist) > div {
  min-width: 112px;
}

.humanizer-strength-control li label,
.humanizer-strength-control > div:not(.errorlist) > div label {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  justify-content: center;
}

.humanizer-strength-control li label:has(input:checked),
.humanizer-strength-control > div:not(.errorlist) > div label:has(input:checked) {
  background: #0f766e;
  color: #ffffff;
  transform: none;
}

.humanizer-workbench {
  align-items: stretch;
  gap: clamp(16px, 3vw, 28px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-top: 0;
}

.humanizer-workbench .workspace-panel {
  overflow: hidden;
  padding: 0;
}

.humanizer-workbench .workspace-panel h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.humanizer-workbench textarea {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  min-height: clamp(250px, 34vh, 360px);
  padding: 22px;
}

.tool-card-header,
.tool-card-footer,
.upload-row {
  border-bottom: 1px solid var(--line);
  padding: 18px 22px;
}

.tool-card-header,
.tool-card-footer {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.tool-card-actions {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 800;
  gap: 12px;
  justify-content: flex-end;
}

.button-reset {
  background: transparent;
  border: 0;
  cursor: pointer;
  min-height: auto;
  padding: 0;
  width: auto;
}

.upload-row {
  border-bottom: 0;
  border-top: 1px solid var(--line);
}

.upload-row input[type="file"] {
  background: color-mix(in srgb, #ffffff 80%, var(--surface) 20%);
  border-style: dashed;
}

.output-panel {
  display: grid;
  gap: 14px;
  grid-template-rows: auto 1fr;
}

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

.output-box {
  background: #ffffff;
  border: 0;
  border-radius: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.75;
  min-height: clamp(366px, 47vh, 488px);
  overflow: auto;
  padding: 22px;
  white-space: normal;
}

.output-box p {
  color: var(--text);
  font-size: 16px;
  margin: 0 0 12px;
  max-width: none;
}

.output-box p:last-child {
  margin-bottom: 0;
}

.output-box span {
  color: var(--muted);
}

.output-actions {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 22px;
}

.output-actions .button,
.output-actions .button-muted {
  min-height: 42px;
  padding: 10px 14px;
}

.humanizer-status {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--brand-primary);
  font-size: 14px;
  font-weight: 800;
  padding: 12px 14px;
}

.humanizer-status[data-tone="success"] {
  background: #ecfdf3;
  border-color: #abefc6;
  color: #067647;
}

.humanizer-status[data-tone="error"] {
  background: #fef3f2;
  border-color: #fecdca;
  color: #b42318;
}

.humanizer-run-prompt {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 251, 235, 0.96), rgba(255, 247, 237, 0.86)),
    #fffaf4;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-md);
  box-shadow: 0 16px 38px rgba(180, 83, 9, 0.08);
  display: grid;
  gap: 18px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin-top: 24px;
  padding: clamp(18px, 2.5vw, 26px);
}

.humanizer-run-prompt-icon {
  align-items: center;
  color: #d97706;
  display: inline-flex;
  font-size: clamp(26px, 3vw, 34px);
  justify-content: center;
  line-height: 1;
  min-width: 42px;
}

.humanizer-run-prompt-copy {
  display: grid;
  gap: 6px;
}

.humanizer-run-prompt-copy h2 {
  color: #111827;
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.2;
  margin: 0;
}

.humanizer-run-prompt-copy p {
  color: #4b5563;
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.45;
  margin: 0;
}

.humanizer-run-prompt-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.expert-support-band {
  margin-top: 26px;
}

.expert-support-panel {
  display: grid;
  gap: 14px;
}

.expert-support-panel h2 {
  margin-bottom: 0;
}

.expert-support-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 6px;
}

.expert-support-grid .feature-card {
  min-width: 0;
  padding: 18px;
}

.expert-support-grid .feature-card h2 {
  font-size: 20px;
  overflow-wrap: anywhere;
}

.section-header {
  align-items: end;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-top: 40px;
}

.section-header p {
  font-size: 16px;
  margin: 6px 0 0;
}

.inline-form {
  display: inline-flex;
  margin: 2px 4px 2px 0;
}

.message-stack {
  display: grid;
  gap: 10px;
  margin: 24px auto 0;
  max-width: var(--max-page);
  padding: 0 clamp(20px, 4vw, 44px);
}

.message {
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand-secondary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  padding: 14px 16px;
}

.detail-grid,
.metric-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin: 30px 0;
}

.detail-grid div,
.metric-card {
  background: linear-gradient(180deg, #ffffff, color-mix(in srgb, var(--surface) 96%, var(--tint) 4%));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 36px rgba(17, 19, 22, 0.07);
  padding: 18px;
}

.detail-grid span,
.metric-card span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.detail-grid strong,
.metric-card strong {
  color: var(--brand-primary);
  display: block;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.1;
}

.metric-card p {
  color: var(--muted);
  font-size: 14px;
  margin: 10px 0 0;
}

.table-shell {
  margin-top: 18px;
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  min-width: 720px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: color-mix(in srgb, var(--surface) 86%, var(--tint) 14%);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

tbody tr {
  transition: background 140ms ease;
}

tbody tr:hover {
  background: color-mix(in srgb, var(--tint) 42%, transparent);
}

td a {
  color: var(--brand-secondary);
  font-weight: 850;
  text-decoration: none;
}

.badge {
  background: var(--tint);
  border: 1px solid color-mix(in srgb, var(--brand-secondary) 20%, var(--line) 80%);
  border-radius: 999px;
  color: var(--brand-primary);
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  padding: 7px 10px;
}

.status-timeline {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.status-step {
  position: relative;
}

.status-step::before {
  background: linear-gradient(135deg, var(--brand-secondary), var(--brand-accent));
  border-radius: 999px;
  content: "";
  display: block;
  height: 10px;
  margin-bottom: 12px;
  width: 10px;
}

.order-detail-page {
  display: grid;
  gap: clamp(18px, 3vw, 28px);
  margin: 0 auto;
  max-width: var(--max-page);
  padding: clamp(30px, 5vw, 56px) clamp(18px, 4vw, 44px);
}

.order-detail-hero,
.order-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), color-mix(in srgb, var(--surface) 94%, #ffffff 6%)),
    #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.order-detail-hero {
  align-items: end;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
  padding: clamp(22px, 4vw, 36px);
}

.order-title-block {
  min-width: 0;
}

.order-title-block h1 {
  color: var(--brand-primary);
  font-size: clamp(32px, 5vw, 54px);
  letter-spacing: 0;
  line-height: 1;
  margin: 10px 0 14px;
  overflow-wrap: anywhere;
}

.order-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.order-hero-meta span,
.order-status-step span {
  background: var(--tint);
  border: 1px solid color-mix(in srgb, var(--brand-secondary) 18%, var(--line) 82%);
  border-radius: 999px;
  color: var(--brand-primary);
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  padding: 8px 10px;
}

.order-price-card {
  background: linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-primary) 72%, var(--brand-secondary) 28%));
  border-radius: var(--radius-md);
  box-shadow: 0 18px 40px rgba(17, 19, 22, 0.18);
  color: #ffffff;
  min-width: 220px;
  padding: 20px;
}

.order-price-card span,
.order-price-card small {
  color: rgba(255, 255, 255, 0.74);
  display: block;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.order-price-card strong {
  display: block;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.05;
  margin: 8px 0 10px;
  white-space: nowrap;
}

.order-price-card small {
  overflow-wrap: anywhere;
  text-transform: none;
}

.order-status-track {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.order-status-step {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
}

.order-status-step.is-done {
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand-accent) 12%, #ffffff 88%), #ffffff);
  border-color: color-mix(in srgb, var(--brand-accent) 62%, var(--line) 38%);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--brand-accent) 12%, transparent);
}

.order-status-step.is-current {
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand-secondary) 18%, #ffffff 82%), #ffffff);
  border-color: color-mix(in srgb, var(--brand-secondary) 78%, var(--line) 22%);
  box-shadow: 0 18px 38px color-mix(in srgb, var(--brand-secondary) 18%, transparent);
}

.order-status-step.is-upcoming {
  background: color-mix(in srgb, #ffffff 72%, var(--tint) 28%);
  border-color: color-mix(in srgb, var(--line) 78%, #ffffff 22%);
  opacity: 0.58;
}

.order-status-step span {
  align-items: center;
  background: color-mix(in srgb, var(--tint) 64%, #ffffff 36%);
  border: 1px solid color-mix(in srgb, var(--brand-secondary) 18%, var(--line) 82%);
  border-radius: 999px;
  color: var(--brand-primary);
  display: inline-flex;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  padding: 0;
  width: 28px;
}

.order-status-step.is-done span {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
  color: #ffffff;
}

.order-status-step.is-current span {
  background: var(--brand-secondary);
  border-color: var(--brand-secondary);
  color: #ffffff;
}

.order-status-step strong {
  color: var(--brand-primary);
  font-size: 15px;
  line-height: 1.2;
}

.order-status-step small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.order-detail-layout {
  align-items: start;
  display: grid;
  gap: clamp(18px, 3vw, 28px);
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
}

.order-main-stack,
.order-side-stack {
  display: grid;
  gap: clamp(18px, 3vw, 26px);
  min-width: 0;
}

.order-side-stack {
  position: sticky;
  top: 96px;
}

.order-card {
  min-width: 0;
  padding: clamp(18px, 3vw, 28px);
}

.order-card h2 {
  color: var(--brand-primary);
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: 0;
  line-height: 1.15;
  margin: 8px 0 0;
}

.order-card p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.order-section-header {
  align-items: center;
  margin: 0 0 20px;
}

.order-section-header .action-row {
  margin-top: 0;
}

.order-facts {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin: 0;
}

.order-facts div {
  background: color-mix(in srgb, #ffffff 82%, var(--tint) 18%);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  min-width: 0;
  padding: 14px;
}

.order-facts dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.order-facts dd {
  color: var(--brand-primary);
  font-size: clamp(16px, 2vw, 20px);
  font-weight: 850;
  line-height: 1.25;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.monospace-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 16px !important;
}

.order-payment-card {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand-secondary) 9%, #ffffff 91%), #ffffff 66%),
    #ffffff;
}

.order-payment-options {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.order-payment-options form {
  margin: 0;
}

.payment-method-card {
  background: #ffffff;
  border: 1px solid color-mix(in srgb, var(--brand-secondary) 28%, var(--line) 72%);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(17, 19, 22, 0.06);
  color: var(--brand-primary);
  cursor: pointer;
  display: grid;
  gap: 7px;
  padding: 16px;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  width: 100%;
}

.payment-method-card:hover {
  border-color: color-mix(in srgb, var(--brand-secondary) 58%, var(--line) 42%);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.payment-method-card strong {
  font-size: 16px;
}

.payment-method-card small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.payment-method-cta {
  align-items: center;
  background: var(--brand-primary);
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  justify-content: center;
  margin-top: 6px;
  min-height: 38px;
  padding: 8px 14px;
  width: 100%;
}

.order-side-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.order-side-actions .button {
  width: 100%;
}

.order-upload-form {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(170px, 0.34fr) minmax(240px, 0.66fr);
}

.order-upload-notes,
.order-upload-form .button {
  grid-column: 1 / -1;
}

.order-upload-form input[type="file"] {
  background: #ffffff;
  padding: 8px;
}

.order-upload-form input[type="file"]::file-selector-button {
  background: var(--tint);
  border: 1px solid color-mix(in srgb, var(--brand-secondary) 26%, var(--line) 74%);
  border-radius: 999px;
  color: var(--brand-primary);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  margin-right: 12px;
  min-height: 34px;
  padding: 7px 12px;
}

.order-table-shell table {
  min-width: 0;
}

.empty-state {
  background: color-mix(in srgb, #ffffff 84%, var(--tint) 16%);
  border: 1px dashed color-mix(in srgb, var(--brand-secondary) 26%, var(--line) 74%);
  border-radius: var(--radius-md);
  margin: 18px 0 0;
  padding: 16px;
}

.order-instructions {
  background: color-mix(in srgb, #ffffff 84%, var(--tint) 16%);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: 0;
  max-width: none !important;
  padding: 18px;
  overflow-wrap: anywhere;
}

.message-thread {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.thread-message {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  max-width: 760px;
  padding: 18px;
}

.thread-message-own {
  border-left: 5px solid var(--brand-secondary);
  margin-left: auto;
}

.thread-message-meta {
  align-items: center;
  color: var(--muted);
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.thread-message-meta strong {
  color: var(--brand-primary);
}

.thread-message p {
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  margin: 10px 0 0;
}

.thread-message small {
  color: var(--muted);
  display: block;
  margin-top: 10px;
}

.text-output {
  color: var(--text);
  font-size: 17px;
  line-height: 1.75;
  margin-top: 16px;
  padding: 24px;
  white-space: normal;
}

.article-body {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  display: grid;
  font-size: 17px;
  gap: 18px;
  line-height: 1.78;
  margin-top: 24px;
  padding: clamp(22px, 4vw, 38px);
}

.article-body h2 {
  color: var(--brand-primary);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  margin: 18px 0 0;
}

.article-body p,
.article-body ul {
  margin: 0;
  max-width: 820px;
}

.article-body ul {
  display: grid;
  gap: 10px;
  padding-left: 22px;
}

.checklist {
  list-style: none;
  padding-left: 0;
}

.checklist li::before {
  color: var(--brand-secondary);
  content: "✓";
  font-weight: 900;
  margin-right: 10px;
}

.article-callout,
.article-example {
  background: linear-gradient(135deg, var(--tint), #ffffff);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
}

.article-example strong {
  color: var(--brand-primary);
  display: block;
  margin-bottom: 8px;
}

.text-output-muted {
  color: var(--muted);
}

.breadcrumbs {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  gap: 8px;
  margin-bottom: 22px;
}

.breadcrumbs a {
  color: var(--brand-secondary);
  font-weight: 850;
  text-decoration: none;
}

.breadcrumbs span::before {
  color: var(--muted);
  content: "/";
  margin-right: 8px;
}

.faq-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.quote-panel {
  margin-top: 34px;
  padding: clamp(22px, 3vw, 30px);
}

.quote-panel h2 {
  color: var(--brand-primary);
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: 0;
  line-height: 1;
  margin: 8px 0 18px;
}

.portal-writer {
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.10), transparent 28rem),
    radial-gradient(circle at 86% 14%, rgba(245, 158, 11, 0.12), transparent 20rem),
    linear-gradient(180deg, #ffffff, var(--page-bg));
}

.portal-admin {
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.09), transparent 28rem),
    radial-gradient(circle at 86% 14%, rgba(249, 115, 22, 0.12), transparent 20rem),
    linear-gradient(180deg, #ffffff, var(--page-bg));
}

.portal-writer .brand-mark::before {
  background: linear-gradient(135deg, #0f766e, #f59e0b);
}

.portal-admin .brand-mark::before {
  background: linear-gradient(135deg, #7c3aed, #f97316);
}

.portal-writer .site-header {
  border-bottom-color: color-mix(in srgb, #99f6e4 58%, var(--border) 42%);
}

.portal-admin .site-header {
  border-bottom-color: color-mix(in srgb, #ddd6fe 58%, var(--border) 42%);
}

.portal-admin {
  --ops-sidebar: 292px;
  background: #eef1f6;
  color: #111827;
}

.portal-admin .site-footer {
  display: none;
}

.portal-admin .site-header {
  align-items: stretch;
  background: #201d4f;
  border: 0;
  box-shadow: none;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100vh;
  justify-content: flex-start;
  left: 0;
  min-height: 100vh;
  overflow-y: auto;
  padding: 0;
  position: fixed;
  top: 0;
  width: var(--ops-sidebar);
  z-index: 40;
}

.portal-admin .site-header > .brand-mark {
  align-items: center;
  background: #201d4f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  color: #ffffff;
  display: flex;
  font-size: 20px;
  min-height: 82px;
  padding: 0 18px;
}

.portal-admin .site-header > .brand-mark::before {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.78);
  box-shadow: none;
  height: 22px;
  width: 22px;
}

.portal-admin main {
  margin-left: var(--ops-sidebar);
  min-height: 100vh;
}

.portal-admin .message-stack {
  left: calc(var(--ops-sidebar) + 24px);
  position: fixed;
  right: 24px;
  top: 88px;
  z-index: 60;
}

.ops-sidebar-nav {
  align-items: stretch;
  display: flex;
  flex: 1;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 2px;
  justify-content: flex-start;
  padding: 0 0 18px;
}

.ops-nav-head {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: auto 1fr auto;
  min-height: 82px;
  padding: 0 18px;
}

.ops-shield {
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.70);
  border-radius: 8px;
  display: inline-flex;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.ops-nav-head > span:nth-child(2) {
  color: #ffffff;
  font-size: 18px;
  font-weight: 850;
}

.ops-role-pill {
  background: #7c3aed;
  border-radius: 5px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 7px 10px;
  text-transform: uppercase;
}

.ops-nav-section {
  color: #7f8cff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  margin: 22px 14px 9px;
  text-transform: uppercase;
}

.portal-admin .site-nav .ops-nav-link,
.portal-admin .site-nav .ops-signout-form button {
  align-items: center;
  border-radius: 0;
  color: #c8c8ea;
  display: grid;
  font-size: 15px;
  font-weight: 650;
  gap: 12px;
  grid-template-columns: 24px 1fr;
  justify-content: start;
  min-height: 44px;
  padding: 11px 18px;
  text-align: left;
  width: 100%;
}

.portal-admin .site-nav .ops-nav-link:hover,
.portal-admin .site-nav .ops-signout-form button:hover,
.portal-admin .site-nav .ops-nav-link.is-active {
  background: #7541e8;
  color: #ffffff;
  transform: none;
}

.ops-nav-user {
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  display: grid;
  gap: 10px;
  grid-template-columns: auto 1fr;
  margin-top: auto;
  padding: 18px 18px 10px;
}

.ops-avatar {
  align-items: center;
  background: #7c3aed;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-weight: 850;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.ops-nav-user strong,
.ops-nav-user small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ops-nav-user strong {
  color: #ffffff;
  font-size: 13px;
}

.ops-nav-user small {
  color: #8c8cff;
  font-size: 12px;
}

.ops-signout-form {
  padding: 0 12px;
}

.portal-admin .site-nav .ops-signout-form button {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: block;
  text-align: center;
}

.ops-shell {
  padding: 0 clamp(18px, 2.6vw, 34px) 34px;
}

.ops-topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid #dce1ea;
  display: flex;
  justify-content: space-between;
  margin: 0 calc(clamp(18px, 2.6vw, 34px) * -1) 24px;
  min-height: 70px;
  padding: 0 clamp(18px, 2.6vw, 34px);
  position: sticky;
  top: 0;
  z-index: 30;
}

.ops-breadcrumb {
  align-items: center;
  color: #606672;
  display: flex;
  font-size: 15px;
  gap: 12px;
}

.ops-breadcrumb span + span::before {
  color: #969da8;
  content: "/";
  margin-right: 12px;
}

.ops-status-pill {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d8dde5;
  border-radius: 999px;
  color: #2f3845;
  display: inline-flex;
  font-size: 13px;
  font-weight: 850;
  gap: 7px;
  padding: 7px 12px;
}

.ops-status-pill span {
  background: #2f9e62;
  border-radius: 999px;
  height: 8px;
  width: 8px;
}

.ops-page-heading {
  align-items: end;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.ops-page-heading h1 {
  color: #171b25;
  font-size: clamp(30px, 3vw, 42px);
  letter-spacing: 0;
  line-height: 1;
  margin: 0 0 8px;
}

.ops-page-heading p {
  color: #626b78;
  font-size: 16px;
  margin: 0;
}

.ops-outline-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid #aeb6c3;
  border-radius: 8px;
  color: #4a5360;
  display: inline-flex;
  font-weight: 850;
  min-height: 38px;
  padding: 8px 13px;
  text-decoration: none;
}

.ops-metric-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 28px;
}

.ops-metric-card,
.ops-panel-card,
.ops-table-card,
.ops-quick-card,
.ops-feature-card {
  background: #ffffff;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ops-metric-card {
  min-height: 146px;
  padding: 24px;
  position: relative;
}

.ops-metric-label {
  color: #7b8390;
  display: block;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 28px;
  text-transform: uppercase;
}

.ops-metric-card strong {
  color: #161b25;
  display: block;
  font-size: 38px;
  letter-spacing: 0;
  line-height: 0.9;
}

.ops-metric-card small {
  color: #9098a5;
  display: block;
  font-size: 14px;
  margin-top: 14px;
}

.ops-metric-icon {
  align-items: center;
  border-radius: 7px;
  display: inline-flex;
  font-size: 22px;
  height: 46px;
  justify-content: center;
  position: absolute;
  right: 24px;
  top: 24px;
  width: 46px;
}

.icon-blue { background: #eef2ff; color: #4263eb; }
.icon-gold { background: #fff8e1; color: #d97706; }
.icon-green { background: #ecfdf3; color: #31a65d; }
.icon-red { background: #fff0f1; color: #e11d48; }

.ops-panel-grid,
.ops-bottom-grid,
.ops-settings-layout {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
  margin-bottom: 28px;
}

.ops-panel-card,
.ops-table-card,
.ops-quick-card,
.ops-feature-card {
  overflow: hidden;
}

.ops-panel-card > header,
.ops-table-card > header,
.ops-quick-card > header,
.ops-feature-card > header {
  align-items: center;
  border-bottom: 1px solid #dde3ec;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 18px;
}

.ops-panel-card h2,
.ops-table-card h2,
.ops-quick-card h2,
.ops-feature-card h2 {
  color: #20252e;
  font-size: 18px;
  letter-spacing: 0;
  margin: 0;
}

.ops-panel-card a,
.ops-table-card header a {
  color: #666e7a;
  font-weight: 650;
  text-decoration: none;
}

.ops-chart {
  align-items: end;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(8, 1fr);
  height: 260px;
  padding: 36px 28px 28px;
}

.ops-chart span {
  background: linear-gradient(180deg, #7c3aed, #4263eb);
  border-radius: 6px 6px 0 0;
  min-height: 10px;
  position: relative;
}

.ops-chart-orders span {
  background: linear-gradient(180deg, #31a65d, #14b8a6);
}

.ops-chart small {
  bottom: -24px;
  color: #8a93a0;
  font-size: 11px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
}

.ops-table-wrap {
  overflow-x: auto;
}

.ops-data-table {
  border-collapse: collapse;
  min-width: 680px;
  width: 100%;
}

.ops-data-table th,
.ops-data-table td {
  border-bottom: 1px solid #dfe5ee;
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
}

.ops-data-table th {
  color: #4a5360;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.ops-data-table td {
  color: #20252e;
  font-size: 14px;
}

.ops-data-table td a {
  color: #2970ff;
  font-weight: 850;
  text-decoration: none;
}

.ops-state-pill {
  border: 1px solid #d7dde7;
  border-radius: 999px;
  color: #4d5663;
  display: inline-flex;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  padding: 5px 10px;
  text-transform: uppercase;
}

.ops-state-pill.on {
  background: #34875c;
  border-color: #34875c;
  color: #ffffff;
}

.ops-state-pill.off {
  background: #ffffff;
  color: #737b86;
}

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

.ops-quick-grid a {
  align-items: center;
  border-radius: 8px;
  display: grid;
  gap: 2px 12px;
  grid-template-columns: 42px 1fr;
  padding: 12px;
  text-decoration: none;
}

.ops-quick-grid a:hover {
  background: #f5f7fb;
}

.ops-quick-grid span {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  grid-row: span 2;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.ops-quick-grid strong {
  color: #2970ff;
  font-size: 15px;
}

.ops-quick-grid small {
  color: #6d7480;
}

.ops-settings-layout {
  align-items: start;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.8fr);
}

.ops-settings-table {
  min-width: 860px;
}

.ops-setting-key {
  color: #d9468e;
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 15px;
  font-weight: 750;
  margin-bottom: 4px;
}

.ops-settings-table small {
  color: #69717d;
  display: block;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-setting-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 15px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-type-pill {
  background: #f8fafc;
  border: 1px solid #dce2eb;
  border-radius: 7px;
  color: #303846;
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  padding: 5px 9px;
}

.ops-edit-button {
  align-items: center;
  border: 1px solid #2970ff;
  border-radius: 8px;
  color: #2970ff;
  display: inline-flex;
  font-size: 16px;
  font-weight: 850;
  height: 34px;
  justify-content: center;
  width: 38px;
}

.ops-feature-list {
  display: grid;
}

.ops-feature-list a {
  align-items: center;
  border-bottom: 1px solid #dfe5ee;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto;
  padding: 14px 18px;
  text-decoration: none;
}

.ops-feature-list strong {
  color: #d9468e;
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  margin-bottom: 4px;
}

.ops-feature-list small,
.ops-feature-list p {
  color: #69717d;
  margin: 0;
}

.mini-chart {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(9, 1fr);
  height: 160px;
  margin-top: 18px;
}

.mini-chart span {
  background: linear-gradient(180deg, var(--brand-secondary), var(--brand-accent));
  border-radius: 999px 999px 4px 4px;
  min-height: 24px;
}

.mini-chart span:nth-child(1) { height: 34%; }
.mini-chart span:nth-child(2) { height: 48%; }
.mini-chart span:nth-child(3) { height: 38%; }
.mini-chart span:nth-child(4) { height: 62%; }
.mini-chart span:nth-child(5) { height: 72%; }
.mini-chart span:nth-child(6) { height: 56%; }
.mini-chart span:nth-child(7) { height: 82%; }
.mini-chart span:nth-child(8) { height: 68%; }
.mini-chart span:nth-child(9) { height: 92%; }

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 920px) {
  .portal-admin .site-header {
    height: auto;
    min-height: 0;
    overflow: visible;
    position: static;
    width: 100%;
  }

  .portal-admin .site-header > .brand-mark {
    min-height: 68px;
  }

  .portal-admin main {
    margin-left: 0;
  }

  .portal-admin .message-stack {
    left: 14px;
    right: 14px;
    top: 14px;
  }

  .ops-sidebar-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-bottom: 12px;
  }

  .ops-nav-head,
  .ops-nav-section,
  .ops-nav-user,
  .ops-signout-form {
    grid-column: 1 / -1;
  }

  .portal-admin .site-nav .ops-nav-link {
    border-radius: 8px;
    margin: 0 8px;
    width: auto;
  }

  .ops-topbar {
    position: static;
  }

  .ops-metric-grid,
  .ops-panel-grid,
  .ops-bottom-grid,
  .ops-settings-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 16px;
    padding-top: 16px;
    position: static;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .hero-shell,
  .dashboard-hero,
  .split-workspace,
  .humanizer-workbench,
  .humanizer-controls,
  .order-layout,
  .seo-hero {
    grid-template-columns: 1fr;
  }

  .humanizer-controls > .field-block {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .footer-shell,
  .portal-writer .footer-shell,
  .portal-admin .footer-shell {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .order-detail-hero,
  .order-detail-layout {
    grid-template-columns: 1fr;
  }

  .order-side-stack {
    position: static;
  }

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

  .subscription-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .humanizer-run-prompt {
    align-items: flex-start;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .humanizer-run-prompt-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .humanizer-workbench textarea,
  .output-box {
    min-height: 260px;
  }
}

@media (max-width: 640px) {
  .ops-sidebar-nav,
  .ops-metric-grid,
  .ops-panel-grid,
  .ops-bottom-grid,
  .ops-settings-layout,
  .ops-quick-grid {
    grid-template-columns: 1fr;
  }

  .ops-page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .ops-chart {
    height: 210px;
  }

  .hero,
  .panel,
  .auth-panel {
    padding: 40px 18px;
  }

  .hero h1,
  .panel h1,
  .auth-panel h1 {
    font-size: 38px;
  }

  .site-nav a,
  .site-nav button {
    padding: 9px 10px;
  }

  .order-detail-page {
    padding: 28px 14px;
  }

  .order-status-track,
  .order-upload-form {
    grid-template-columns: 1fr;
  }

  .order-price-card {
    min-width: 0;
  }

  .order-section-header .action-row,
  .order-section-header .button {
    width: 100%;
  }

  .order-facts {
    grid-template-columns: 1fr;
  }

  .product-preview {
    min-height: 300px;
  }

  .footer-shell,
  .portal-writer .footer-shell,
  .portal-admin .footer-shell {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .humanizer-run-prompt {
    grid-template-columns: 1fr;
  }

  .humanizer-run-prompt-icon {
    justify-content: flex-start;
  }

  .humanizer-run-prompt-actions .button {
    width: 100%;
  }
}
