/* The page's own layout, on Cambrian Design System 2026 (cambrian.css) and the elements proposed
   for it (cambrian-proposed.css). Colours, faces and shapes are the system's; type is the
   system's classes on the elements in index.html. This file places things. */

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--cambrian-main-beige); color: var(--cambrian-main-ink); font: 400 16px / 24px var(--cambrian-font-sans); font-variant-numeric: tabular-nums; }
h1, h2, h3, p, dl, dd { margin: 0; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--cambrian-main-cambrian-green); outline-offset: 3px; }
.site-row { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
main a:not(.cambrian-btn):not(.cambrian-btn-lg):not(.cambrian-btn-sm):not(.trader) { color: var(--cambrian-main-cambrian-green); text-decoration: underline; text-underline-position: from-font; }
p { max-width: 70ch; }

/* Risk levels on light: green, forest, risk; none is ink at 45%. */
.low { color: var(--cambrian-main-cambrian-green); }
.medium { color: var(--cambrian-main-forest-green); }
.high { color: var(--cambrian-secondary-risk); }
.none { color: rgba(28, 28, 28, 0.45); }
.side-long, .side-short { font-weight: 600; }

/* The dark band: header and hero on forest, the file's dark background art behind them (hero crop). */
/* The dark band: header and hero on plain forest. The file's background art stays off any band
   that carries dashboard elements; it is kept for the social preview image only. */
.band { background: var(--cambrian-main-forest-green); color: var(--cambrian-main-beige); }
.site-header { padding: 20px 0; }
.site-header .site-row { display: flex; align-items: center; gap: 12px; }
/* Cambrian's logo (mark and wordmark, as on cambrian.org), the app's name under it. */
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; flex: 1; min-width: 0; }
.brand-logo img { display: block; height: 36px; width: auto; }
.brand-app { font: 600 16px / 20px var(--cambrian-font-sans); text-decoration: none; white-space: nowrap; }

/* The live strip: up to three coins on the board, their price ticking, the nearest liquidation price
   of each. Side by side, two short lines each, the read time at the right; they wrap when narrow. */
.ticker { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 32px; align-items: start; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid rgba(246, 235, 211, 0.2); font-variant-numeric: tabular-nums; }
.tick { display: flex; flex-direction: column; gap: 0; white-space: nowrap; }
.tick-top { display: flex; align-items: baseline; gap: 8px; }
.tick-coin { font: 600 16px / 24px var(--cambrian-font-sans); letter-spacing: 0.04em; text-transform: uppercase; }
.tick-mark { font: 600 16px / 24px var(--cambrian-font-sans); }
.tick-liq { font: 400 13px / 18px var(--cambrian-font-sans); opacity: 0.7; }
.ticker-note { opacity: 0.7; white-space: nowrap; margin-left: auto; }

/* The hero is one live position: the sentence a trader would want to read about their own. */
.hero { display: grid; grid-template-columns: 1.5fr 1fr; grid-template-areas: 'ticker ticker' 'title card' 'rest card'; gap: 0 40px; padding: 32px 24px 44px; }
.hero .ticker { grid-area: ticker; }
.hero h1 { grid-area: title; align-self: end; }
.hero-rest { grid-area: rest; align-self: start; }
.hero-card { grid-area: card; align-self: center; min-width: 0; }
/* The figure sits centred in its column, in the level's colour: red for a high chance, as everywhere else. */
.hero .cambrian-metric-hero { align-items: center; text-align: center; }
.hero .cambrian-metric-hero__figure { font-size: clamp(72px, 8.5vw, 110px); }
.cambrian-on-dark .cambrian-metric-hero__figure.high { color: var(--cambrian-secondary-risk); }
.cambrian-on-dark .cambrian-metric-hero__figure.medium { color: var(--cambrian-main-beige); }
.cambrian-on-dark .cambrian-metric-hero__figure.low { color: var(--cambrian-main-cambrian-green); }
.eyebrow { opacity: 0.85; }
/* The hero card: a beige hairline frame, centred, where a hero picture would sit. */
.hero-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 20px 20px 24px; border: 1px solid rgba(246, 235, 211, 0.45); border-radius: 8px; background: rgba(246, 235, 211, 0.04); }
.hero-card-dist { opacity: 0.8; }
.hero-card-dist:empty { display: none; }
.hero-card .odds { margin-top: 8px; gap: 6px; }
.hero-paths { align-self: stretch; margin: 10px 0 0; }
.hero-paths canvas { display: block; width: 100%; height: 148px; }
/* Loading: grey bars where the position and distance go, a grey chart, a dim "––%", one light sweep across them. */
.hero-card .skel { display: inline-block; height: 14px; border-radius: 3px; vertical-align: middle; }
.hero-card .skel-pos { width: 160px; height: 18px; }
.hero-card .skel-dist { width: 220px; }
.hero-card.loading .skel, .hero-card.loading .hero-paths canvas { background: rgba(246, 235, 211, 0.1) linear-gradient(90deg, transparent, rgba(246, 235, 211, 0.1), transparent) no-repeat; background-size: 40% 100%; animation: skel-sweep 1.4s linear infinite; }
.hero-card.loading .cambrian-metric-hero__figure { color: rgba(246, 235, 211, 0.25); }
@keyframes skel-sweep { from { background-position: -70% 0; } to { background-position: 170% 0; } }
@media (prefers-reduced-motion: reduce) { .hero-card.loading .skel, .hero-card.loading .hero-paths canvas { animation: none; } }
.hero h1 { margin-top: 0; max-width: 22ch; }
.hero .pitch { max-width: 64ch; margin: 18px 0 20px; }
.hero .actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.hero .actions a:not(.cta) { color: var(--cambrian-main-beige); text-decoration: underline; text-underline-position: from-font; }

main section { padding: 56px 0; border-bottom: 1px solid var(--cambrian-main-forest-green); }
main section.board { padding-top: 40px; }
main section:last-child { border-bottom: 0; }

/* The footer: the disclaimer, small and quiet, under a rule. */
.site-footer > p { padding: 32px 0 48px; border-top: 1px solid var(--cambrian-main-forest-green); color: rgba(28, 28, 28, 0.65); max-width: none; }

.eyebrow + h2 { margin-top: 10px; }
main .eyebrow { color: var(--cambrian-main-forest-green); opacity: 1; }
.sub { margin: 12px 0 24px; }
.status { padding: 24px 0; opacity: 0.7; }

/* Tables. */
.cambrian-table td.rank { opacity: 0.6; width: 2.5em; }
.trader { text-decoration: none; opacity: 0.8; }
.trader:hover { opacity: 1; text-decoration: underline; }
.lev { opacity: 0.6; }
td.p { width: 22%; }
td.other { opacity: 0.85; }

.board-cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 28px; }
.board-soon { margin: 28px 0 0; }

/* Check your address: the same table as the board, for one account. */
.check-form { display: flex; gap: 10px; max-width: 640px; }
.check-form .cambrian-field { flex: 1; }
.check-wallets { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 12px; max-width: 640px; }
.verdict { margin: 28px 0 6px; }
.verdict + .sub { margin-top: 0; }

/* Hall of Rekt: the loss first, then the position, then the model's call in one shape. */
.quip { margin-top: 8px; }
.quip + .sub { margin-top: 12px; }
.rip-loss { color: var(--cambrian-secondary-risk); margin-top: 10px; font-size: 40px; line-height: 44px; }
.rip-pos { margin-top: 4px; }
.rip-meta { opacity: 0.75; margin-top: 2px; }
.rip-foot b, .rekt-figure { color: var(--cambrian-secondary-risk); font-weight: 600; }

.rekt-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
/* The cards take the Coverage Card's frame (a forest hairline all round) on a white surface: the
   Feature Card's two-sided border reads as broken when twelve sit in a grid. */
.rip { gap: 0; padding: 18px 20px 16px; background: var(--cambrian-main-white); }
.rip-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rip-tag { color: var(--cambrian-secondary-risk); }
.rip-head .trader { font-weight: 400; text-transform: none; letter-spacing: 0; }
.rip-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(4, 64, 25, 0.25); }
.rip-foot .share { align-self: flex-end; color: var(--cambrian-main-cambrian-green); text-decoration: underline; text-underline-position: from-font; }
.share { white-space: nowrap; }

/* The extension. */
.product img { display: block; width: 100%; border: 1px solid var(--cambrian-main-forest-green); border-radius: var(--cambrian-radius-button); }
.product dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 32px; }
.product dl .cambrian-feature-card { padding: 26px 24px 28px; }
.product dd { opacity: 0.9; }

/* The extension's waitlist, laid out as cambrian.org's newsletter popup (a rounded card, a full-
   width field and button, the page blurred behind it) in this system's colours. The dialog has no
   padding, so a click on the dialog itself is a click on the backdrop. */
.waitlist { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 12px; background: var(--cambrian-main-beige); color: var(--cambrian-main-ink); box-shadow: 0 24px 64px rgba(4, 64, 25, 0.35); }
.waitlist::backdrop { background: rgba(4, 64, 25, 0.55); backdrop-filter: blur(6px); }
.waitlist-body { position: relative; padding: 48px; }
.waitlist-close { position: absolute; top: 20px; right: 20px; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: var(--cambrian-radius-button); background: transparent; color: var(--cambrian-main-ink); cursor: pointer; }
.waitlist-close:hover { background: rgba(4, 64, 25, 0.08); }
.waitlist h2 { padding-right: 36px; }
.waitlist-body > p { margin-top: 16px; }
#waitlist-form { display: flex; flex-direction: column; margin-top: 32px; }
.waitlist-label { margin-bottom: 8px; font-weight: 600; }
.waitlist-label span { color: var(--cambrian-secondary-risk); }
.waitlist-check { display: flex; align-items: center; gap: 10px; margin-top: 16px; cursor: pointer; }
.waitlist-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--cambrian-main-cambrian-green); }
#waitlist-turnstile { margin-top: 16px; }
#waitlist-turnstile:empty { display: none; }
#waitlist-form .cambrian-btn-lg { width: 100%; margin-top: 28px; }
#waitlist-form .cambrian-btn-lg:disabled { opacity: 0.6; cursor: progress; }
.waitlist-error { margin-top: 12px; color: var(--cambrian-secondary-risk); }
.waitlist-error:empty { display: none; }
.waitlist-done { margin-top: 32px; padding: 16px 18px; border-left: 3px solid var(--cambrian-main-cambrian-green); background: var(--cambrian-main-white); }

@media (max-width: 1000px) {
  .rekt-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .product dl { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .hero, .product dl { grid-template-columns: 1fr; }
  .rekt-grid { grid-template-columns: 1fr 1fr; }
  /* The card follows the title, so the first screen on a phone shows the live position. */
  .hero { grid-template-areas: 'ticker' 'title' 'card' 'rest'; }
  .hero-card { margin-top: 24px; }
  .ticker { flex-direction: column; gap: 10px; }
  .ticker-note { margin-left: 0; }
  .hide-sm, td.other, th.other, .lev, .cambrian-meter__track { display: none; }
  .cambrian-table th, .cambrian-table td { padding-left: 8px; padding-right: 8px; }
}
@media (max-width: 480px) {
  .rekt-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  /* The file draws no phone steps: the serif headlines take the next step down. */
  .cambrian-h1 { font-size: 36px; line-height: 40px; }
  .cambrian-h2 { font-size: 32px; line-height: 38px; }
  .cambrian-body-lg { font-size: 18px; line-height: 28px; }
  main section { padding: 40px 0; }
  .hero { padding: 36px 24px 48px; }
  .site-header .cambrian-btn-sm, .brand-app { white-space: nowrap; }
  /* The name and the button do not fit side by side: the button goes under the name. */
  .site-header .site-row { flex-wrap: wrap; row-gap: 12px; }
  .brand { flex: 1 1 auto; }
  .waitlist-body { padding: 40px 24px 28px; }
  .waitlist-close { top: 12px; right: 12px; }
}
