/* Foundations adapted from the local WiLL frontend. */
@font-face {
  font-family: Inter;
  src: url("/assets/fonts/InterVariable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root, :root[data-theme="light"] {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-optical-sizing: none;
  --page: #ffffff;
  --surface: #fff;
  --subtle: #f4f6f8;
  --hover: #e9edf2;
  --ink: #20252d;
  --muted: #5f6b7a;
  --line: #e5e9ef;
  --control-line: #7c8898;
  --accent: #246cd0;
  --accent-hover: #1d5bb0;
  --accent-text: #fff;
  --tint: #ebf3ff;
  --focus: #246cd0;
  --danger: #a33d36;
  --danger-bg: #fcf0ee;
  --danger-line: #ca8a84;
  --shadow: 0 2px 0 #25372b0a, 0 9px 28px #25372b0c;
  --gutter: clamp(1rem, 4vw, 2rem);
  --measure: 74rem;
  --sidebar: 14.5rem;
  --radius: 0.75rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --page: #14181f;
    --surface: #1b222c;
    --subtle: #1e2631;
    --hover: #293544;
    --ink: #edf1f7;
    --muted: #adb9ca;
    --line: #303c4c;
    --control-line: #6d7e95;
    --accent: #92bdff;
    --accent-hover: #b7d4ff;
    --accent-text: #142338;
    --tint: #1d304d;
    --focus: #a5c8ff;
    --danger: #ffb4ac;
    --danger-bg: #392626;
    --danger-line: #a06660;
    --shadow: 0 2px 0 #0c100e50, 0 9px 28px #0c100e40;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #14181f;
  --surface: #1b222c;
  --subtle: #1e2631;
  --hover: #293544;
  --ink: #edf1f7;
  --muted: #adb9ca;
  --line: #303c4c;
  --control-line: #6d7e95;
  --accent: #92bdff;
  --accent-hover: #b7d4ff;
  --accent-text: #142338;
  --tint: #1d304d;
  --focus: #a5c8ff;
  --danger: #ffb4ac;
  --danger-bg: #392626;
  --danger-line: #a06660;
  --shadow: 0 2px 0 #0c100e50, 0 9px 28px #0c100e40;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden], .ad-slot:empty { display: none !important; }

body {
  min-height: 100vh;
  margin: 0;
  background: var(--page);
  color: var(--ink);
  line-height: 1.55;
}

body, button, input, select, textarea { font-family: inherit; }
button, input, select, textarea { font-size: 1rem; }
button, select { cursor: pointer; }
button:disabled, select:disabled, input:disabled { cursor: default; }
button { color: inherit; }

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.14; }
a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 0.1em; }
::selection { background-color: var(--tint); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.container {
  width: min(calc(100% - 2 * var(--gutter)), var(--measure));
  margin-inline: auto;
}

.sr-only, .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  padding: 0;
  margin: -1px;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  z-index: 5;
  top: 0.75rem;
  left: var(--gutter);
  padding: 0.625rem 0.875rem;
  transform: translateY(-180%);
  background: var(--surface);
  border: 1px solid var(--control-line);
  border-radius: var(--radius);
}

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

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.25rem;
  min-height: 4rem;
  padding-block: 0.625rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand::before {
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
  background:
    linear-gradient(var(--accent), var(--accent)) left 14% center / 16% 42% no-repeat,
    linear-gradient(var(--accent), var(--accent)) center / 16% 80% no-repeat,
    linear-gradient(var(--accent), var(--accent)) right 14% center / 16% 56% no-repeat;
  content: "";
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.85rem;
  font-size: 0.875rem;
}

.site-header nav a, .site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 2.125rem;
  color: var(--muted);
  text-decoration: none;
}

.site-header nav a:hover, .site-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.theme-toggle, .locale-switch a, .icon-button {
  display: inline-grid;
  min-width: 2.125rem;
  min-height: 2.125rem;
  place-items: center;
  padding: 0.125rem 0.375rem;
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  background: var(--surface);
  line-height: 1;
}

.theme-toggle { font-size: 1.05rem; }

.locale-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.1875rem;
  padding: 0.125rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: var(--subtle);
}

.locale-switch a {
  min-width: 2rem;
  min-height: 1.75rem;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 650;
}

.locale-switch a[aria-current="page"] {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.theme-toggle:hover, .locale-switch a:hover, .icon-button:not(:disabled):hover {
  background: var(--hover);
  color: var(--ink);
}

.hero {
  display: grid;
  justify-items: start;
  gap: 0.875rem;
  padding-block: clamp(2.3rem, 7vw, 4.15rem) clamp(1.45rem, 4.8vw, 2.6rem);
}

.sound-mark {
  display: inline-flex;
  width: 3.2rem;
  height: 3.2rem;
  align-items: center;
  justify-content: center;
  gap: 0.16rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--tint);
  color: var(--accent);
  box-shadow: 0 1px 0 var(--control-line);
}

.sound-mark span {
  width: 0.19rem;
  height: 0.76rem;
  border-radius: 2px;
  background: currentColor;
}

.sound-mark span:nth-child(2), .sound-mark span:nth-child(4) { height: 1.2rem; }
.sound-mark span:nth-child(3) { height: 1.68rem; }
.sound-mark span:nth-child(5) { height: 0.55rem; }

.hero h1, .prose h1 {
  max-width: 18ch;
  font-size: clamp(2.2rem, 6vw, 3.65rem);
  font-weight: 760;
  letter-spacing: -0.067em;
  text-wrap: balance;
}

.hero p {
  max-width: 55ch;
  color: var(--muted);
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  text-wrap: pretty;
}

.tool-card {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tool-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 1rem clamp(1rem, 5vw, 1.625rem);
  border-bottom: 1px solid var(--line);
  border-radius: 0.85rem 0.85rem 0 0;
  background: var(--subtle);
}

.tool-heading { display: grid; gap: 0.275rem; min-width: 0; }

.tool-top h2, .job-panel h3, .result-panel h3 {
  font-size: 1rem;
  font-weight: 720;
  letter-spacing: -0.025em;
}

.quota, .hint {
  min-height: 1.4em;
  color: var(--muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.job-form, .job-panel, .result-panel {
  padding: clamp(1rem, 5vw, 1.625rem);
}

.job-form, .input-grid, .link-entry, .option, .job-panel, .result-panel {
  display: grid;
  min-width: 0;
}

.job-form { gap: 0.95rem; }

.mode-switch {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.8rem clamp(1rem, 4vw, 1.6rem) 0;
}

.mode-switch button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--tint);
  color: var(--accent);
  font-weight: 650;
}

#local-file { max-width: 100%; }
#local-file::file-selector-button {
  margin-inline-end: 0.65rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--control-line);
  border-radius: var(--radius);
  background: var(--subtle);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.local-actions { display: flex; }
@media (max-width: 30rem) {
  .local-actions button { width: 100%; }
}
.input-grid { gap: 0.65rem; }
.link-entry { gap: 0.3rem; }
.option { gap: 0.35rem; }

.link-entry label, .option label, .preview-label {
  font-size: 0.875rem;
  font-weight: 650;
}

.input-line {
  display: flex;
  align-items: stretch;
  gap: 0.55rem;
}

.input-line input, .option input[type=url], .option select, .result-panel textarea, .form-options select, .combine-option select {
  width: 100%;
  min-width: 0;
  min-height: 2.65rem;
  padding: 0.55rem 0.675rem;
  border: 1px solid var(--control-line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

.input-line input { flex: 1 1 auto; }
.input-line input::placeholder, .option input[type=url]::placeholder { color: var(--muted); opacity: 1; }

.option select, .form-options select, .combine-option select {
  appearance: none;
  padding-inline-end: 1.85rem;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) right 0.92rem center / 0.27rem 0.27rem no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) right 0.65rem center / 0.27rem 0.27rem no-repeat,
    var(--surface);
}

.primary, .secondary, .secondary-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--control-line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: 0 1px 0 var(--accent-hover);
}

.primary:not(:disabled, [aria-disabled="true"]):hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.secondary:not(:disabled):hover, .secondary-button:not(:disabled):hover { background: var(--hover); }

.primary:disabled, .secondary:disabled, .secondary-button:disabled, .text-button:disabled,
.icon-button:disabled, select:disabled {
  border-color: var(--line);
  background-color: var(--subtle);
  color: var(--muted);
  box-shadow: none;
}

.input-actions, .result-actions, .status-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.9rem;
}

.text-button {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 650;
  text-align: start;
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.text-button:not(:disabled):hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
.text-button:disabled { background-color: transparent; text-decoration: none; }
.remove-button { align-self: stretch; min-width: 2.65rem; font-size: 1.15rem; }

.drop-area {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
  min-height: 4.25rem;
  padding: 0.75rem;
  border: 1px dashed var(--control-line);
  border-radius: var(--radius);
  background: var(--subtle);
  color: var(--muted);
  font-size: 0.875rem;
}

.drop-area strong { color: var(--ink); font-weight: 650; }
.drop-area button:not(.text-button) { margin-inline-start: auto; }
.drop-area .secondary { min-height: 2.25rem; padding: 0.35rem 0.65rem; font-size: 0.875rem; }
.drop-details { display: grid; gap: 0.05rem; }
.drop-icon {
  display: inline-grid;
  min-width: 1.75rem;
  min-height: 1.75rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: var(--surface);
  color: var(--accent);
  font-size: 1rem;
}

.drop-area:is(.is-dragging, .is-dragover, .drag-over, [data-dragging="true"]) {
  border-color: var(--accent);
  background: var(--tint);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.file-list, .job-items {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.file-list li, .job-items li {
  min-width: 0;
  padding: 0.45rem 0.625rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--subtle);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

.file-list li, .item-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.65rem;
}

.form-options {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.8rem 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.form-options > * { min-width: 0; }
.form-options .option { flex: 1 1 8rem; max-width: 100%; }
.form-options label { font-size: 0.875rem; }

.check-option {
  display: inline-flex;
  min-height: 2.65rem;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.875rem;
}

.check-option input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: var(--accent);
}

.combine-option {
  display: grid;
  gap: 0.35rem;
  padding: 0;
  margin: 0;
  border: 0;
  min-width: 0;
}

.combine-option legend { padding: 0; font-size: 0.875rem; font-weight: 650; }

.notice {
  padding: 0.65rem 0.8rem;
  margin: 0 clamp(1rem, 5vw, 1.625rem) 1rem;
  border: 1px solid var(--danger-line);
  border-radius: var(--radius);
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

.notice:empty, .job-items:empty, .file-list:empty { display: none; }

.job-panel, .result-panel {
  gap: 0.7rem;
  border-top: 1px solid var(--line);
}

.job-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.8rem;
  font-variant-numeric: tabular-nums;
}

.status-actions { justify-content: space-between; }
.status-actions p { color: var(--muted); font-size: 0.875rem; }

.job-panel progress {
  overflow: hidden;
  width: 100%;
  height: 0.55rem;
  appearance: none;
  border: 0;
  border-radius: 0.3rem;
  background: var(--tint);
  color: var(--accent);
}

.job-panel progress::-webkit-progress-bar { background: var(--tint); }
.job-panel progress::-webkit-progress-value { border-radius: 0.3rem; background: var(--accent); }
.job-panel progress::-moz-progress-bar { border-radius: 0.3rem; background: var(--accent); }
.job-panel progress:indeterminate,
.job-panel progress:indeterminate::-webkit-progress-bar {
  background: linear-gradient(90deg, var(--tint) 10%, var(--accent) 50%, var(--tint) 90%) 0 / 200% 100%;
}
@media (prefers-reduced-motion: no-preference) {
  .job-panel progress:indeterminate,
  .job-panel progress:indeterminate::-webkit-progress-bar {
    animation: progress-wait 1.8s ease-in-out infinite alternate;
  }
}
@keyframes progress-wait { to { background-position: 100% 0; } }
.item-state { color: var(--muted); text-align: end; }
.item-error { margin-top: 0.25rem; color: var(--danger); }

.preview-label { display: block; margin-bottom: 0.35rem; }

.result-panel textarea {
  display: block;
  min-height: 10rem;
  resize: vertical;
  background: var(--subtle);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.875rem;
  line-height: 1.55;
}

.ad-slot { margin-block: 3.25rem; }

.support-section { margin-top: clamp(2.75rem, 7vw, 4rem); }

.support-section h2, .prose h2 {
  margin-bottom: 0.9rem;
  font-size: clamp(1.35rem, 4.25vw, 1.65rem);
  font-weight: 730;
  letter-spacing: -0.04em;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.5rem), 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  padding: 0.85rem 0.925rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.steps strong { display: block; margin-bottom: 0.25rem; font-weight: 700; }
.steps p { color: var(--muted); font-size: 0.875rem; }

.why-note {
  margin-top: 1rem;
  padding: 0.65rem 0.8rem;
  border-inline-start: 2px solid var(--control-line);
  color: var(--muted);
  font-size: 0.9375rem;
}

.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }

.faq-list summary {
  min-height: 3rem;
  padding: 0.75rem 0.25rem;
  cursor: pointer;
  font-weight: 650;
}

.faq-list summary::marker { color: var(--accent); }
.faq-list details p { max-width: 64ch; padding: 0 0.25rem 0.9rem; color: var(--muted); }

.prose { padding-block: clamp(2rem, 8vw, 4rem); }
.prose h1 { margin-bottom: 1.25rem; }
.prose h2 { margin-top: 1.65rem; }
.prose :where(p, ul, ol) { margin-block: 0.75rem; }
.prose :where(ul, ol) { padding-inline-start: 1.4rem; }
.prose li + li { margin-top: 0.6rem; }
.prose { overflow-wrap: anywhere; }

.site-footer {
  margin-top: clamp(2.75rem, 7vw, 4rem);
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

.site-footer .container { overflow-wrap: anywhere; }

@media (max-width: 30rem) {
  .input-line:has(.submit-button) { flex-wrap: wrap; }
  .input-line:has(.submit-button) > :is(input, .submit-button) { flex-basis: 100%; }
  .drop-area button:not(.text-button) { margin-inline-start: 0; }
}

@media (forced-colors: active) {
  .option select, .form-options select, .combine-option select { appearance: auto; }
  .brand::before, .sound-mark span { forced-color-adjust: none; background-color: CanvasText; }
  .primary { border-color: ButtonText; }
}

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

/* WiLL workspace: a quiet sidebar, blue action panel and grey context panel. */
body { padding-inline-start: var(--sidebar); min-height: 100dvh; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { line-height: 1.3; font-weight: 600; text-wrap: pretty; }
strong { font-weight: 600; }
svg { flex-shrink: 0; }
.skip-link { position: fixed; z-index: 100; left: calc(var(--sidebar) + var(--gutter)); max-width: calc(100% - 2 * var(--gutter)); }
.site-header { position: fixed; inset: 0 auto 0 0; z-index: 20; width: var(--sidebar); background: var(--subtle); border: 0; overflow-y: auto; }
.site-header .container { flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; width: 100%; min-height: 100%; padding: 2.5rem 1rem 1.5rem; margin: 0; gap: 0; }
.brand { align-self: flex-start; min-height: 2.75rem; margin-inline: 0.75rem; font-size: 1.25rem; font-weight: 750; letter-spacing: -0.055em; gap: 0; white-space: nowrap; }
.brand::before { content: none; }
.brand img { margin-inline-end: 0.5rem; flex: none; }
.brand::after { content: ""; width: 0.3rem; height: 0.3rem; margin: 0.5rem 0 0 0.12rem; border-radius: 50%; background: #ff2345; }
.site-header nav { display: grid; gap: 2rem; margin-top: 3rem; }
.nav-primary, .nav-secondary { display: grid; gap: 0.5rem; }
.nav-secondary { padding-top: 1.5rem; border-top: 1px solid var(--line); }
.site-header nav a { display: flex; align-items: center; gap: 0.75rem; min-height: 2.875rem; padding: 0.625rem 0.75rem; border-radius: var(--radius); font-size: 0.875rem; font-weight: 600; }
.site-header nav a:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.site-header nav a[aria-current="page"] { color: var(--accent); background: var(--tint); }
.site-header .nav-secondary a { font-weight: 500; }
.theme-toggle, .locale-switch a, .icon-button { min-width: 2.75rem; min-height: 2.75rem; border-radius: var(--radius); }
.theme-toggle { align-self: flex-start; margin: max(3rem, calc(100dvh - 34rem)) 0.75rem 0; }
.theme-sun { display: none; }
[data-theme="dark"] .theme-moon { display: none; }
[data-theme="dark"] .theme-sun { display: block; }
.locale-switch { padding: 0.1875rem; border-radius: 0.875rem; background: var(--surface); }
.locale-switch a { background: transparent; }
.locale-switch a[aria-current="page"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.hero { gap: 0.75rem; padding-block: 2.5rem 2rem; }
.sound-mark { width: auto; height: 1.375rem; justify-content: flex-start; gap: 0.18rem; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.sound-mark span { height: 0.5rem; }
.sound-mark span:nth-child(2), .sound-mark span:nth-child(4) { height: 0.875rem; }
.sound-mark span:nth-child(3) { height: 1.25rem; }
.sound-mark span:nth-child(5) { height: 0.5rem; }
.hero h1, .prose h1 { max-width: none; font-size: clamp(1.75rem, 3vw, 2.125rem); font-weight: 700; letter-spacing: -0.04em; }
.hero p { max-width: 64ch; font-size: 0.9375rem; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 2rem; align-items: start; }
.tool-card { min-width: 0; border: 0; border-radius: 1.25rem; background: var(--tint); box-shadow: none; }
.tool-top { padding: 1.375rem 1.5rem 1rem; gap: 0.75rem 1rem; border: 0; border-radius: 1.25rem 1.25rem 0 0; background: transparent; }
.tool-heading { gap: 0.375rem; flex: 1 1 12rem; }
.tool-top h2 { font-size: 1.25rem; font-weight: 600; }
.quota, .hint { font-size: 0.8125rem; }
.job-form, .job-panel, .result-panel { padding: 1.5rem; }
.job-form { gap: 1rem; }
.mode-switch { gap: 0.5rem; padding: 0 1.5rem; }
.mode-switch .secondary { background: transparent; border-color: var(--control-line); }
.mode-switch button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-text); }
.input-grid { gap: 0.875rem; }
.link-entry, .option { gap: 0.5rem; }
.link-entry label, .option label, .preview-label { font-weight: 600; }
.input-line { gap: 0.625rem; }
.input-line input, .option input[type=url], .option select, .result-panel textarea, .form-options select, .combine-option select { min-height: 2.875rem; padding: 0.6875rem 0.875rem; }
.option select, .form-options select, .combine-option select { padding-inline-end: 2rem; font-size: 0.875rem; }
.primary, .secondary, .secondary-button { min-height: 2.875rem; padding: 0.6875rem 1.125rem; font-size: 0.875rem; font-weight: 600; line-height: 1.4; box-shadow: none; }
.input-actions, .result-actions, .status-actions { gap: 0.375rem 1rem; }
.text-button { min-height: 2.75rem; text-decoration: none; }
.text-button:not(:disabled):hover { text-decoration: underline; }
.remove-button { font-size: 1.25rem; }
.drop-area { min-height: 7.5rem; gap: 0.75rem; padding: 1.125rem; border-radius: 1rem; background: var(--surface); font-size: 0.8125rem; }
.drop-area strong { font-size: 0.875rem; }
.drop-details { flex: 1 1 11rem; min-width: 0; gap: 0.375rem; }
.drop-area .secondary { min-height: 2.875rem; padding: 0.6875rem 0.875rem; margin-inline-start: 0; }
.drop-icon { width: 2.75rem; height: 2.75rem; flex-shrink: 0; border: 0; border-radius: var(--radius); background: var(--tint); font-size: 1.5rem; }
.drop-area.is-dragging { border-style: solid; outline: 2px solid var(--accent); }
.file-list, .job-items { gap: 0.5rem; }
.file-list li, .job-items li { padding: 0.625rem 0.75rem; border: 0; background: var(--surface); }
.file-list li > span, .item-name { min-width: 0; overflow-wrap: anywhere; }
.form-options { gap: 1rem; padding-top: 1.25rem; }
.form-options label { font-size: 0.8125rem; }
.check-option { min-height: 2.875rem; cursor: pointer; }
.check-option input { flex-shrink: 0; }
#local-file { width: 100%; min-width: 0; padding: 0.5rem; border: 1px dashed var(--control-line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-size: 0.875rem; }
#local-file::file-selector-button { min-height: 2.75rem; }
.notice { margin: 0 1.5rem 1.5rem; padding: 0.875rem 1rem; border-inline-start-width: 3px; }
.job-panel, .result-panel { gap: 1rem; }
.job-panel h3, .result-panel h3 { font-size: 1.125rem; font-weight: 600; }
.job-panel progress { height: 0.375rem; background: var(--surface); }
.job-panel progress::-webkit-progress-bar { background: var(--surface); }
.item-state { padding: 0.25rem 0.5rem; border-radius: 0.5rem; background: var(--subtle); font-size: 0.8125rem; }
.item-error { margin-top: 0.5rem; }
.result-panel h3::before { content: "✓"; display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; margin-inline-end: 0.5rem; border-radius: 50%; background: var(--surface); color: var(--accent); }
.result-panel textarea { min-height: 12rem; background: var(--surface); line-height: 1.7; }
.support-section { margin-top: 3rem; }
.support-section h2, .prose h2 { margin-bottom: 1.25rem; font-size: 1.25rem; font-weight: 600; letter-spacing: -0.025em; }
.processing-guide { margin-top: 0; padding: 1.5rem; border-radius: 1.25rem; background: var(--subtle); }
.processing-guide h2 { font-size: 1.125rem; }
.processing-guide p { color: var(--muted); font-size: 0.8125rem; line-height: 1.75; }
.processing-guide p + p { margin-top: 1.25rem; }
.mode-detail strong { display: block; margin-bottom: 0.5rem; color: var(--ink); font-size: 0.875rem; }
.mode-detail + .mode-detail { padding-top: 1.25rem; border-top: 1px solid var(--line); }
.steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; counter-reset: step; }
.steps li { min-width: 0; padding: 1.25rem 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; counter-increment: step; }
.steps li::before { content: "0" counter(step); display: grid; place-items: center; width: 2.75rem; height: 2.75rem; margin-bottom: 1rem; border-radius: var(--radius); background: var(--subtle); color: var(--accent); font-size: 0.875rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.steps strong { margin-bottom: 0.5rem; font-size: 1rem; font-weight: 600; }
.why-note { margin-top: 1.25rem; padding: 1.125rem 1.25rem; border: 0; border-radius: var(--radius); background: var(--subtle); font-size: 0.875rem; }
.why-note strong { color: var(--ink); }
.faq-list summary { min-height: 3.75rem; padding: 1.125rem 0.25rem; font-size: 0.9375rem; font-weight: 500; }
.faq-list details[open] summary { color: var(--accent); }
.faq-list details p { max-width: 78ch; padding: 0 1.375rem 1.25rem; font-size: 0.875rem; }
.prose { max-width: 51rem; padding-block: 3rem 1rem; }
.prose h1 + p:not(.hint) { font-size: 1.0625rem; color: var(--muted); }
.prose h2 { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.prose :where(p, ul, ol) { margin-block: 1rem; }
.prose :where(ul, ol) { padding-inline-start: 1.5rem; }
.prose li + li { margin-top: 0.875rem; }
.prose code { padding: 0.125rem 0.375rem; border-radius: 0.25rem; background: var(--subtle); font-size: 0.875em; }
.prose .hint { display: inline-block; padding: 0.375rem 0.75rem; border-radius: 0.5rem; background: var(--subtle); }
.site-footer { margin-top: 3.5rem; padding-block: 1.25rem 1.75rem; border: 0; font-size: 0.8125rem; }
.site-footer .container { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.625rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.site-footer a { min-height: 2.75rem; }
.site-footer a[aria-current="page"] { color: var(--accent); text-decoration: underline; }

@media (max-width: 75rem) {
  .workspace-grid { grid-template-columns: minmax(0, 1fr) 17rem; gap: 1.5rem; }
  .input-line:has(.submit-button) { flex-wrap: wrap; }
  .input-line:has(.submit-button) input { flex-basis: 100%; }
}
@media (max-width: 65rem) {
  :root, :root[data-theme] { --sidebar: 12.5rem; }
  .brand { font-size: 1.125rem; margin-inline: 0.375rem; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .processing-guide { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem; }
  .processing-guide h2, .processing-guide > p:last-child { grid-column: 1 / -1; }
  .processing-guide h2 { margin-bottom: 0; }
  .processing-guide p + p { margin-top: 0; }
  .mode-detail + .mode-detail { padding: 0; border: 0; }
}
@media (max-width: 47.5rem) {
  body { padding-inline-start: 0; }
  .site-header { position: static; width: 100%; overflow: visible; background: var(--page); }
  .site-header .container { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; padding: 1.25rem var(--gutter) 0; }
  .brand { margin: 0; font-size: 1.25rem; }
  .theme-toggle { grid-column: 2; grid-row: 1; margin: 0; }
  .site-header nav { grid-column: 1 / -1; margin: 0; gap: 0; }
  .nav-primary { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.25rem; padding: 0.25rem; border-radius: 1rem; background: var(--subtle); }
  .site-header nav a { justify-content: center; gap: 0.5rem; padding-inline: 0.25rem; font-size: 0.8125rem; }
  .nav-secondary { display: none; }
  .skip-link { left: var(--gutter); }
  .hero { padding-block: 1.75rem 1.5rem; }
  .hero p { font-size: 0.875rem; }
  .tool-top { padding: 1.25rem 1.25rem 1rem; }
  .tool-heading { flex-basis: 9rem; }
  .tool-top h2 { font-size: 1.125rem; }
  .job-form, .job-panel, .result-panel { padding: 1.25rem; }
  .mode-switch { padding-inline: 1.25rem; }
  .input-line:has(.submit-button) > .submit-button { width: 100%; }
  .form-options { gap: 0.875rem; }
  .form-options .option { flex-basis: 100%; }
  .form-options .check-option { width: 100%; }
  .drop-area { padding: 1rem; }
  .drop-area .secondary { width: 100%; }
  .drop-details { flex-basis: 8rem; }
  .notice { margin-inline: 1.25rem; }
  .processing-guide { display: block; padding: 1.25rem; }
  .processing-guide h2 { margin-bottom: 1.25rem; }
  .processing-guide p + p { margin-top: 1.25rem; }
  .mode-detail + .mode-detail { padding-top: 1.25rem; border-top: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps li { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); gap: 0.375rem 1rem; }
  .steps li::before { grid-row: 1 / 3; margin: 0; }
  .steps strong { margin: 0; }
  .steps p { grid-column: 2; }
  .support-section { margin-top: 2.25rem; }
  .processing-guide { margin-top: 0; }
  .local-actions button { width: 100%; }
  .prose { padding-top: 2rem; }
  .site-footer { margin-top: 2.25rem; }
}
@media (forced-colors: active) {
  .brand::after { forced-color-adjust: none; background: CanvasText; }
  .site-header nav a[aria-current="page"], .mode-switch button[aria-pressed="true"], .locale-switch a[aria-current="page"] { border: 1px solid ButtonText; }
}
