@scope (.clare-support) {

  /* Claré Atelier's Atelier scheme: cream page, warm ink, terracotta accent.
     Secondary text #6B6159 keeps 5.3:1 on the page; the error red 6.6:1. */
  :scope {
    --paper: #F6F0E6;
    --ink: #1C1714;
    --accent: #A8472A;
    --error: #9E2A2B;
    --muted: #6B6159;
    --border: #E3D9C9;
    --surface: #EFE6D8;
    --field: #FBF8F2;
    --font-heading: "Bodoni Moda", "Didot", "Bodoni 72", "Playfair Display", Georgia, serif;
    --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --tap: 44px;
    --gutter: 16px;
    --radius: 6px;
  }

  *, *::before, *::after { box-sizing: border-box; }



  :scope {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.55;
  }

  a { color: var(--ink); text-underline-offset: 0.18em; }
  a:hover { text-decoration-thickness: 2px; }

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

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

  .page {
    max-width: 44rem;
    margin: 0 auto;
    padding: 32px var(--gutter) 64px;
  }

  /* Labels and buttons in the body font: the serif is for 20px and up. */
  .spec dt,
  .label-text {
    font-family: var(--font-body);
    font-weight: 500;
    letter-spacing: 0.02em;
  }

  .button {
    font-family: var(--font-body);
    font-weight: 600;
  }

  /* Hairline-ruled detail strip */
  .spec {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 0 32px;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--border);
  }

  .spec div { padding: 10px 12px 10px 0; }
  .spec div + div { padding-left: 12px; border-left: 1px solid var(--border); }
  .spec dt { margin: 0; color: var(--muted); font-size: 0.75rem; }
  .spec dd { margin: 2px 0 0; font-size: 0.875rem; font-weight: 500; }

  h1 {
    margin: 0 0 12px;
    font-family: var(--font-heading);
    font-size: clamp(2.25rem, 7vw, 3.5rem);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -0.01em;
  }

  h1 em { color: var(--accent); }

  .intro p { margin: 0 0 12px; }
  .intro .muted { color: var(--muted); font-size: 0.875rem; }

  .before {
    margin: 24px 0 32px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
  }

  .before p { margin: 0 0 8px; }
  .before ul { margin: 0; padding-left: 1.2em; }
  .before li + li { margin-top: 4px; }

  /* Form */
  form { display: grid; gap: 24px; }

  .row { display: grid; gap: 24px; }

  @media (min-width: 600px) {
    .row--2 { grid-template-columns: 1fr 1fr; }
  }

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

  .label-text { font-size: 0.875rem; }

  .req {
    margin-left: 6px;
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0;
  }

  .hint { margin: 0; color: var(--muted); font-size: 0.8125rem; }

  input[type="text"],
  input[type="email"],
  input[type="url"],
  select,
  textarea {
    width: 100%;
    min-height: var(--tap);
    margin: 0;
    padding: 10px 12px;
    background: var(--field);
    color: var(--ink);
    border: 1px solid var(--muted);
    border-radius: var(--radius);
    font: inherit;
    font-size: 1rem; /* 16px stops iOS from zooming on focus */
  }

  textarea { min-height: 12rem; resize: vertical; }

  select {
    appearance: none;
    padding-right: 40px;
    background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
    background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
    background-size: 5px 5px;
    background-repeat: no-repeat;
  }

  input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
  }

  [aria-invalid="true"] { border-color: var(--error); border-width: 2px; }

  .error {
    margin: 0;
    color: var(--error);
    font-size: 0.875rem;
    font-weight: 600;
  }

  .error::before { content: "Error: "; }
  .error:empty { display: none; }

  /* File upload */
  .file-drop {
    position: relative;
    display: grid;
    gap: 4px;
    padding: 16px;
    border: 1px dashed var(--muted);
    border-radius: var(--radius);
    background: var(--field);
  }

  .file-drop.is-dragging { background: var(--surface); }

  .file-drop input[type="file"] {
    width: 100%;
    min-height: var(--tap);
    font: inherit;
    font-size: 0.875rem;
  }

  .file-drop input[type="file"]::file-selector-button {
    min-height: var(--tap);
    margin-right: 12px;
    padding: 0 16px;
    background: var(--paper);
    color: var(--ink);
    border: 1px solid var(--ink);
    border-radius: 999px;
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
  }

  .file-list { margin: 0; padding: 0; list-style: none; font-size: 0.875rem; }
  .file-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    font-variant-numeric: tabular-nums;
  }
  .file-list li span:first-child { overflow-wrap: anywhere; }
  .file-list li.is-bad { color: var(--error); }

  /* Honeypot: off-screen for people, still in the DOM for bots. */
  .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

  .actions { display: grid; gap: 12px; }

  .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    padding: 0 28px;
    background: var(--ink);
    color: var(--paper);
    border: 0;
    border-radius: 999px;
    font-size: 0.9375rem;
    cursor: pointer;
  }

  @media (hover: hover) {
    .button:hover { background: #3A322D; }
  }
  .button[disabled] { opacity: 0.6; cursor: progress; }

  @media (min-width: 600px) {
    .button { width: auto; justify-self: start; }
  }

  .fine { margin: 0; color: var(--muted); font-size: 0.8125rem; }

  /* Error summary and status */
  .summary {
    padding: 16px;
    border: 2px solid var(--error);
    border-radius: var(--radius);
    background: var(--field);
  }

  .summary h2 {
    margin: 0 0 8px;
    font-family: var(--font-heading);
    font-size: 1.375rem;
    font-weight: 400;
  }

  .summary ul { margin: 0; padding-left: 1.2em; }
  .summary a { color: var(--error); font-weight: 600; }

  .notice {
    padding: 16px;
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    background: var(--field);
  }

  .success {
    padding: 24px 16px;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--border);
  }

  .success h2 {
    margin: 0 0 12px;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.1;
  }

  .success p { margin: 0 0 12px; }
  .ticket { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; font-variant-numeric: tabular-nums; }

  footer {
    margin-top: 48px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.8125rem;
  }

  footer p { margin: 0 0 6px; }

  @media (max-width: 420px) {
    .spec { grid-template-columns: 1fr; }
    .spec div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--border); }
  }

  @media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; }
  }

  form[hidden] { display: none; }
  .studio-breadcrumb { margin-bottom: 24px; }
}