:root {
  color-scheme: light;
  --paper: #f4f2ec;
  --surface: #fffefa;
  --ink: #17201b;
  --muted: #536058;
  --line: #c9cec8;
  --accent: #17633c;
  --accent-dark: #0d4428;
  --soft: #e4eee7;
  --danger: #8d2f2f;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(42, 55, 45, 0.09);
  font-family: Aptos, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.5; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-underline-offset: 0.2em; }
.skip-link { position: fixed; top: 0.5rem; left: 0.5rem; z-index: 50; padding: 0.7rem 1rem; background: var(--ink); color: white; border-radius: var(--radius); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.site-header, main, footer { width: min(1180px, calc(100% - 2rem)); margin-inline: auto; }
.site-header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; border-bottom: 1px solid var(--line); }
.brand { font-weight: 850; letter-spacing: -0.04em; text-decoration: none; font-size: 1.2rem; }
nav { display: flex; gap: 1.2rem; align-items: center; }
nav a { font-weight: 650; }
.intro { min-height: 430px; padding: 4.5rem 0 3.5rem; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.5fr); gap: clamp(2rem, 8vw, 8rem); align-items: end; }
.eyebrow { margin: 0 0 0.8rem; color: var(--accent-dark); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 820px; margin-bottom: 1rem; font-size: clamp(2.7rem, 7vw, 5.8rem); line-height: 0.96; letter-spacing: -0.065em; }
.intro > div > p:last-child { max-width: 42rem; margin: 0; color: var(--muted); font-size: 1.15rem; }
.principle { display: grid; gap: 0.35rem; padding-top: 1rem; border-top: 3px solid var(--accent); }
.principle strong { font-size: 1.15rem; }
.principle span { color: var(--muted); }
.workspace, .queue { padding: clamp(1.2rem, 4vw, 3rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.section-heading { margin-bottom: 2.2rem; }
.section-heading h2, .queue h2, .connector-note h2 { margin-bottom: 0.3rem; font-size: clamp(1.7rem, 3vw, 2.5rem); letter-spacing: -0.035em; }
.section-heading p, .queue-header p, .connector-note p { color: var(--muted); margin-bottom: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.field { display: grid; align-content: start; gap: 0.45rem; }
.field-wide { grid-column: 1 / -1; }
label { font-weight: 750; }
input, select, textarea { width: 100%; border: 1px solid #949f97; border-radius: var(--radius); background: #fff; color: var(--ink); padding: 0.8rem 0.9rem; }
textarea { resize: vertical; min-height: 9rem; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, .table-wrap:focus-visible { outline: 3px solid #78a98b; outline-offset: 3px; }
[aria-invalid="true"] { border-color: var(--danger); }
.field-help, .field-error, .field-meta { margin: 0; font-size: 0.88rem; }
.field-help, .field-meta { color: var(--muted); }
.field-error { color: var(--danger); font-weight: 650; min-height: 0.2rem; }
.field-meta { display: flex; justify-content: space-between; gap: 1rem; }
.link-output { margin-top: 1.5rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 1.1rem; background: var(--soft); border-radius: var(--radius); }
.link-output h3 { margin-bottom: 0.3rem; }
output { display: block; color: var(--accent-dark); overflow-wrap: anywhere; }
.form-actions, .export-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; }
.form-actions { margin-top: 1.5rem; }
.button { min-height: 44px; border: 1px solid transparent; border-radius: var(--radius); padding: 0.68rem 1rem; font-weight: 800; cursor: pointer; transition: transform 120ms ease, background 120ms ease; }
.button:active { transform: translateY(1px); }
.button:disabled { cursor: not-allowed; opacity: 0.55; }
.primary { background: var(--accent-dark); color: white; }
.primary:hover { background: #082f1b; }
.secondary { border-color: #77847b; background: var(--surface); color: var(--ink); }
.secondary:hover { background: var(--soft); }
.danger { border-color: #af7777; background: var(--surface); color: #762121; }
.form-status { flex: 1 1 15rem; margin: 0; color: var(--accent-dark); font-weight: 700; }
.queue { margin-top: 1.2rem; box-shadow: none; }
.queue-header { display: flex; justify-content: space-between; align-items: start; gap: 2rem; margin-bottom: 1.5rem; }
.empty-state { padding: 2rem; border: 1px dashed #7f8d83; border-radius: var(--radius); background: #f7faf7; }
.empty-state h3 { margin-bottom: 0.4rem; }
.empty-state p { margin: 0; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 0.9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: var(--soft); font-size: 0.83rem; letter-spacing: 0.02em; }
tbody tr:last-child td { border-bottom: 0; }
.cell-title { display: block; font-weight: 800; }
.cell-copy { display: block; max-width: 24rem; color: var(--muted); font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-cell { max-width: 22rem; overflow-wrap: anywhere; }
.row-actions { display: flex; gap: 0.5rem; }
.row-button { border: 1px solid #77847b; border-radius: 10px; background: white; padding: 0.45rem 0.65rem; cursor: pointer; }
.connector-note { margin: clamp(4rem, 9vw, 8rem) 0; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 8vw, 7rem); align-items: start; }
.connector-note ul { margin: 0; padding: 0; list-style: none; }
.connector-note li { padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.connector-note li:first-child { padding-top: 0; }
footer { min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); font-weight: 700; }
.noscript { position: fixed; bottom: 1rem; left: 1rem; right: 1rem; padding: 1rem; background: #fff2c7; border: 2px solid #6c5605; border-radius: var(--radius); }
.legal { max-width: 760px; margin: 4rem auto 6rem; }
.legal h1 { font-size: clamp(2.5rem, 6vw, 4.8rem); }
.legal h2 { margin-top: 2.5rem; }
.legal p, .legal li { color: #38443c; }
@media (max-width: 760px) {
  .site-header { align-items: flex-start; padding: 1rem 0; }
  .site-header nav { gap: 0.75rem; font-size: 0.9rem; }
  .intro, .connector-note { grid-template-columns: 1fr; }
  .intro { min-height: auto; padding: 3.5rem 0; gap: 2.5rem; }
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .link-output, .queue-header { grid-template-columns: 1fr; display: grid; }
  .link-output .button { width: 100%; }
  footer { align-items: flex-start; padding: 1.5rem 0; }
}
@media (max-width: 500px) {
  .site-header nav a:not(:first-child) { display: none; }
  main, .site-header, footer { width: min(100% - 1rem, 1180px); }
  .workspace, .queue { padding: 1rem; }
  .form-actions .button, .export-actions .button { width: 100%; }
  footer nav { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.001ms !important; }
}
@media print {
  .site-header, .form-actions, .export-actions, footer, .connector-note { display: none; }
  body { background: white; }
  .workspace, .queue { box-shadow: none; }
}
