/* Color and font tokens come from the site's shared global.css. */
* { box-sizing: border-box; }
html { color-scheme: light; }
html body { margin: 0; background: hsl(var(--background)); color: hsl(var(--foreground)); font: 16px/1.6 var(--font-sans); }
body a { color: hsl(var(--primary)); text-decoration: underline; text-underline-offset: 3px; }
button, select, textarea { font: inherit; }
button, a, input, select, summary { touch-action: manipulation; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
.tool h2 { font-size: clamp(24px, 3vw, 28px); font-weight: 600; line-height: 1.25; letter-spacing: -.025em; margin-bottom: 16px; }
.tool h3 { font-size: 18px; font-weight: 600; line-height: 1.4; margin-bottom: 12px; }
.shell { max-width: 960px; margin: 0 auto; padding: 32px 24px; }
.brand { margin-bottom: 24px; }
.brand a { font-weight: 600; text-decoration: none; font-size: 20px; color: hsl(var(--foreground)); }
.brand span { font-weight: 400; color: hsl(var(--muted-foreground)); font-size: 14px; }
.tool { background: hsl(var(--card)); border: 1px solid hsl(var(--card-border)); border-radius: var(--radius); overflow: hidden; }
.tool-header { padding: 24px 32px 0; }
.tool-header h1 { font-size: 24px; font-weight: 600; letter-spacing: -.025em; margin: 0; }
.flow { display: flex; padding: 24px 32px 0; gap: 16px; border-bottom: 1px solid hsl(var(--border)); }
.flow-node { display: flex; flex: 1; min-width: 0; align-items: baseline; gap: 8px; padding: 0 8px 16px 0; border-bottom: 2px solid transparent; color: hsl(var(--muted-foreground)); line-height: 1.35; font-size: 12px; position: relative; }
.flow-node:not(:last-child)::after { content: '→'; position: absolute; right: -8px; color: hsl(var(--input)); }
.flow-node span { flex-shrink: 0; font-size: 12px; font-weight: 500; }
.flow-node.current { font-weight: 600; color: hsl(var(--primary)); border-bottom-color: hsl(var(--primary)); }
.flow-node.done span { color: hsl(var(--primary)); }
.flow-node small { display: block; font-size: 11px; margin-top: 4px; font-weight: 400; }
.flow-node button { border: 0; background: none; padding: 0; text-align: left; color: inherit; font: inherit; }
.flow-node button:hover { color: hsl(var(--primary)); }
.question, .result { padding: 32px; }
.step-note { font-size: 12px; font-weight: 500; color: hsl(var(--muted-foreground)); margin-bottom: 12px; }
.help { color: hsl(var(--muted-foreground)); font-size: 14px; margin-bottom: 24px; max-width: 740px; }
.field-label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; }
select { width: 100%; padding: 12px; border: 1px solid hsl(var(--input)); border-radius: 6px; background: hsl(var(--background)); color: hsl(var(--foreground)); min-height: 48px; }
.options { display: grid; gap: 12px; }
.trade-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.option { display: flex; align-items: center; gap: 16px; min-height: 72px; border: 1px solid hsl(var(--input) / .65); border-radius: 6px; padding: 20px; background: hsl(var(--card)); cursor: pointer; font-size: 18px; transition: border-color .15s, background .15s; }
.option:hover { border-color: hsl(var(--primary) / .65); }
.option:has(input:checked) { border-color: hsl(var(--primary)); background: hsl(var(--primary) / .04); }
.option input { width: 18px; height: 18px; accent-color: hsl(var(--primary)); flex-shrink: 0; margin: 2px 0 0; }
.option strong { display: block; font-weight: 500; }
.option small { display: block; color: hsl(var(--muted-foreground)); font-size: 13px; line-height: 1.5; margin-top: 4px; }
.actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.state-actions { justify-content: flex-end; }
.button { border: 1px solid hsl(var(--input) / .65); border-radius: 6px; min-height: 52px; padding: 12px 24px; font-weight: 500; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); border-color: var(--primary-border); }
.primary:hover { background: var(--primary-border); }
.secondary { background: hsl(var(--background)); color: hsl(var(--foreground)); }
.secondary:hover { background: hsl(var(--muted) / .3); }
.button:disabled { opacity: .5; cursor: not-allowed; }
.source { font-size: 12px; margin: 20px 0 0; }
.tool-footer { border-top: 1px solid hsl(var(--border)); padding: 16px 32px; color: hsl(var(--muted-foreground)); font-size: 11px; line-height: 1.7; }
.coverage { border-left: 2px solid hsl(var(--primary)); padding: 0 0 0 16px; font-size: 14px; margin: 24px 0 32px; }
.coverage strong { display: block; font-weight: 600; margin-bottom: 8px; }
.coverage p { margin: 0; color: hsl(var(--muted-foreground)); }
.result-grid { border-top: 1px solid hsl(var(--border)); margin-bottom: 32px; }
.result-card { border-bottom: 1px solid hsl(var(--border)); padding: 24px 0; }
.result-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.result-card h3 { margin: 0 0 10px; }
.result-card .result-links { margin-top: 12px; }
.result-card p { font-size: 14px; color: hsl(var(--muted-foreground)); margin: 0; }
.badge { font-size: 12px; font-weight: 500; color: hsl(var(--primary)); max-width: 220px; text-align: right; }
.flags { padding: 20px; border: 1px solid hsl(var(--card-border)); border-radius: var(--radius); background: hsl(var(--muted) / .2); margin-bottom: 32px; }
.flags li { font-size: 14px; margin-bottom: 16px; }
.flags ul { list-style: disc; padding-left: 20px; margin: 0; }
.flags li:last-child { margin-bottom: 0; }
.flags strong { display: block; font-weight: 600; }
.result-section { margin-top: 32px; }
.result-section > p { font-size: 14px; color: hsl(var(--muted-foreground)); }
.copy { width: 100%; min-height: 180px; resize: vertical; border: 1px solid hsl(var(--input)); border-radius: 6px; padding: 16px; background: hsl(var(--muted) / .15); font-size: 14px; line-height: 1.7; color: hsl(var(--foreground)); }
.copy-status { font-size: 12px; color: hsl(var(--primary)); margin: 12px 0 0; min-height: 18px; }
.examples { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.example { display: block; text-decoration: none; }
.example img { width: 100%; aspect-ratio: 16/9; object-fit: contain; background: hsl(var(--background)); border: 1px solid hsl(var(--border)); border-radius: 4px; }
.example strong { font-size: 14px; font-weight: 500; display: block; margin-top: 12px; }
.example span { font-size: 12px; color: hsl(var(--muted-foreground)); display: block; margin-top: 4px; }
.source-list { list-style: disc; padding-left: 20px; font-size: 13px; }
.source-list li { margin-bottom: 8px; }
.answers { margin-top: 24px; border-top: 1px solid hsl(var(--border)); padding-top: 20px; font-size: 13px; }
.answers summary { cursor: pointer; font-weight: 500; }
.answers dl { display: grid; grid-template-columns: 1fr auto; gap: 12px 24px; margin: 20px 0; }
.answers dt { color: hsl(var(--muted-foreground)); }
.answers dd { margin: 0; font-weight: 500; text-align: right; }
.result-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.fallback { padding: 24px; }
.embedded .shell { padding: 0; max-width: none; }
.embedded .standalone-only { display: none; }
.embedded .tool { border: 0; border-radius: 0; }
.error { padding: 24px; color: hsl(var(--destructive)); }
.question h2:focus, .result h2:focus { outline: none; }
.question-details { border-left: 2px solid hsl(var(--border)); padding: 0 0 0 16px; margin: 0 0 24px; font-size: 13px; color: hsl(var(--muted-foreground)); }
.question-details summary { cursor: pointer; font-weight: 500; color: hsl(var(--primary)); }
.question-details p { margin: 12px 0 0; line-height: 1.6; }
@media (max-width: 639px) {
  .trade-options { grid-template-columns: 1fr; }
  .shell { padding: 16px; }
  .tool-header { padding: 20px 20px 0; }
  .question, .result { padding: 24px 20px; }
  .flow { padding: 20px 16px 0; gap: 12px; }
  .flow-node { flex-direction: column; align-items: center; text-align: center; font-size: 10px; padding: 0 0 12px; gap: 6px; }
  .flow-node button { text-align: center; }
  .flow-node:not(:last-child)::after { top: 0; right: -10px; }
  .flow-node > div { max-width: 100%; overflow-wrap: break-word; }
  .flow-node small { font-size: 10px; }
  .tool-footer { padding: 16px 20px; }
  .result-card header { display: block; }
  .badge { display: block; margin-top: 8px; text-align: left; max-width: none; }
  .examples { grid-template-columns: 1fr; }
  .actions .primary { flex: 1; }
  .answers dl { grid-template-columns: 1fr; }
  .answers dd { text-align: left; margin-top: -8px; }
  .result-links .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
