/* The two working pages and the reference, in the front page's system. */

.page-head { padding-block: 36px 26px; }
.page-head h1 { margin-top: 14px; }
.page-head p { color: var(--muted); margin-top: 14px; max-width: 58ch; font-size: 15px; }

/* ---- launch ---------------------------------------------------------------------- */
.launch-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 22px; align-items: start; padding-block: 8px 80px; }
.launch-grid > section, .launch-grid > aside { background: #fff; border: 1px solid rgba(226,232,240,0.9); border-radius: var(--r-xl); box-shadow: var(--shadow-sm); padding: 28px; }

.field { margin-bottom: 24px; }
.field > label { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 10px; }
.control {
  width: 100%; height: 44px; padding: 0 14px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-s);
  font-size: 14px; font-weight: 500; color: var(--ink);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.control:focus { outline: none; background: #fff; border-color: var(--call); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 12.5px; color: var(--muted-2); margin-top: 9px; line-height: 1.55; }
.hint b { color: var(--ink); font-weight: 600; }
.hint.bad { color: var(--put); }

.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; max-height: 252px; overflow: auto; padding: 2px; }
.pick {
  border: 1px solid rgba(226,232,240,0.9); border-radius: var(--r-s); background: #fff;
  padding: 10px 12px; text-align: left; box-shadow: var(--shadow-sm);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.pick:hover { border-color: var(--line-2); transform: translateY(-1px); }
.pick.on { border-color: var(--call); background: var(--call-dim); }
.pick-head { display: flex; align-items: center; gap: 8px; }
.pick-logo { width: 18px; height: 18px; object-fit: contain; flex: 0 0 18px; }
.pick-mono { font-size: 10px; font-weight: 700; letter-spacing: 0.02em; width: 18px; flex: 0 0 18px; }
.pick .t { font-size: 13px; font-weight: 600; color: var(--ink); }
.pick .p { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips .chip { cursor: pointer; }
.chips .chip:hover { border-color: var(--call); color: var(--call); }
.chips .chip.on { border-color: var(--call); color: var(--call); background: var(--call-dim); }
/* An underlying the oracle has no feed for. Shown rather than hidden, so a
   ticker that is missing looks missing instead of looking unsupported. */
.pick.off { opacity: 0.4; cursor: not-allowed; }
.pick.off:hover { border-color: var(--line); transform: none; }

.slider { width: 100%; accent-color: var(--call); }
.preview-canvas { width: 100%; height: 210px; }

/* ---- one market -------------------------------------------------------------------- */
.market-top { padding-block: 30px 22px; }
.market-title h1 { font-size: clamp(28px, 3.6vw, 44px); }
.market-title .sub { color: var(--muted); margin-top: 12px; font-size: 15px; max-width: 62ch; }
.market-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }

.market-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; padding-bottom: 90px; }
.market-grid > aside > div { background: #fff; border: 1px solid rgba(226,232,240,0.9); border-radius: var(--r-xl); box-shadow: var(--shadow-sm); padding: 26px; }
.chart-canvas { width: 100%; height: 300px; }
.chart-tabs { display: flex; gap: 6px; }

.ticket-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.side-btn {
  display: block; width: 100%; text-align: left; padding: 12px 14px;
  border: 1px solid rgba(226,232,240,0.9); border-radius: var(--r-s); background: #fff;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.side-btn .lab { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); }
.side-btn .px { display: block; font-family: var(--display); font-size: 24px; font-weight: 500; letter-spacing: -0.03em; margin-top: 4px; }
.side-btn.call .px { color: var(--call); }
.side-btn.put .px { color: var(--put); }
.side-btn.on.call { border-color: #bfdbfe; background: var(--call-dim); }
.side-btn.on.put { border-color: #fecdd3; background: var(--put-dim); }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--surface-3); border-radius: 999px; margin-bottom: 12px; }
.seg button { padding: 8px 0; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); transition: background 0.2s var(--ease), color 0.2s var(--ease); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

.amount-row { margin-bottom: 10px; }

.pos-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pos-table td { padding: 10px 0; border-bottom: 1px solid var(--surface-3); font-weight: 500; }
.pos-table tr:last-child td { border-bottom: 0; }

.tape { max-height: 250px; overflow: auto; }
.tape-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--surface-3); font-size: 12.5px; color: var(--muted); }
.tape-row:last-child { border-bottom: 0; }

/* ---- the reference -------------------------------------------------------------------- */
.doc-grid { display: grid; grid-template-columns: 1fr 210px; gap: 56px; padding-block: 20px 90px; }
.doc { max-width: 720px; }
.doc h2 { margin: 56px 0 16px; font-size: 30px; }
.doc h3 { margin: 32px 0 12px; }
.doc p { color: var(--muted); margin: 15px 0; font-size: 15.5px; line-height: 1.75; }
.doc li { color: var(--muted); margin: 8px 0; line-height: 1.7; }
.doc code { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; color: var(--ink); background: var(--surface-3); padding: 2px 6px; border-radius: 6px; }
.doc pre { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; color: var(--muted); background: #fff; border: 1px solid rgba(226,232,240,0.9); border-radius: var(--r-s); padding: 20px; overflow-x: auto; line-height: 1.7; box-shadow: var(--shadow-sm); }
.doc table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; background: #fff; border: 1px solid rgba(226,232,240,0.9); border-radius: var(--r-s); overflow: hidden; }
.doc th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted-2); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.doc td { padding: 13px 16px; border-bottom: 1px solid var(--surface-3); color: var(--muted); vertical-align: top; }
.doc tr:last-child td { border-bottom: 0; }
.toc { position: sticky; top: 96px; align-self: start; }
.toc a { display: block; font-size: 13px; color: var(--muted-2); padding: 6px 0; transition: color 0.2s var(--ease); }
.toc a:hover { color: var(--ink); }

@media (max-width: 940px) {
  .launch-grid, .market-grid, .doc-grid { grid-template-columns: 1fr; }
  .toc { display: none; }
}

/* the empty states the working pages fall back to */
.empty {
  background: #fff; border: 1px dashed var(--line-2); border-radius: var(--r-xl);
  padding: 64px 24px; text-align: center; color: var(--ink);
  margin-block: 40px 80px;
}
