/* Why OptionSpace · Build your own. Site tokens only, so light and dark both work. */

/* ---------------- hero: code that turns into a dashboard ---------------- */
.bd-hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 52px; align-items: start; padding-top: 64px; padding-bottom: 72px; }
.bd-hero-copy { padding-top: 36px; }
.bd-hero h1 { margin-top: 14px; }
.bd-hero h1 em { color: var(--accent); }
@media (max-width: 920px) { .bd-hero { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 40px; } .bd-hero-copy { padding-top: 0; } }
.bd-code { background: var(--plate); color: var(--plate-ink); border: 1px solid var(--plate-2); }
.bd-code-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-bottom: 1px solid #262a35; font: 12px var(--mono); color: var(--plate-mut); }
.bd-replay { all: unset; cursor: pointer; font: 12px var(--mono); color: var(--plate-mut); }
.bd-replay:hover { color: var(--plate-ink); }
.bd-replay:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bd-code pre { margin: 0; padding: 14px 18px 16px; font: 12.5px/1.65 var(--mono); white-space: pre; overflow-x: auto; overflow-y: hidden; height: 312px; box-sizing: border-box; }
.bd-code .k, .bd-snip .k, .bd-pre .k { color: #8FB4FF; }
.bd-code .s, .bd-snip .s, .bd-pre .s { color: #E9C46A; }
.bd-code .c, .bd-snip .c, .bd-pre .c { color: var(--plate-mut); }
.typing-caret::after { content: "▍"; color: #8FB4FF; }
.bd-dash { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.bd-tile { margin: 0; background: var(--card); border: 1px solid var(--rule); padding: 10px 12px 8px; opacity: 1; transform: none; transition: opacity .5s ease, transform .5s ease; }
.bd-tile.pre { opacity: 0; transform: translateY(8px); }
.bd-tile figcaption { display: flex; flex-direction: column; margin-bottom: 4px; }
.bd-tile figcaption b { font-weight: 400; font-size: 14.5px; }
.bd-tile figcaption span { font-size: 12px; color: var(--muted); }
@media (max-width: 520px) { .bd-dash { grid-template-columns: minmax(0, 1fr); } .bd-code pre { font-size: 11px; height: 276px; } }

/* ---------------- three ways in ---------------- */
.bd-ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 920px) { .bd-ways { grid-template-columns: minmax(0, 1fr); } }
.bd-way { background: var(--card); border: 1px solid var(--rule); padding: 0 0 20px; display: flex; flex-direction: column; }
.bd-way > :not(.bd-way-vis) { margin-inline: 22px; }
.bd-way h3 { font-size: 22px; margin: 4px 22px 8px; }
.bd-way p { font-size: 15px; line-height: 1.5; color: var(--ink-2); margin-top: 0; margin-bottom: 10px; }
.bd-way .bd-for { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--rule); font-size: 14px; margin-bottom: 0; }
.bd-way .bd-for b { font-weight: 400; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; font-size: 11.5px; margin-right: 6px; }
.bd-way-vis { height: 190px; overflow: hidden; border-bottom: 1px solid var(--rule); margin-bottom: 18px; position: relative; }
.bd-num { display: block; font-size: 13px; letter-spacing: .12em; color: var(--accent); }
.bd-shot { background: var(--paper-2); }
.bd-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.bd-chat { background: #131820; color: #e1e5eb; padding: 16px 18px; font: 12px/1.6 var(--mono); }
.bd-chat .bd-q { border-left: 2px solid #7596fa; padding-left: 10px; color: #edf2fa; }
.bd-chat .bd-t { color: #a4c8ab; font-size: 11px; margin: 8px 0; padding-bottom: 6px; border-bottom: 1px solid #26313d; }
.bd-chat .bd-a { color: #c9cfd8; }
.bd-chat .bd-rec { position: absolute; right: 10px; bottom: 8px; font-size: 10.5px; color: #8b95a3; }
.bd-snip { background: var(--plate); padding: 16px 18px; }
.bd-snip pre { margin: 0; color: var(--plate-ink); font: 12px/1.6 var(--mono); white-space: pre; overflow: hidden; }

/* ---------------- worked examples ---------------- */
.bd-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule-dark); margin-bottom: 26px; }
.bd-tabs button { all: unset; cursor: pointer; display: flex; flex-direction: column; justify-content: flex-start; padding: 14px 16px 14px 0; font-size: 17px; line-height: 1.3; color: var(--ink-2); border-top: 2px solid transparent; margin-top: -1px; }
.bd-tabs button + button { padding-left: 16px; }
.bd-tabs button span { display: block; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.bd-tabs button:hover { color: var(--ink); }
.bd-tabs button[aria-selected="true"] { color: var(--ink); border-top-color: var(--accent); }
.bd-tabs button[aria-selected="true"] span { color: var(--accent); }
.bd-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 760px) { .bd-tabs { grid-template-columns: 1fr 1fr; } .bd-tabs button + button { padding-left: 0; } .bd-tabs button:nth-child(even) { padding-left: 14px; } }
.bd-tabs-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.bd-tabs-5 button { font-size: 16px; }
@media (max-width: 1100px) { .bd-tabs-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .bd-tabs-5 button:nth-child(4) { padding-left: 0; } }
@media (max-width: 760px) { .bd-tabs-5 { grid-template-columns: 1fr 1fr; } .bd-tabs-5 button:nth-child(4) { padding-left: 14px; } }
.bd-canvas { background: var(--card); border: 1px solid var(--rule); padding: 14px 14px 10px; }
.bd-canvas canvas { display: block; width: 100%; }
.bd-goal { font-size: 17px; color: var(--ink-2); margin-bottom: 18px; }
.bd-goal b { font-weight: 400; color: var(--ink); }
.bd-stage { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 28px; align-items: start; }
@media (max-width: 1120px) { .bd-stage { grid-template-columns: minmax(0, 1fr); } }   /* side by side only where 56-character code lines fit */
.bd-how { min-width: 0; }
.bd-lang { display: inline-flex; border: 1px solid var(--rule-dark); margin-bottom: 10px; }
.bd-lang button { all: unset; cursor: pointer; padding: 6px 14px; font-size: 13.5px; color: var(--ink-2); }
.bd-lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.bd-pre { margin: 0; background: var(--plate); color: var(--plate-ink); padding: 16px 18px; font: 12.5px/1.65 var(--mono); white-space: pre; overflow-x: auto; border: 1px solid var(--plate-2); }
#skewCode, #cleanCode { display: block; min-height: 300px; }
.bd-out { font: 12.5px/1.6 var(--mono); color: var(--ink-2); white-space: pre; overflow-x: auto; margin: 10px 0 0; }
/* Phones: the 56-character lines would scroll, so they wrap at a smaller size instead. */
@media (max-width: 480px) { .bd-pre, .bd-out, .bd-code pre { font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; } }
.bd-result { margin: 0; background: var(--card); border: 1px solid var(--rule); padding: 10px; }
.bd-result img { width: 100%; height: auto; display: block; }
.bd-result figcaption { font-size: 13.5px; color: var(--muted); line-height: 1.5; padding: 10px 4px 2px; }
.bd-how .mcp-terminal-body { height: 380px; font-size: 13px; }
.bd-py { margin-top: 10px; }
.bd-py summary { cursor: pointer; font-size: 14.5px; color: var(--accent); padding: 6px 0; }

/* ---------------- the foundation: one formula, two answers ---------------- */
.bd-found { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 34px; align-items: center; margin-bottom: 64px; }
.bd-found-q { margin: 0; display: grid; gap: 4px; }
.bd-found-q b { font-weight: 400; font-size: 24px; line-height: 1.2; }
.bd-found-q span { color: var(--muted); font-size: 15px; }
.bd-found-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 20px 0 18px; }
.bd-found-n { border-top: 3px solid; padding-top: 10px; }
.bd-found-n b { display: block; font-weight: 400; font-size: clamp(68px, 7vw, 96px); line-height: .95; font-variant-numeric: lining-nums tabular-nums; }
.bd-found-n span { display: grid; gap: 2px; margin-top: 8px; font-size: 15px; line-height: 1.3; }
.bd-found-n em { font-style: normal; font-size: 13.5px; color: var(--muted); }
.bd-found-n.ven { border-color: var(--gated-ink); } .bd-found-n.ven b { color: var(--gated-ink); }
.bd-found-n.fit { border-color: var(--accent); } .bd-found-n.fit b { color: var(--accent); }
.bd-found-same { margin: 0; font-size: 16px; color: var(--ink-2); }
.bd-found-same a { display: inline-block; color: var(--ink); text-underline-offset: 3px; }
.bd-found-same a:hover { color: var(--accent); }
.bd-sub { max-width: 760px; margin-bottom: 26px; }
.bd-sub h3 { font-size: clamp(24px, 2.6vw, 32px); margin: 0 0 8px; }
.bd-sub p { font-size: 17px; line-height: 1.55; color: var(--ink-2); margin: 0; }
@media (max-width: 900px) { .bd-found { grid-template-columns: minmax(0, 1fr); gap: 22px; margin-bottom: 48px; } .bd-found-nums { max-width: 360px; } }

/* ---------------- an afternoon, not years ---------------- */
.bd-tracks { display: grid; gap: 30px; }
.bd-track-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; font-size: 16px; }
.bd-track-head b { font-weight: 400; }
.bd-track-head span { color: var(--muted); font-size: 14.5px; }
.bd-bar { display: flex; height: 46px; gap: 2px; }
.bd-bar span { flex: 1; background: var(--ink-2); color: var(--paper); font-size: 12px; line-height: 1.2; display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 6px;
  transform-origin: left; transform: scaleX(1); transition: transform .5s ease, opacity .5s ease; overflow: hidden; }
.bd-bar.pre span { transform: scaleX(0); opacity: 0; }
.bd-bar-short span { flex: 0 0 3.5%; background: var(--accent); min-width: 14px; }
/* Owner's bracket under segments 3 to 6 (forwards through quality checks): the part that takes the years. */
.bd-brace { position: relative; margin: 6px 0 0 calc(200% / 7); width: calc(400% / 7); height: 10px; border: 1.5px solid var(--ink-2); border-top: 0; }
.bd-brace span { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 14px; font-style: italic; color: var(--ink-2); }
.bd-track:has(.bd-brace) { padding-bottom: 26px; }
.bd-steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--rule-dark); position: relative; }
.bd-steps::before { content: ""; position: absolute; left: 1.75%; top: -14px; width: 1px; height: 14px; background: var(--accent); }
.bd-steps li { padding: 12px 16px 0 0; transition: opacity .45s ease, transform .45s ease; }
.bd-steps li + li { padding-left: 16px; border-left: 1px solid var(--rule); }
.bd-steps li b { font-weight: 400; font-size: 17px; display: block; color: var(--accent); }
.bd-steps li span { font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.bd-steps.pre li { opacity: 0; transform: translateY(6px); }
@media (max-width: 760px) {
  .bd-brace { margin-left: 0; width: 100%; }
  .bd-bar { flex-wrap: wrap; height: auto; }
  .bd-bar span { flex: 1 1 30%; height: 40px; }
  .bd-bar-short span { flex: 0 0 18px; height: 40px; }
  .bd-steps { grid-template-columns: 1fr 1fr; }
  .bd-steps li:nth-child(3) { border-left: 0; padding-left: 0; }
}

/* ---------------- start ---------------- */
.bd-oneline { display: grid; gap: 8px; background: var(--plate); color: var(--plate-ink); border: 1px solid var(--plate-2); padding: 16px 20px 18px; margin-bottom: 22px; }
.bd-oneline span { font: 11.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--plate-mut); }
.bd-oneline code { font: 15px/1.6 var(--mono); color: var(--plate-ink); background: none; padding: 0; overflow-wrap: anywhere; }
.bd-oneline code::before { content: "❯ "; color: #8FB4FF; }
.bd-oneline a { font-size: 14.5px; color: var(--plate-mut); text-underline-offset: 3px; justify-self: start; }
.bd-oneline a:hover { color: var(--plate-ink); }
.bd-steps li a { color: var(--accent); text-underline-offset: 3px; white-space: nowrap; }
.bd-start { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 920px) { .bd-start { grid-template-columns: minmax(0, 1fr); } }
.bd-start > div { min-width: 0; }
.bd-start h3 { font-size: 22px; margin: 4px 0 10px; }
.bd-start p { font-size: 14px; color: var(--muted); margin: 10px 0 6px; }
.bd-start .bd-pre { font-size: 12px; }

/* ---------------- close ---------------- */
.bd-close { text-align: center; }
.bd-close h2 { font-size: clamp(32px, 4vw, 52px); margin: 0 0 10px; }
.bd-close .ws-lede { margin: 0 auto 28px; max-width: none; }
