/* Motion Clerk locked Direction 03 v1.2; exact source tokens. */
:root {
  /* Core brand */
  --mc-black: #0B0B0D;
  --mc-charcoal: #2B2B2E;
  --mc-graphite: #3A3A3F;
  --mc-gray: #9CA3AF;
  --mc-off-white: #F8F8F6;
  --mc-pink: #FF2D9B;
  --mc-pink-hover: #F0198D;
  --mc-pink-pressed: #D90078;
  --mc-pink-soft: #FFF0F7;
  --mc-pink-text: #A8005A;

  /* Surfaces */
  --mc-canvas: #FFFFFF;
  --mc-surface-subtle: #F5F5F7;
  --mc-surface-raised: #FFFFFF;
  --mc-surface-selected: #FFF0F7;
  --mc-surface-disabled: #F1F1F3;
  --mc-stage: #F5F5F7;
  --mc-stage-grid: #E1E1E6;

  /* Text */
  --mc-text-primary: #0B0B0D;
  --mc-text-secondary: #5F5F66;
  --mc-text-tertiary: #6E6E73;
  --mc-text-disabled: #86868B;
  --mc-text-on-pink: #0B0B0D;
  --mc-text-inverse: #FFFFFF;

  /* Lines */
  --mc-border: #D2D2D7;
  --mc-divider: #E6E6EA;
  --mc-divider-strong: #C7C7CC;

  /* Functional */
  --mc-success: #167D3C;
  --mc-success-bg: #ECF8F0;
  --mc-warning: #965A00;
  --mc-warning-bg: #FFF6E5;
  --mc-error: #B42318;
  --mc-error-bg: #FFF0EF;
  --mc-info: #A8005A;
  --mc-info-bg: #FFF0F7;

  /* Interaction */
  --mc-hover-neutral: rgba(11, 11, 13, 0.055);
  --mc-pressed-neutral: rgba(11, 11, 13, 0.10);
  --mc-focus-ring: rgba(255, 45, 155, 0.28);
  --mc-selection: rgba(255, 45, 155, 0.14);

  /* Shadows */
  --mc-shadow-control: 0 1px 2px rgba(11, 11, 13, 0.06);
  --mc-shadow-popover:
    0 20px 60px rgba(11, 11, 13, 0.14),
    0 3px 12px rgba(11, 11, 13, 0.08);
  --mc-shadow-modal:
    0 30px 90px rgba(11, 11, 13, 0.18),
    0 5px 20px rgba(11, 11, 13, 0.10);
}

:root {
  --mc-type-display-size: 32px;
  --mc-type-display-line: 38px;
  --mc-type-display-weight: 700;

  --mc-type-title-size: 26px;
  --mc-type-title-line: 32px;
  --mc-type-title-weight: 700;

  --mc-type-section-size: 19px;
  --mc-type-section-line: 24px;
  --mc-type-section-weight: 650;

  --mc-type-subhead-size: 15px;
  --mc-type-subhead-line: 21px;
  --mc-type-subhead-weight: 600;

  --mc-type-body-size: 15px;
  --mc-type-body-line: 22px;
  --mc-type-body-weight: 400;

  --mc-type-label-size: 13px;
  --mc-type-label-line: 18px;
  --mc-type-label-weight: 600;

  --mc-type-meta-size: 12px;
  --mc-type-meta-line: 16px;
  --mc-type-meta-weight: 500;

  --mc-type-micro-size: 11px;
  --mc-type-micro-line: 14px;
  --mc-type-micro-weight: 600;
}

:root {
  --mc-space-1: 4px;
  --mc-space-2: 8px;
  --mc-space-3: 12px;
  --mc-space-4: 16px;
  --mc-space-5: 20px;
  --mc-space-6: 24px;
  --mc-space-8: 32px;
  --mc-space-10: 40px;
  --mc-space-12: 48px;
  --mc-space-16: 64px;
}

:root {
  --mc-radius-small: 8px;
  --mc-radius-control: 12px;
  --mc-radius-card: 16px;
  --mc-radius-stage: 18px;
  --mc-radius-popover: 18px;
  --mc-radius-pill: 999px;
}

:root {
  --mc-duration-fast: 120ms;
  --mc-duration-standard: 180ms;
  --mc-duration-slow: 240ms;
  --mc-ease-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
  --mc-ease-exit: cubic-bezier(0.4, 0, 1, 1);
}

:root {
--mc-font-sans:
  -apple-system,
  BlinkMacSystemFont,
  "SF Pro Text",
  "SF Pro Display",
  "Helvetica Neue",
  "Inter",
  "Segoe UI",
  Arial,
  sans-serif;

--mc-font-mono:
  ui-monospace,
  "SFMono-Regular",
  Menlo,
  Monaco,
  Consolas,
  "Liberation Mono",
  monospace;

--hq-toolbar-height: 60px;
--hq-inspector-width: 372px;
--hq-content-width: 960px;
}

/* Shared Button System v1.3.1, board match of 2026-10-19. Only the isolated Gauntlet/HQ consumes these rules.
   Existing class names remain compatible; layout/selection controls keep their
   specialized rules in their own surface sheets. No Studio/desk selectors.
   The --mc-btn-* values are the ONE value sheet shared with the beta Studio and the
   Playground (beta-01-review/BUTTONS-BOARD-SPEC.md). They are mixed from the tokens above,
   so no raw colour is added. Pages that load this file may use them. */
:root {
  --mc-button-height: 44px;
  --mc-button-primary-height: 46px;
  --mc-button-padding-inline: 16px;
  --mc-button-label-size: 14px;
  --mc-button-label-line: 20px;
  --mc-button-label-weight: 600;
  --mc-button-icon-size: 18px;
  --mc-button-icon-gap: var(--mc-space-2);
  --mc-button-arrow-shift: 2px;
  /* Drop-down menus (GAUNTLET-059, 2026-10-20): the icons.svg chevron-down (Lucide, stroke 1.75) as a data URL, because a select
     cannot hold an icon element. Stroke --mc-text-secondary #5F5F66; the disabled one --mc-text-disabled #86868B. */
  --mc-select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235F5F66' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --mc-select-chevron-disabled: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386868B' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  /* Board match: tint, selected, danger and shadow values. */
  --mc-btn-tint:            color-mix(in srgb, var(--mc-pink) 5%, var(--mc-canvas));
  --mc-btn-tint-hover:      color-mix(in srgb, var(--mc-pink) 9%, var(--mc-canvas));
  --mc-btn-tint-border:     color-mix(in srgb, var(--mc-pink) 22%, var(--mc-canvas));
  --mc-btn-selected-fill:   color-mix(in srgb, var(--mc-pink) 8%, var(--mc-canvas));
  --mc-btn-danger:          var(--mc-error);
  --mc-btn-danger-fill:     color-mix(in srgb, var(--mc-error) 8%, var(--mc-canvas));
  --mc-btn-danger-hover:    color-mix(in srgb, var(--mc-error) 13%, var(--mc-canvas));
  --mc-btn-danger-border:   color-mix(in srgb, var(--mc-error) 24%, var(--mc-canvas));
  --mc-btn-shadow-primary:        0 1px 2px color-mix(in srgb, var(--mc-text-primary) 6%, transparent), 0 4px 12px color-mix(in srgb, var(--mc-pink) 18%, transparent);
  --mc-btn-shadow-primary-hover:  0 2px 4px color-mix(in srgb, var(--mc-text-primary) 6%, transparent), 0 8px 18px color-mix(in srgb, var(--mc-pink) 26%, transparent);
  --mc-btn-shadow-neutral:        0 1px 2px color-mix(in srgb, var(--mc-text-primary) 5%, transparent);
  --mc-btn-shadow-neutral-hover:  0 2px 8px color-mix(in srgb, var(--mc-text-primary) 9%, transparent);
}
:where(.mc-gauntlet) button,
:where(.dr-app) .dr-button {
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: var(--mc-button-icon-gap);
  min-height: var(--mc-button-height);
  max-width: 100%;
  padding: var(--mc-space-2) var(--mc-button-padding-inline);
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius-control);
  background: var(--mc-canvas);
  color: var(--mc-text-primary);
  font: var(--mc-button-label-weight) var(--mc-button-label-size)/var(--mc-button-label-line) var(--mc-font-sans);
  letter-spacing: normal;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: middle;
  cursor: pointer;
  box-shadow: none;
  transition: background-color var(--mc-duration-fast) var(--mc-ease-standard),
    border-color var(--mc-duration-fast) var(--mc-ease-standard),
    color var(--mc-duration-fast) var(--mc-ease-standard);
}
:where(.mc-gauntlet) button:not(:where(.review-choice, .act-path button)),
:where(.dr-app) .dr-button { display: inline-flex; }
/* A fixed icon slot keeps labels still when a forward arrow moves. */
:where(.mc-gauntlet, .dr-app) .mc-button-label { min-width: 0; }
:where(.mc-gauntlet, .dr-app) .mc-button-icon-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--mc-button-icon-size);
  height: var(--mc-button-icon-size);
  flex: 0 0 var(--mc-button-icon-size);
  vertical-align: middle;
}
:where(.mc-gauntlet, .dr-app) .mc-button-icon {
  display: block;
  width: var(--mc-button-icon-size);
  height: var(--mc-button-icon-size);
  flex-shrink: 0;
}
:where(.mc-gauntlet, .dr-app) .mc-button-arrow {
  transition: transform var(--mc-duration-fast) var(--mc-ease-standard);
}
/* Native disclosures keep their marker and keyboard behavior. */
.mc-gauntlet summary > .mc-button-icon-slot { margin-inline-end: var(--mc-button-icon-gap); }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  :where(.mc-gauntlet, .dr-app) .mc-button-forward:hover:not(:disabled):not([aria-disabled="true"]) .mc-button-arrow,
  .dr-app .dr-button:hover:not(:disabled):not([aria-disabled="true"]) > .mc-button-arrow {
    transform: translateX(var(--mc-button-arrow-shift));
  }
}
:where(.mc-gauntlet) button:hover:not(:disabled),
:where(.dr-app) .dr-button:hover:not(:disabled) {
  background: var(--mc-hover-neutral);
  border-color: var(--mc-divider-strong);
}
:where(.mc-gauntlet) button:active:not(:disabled),
:where(.dr-app) .dr-button:active:not(:disabled) {
  background: var(--mc-pressed-neutral);
}
.mc-gauntlet #next,
:where(.mc-gauntlet, .dr-app) :is(.primary, .dr-button--primary) {
  min-height: var(--mc-button-primary-height);
  background: var(--mc-pink);
  color: var(--mc-text-on-pink);
  border-color: transparent;
}
.mc-gauntlet #next:hover:not(:disabled),
:where(.mc-gauntlet, .dr-app) :is(.primary, .dr-button--primary):hover:not(:disabled) {
  background: var(--mc-pink-hover);
}
.mc-gauntlet #next:active:not(:disabled),
:where(.mc-gauntlet, .dr-app) :is(.primary, .dr-button--primary):active:not(:disabled) {
  background: var(--mc-pink-pressed);
}
:where(.dr-app) .dr-button.quiet {
  background: transparent;
  color: var(--mc-text-secondary);
  border-color: transparent;
}
:where(.dr-app) .dr-button.quiet:hover:not(:disabled) {
  background: var(--mc-hover-neutral);
  color: var(--mc-text-primary);
}
:where(.dr-app) .dr-button.quiet:active:not(:disabled) {
  background: var(--mc-pressed-neutral);
}
:where(.dr-app) .dr-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--mc-button-height);
  height: var(--mc-button-height);
  min-width: var(--mc-button-height);
  min-height: var(--mc-button-height);
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--mc-radius-control);
  background: transparent;
  color: var(--mc-text-primary);
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--mc-duration-fast) var(--mc-ease-standard);
}
:where(.dr-app) .dr-icon-button:hover:not(:disabled) { background: var(--mc-hover-neutral); }
:where(.dr-app) .dr-icon-button:active:not(:disabled) { background: var(--mc-pressed-neutral); }
/* Focus has its own outline and remains distinct from pressed/selected state. */
.mc-gauntlet button:focus-visible,
.dr-app :is(.dr-button, .dr-icon-button):focus-visible {
  outline: 2px solid var(--mc-pink-text);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px var(--mc-focus-ring);
}
/* Last and specific enough that primary/quiet/hover can never repaint disabled. */
.mc-gauntlet button[disabled]:disabled,
.dr-app :is(.dr-button, .dr-icon-button)[disabled]:disabled,
.mc-gauntlet #next:disabled {
  background: var(--mc-surface-disabled);
  color: var(--mc-text-disabled);
  border-color: var(--mc-divider);
  cursor: not-allowed;
}
/* Icon slots (board match). A real sprite icon is <svg class="mc-btn-ico mc-btn-ico--lead|--trail" aria-hidden="true"><use href="/icons.svg#i-NAME"></use></svg>
   (symbol id: i- plus the Lucide name). Leading slot 18 px before the label, trailing arrow 16 px after it, 8 px apart. The trailing arrow moves 2 px on a fine
   pointer over 120 ms; the label never moves; nothing moves with reduced motion. Loading (aria-busy="true") shows a turning loader-circle in place of the leading icon. */
.mc-btn-ico {
  width: var(--mc-button-icon-size);
  height: var(--mc-button-icon-size);
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.mc-btn-ico--trail { width: 16px; height: 16px; transition: transform var(--mc-duration-fast) var(--mc-ease-standard); }
@keyframes mc-btn-spin { to { transform: rotate(360deg); } }
.mc-btn-ico--spin { display: none; }
[aria-busy="true"] > .mc-btn-ico--spin { display: inline-block; animation: mc-btn-spin 1s linear infinite; }
[aria-busy="true"] > .mc-btn-ico--lead:not(.mc-btn-ico--spin), [aria-busy="true"] > .mc-btn-ico--trail { display: none; }
.mc-btn-ico--check { color: var(--mc-pink); }
:is([aria-pressed="false"], [aria-checked="false"], [aria-selected="false"]) > .mc-btn-ico--check { display: none; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  :is(button, a, summary):hover:where(:not(:disabled, [aria-disabled="true"], [aria-busy="true"])) > .mc-btn-ico--trail[data-mc-icon="trail:arrow-right"] { transform: translateX(var(--mc-button-arrow-shift)); }
}
@media (prefers-reduced-motion: reduce) {
  .mc-btn-ico--trail { transition: none; }
  [aria-busy="true"] > .mc-btn-ico--spin { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mc-gauntlet button,
  .dr-app :is(.dr-button, .dr-icon-button),
  :where(.mc-gauntlet, .dr-app) .mc-button-arrow { transition: none; }
}
@media (forced-colors: active) {
  .mc-gauntlet button,
  .dr-app :is(.dr-button, .dr-icon-button) { border-color: ButtonText; }
  .mc-gauntlet button[disabled]:disabled,
  .dr-app :is(.dr-button, .dr-icon-button)[disabled]:disabled { border-color: GrayText; color: GrayText; }
  .mc-gauntlet button:focus-visible,
  .dr-app :is(.dr-button, .dr-icon-button):focus-visible {
    outline: 2px solid Highlight;
    box-shadow: none;
  }
}
