@charset "UTF-8";
:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --bg: #f3f6f4;
  --surface: #ffffff;
  --surface-subtle: #f7faf8;
  --surface-soft: #edf3ef;
  --ink: #162620;
  --ink-2: #33473f;
  --ink-3: #576b62;
  --line: #dbe4de;
  --line-strong: #c2d1c8;
  --green: #16523f;
  --green-hover: #1d6951;
  --green-soft: #e7f4ee;
  --muted: #576b62;
  --noul: #6b48b5;
  --noul-soft: #f4f0fc;
  --noul-line: #ddd2f5;
  --choice: #1f6785;
  --choice-soft: #edf6fa;
  --choice-line: #cce3ed;
  --score: #9b6618;
  --score-soft: #fdf6e9;
  --score-line: #eedbb7;
  --danger: #b4432c;
  --danger-soft: #fef4f1;
  --danger-line: #f3cfc6;
  --shadow-sm: 0 1px 2px rgba(17, 40, 31, 0.04);
  --shadow-md: 0 4px 18px rgba(17, 40, 31, 0.05), 0 1px 3px rgba(17, 40, 31, 0.04);
  color: var(--ink);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(22, 82, 63, 0.045), transparent 42%),
    var(--bg);
  font-size: 14px;
  line-height: 1.6;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

button,
a,
input,
textarea,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--green);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(22, 82, 63, 0.35);
  outline-offset: 2px;
}

svg {
  width: 17px;
  height: 17px;
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}

button svg {
  width: 15px;
  height: 15px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1220px;
  margin: auto;
  padding: 16px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}

.brand > span {
  display: flex;
  gap: 5px;
  align-items: baseline;
  flex-wrap: wrap;
}

.brand b {
  font-weight: 500;
  color: var(--green);
}

.brand small {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: 0.3px;
  margin-left: 8px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

.connection {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  padding: 6px 11px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.connection i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9aaea3;
  flex-shrink: 0;
}

.connection.connected {
  color: #14593d;
  background: var(--green-soft);
  border-color: #bfe0cf;
}

.connection.connected i {
  background: #248a5b;
  box-shadow: 0 0 0 3px rgba(36, 138, 91, 0.18);
}

.quiet-button {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  min-height: 36px;
  gap: 7px;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
  white-space: nowrap;
}

.quiet-button:hover:not(:disabled) {
  background: var(--green-soft);
  border-color: #93bda9;
  color: var(--green);
}

/* Main container & intro */
main {
  max-width: 1220px;
  padding: 36px 36px 28px;
  margin: auto;
}

.intro {
  margin-bottom: 26px;
}

.eyebrow {
  display: inline-block;
  font-size: 11px;
  color: var(--green);
  font-weight: 600;
  letter-spacing: 1.8px;
}

.intro h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.9px;
  line-height: 1.3;
  margin: 8px 0 8px;
  color: var(--ink);
}

.intro p {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.7;
  margin: 0;
}

/* Mode picker */
.mode-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  margin: 0;
  border: 0;
  min-width: 0;
}

.mode-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    background 0.15s,
    transform 0.15s;
  min-width: 0;
}

.mode-option:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.mode-option.selected {
  border-color: var(--green);
  background: #f9fcfa;
  box-shadow: 0 0 0 3px rgba(22, 82, 63, 0.1), var(--shadow-sm);
}

.mode-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.mode-option:has(input:focus-visible) {
  outline: 3px solid rgba(22, 82, 63, 0.35);
  outline-offset: 2px;
}

.mode-option:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.6;
}

.mode-symbol {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--green);
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.mode-symbol.noul {
  color: var(--noul);
  background: var(--noul-soft);
  border-color: var(--noul-line);
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, monospace;
}

.mode-symbol.choice {
  color: var(--choice);
  background: var(--choice-soft);
  border-color: var(--choice-line);
}

.mode-symbol.score {
  color: var(--score);
  background: var(--score-soft);
  border-color: var(--score-line);
}

.mode-copy {
  min-width: 0;
  flex: 1;
}

.mode-copy strong {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--ink);
  line-height: 1.4;
}

.mode-copy code {
  font-size: 11px;
  color: var(--ink-3);
  background: var(--surface-soft);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.mode-copy small {
  display: block;
  color: var(--ink-3);
  font-size: 12.5px;
  margin-top: 4px;
  line-height: 1.45;
}

.radio-dot {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--line-strong);
  display: block;
  border-radius: 50%;
  margin-left: auto;
  flex-shrink: 0;
  background: var(--surface);
}

.selected .radio-dot {
  border: 5px solid var(--green);
  background: #fff;
}

/* Example bar */
.example-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 22px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
  flex-wrap: wrap;
}

.example-row > span:first-child {
  font-weight: 600;
  color: var(--ink-2);
}

.example-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.example-chip {
  font-size: 13px;
  font-weight: 500;
  gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  padding: 7px 13px;
  min-height: 34px;
  box-shadow: var(--shadow-sm);
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}

.example-chip:hover:not(:disabled) {
  background: var(--green-soft);
  color: var(--green);
  border-color: #93bda9;
}

.example-chip.active {
  background: var(--green);
  color: #ffffff;
  border-color: var(--green);
}

.example-chip span {
  font-size: 12px;
  opacity: 0.75;
}

.example-hint {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink-3);
}

/* Workspace grid */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.94fr);
  gap: 22px;
  align-items: start;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  min-width: 0;
  box-shadow: var(--shadow-md);
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-subtle);
  padding: 16px 22px;
  min-height: 58px;
}

.panel-heading h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
}

.heading-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 2px;
  display: block;
  transform: rotate(45deg);
  flex-shrink: 0;
}

.heading-dot.soft {
  background: #6f9e8a;
}

.text-button {
  border: 0;
  background: none;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--green);
  font-size: 13px;
  font-weight: 500;
  gap: 5px;
  line-height: 1.4;
  transition: background 0.15s, color 0.15s;
}

.text-button:hover:not(:disabled) {
  background: var(--green-soft);
  color: #0e3d2e;
}

.text-button svg {
  width: 14px;
  height: 14px;
}

.output-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: var(--green);
  background: var(--green-soft);
  padding: 4px 9px;
  border: 1px solid #c3dfd0;
  border-radius: 6px;
}

/* Form */
#decision-form {
  padding: 22px 22px 0;
}

.form-section {
  margin-bottom: 24px;
}

.field-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
}

.field-tag {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  color: var(--ink-3);
  background: var(--surface-soft);
  padding: 2px 7px;
  border-radius: 4px;
}

.step {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  color: var(--green);
  background: var(--green-soft);
  padding: 2px 6px;
  border-radius: 4px;
}

.optional {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
  margin-left: auto;
}

.field-description {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.65;
  margin: -2px 0 12px;
}

.field-bottom {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-3);
  margin: 7px 0 0;
  font-variant-numeric: tabular-nums;
}

textarea,
input[type="text"],
input[type="password"] {
  width: 100%;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  font-size: 14px;
  line-height: 1.65;
  padding: 11px 13px;
  display: block;
  min-width: 0;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

textarea {
  resize: vertical;
  min-height: 76px;
  max-height: 380px;
}

textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 82, 63, 0.12);
  background: #ffffff;
}

textarea::placeholder,
input::placeholder {
  color: #7d9087;
}

#state-input {
  min-height: 136px;
}

#instructions {
  min-height: 82px;
}

/* Option & level editor */
.option-list {
  display: grid;
  gap: 10px;
}

.option-row {
  display: flex;
  align-items: flex-start;
  border: 1px solid var(--line);
  background: var(--surface-subtle);
  border-radius: 10px;
  padding: 10px 10px 10px 11px;
  gap: 10px;
  min-width: 0;
  transition: border-color 0.15s, background 0.15s;
}

.option-row:focus-within {
  border-color: #93bda9;
  background: var(--surface);
}

.option-number {
  font-size: 11px;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, monospace;
  color: var(--green);
  display: grid;
  place-items: center;
  background: var(--green-soft);
  border: 1px solid #cae2d5;
  min-width: 26px;
  height: 26px;
  border-radius: 6px;
  margin-top: 3px;
  flex-shrink: 0;
}

.option-fields {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 4px;
}

.option-fields input {
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
}

.option-fields textarea {
  border: 1px solid transparent;
  box-shadow: none;
  background: transparent;
  min-height: 32px;
  height: 36px;
  resize: vertical;
  font-size: 13px;
  line-height: 1.55;
  border-radius: 6px;
  color: var(--ink-2);
  padding: 4px 7px;
}

.option-fields input:focus,
.option-fields textarea:focus {
  outline: none;
  border-color: #93bda9;
  box-shadow: 0 0 0 2px rgba(22, 82, 63, 0.1);
  background: #ffffff;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-top: 2px;
}

.row-button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-3);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.row-button:hover:not(:disabled) {
  background: var(--green-soft);
  border-color: #c2dfd0;
  color: var(--green);
}

.row-button.remove-option {
  font-size: 19px;
  font-weight: 400;
  color: var(--ink-3);
}

.row-button.remove-option:hover:not(:disabled) {
  background: var(--danger-soft);
  border-color: var(--danger-line);
  color: var(--danger);
}

.add-button {
  border: 1.5px dashed var(--line-strong);
  background: var(--surface-subtle);
  color: var(--green);
  font-weight: 500;
  border-radius: 9px;
  width: 100%;
  padding: 10px 14px;
  min-height: 42px;
  margin-top: 12px;
  gap: 7px;
  font-size: 13px;
  transition: background 0.15s, border-color 0.15s;
}

.add-button small {
  font-size: 12px;
  color: var(--ink-3);
  margin-left: auto;
  font-weight: 400;
}

.add-button:hover:not(:disabled) {
  background: var(--green-soft);
  border-color: var(--green);
}

/* Noul binary fields */
.binary-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.binary-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--noul);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
}

.binary-field:last-child .binary-label {
  color: var(--ink-2);
}

.binary-label code {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  background: var(--surface-soft);
  padding: 1px 6px;
  border-radius: 4px;
}

.binary-field textarea {
  font-size: 13.5px;
  min-height: 104px;
  padding: 10px 12px;
}

/* Submit section */
.submit-section {
  border-top: 1px solid var(--line);
  padding: 20px 0 20px;
}

.model-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.model-row label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}

.model-row select {
  min-width: 185px;
  min-height: 38px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface-subtle);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 7px 12px;
}

.model-row select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 82, 63, 0.12);
}

.model-row > span {
  font-size: 12px;
  color: var(--ink-3);
  background: var(--surface-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-left: auto;
  white-space: nowrap;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 16px;
  cursor: pointer;
}

.consent input {
  margin: 2px 0 0;
  width: 17px;
  height: 17px;
  accent-color: var(--green);
  flex-shrink: 0;
  cursor: pointer;
}

.primary-button {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--green);
  border: 1px solid var(--green);
  border-radius: 10px;
  color: #ffffff;
  width: 100%;
  padding: 13px 18px;
  font-size: 15px;
  font-weight: 600;
  min-height: 48px;
  box-shadow: 0 2px 8px rgba(22, 82, 63, 0.2);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.primary-button > span:last-child {
  margin-left: auto;
  opacity: 0.85;
  font-size: 15px;
}

.primary-button:hover:not(:disabled) {
  background: var(--green-hover);
  border-color: var(--green-hover);
  box-shadow: 0 4px 12px rgba(22, 82, 63, 0.28);
}

.submit-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--ink-3);
  font-size: 12px;
  margin: 12px 0 0;
}

.submit-note svg {
  width: 13px;
  height: 13px;
}

.error-text {
  color: var(--danger);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.65;
  padding: 11px 13px;
  border: 1px solid var(--danger-line);
  background: var(--danger-soft);
  border-radius: 8px;
  margin: 0 0 14px;
  overflow-wrap: anywhere;
}

.error-text:empty {
  display: none;
}

/* Output panel */
.output-panel {
  position: sticky;
  top: 84px;
}

.empty-result {
  padding: 46px 26px 42px;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  color: var(--ink-3);
}

.empty-illustration {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid #cce0d5;
  border-radius: 18px;
  background: linear-gradient(135deg, #f7fbf9, #e5f2eb);
  transform: rotate(-5deg);
  margin: 4px 0 22px;
}

.empty-illustration svg {
  width: 30px;
  height: 30px;
  stroke: var(--green);
  transform: rotate(5deg);
}

.empty-illustration i {
  position: absolute;
  right: -6px;
  bottom: 8px;
  width: 20px;
  height: 20px;
  background: #ffffff;
  border: 1px solid #c5ddd0;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(22, 82, 63, 0.12);
}

.empty-illustration i:after {
  content: "✓";
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  position: absolute;
  top: 1px;
  left: 5px;
}

.empty-result h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 8px;
  line-height: 1.5;
}

.empty-result p {
  font-size: 13.5px;
  color: var(--ink-3);
  line-height: 1.7;
  margin: 0;
}

.empty-hint {
  display: inline-block;
  background: var(--surface-soft);
  color: var(--ink-3);
  border: 1px solid var(--line);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  margin-top: 20px;
}

/* JSON inspector */
.json-section {
  border-top: 1px solid var(--line);
  padding: 0 22px;
}

.json-details + .json-details {
  border-top: 1px solid var(--line);
}

.json-details > summary {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 8px;
  padding: 15px 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  min-height: 50px;
}

.json-details > summary::-webkit-details-marker {
  display: none;
}

.json-details > summary svg {
  width: 16px;
  height: 16px;
  color: var(--green);
}

.json-status {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-3);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: auto;
}

.chevron {
  font-size: 16px;
  margin-left: 4px;
  color: var(--ink-3);
  transition: transform 0.15s;
}

.json-details[open] .chevron {
  transform: rotate(180deg);
}

.json-content {
  padding: 0 0 18px;
}

.json-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.json-block {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.65;
  background: #f5f8f6;
  color: #1c2e27;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow: auto;
  max-height: 380px;
  margin: 0;
  min-height: 60px;
}

/* Result content */
.result-content {
  padding: 22px 22px 0;
}

.result-eyebrow {
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--green-soft);
  padding: 4px 10px;
  border-radius: 999px;
}

.result-eyebrow svg {
  width: 13px;
  height: 13px;
}

.result-question {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.65;
  margin: 12px 0 18px;
  overflow-wrap: anywhere;
}

.verdict strong {
  font-size: 28px;
  color: var(--noul);
  letter-spacing: -0.5px;
  font-weight: 700;
  line-height: 1.3;
  display: block;
}

.verdict > span {
  font-size: 12.5px;
  color: var(--ink-3);
  display: block;
  margin-top: 6px;
}

.binary-result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 22px 0 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.binary-metric {
  border-right: 1px solid var(--line);
  padding: 0 16px 0 0;
}

.binary-metric.no {
  border: 0;
  padding: 0 0 0 18px;
}

.binary-metric > span {
  font-size: 13px;
  font-weight: 600;
  color: var(--noul);
  display: block;
  margin-bottom: 4px;
}

.binary-metric strong {
  font-size: 30px;
  color: var(--noul);
  font-weight: 700;
  letter-spacing: -0.8px;
  font-variant-numeric: tabular-nums;
}

.binary-metric.no > span {
  color: var(--ink-3);
}

.binary-metric.no strong {
  color: var(--ink-2);
}

.binary-track {
  height: 10px;
  display: flex;
  overflow: hidden;
  background: #e2e9e5;
  border-radius: 999px;
}

.binary-track > span {
  display: block;
  background: var(--noul);
  height: 100%;
  transition: width 0.25s ease;
}

.result-footnote {
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.65;
  margin: 16px 0 20px;
  overflow-wrap: anywhere;
}

.result-caption {
  display: block;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}

.choice-verdict {
  background: var(--choice-soft);
  border: 1px solid var(--choice-line);
  border-radius: 10px;
  padding: 16px 18px;
}

.choice-verdict > strong {
  display: block;
  color: #164e66;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.chosen-probability {
  display: inline-block;
  margin: 10px 0 0;
  background: #ffffff;
  border: 1px solid var(--choice-line);
  color: var(--choice);
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.distribution {
  display: grid;
  gap: 14px;
  margin: 20px 0 0;
}

.probability-title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  justify-content: space-between;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 6px;
}

.probability-title > span {
  overflow-wrap: anywhere;
  min-width: 0;
}

.probability-title strong {
  font-size: 13px;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--ink-2);
}

.probability-track {
  height: 8px;
  border-radius: 999px;
  background: #eaf0ec;
  overflow: hidden;
}

.probability-track > span {
  height: 100%;
  display: block;
  background: #9bb6a8;
  border-radius: 999px;
  min-width: 2px;
  transition: width 0.25s ease;
}

.probability-row.top .probability-title {
  color: #164e66;
  font-weight: 600;
}

.probability-row.top .probability-title strong {
  color: var(--choice);
}

.probability-row.top .probability-track > span {
  background: var(--choice);
}

/* Score result */
.score-verdict {
  background: var(--score-soft);
  border: 1px solid var(--score-line);
  border-radius: 10px;
  padding: 16px 18px;
}

.score-verdict > strong {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -1.2px;
  color: var(--score);
  display: block;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.score-verdict > strong small {
  font-size: 17px;
  color: var(--ink-3);
  letter-spacing: 0;
  margin-left: 6px;
  font-weight: 500;
}

.score-nearest {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--score);
  background: #ffffff;
  border: 1px solid var(--score-line);
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-block;
  margin-top: 10px;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.score-track {
  position: relative;
  background: linear-gradient(90deg, #dde8df, #e6d19c, #c2852f);
  height: 9px;
  border-radius: 999px;
  margin: 24px 4px 10px;
}

.score-marker {
  position: absolute;
  top: -5px;
  transform: translateX(-50%);
  height: 19px;
  width: 8px;
  border: 2px solid #ffffff;
  border-radius: 5px;
  background: var(--score);
  box-shadow: 0 0 0 2px rgba(155, 102, 24, 0.25);
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-3);
  overflow-wrap: anywhere;
}

.scale-labels span {
  max-width: 48%;
}

.scale-labels span:last-child {
  text-align: right;
}

.score-distribution .probability-row.top .probability-title,
.score-distribution .probability-row.top .probability-title strong {
  color: var(--score);
}

.score-distribution .probability-row.top .probability-track > span {
  background: #c1862e;
}

.confidence-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--ink-2);
}

.confidence-info strong {
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}

.confidence-info p {
  width: 100%;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-3);
  margin: 0;
}

.result-meta {
  display: flex;
  gap: 8px 14px;
  flex-wrap: wrap;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 14px 0;
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.result-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.result-meta svg {
  width: 13px;
  height: 13px;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-3);
  margin: 22px 2px 0;
}

.privacy-note svg {
  margin-top: 3px;
  width: 14px;
  height: 14px;
}

/* Footer */
.site-footer {
  max-width: 1220px;
  margin: auto;
  padding: 12px 36px 28px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-3);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.version {
  margin-left: 10px;
  color: var(--ink-3);
  font-family: ui-monospace, SFMono-Regular, monospace;
}

/* Loading & toast */
.loading-result h3 {
  margin-top: 20px;
}

.loading-result .quiet-button {
  margin-top: 20px;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #dce9e2;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 15px);
  padding: 12px 18px;
  max-width: calc(100vw - 32px);
  width: max-content;
  line-height: 1.55;
  font-size: 13.5px;
  font-weight: 500;
  background: #163b2d;
  color: #f2faf6;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(13, 38, 27, 0.25);
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.2s,
    transform 0.2s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Access dialog */
dialog {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: 16px;
  padding: 28px;
  max-width: 430px;
  width: calc(100% - 28px);
  box-shadow: 0 24px 70px rgba(15, 38, 28, 0.22);
}

dialog::backdrop {
  background: rgba(18, 38, 29, 0.45);
  backdrop-filter: blur(4px);
}

dialog form {
  position: relative;
}

.close-button {
  background: var(--surface-soft);
  border: 0;
  border-radius: 8px;
  font-size: 22px;
  font-weight: 400;
  color: var(--ink-2);
  position: absolute;
  right: -6px;
  top: -8px;
  width: 34px;
  height: 34px;
  line-height: 1;
  padding: 0;
}

.close-button:hover {
  background: var(--line);
  color: var(--ink);
}

.dialog-mark {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--green-soft);
  border: 1px solid #c3dfd0;
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 16px;
}

dialog .eyebrow {
  font-size: 10.5px;
  letter-spacing: 1.4px;
}

dialog h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin: 8px 0 8px;
}

dialog p {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.65;
  margin: 0 0 16px;
}

dialog .field-label {
  font-size: 13.5px;
  margin-top: 16px;
}

dialog input[type="password"] {
  font-size: 16px;
  padding: 12px 14px;
}

.transport-notice {
  background: #fdf6e7;
  border: 1px solid #ecd9b0;
  font-size: 12px;
  color: #7d5616;
  padding: 10px 12px;
  line-height: 1.6;
  border-radius: 8px;
  margin: 12px 0 !important;
}

/* Accessibility helpers */
.skip-link {
  position: fixed;
  top: 0;
  left: 20px;
  padding: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  background: #fff;
  z-index: 200;
}

.skip-link:focus {
  top: 10px;
  padding: 12px;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* v3: Context, multi-question and experiment tools */
.complex-chip {
  border-color: #b7d3c3;
  background: var(--green-soft);
  color: var(--green);
}

.context-panel {
  margin: -4px 0 22px;
  padding: 16px 20px;
  background: var(--green-soft);
  border: 1px solid #c3dfd0;
  border-radius: 12px;
}

.context-title {
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.context-title > span {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
}

.context-variants {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 10px;
}

.context-variants button {
  padding: 7px 13px;
  min-height: 36px;
  border: 1px solid #bdd6c7;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
}

.context-variants button.active {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.context-panel p {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.65;
  margin: 0;
}

.state-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--ink-3);
  font-size: 12.5px;
  flex-wrap: wrap;
}

.state-tools select {
  padding: 6px 10px;
  min-height: 34px;
  background: var(--surface-subtle);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
}

.state-tools .text-button {
  margin-left: auto;
  font-size: 12.5px;
}

.json-validation {
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.6;
  margin: 0 0 9px;
}

.json-validation.invalid {
  color: var(--danger);
  font-weight: 500;
}

textarea.json-state {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.65;
  min-height: 265px;
  white-space: pre;
  overflow: auto;
}

#state-input.json-state {
  min-height: 280px;
  max-height: 480px;
}

.advanced-panel {
  border-top: 1px solid var(--line);
  margin-bottom: 18px;
}

.advanced-panel > summary,
.saved-panel > summary {
  cursor: pointer;
  padding: 16px 0;
  display: list-item;
  list-style-position: inside;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.advanced-count {
  font-size: 11.5px;
  font-weight: 500;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--ink-2);
  padding: 3px 9px;
  border-radius: 999px;
  float: right;
  margin-left: 8px;
}

.advanced-content {
  padding: 0 0 6px;
}

.advanced-content > .text-button {
  font-size: 13px;
  line-height: 1.5;
  margin: 2px 0 8px;
  text-align: left;
  justify-content: flex-start;
  padding-left: 0;
}

.extra-question {
  border: 1px solid var(--line);
  background: var(--surface-subtle);
  border-radius: 10px;
  padding: 14px;
  margin: 12px 0;
}

.extra-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.extra-heading strong {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.extra-heading code {
  font-size: 11px;
  color: var(--ink-3);
  margin-left: 4px;
  font-weight: 500;
}

.extra-heading select {
  font-size: 12.5px;
  padding: 6px 8px;
  min-height: 34px;
  max-width: 145px;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  color: var(--ink);
  border-radius: 7px;
  margin-left: auto;
}

.extra-heading > .text-button {
  font-size: 12.5px;
  white-space: nowrap;
  color: var(--danger);
}

.extra-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  margin-bottom: 12px;
}

.extra-label > textarea {
  margin-top: 6px;
  font-size: 13.5px;
  min-height: 68px;
  max-height: 220px;
}

.extra-question .binary-fields {
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-2);
}

.extra-question .binary-fields textarea {
  font-size: 13px;
  min-height: 68px;
  margin-top: 6px;
  padding: 9px;
}

.extra-question .option-row {
  padding: 8px;
  gap: 7px;
  margin: 8px 0;
  background: #ffffff;
}

.extra-question .option-number {
  min-width: 24px;
  height: 24px;
  font-size: 11px;
}

.extra-question .option-fields textarea {
  min-height: 30px;
  height: 34px;
}

.extra-question .option-fields input {
  font-size: 13px;
}

.extra-question .row-button {
  width: 26px;
  height: 26px;
}

.extra-question .field-description {
  font-size: 12px;
}

.extra-add-row {
  font-size: 12.5px;
  margin-top: 6px;
}

.advanced-notice {
  font-size: 12px;
  line-height: 1.65;
  color: var(--ink-3);
  margin: 12px 0 0;
}

.additional-answer {
  margin: 0 20px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.additional-answer > summary {
  padding: 13px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface-subtle);
  cursor: pointer;
  line-height: 1.5;
}

.additional-answer > summary code {
  font-size: 11px;
  float: right;
  color: var(--ink-3);
}

.additional-answer .result-content {
  padding: 14px 14px 0;
}

.additional-answer .result-question {
  font-size: 13.5px;
  margin-top: 8px;
}

.additional-answer .verdict strong {
  font-size: 22px;
}

.additional-answer .binary-metric strong {
  font-size: 24px;
}

.additional-answer .binary-result {
  margin-top: 16px;
}

.extra-result-eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--green);
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.extra-result-eyebrow svg {
  width: 12px;
  height: 12px;
}

/* Save current bar */
.save-current {
  border-top: 1px solid var(--line);
  padding: 16px 22px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  background: var(--surface-subtle);
}

.save-current label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  grid-column: 1 / -1;
}

.save-current input {
  font-size: 13.5px;
  padding: 8px 11px;
  min-width: 0;
}

.save-current button {
  font-size: 13px;
  padding: 8px 14px;
}

.save-current > span {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.55;
  grid-column: 1 / -1;
}

/* Saved panel & comparisons */
.saved-panel {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 14px;
  margin-top: 22px;
  padding: 0 22px;
  box-shadow: var(--shadow-sm);
}

.saved-panel > summary {
  padding: 18px 0;
  font-size: 15px;
}

.saved-content {
  padding: 0 0 20px;
}

.saved-content > .field-description {
  margin: 0 0 14px;
}

.saved-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.saved-toolbar .quiet-button {
  font-size: 13px;
  padding: 8px 13px;
}

.saved-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.saved-row > div {
  flex: 1;
  min-width: 0;
}

.saved-row strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.saved-row small {
  display: block;
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 3px;
  line-height: 1.5;
}

.saved-row > .text-button {
  font-size: 13px;
  flex-shrink: 0;
}

.saved-row > .row-button {
  font-size: 20px;
}

.compare-selectors {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 0;
}

.compare-selectors label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  flex: 1;
  min-width: 140px;
}

.compare-selectors > span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-3);
  padding-top: 22px;
}

.compare-selectors select {
  display: block;
  width: 100%;
  font-size: 13.5px;
  color: var(--ink);
  background: var(--surface-subtle);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 9px 11px;
  margin-top: 6px;
  text-overflow: ellipsis;
}

.comparison-notice {
  background: var(--green-soft);
  border: 1px solid #c3dfd0;
  padding: 13px 15px;
  border-radius: 9px;
  line-height: 1.65;
}

.comparison-notice strong {
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 600;
}

.comparison-notice p {
  font-size: 12.5px;
  color: var(--ink-2);
  margin: 4px 0 0;
}

.comparison-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin: 14px 0;
}

.comparison-table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 13px;
  min-width: 540px;
}

.comparison-table th {
  background: var(--surface-subtle);
  font-weight: 600;
  color: var(--ink-2);
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
}

.comparison-table td {
  border-top: 1px solid var(--line);
  padding: 12px 13px;
  color: var(--ink);
  vertical-align: top;
  line-height: 1.65;
  overflow-wrap: anywhere;
  max-width: 280px;
}

.comparison-table td code {
  font-size: 11px;
  color: var(--ink-3);
}

.comparison-table td p {
  font-size: 12.5px;
  line-height: 1.6;
  margin: 3px 0;
}

.comparison-table td small {
  font-size: 11.5px;
  display: block;
  color: var(--ink-3);
  max-width: 200px;
}

.compare-meta {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.7;
  margin-bottom: 10px;
}

.comparison-empty,
.comparison-warning {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.65;
  margin-top: 16px;
}

.comparison-warning {
  color: var(--score);
  font-weight: 500;
}

/* Wide desktop */
@media (min-width: 1500px) {
  .header-inner,
  main,
  .site-footer {
    max-width: 1280px;
  }
  .workspace {
    gap: 26px;
  }
}

/* Tablet */
@media (max-width: 1000px) {
  .header-inner {
    padding: 14px 24px;
  }
  main {
    padding: 28px 24px 24px;
  }
  .site-footer {
    padding: 10px 24px 24px;
  }
  .mode-option {
    gap: 11px;
    padding: 15px 14px;
  }
  .mode-symbol {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  .mode-symbol.noul {
    font-size: 11.5px;
  }
  .example-hint {
    display: none;
  }
  .workspace {
    gap: 16px;
  }
  #decision-form {
    padding: 18px 18px 0;
  }
  .panel-heading {
    padding: 15px 18px;
  }
  .result-content {
    padding: 18px 18px 0;
  }
  .json-section {
    padding: 0 18px;
  }
  .binary-fields {
    grid-template-columns: 1fr;
  }
  .binary-field textarea {
    min-height: 80px;
  }
  .intro h1 {
    font-size: 28px;
  }
}

/* Mobile & small tablets */
@media (max-width: 760px) {
  html {
    scroll-padding-top: 72px;
  }
  .workspace {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .output-panel {
    position: static;
  }
  /* Stack mode cards cleanly for instant readability & effortless tapping */
  .mode-picker {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .mode-option {
    padding: 14px 15px;
    gap: 13px;
  }
  .mode-copy strong {
    font-size: 15px;
  }
  .mode-copy small {
    font-size: 13px;
    margin-top: 3px;
  }
  /* 16px inputs prevent unwanted iOS Safari auto-zoom */
  textarea,
  input[type="text"],
  input[type="password"],
  select {
    font-size: 16px;
  }
  .option-fields input {
    font-size: 15px;
    padding: 5px 7px;
  }
  .option-fields textarea {
    font-size: 14px;
    min-height: 38px;
    height: 42px;
    padding: 5px 7px;
  }
  .model-row {
    gap: 8px;
  }
  .model-row select {
    flex: 1;
    min-width: 0;
    max-width: none;
    min-height: 42px;
    font-size: 15px;
  }
  .model-row > span {
    margin-left: 0;
  }
  .binary-fields {
    grid-template-columns: 1fr;
  }
  .empty-result {
    min-height: 240px;
    padding: 32px 20px;
  }
  .saved-panel {
    padding: 0 18px;
  }
  .context-panel {
    padding: 15px 16px;
  }
  .additional-answer {
    margin: 0 16px 16px;
  }
}

/* Phones (320px - 480px) */
@media (max-width: 480px) {
  .header-inner {
    padding: 12px 14px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .brand {
    font-size: 18px;
    gap: 8px;
  }
  .brand img {
    width: 28px;
    height: 28px;
  }
  .brand small {
    display: none;
  }
  .header-actions {
    gap: 7px;
    margin-left: auto;
  }
  .connection {
    font-size: 11.5px;
    padding: 5px 9px;
    gap: 5px;
  }
  .quiet-button {
    padding: 7px 11px;
    font-size: 12.5px;
    min-height: 34px;
  }
  main {
    padding: 20px 14px 22px;
  }
  .intro {
    margin-bottom: 18px;
  }
  .eyebrow {
    font-size: 10.5px;
    letter-spacing: 1.2px;
  }
  .intro h1 {
    font-size: 24px;
    letter-spacing: -0.6px;
    margin: 6px 0 6px;
  }
  .intro p {
    font-size: 14px;
    line-height: 1.6;
  }
  .example-row {
    gap: 8px;
    margin: 16px 0 18px;
  }
  .example-row > span:first-child {
    width: 100%;
    font-size: 13px;
  }
  .example-buttons {
    gap: 7px;
    width: 100%;
  }
  .example-chip {
    font-size: 13px;
    padding: 7px 12px;
    min-height: 36px;
  }
  .panel {
    border-radius: 12px;
  }
  .panel-heading {
    padding: 14px 15px;
    min-height: 52px;
  }
  .panel-heading h2 {
    font-size: 15px;
  }
  #decision-form {
    padding: 18px 15px 0;
  }
  .form-section {
    margin-bottom: 20px;
  }
  .field-label {
    font-size: 14px;
    flex-wrap: wrap;
  }
  .option-row {
    gap: 8px;
    padding: 10px 8px 10px 10px;
  }
  .row-actions {
    flex-direction: column;
    gap: 4px;
  }
  .row-button {
    width: 32px;
    height: 32px;
    font-size: 14px;
    background: var(--surface);
    border-color: var(--line);
  }
  .row-button.remove-option {
    font-size: 19px;
  }
  .state-tools {
    gap: 8px;
  }
  .state-tools select {
    font-size: 14px;
    min-height: 36px;
  }
  .state-tools .text-button {
    margin-left: 0;
    padding: 6px 8px;
  }
  #state-input {
    min-height: 120px;
  }
  #state-input.json-state {
    min-height: 220px;
    font-size: 13px;
  }
  .extra-question {
    padding: 12px;
  }
  .extra-heading code {
    display: none;
  }
  .extra-heading select {
    max-width: 135px;
    font-size: 14px;
  }
  .result-content {
    padding: 18px 15px 0;
  }
  .choice-verdict,
  .score-verdict {
    padding: 14px 15px;
  }
  .choice-verdict > strong {
    font-size: 23px;
  }
  .score-verdict > strong {
    font-size: 34px;
  }
  .binary-metric strong {
    font-size: 26px;
  }
  .json-section {
    padding: 0 15px;
  }
  .json-block {
    font-size: 12px;
    padding: 12px;
    max-height: 320px;
  }
  .save-current {
    padding: 15px;
    grid-template-columns: 1fr;
  }
  .saved-panel {
    padding: 0 15px;
    border-radius: 12px;
  }
  .saved-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  .compare-selectors {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .compare-selectors > span {
    padding-top: 0;
    text-align: center;
  }
  .compare-selectors select {
    font-size: 14px;
    padding: 10px;
  }
  .comparison-table {
    min-width: 480px;
    font-size: 12.5px;
  }
  dialog {
    padding: 22px 18px;
  }
  .site-footer {
    padding: 8px 15px 24px;
    display: block;
    font-size: 12px;
  }
  .site-footer > span {
    display: block;
    margin-top: 4px;
  }
}

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