/* Clause. Hand-written, no framework, no build step.
 *
 * The palette is near-monochrome by intent, but the ground is a deep BLUE
 * black rather than a neutral one, and every secondary tone is tinted toward
 * it. Neutral greys on a dark ground are what makes a page read as bland: the
 * eye has nothing to hold. Colour here is never decoration -- amber is a
 * number, red is a conflict, green is agreement, cyan is something you can
 * click. If a colour appears, it means something. */

:root {
  --ground:   #080b12;
  --raised:   #0f1522;
  --raised-2: #161e2e;
  --line:     #232d40;
  --line-2:   #33405a;

  --ink:      #eef3fb;
  --ink-2:    #9db0cc;
  --ink-3:    #6b7c99;

  --cyan:     #3ddcff;   /* interactive */
  --gold:     #ffb03a;   /* figures, cautions */
  --red:      #ff5470;   /* conflict, mirage, loss */
  --green:    #2fe08a;   /* agreement, fits */

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Cascadia Code",
          Consolas, "Liberation Mono", monospace;

  --wrap: 76rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  /* A single wide, very dilute wash so the page is not a flat rectangle.
   * Not a gradient behind the headline -- that is the vibe-coded tell. */
  background-image:
    radial-gradient(80rem 40rem at 15% -10%, #12203a 0%, transparent 60%);
  background-repeat: no-repeat;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.75rem; }

.skip {
  position: absolute; left: -999px;
  background: var(--cyan); color: #001018; padding: .6rem 1rem;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 99; }

/* ------------------------------------------------------------------ type */

h1, h2, h3 { font-weight: 600; letter-spacing: -0.022em; line-height: 1.12; }
h1 { font-size: clamp(2.6rem, 6.2vw, 4.4rem); margin: 0 0 1.25rem; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.1rem); margin: 0 0 .5rem; }
h3 { font-size: 1.12rem; margin: 0 0 .6rem; letter-spacing: -0.01em; }

.hl {
  color: var(--cyan);
  /* An underline that sits below the descenders, drawn rather than decorated,
   * so it does not clip the "y" in "actually". */
  background: linear-gradient(var(--cyan), var(--cyan)) 0 100% / 100% 3px
              no-repeat;
  padding-bottom: 2px;
}

p { margin: 0 0 1rem; }

.sub {
  font-size: clamp(1.05rem, 1.9vw, 1.3rem);
  color: var(--ink-2);
  max-width: 46rem;
  margin-bottom: 2.25rem;
}
.sub strong { color: var(--ink); }

.lede { color: var(--ink-2); max-width: 46rem; }

.foot {
  font-size: .86rem; color: var(--ink-3); font-family: var(--mono);
  line-height: 1.55; margin-top: .9rem; margin-bottom: 0;
}

.mono, .num { font-family: var(--mono); font-size: .93em; }
.num { color: var(--gold); font-variant-numeric: tabular-nums; }
.q { color: var(--ink); font-style: italic; }
.yes { color: var(--green); font-family: var(--mono); font-size: .9em; }
.no  { color: var(--red);   font-family: var(--mono); font-size: .9em; }

a { color: var(--cyan); text-decoration-thickness: 1px;
    text-underline-offset: 3px; }
a:hover { color: #8ce9ff; }

/* ---------------------------------------------------------------- header */

.top {
  border-bottom: 1px solid var(--line);
  background: rgba(8, 11, 18, .82);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.top .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; height: 3.6rem;
}
.brand {
  font-family: var(--mono); font-size: 1.05rem; font-weight: 600;
  letter-spacing: .01em; color: var(--ink); text-decoration: none;
}
.brand span { color: var(--cyan); }
.top-nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.top-nav a {
  color: var(--ink-3); text-decoration: none; font-family: var(--mono);
  font-size: .8rem; letter-spacing: .02em;
}
.top-nav a:hover { color: var(--cyan); }

/* --------------------------------------------------------------- section */

section { padding: 4.5rem 0; border-bottom: 1px solid var(--line); }
.hero { padding: 5.5rem 0 4rem; border-bottom: 1px solid var(--line); }

/* ----------------------------------------------------------------- tools */

.tool {
  margin-top: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--raised);
  overflow: hidden;
}
.hero-tool {
  border-color: var(--line-2);
  box-shadow: 0 0 0 1px rgba(61, 220, 255, .07),
              0 24px 60px -30px rgba(0, 0, 0, .9);
}

.tool-bar {
  display: flex; gap: .6rem; padding: .7rem;
  border-bottom: 1px solid var(--line);
  background: var(--raised-2);
  flex-wrap: wrap;
}

input[type="text"] {
  flex: 1 1 16rem; min-width: 0;
  background: var(--ground);
  border: 1px solid var(--line-2);
  border-radius: 3px;
  color: var(--ink);
  font-family: var(--mono); font-size: .92rem;
  padding: .62rem .8rem;
}
input[type="text"]:focus {
  outline: none; border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(61, 220, 255, .14);
}
input::placeholder { color: var(--ink-3); }

.money {
  display: flex; align-items: center; gap: .35rem;
  background: var(--ground);
  border: 1px solid var(--line-2); border-radius: 3px;
  padding-left: .7rem; flex: 0 1 10.5rem;
}
.money span { color: var(--ink-3); font-family: var(--mono); }
.money input { border: none; background: none; flex: 1 1 auto; padding-left: 0; }
.money:focus-within {
  border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(61, 220, 255, .14);
}
.money input:focus { box-shadow: none; }

button {
  font-family: var(--mono); font-size: .88rem; font-weight: 600;
  letter-spacing: .01em;
  background: var(--cyan); color: #00151d;
  border: 1px solid var(--cyan); border-radius: 3px;
  padding: .62rem 1.2rem; cursor: pointer;
}
button:hover { background: #7ee7ff; border-color: #7ee7ff; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.try {
  padding: .7rem .9rem; margin: 0;
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: .78rem; color: var(--ink-3);
  display: flex; align-items: center; gap: .45rem; flex-wrap: wrap;
}
.chip {
  background: transparent; color: var(--ink-2);
  border: 1px solid var(--line-2); border-radius: 100px;
  padding: .22rem .7rem; font-size: .78rem; font-weight: 400;
}
.chip:hover { border-color: var(--cyan); color: var(--cyan); background: transparent; }

.out {
  padding: 1.1rem; margin: 0;
  font-family: var(--mono); font-size: .87rem; line-height: 1.65;
  color: var(--ink-2);
  min-height: 5rem;
  overflow-x: auto;
}
/* The panel renders real markup, so it must NOT preserve source whitespace --
 * doing so indented every choice by its template literal's own leading
 * spaces. Preformatted text gets .pre explicitly. */
.out .pre {
  margin: 0; padding: 0; white-space: pre-wrap; word-break: break-word;
  font-family: var(--mono); font-size: .87rem; line-height: 1.65;
  color: var(--ink-2);
}
.out .hint { color: var(--ink-3); margin: 0; }
.out.is-loading { opacity: .45; }

/* ------------------------------------------------------------ the answer */

.answer-head {
  display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap;
  margin-bottom: .9rem;
}
.answer-title {
  font-family: var(--serif); font-size: 1.12rem; color: var(--ink);
  line-height: 1.3; flex: 1 1 20rem; margin: 0;
}
.verdict {
  font-family: var(--mono); font-size: .72rem; font-weight: 700;
  letter-spacing: .06em; padding: .2rem .55rem; border-radius: 3px;
  white-space: nowrap; border: 1px solid;
}
.verdict-liquid  { color: var(--green); border-color: rgba(47,224,138,.4); background: rgba(47,224,138,.09); }
.verdict-thin    { color: var(--gold);  border-color: rgba(255,176,58,.4); background: rgba(255,176,58,.09); }
.verdict-mirage,
.verdict-dormant { color: var(--red);   border-color: rgba(255,84,112,.4); background: rgba(255,84,112,.09); }
.verdict-unknown { color: var(--ink-3); border-color: var(--line-2); }

.stats {
  display: grid; gap: 1px; background: var(--line);
  grid-template-columns: repeat(var(--cols, 4), 1fr);
  border: 1px solid var(--line); border-radius: 3px;
  margin-bottom: 1rem; overflow: hidden;
}
@media (max-width: 980px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--raised); padding: .8rem .9rem; }
.stat .v {
  display: block; font-family: var(--mono); font-size: 1.32rem;
  color: var(--gold); font-variant-numeric: tabular-nums; line-height: 1.25;
}
.stat .k {
  display: block; font-family: var(--mono); font-size: .7rem;
  color: var(--ink-3); letter-spacing: .04em; margin-top: .2rem;
}
.stat.good .v { color: var(--green); }
.stat.bad  .v { color: var(--red); }
.stat.plain .v { color: var(--ink); }

.findings { list-style: none; padding: 0; margin: 0; }
.findings li {
  padding: .55rem 0 .55rem .95rem; border-left: 2px solid var(--line-2);
  margin-bottom: .4rem; color: var(--ink-2);
}
.findings li.warn { border-left-color: var(--gold); }
.findings li.bad  { border-left-color: var(--red); }

.choices { list-style: none; padding: 0; margin: .6rem 0 0; }
.choices li { margin-bottom: .35rem; }
.choices button {
  display: block; width: 100%; text-align: left;
  background: var(--raised-2); color: var(--ink-2);
  border: 1px solid var(--line); font-weight: 400;
  padding: .6rem .8rem; font-size: .85rem; line-height: 1.45;
  font-family: var(--serif);
}
.choices button:hover { border-color: var(--cyan); color: var(--ink); background: var(--raised-2); }
.choices .why { display: block; color: var(--ink-3); font-size: .76rem; margin-top: .2rem; }
.err { color: var(--red); }

/* ----------------------------------------------------------------- cards */

.cols {
  display: grid; gap: 1.5rem; margin-top: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
}

.card {
  border: 1px solid var(--line); border-radius: 4px;
  background: var(--raised); padding: 1.4rem;
  border-top: 2px solid var(--line-2);
}
.bad-card  { border-top-color: var(--red); }
.warn-card { border-top-color: var(--gold); }

.tag {
  display: inline-block; font-family: var(--mono); font-size: .68rem;
  font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  margin-bottom: .7rem;
}
.tag-bad  { color: var(--red); }
.tag-warn { color: var(--gold); }

.card p { color: var(--ink-2); font-size: .97rem; }
.card em { color: var(--ink); }

.finding {
  margin-top: 1.75rem; padding: 1.4rem 1.5rem;
  border: 1px solid var(--line); border-left: 3px solid var(--cyan);
  border-radius: 4px; background: var(--raised);
}
.finding p { color: var(--ink-2); margin-bottom: .6rem; }

/* ------------------------------------------------------------ code, tabs */

.tabs { display: flex; gap: .3rem; margin: 1rem 0 0; }
.tabs button {
  background: transparent; color: var(--ink-3);
  border: 1px solid var(--line); border-bottom: none;
  border-radius: 3px 3px 0 0; padding: .38rem .85rem;
  font-size: .78rem; font-weight: 400;
}
.tabs button[aria-selected="true"] {
  color: var(--cyan); border-color: var(--line-2);
  background: var(--raised); border-bottom: 1px solid var(--raised);
  margin-bottom: -1px;
}

.code {
  margin: 0; padding: 1rem 1.1rem;
  background: var(--raised); border: 1px solid var(--line-2);
  border-radius: 0 3px 3px 3px;
  font-family: var(--mono); font-size: .84rem; line-height: 1.65;
  color: var(--ink-2); overflow-x: auto;
}
.code .k { color: var(--cyan); }
.code .s { color: var(--gold); }
.code .c { color: var(--ink-3); }

/* ---------------------------------------------------------------- tables */

.scroll { overflow-x: auto; margin-top: .5rem; }
table { border-collapse: collapse; width: 100%; font-size: .88rem; }
th, td {
  text-align: left; padding: .5rem .8rem .5rem 0;
  border-bottom: 1px solid var(--line);
}
th {
  font-family: var(--mono); font-size: .72rem; color: var(--ink-3);
  letter-spacing: .05em; text-transform: uppercase; font-weight: 400;
}
td { color: var(--ink-2); }
td.mono { color: var(--cyan); font-family: var(--mono); font-size: .84rem;
          white-space: nowrap; padding-right: 1.5rem; }

/* ----------------------------------------------------------------- traps */

.traps-grid {
  display: grid; gap: 1rem; margin-top: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
}
.trap {
  border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: 3px; background: var(--raised); padding: 1rem 1.1rem;
}
.trap h4 {
  margin: 0 0 .45rem; font-family: var(--mono); font-size: .82rem;
  color: var(--gold); font-weight: 600; letter-spacing: .01em;
}
.trap p { margin: 0; font-size: .9rem; color: var(--ink-2); line-height: 1.55; }
.trap .cost {
  display: block; margin-top: .5rem; font-family: var(--mono);
  font-size: .74rem; color: var(--ink-3);
}

.trap h4 .kind {
  float: right; font-size: .68rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 400;
}
/* A `good` is the venue doing something right, and a `note` is a standing
   constraint. Neither is a trap, and colouring all three gold would say they
   were. */
.trap-good { border-left-color: var(--green); }
.trap-good h4 { color: var(--green); }
.trap-note { border-left-color: var(--line-2); }
.trap-note h4 { color: var(--ink-2); }

/* ------------------------------------------------------------- scorecard */

.figures {
  display: grid; gap: 1px; background: var(--line);
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  border: 1px solid var(--line); border-radius: 3px; margin: 1.5rem 0 1rem;
}
.figure { background: var(--raised); padding: 1.1rem; }
.figure .v {
  display: block; font-family: var(--mono); font-size: 1.7rem;
  color: var(--gold); font-variant-numeric: tabular-nums;
}
.figure .k {
  display: block; font-family: var(--mono); font-size: .72rem;
  color: var(--ink-3); margin-top: .25rem; letter-spacing: .03em;
}
.figure.good .v { color: var(--green); }
.figure.bad .v  { color: var(--red); }

/* ---------------------------------------------------------------- footer */

footer { padding: 2.5rem 0 3.5rem; }
footer p {
  margin: 0; font-family: var(--mono); font-size: .8rem; color: var(--ink-3);
  line-height: 1.7;
}
footer strong { color: var(--ink-2); }

/* ------------------------------------------------------------ responsive */

@media (max-width: 720px) {
  body { font-size: 16px; }
  section, .hero { padding: 3rem 0; }
  .top-nav { display: none; }
  .tool-bar { flex-direction: column; }
  .money { flex: 1 1 auto; }
  button { width: 100%; }
  .chip { width: auto; }
}

@media (prefers-reduced-motion: no-preference) {
  .out { transition: opacity .12s linear; }
}

/* Scrollbars. A default light scrollbar inside a dark code block is the most
 * visible unfinished edge on a dark page. */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { height: 9px; width: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line-2); border-radius: 99px;
  border: 2px solid transparent; background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); background-clip: content-box; }

/* The curl line is long by nature; wrapping it beats a scrollbar under it. */
.code { white-space: pre-wrap; word-break: break-word; }

.pick {
  font-family: var(--mono); font-size: .84rem; color: var(--gold);
  margin: 0 0 .7rem;
}


/* ---------------------------------------------------------- copyability */

.tool-bar .narrow { max-width: 7rem; flex: 0 0 auto; }

.verdict {
  display: inline-block;
  padding: .3rem .7rem;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: .04em;
  font-size: .82rem;
}
/* Four states, four colours, and the two that are not answers do not get to
   look like the two that are. An INSUFFICIENT_EVIDENCE rendered in green is
   the single most expensive pixel on this page. */
.verdict.no    { background: #4a1220; color: #ff8fa3; }
.verdict.yes   { background: #0e3a24; color: #6ee7a8; }
.verdict.maybe { background: #3d2f0a; color: #f5c542; }
.verdict.none  { background: #22262c; color: #9aa4b2; }

.legs { display: grid; gap: .6rem; margin: 1rem 0; }
@media (min-width: 720px) { .legs { grid-template-columns: repeat(3, 1fr); } }
.leg {
  border: 1px solid #232830;
  border-radius: 4px;
  padding: .7rem .8rem;
  background: #12151a;
}
.leg h4 {
  margin: 0 0 .35rem;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #7d8794;
}
.leg .big { font-size: 1.05rem; font-weight: 600; }
.leg .sub { color: #8b95a3; font-size: .8rem; margin-top: .2rem; }

.findings { margin: .9rem 0 0; padding: 0; list-style: none; }
.findings li {
  padding: .4rem 0 .4rem .95rem;
  border-left: 2px solid #4a3a12;
  margin-bottom: .35rem;
  color: #c7ccd4;
  font-size: .87rem;
}

table.mkts { width: 100%; border-collapse: collapse; margin-top: .9rem;
             font-size: .84rem; }
table.mkts th {
  text-align: left; color: #7d8794; font-weight: 600;
  border-bottom: 1px solid #232830; padding: .35rem .5rem;
  font-size: .74rem; text-transform: uppercase; letter-spacing: .06em;
}
table.mkts td { padding: .35rem .5rem; border-bottom: 1px solid #1a1e24; }
table.mkts td.num { text-align: right; font-variant-numeric: tabular-nums; }
.pos { color: #6ee7a8; }
.neg { color: #ff8fa3; }
.scroller { overflow-x: auto; }

/* ============================================================== pages ===
   Every feature has its own page. What changes between them is the header
   state and the block at the top that says what the page answers; the tools
   themselves reuse the same .tool / .out / .verdict rules as before. */

.top-nav a[aria-current="page"] {
  color: var(--cyan);
  border-bottom: 1px solid var(--cyan);
  padding-bottom: 2px;
}

.hero-slim { padding: 4.5rem 0 3.25rem; }

.page-head {
  padding: 3.5rem 0 3rem;
  border-bottom: 1px solid var(--line);
}
.page-head h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
.page-head .sub { margin-bottom: 2rem; }

/* A tinted band so a long page still reads as distinct blocks without each
   one needing a rule above it. */
.band {
  background: var(--raised);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

section { padding: 3.25rem 0; }
section.hero, section.page-head { padding-top: 4.5rem; }

.cta {
  display: inline-block;
  padding: .7rem 1.2rem;
  background: var(--cyan);
  color: #04121a;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--cyan);
}
.cta:hover { background: #6ae6ff; border-color: #6ae6ff; }
.cta-2 {
  background: transparent;
  color: var(--cyan);
  margin-left: .5rem;
}
.cta-2:hover { background: rgba(61,220,255,.1); }

/* ------------------------------------------------------------- home grid */

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
}
@media (max-width: 640px) { .grid-cards { grid-template-columns: 1fr; } }

.card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: border-color .12s ease, background .12s ease;
}
.card-link p { flex: 1 1 auto; }
.card-link:hover { border-color: var(--line-2); background: var(--raised-2); }
.card-link .go {
  color: var(--cyan);
  font-size: .85rem;
  font-weight: 600;
  margin-top: .6rem;
}

/* ----------------------------------------------------------- equivalence */

.eq-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 760px) { .eq-bar { grid-template-columns: 1fr; } }

.eq-side label {
  display: block;
  color: var(--ink-3);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .4rem;
}
.eq-side select {
  background: var(--raised-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
  padding: .62rem .7rem;
  font-family: var(--mono);
  font-size: .82rem;
  flex: 0 0 auto;
}
.eq-side select:focus { outline: none; border-color: var(--cyan); }

.eq-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin: .9rem 0 .2rem;
}
@media (max-width: 760px) { .eq-pair { grid-template-columns: 1fr; } }
.eq-pair > div {
  background: var(--raised-2);
  padding: .65rem .8rem;
  border-left: 2px solid var(--line-2);
}
.eq-pair .k {
  display: block;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.eq-pair .t { display: block; color: var(--ink); margin-top: .25rem; }

.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-3);
  border: 1px solid var(--line-2);
  padding: .05rem .35rem;
  margin-left: .35rem;
  vertical-align: middle;
}

/* An unknown is not an agreement, and must not be coloured like one. */
.findings li.bad  { border-left-color: var(--red); }
.findings li.warn { border-left-color: var(--gold); }
.findings li strong { color: var(--ink); }
