/* Binly demo. Plain, professional look; the business's own color (--brand) is the only accent. */
:root {
  --bg: #f6f7f7; --surface: #ffffff; --fg: #151b1a; --muted: #5b6765; --line: #dfe4e3;
  --good: #1b7f45; --warn: #9a5b00; --bad: #b0281f;
  --brand: #0d6b52; --on-brand: #ffffff; --brand-l: #0d6b52; --brand-d: #5fc4a2; --brand-text: var(--brand-l);
  --field: #8a9592;   /* form field borders: 3:1 against the page, unlike --line which is for dividers */
  --ring: var(--brand-text);   /* focus outlines and checked states: always readable, whatever the brand color */
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --gap: 1rem; --r: 8px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1312; --surface: #171d1c; --fg: #e8eeec; --muted: #97a4a1; --line: #27302e;
    --good: #55c886; --warn: #e5a640; --bad: #f27b70; --brand-text: var(--brand-d); --field: #5d6a67; color-scheme: dark; }
}
* { box-sizing: border-box }
[hidden] { display: none !important }
html { -webkit-text-size-adjust: 100% }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 1rem/1.5 var(--sans); }
a { color: var(--brand-text) }
h1, h2, h3 { margin: 0; text-wrap: balance; line-height: 1.2 }
p { text-wrap: pretty }
h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em }
h2 { font-size: 1.15rem; font-weight: 700 }
/* the Binly wordmark at the top of the plain pages (sign-up, login, legal, earnings) */
.word { display: inline-block; font-weight: 900; font-size: 1.4rem; letter-spacing: -.03em; text-decoration: none; color: var(--fg); padding-block: .25rem }
.word span { color: var(--brand-text) }
.label { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700 }
.muted { color: var(--muted) } .good { color: var(--good) } .warn { color: var(--warn) } .bad { color: var(--bad) } .brand { color: var(--brand-text) }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums }

.demo-note { font-size: .8rem; color: var(--muted); text-align: center; padding: .5rem 1rem; border-bottom: 1px solid var(--line) }
.demo-note a { color: var(--muted) }

/* .f is a field: a label (or group) above its control. The group version labels its first <span>. */
.f { display: grid; gap: .3rem; font-size: .85rem; font-weight: 600; color: var(--muted) }
div.f > span:first-child { font-size: .85rem; font-weight: 600; color: var(--muted) }
input, textarea, select { font: 400 1rem var(--sans); color: var(--fg); background: var(--surface); border: 1px solid var(--field); border-radius: 8px; padding: .75rem; width: 100%; min-width: 0; min-height: 2.75rem }
/* Dropdowns look the same on every browser (Safari draws a thin native one otherwise). */
select { appearance: none; -webkit-appearance: none; padding-right: 2.25rem; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23778481' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right .8rem center / .75rem }
input[type="number"] { -moz-appearance: textfield; appearance: textfield }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0 }
::placeholder { color: var(--muted); opacity: .75 }
textarea { min-height: 4.5rem; resize: vertical; field-sizing: content }
input:not([type="checkbox"]):not([type="radio"]):focus, textarea:focus, select:focus { outline: 2px solid var(--ring); outline-offset: -1px; border-color: var(--ring) }
input[type="checkbox"]:focus, input[type="radio"]:focus { outline: none }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px }
/* Our own checkboxes and radios: the browser defaults look different on every phone (a bare dot in Safari). */
input[type="checkbox"], input[type="radio"] { appearance: none; -webkit-appearance: none; width: 1.25rem; height: 1.25rem; flex: none; margin: .1rem 0 0; padding: 0;
  border: 2px solid var(--field); background: var(--surface); display: inline-grid; place-content: center; cursor: pointer; transition: border-color .12s, background .12s }
input[type="radio"] { border-radius: 50% }
input[type="checkbox"] { border-radius: 5px }
input[type="radio"]::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--ring); transform: scale(0); transition: transform .12s }
input[type="radio"]:checked { border-color: var(--ring) }
input[type="radio"]:checked::before { transform: scale(1) }
input[type="checkbox"]::before { content: ""; width: .7rem; height: .7rem; background: var(--on-brand); clip-path: polygon(14% 44%, 0 65%, 40% 100%, 100% 22%, 84% 6%, 39% 64%); transform: scale(0); transition: transform .12s }
input[type="checkbox"]:checked { background: var(--brand); border-color: var(--ring) }
input[type="checkbox"]:checked::before { transform: scale(1) }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { opacity: .45; cursor: not-allowed }
@media (forced-colors: active) { input[type="checkbox"], input[type="radio"] { appearance: auto; -webkit-appearance: auto } input[type="checkbox"]::before, input[type="radio"]::before { display: none } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0 }
input[type="color"] { padding: .2rem; height: 2.75rem }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .95rem; color: var(--fg); font-weight: 400 }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: 700 1rem var(--sans); border-radius: var(--r); padding: .8rem 1.2rem; cursor: pointer;
  border: 1px solid var(--brand); background: var(--brand); color: var(--on-brand); text-decoration: none }
.btn.ghost { background: transparent; color: var(--brand-text); border-color: var(--line) }
.btn.small { padding: .45rem .9rem; font-size: .9rem; min-height: 2.75rem }
.btn:disabled { opacity: .45; cursor: not-allowed }
.btn:focus-visible, button:focus-visible, a:focus-visible, [tabindex="-1"]:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px }
.link { background: none; border: 0; padding: 0; font: 600 .95rem var(--sans); color: var(--brand-text); cursor: pointer; text-decoration: underline }
.link.muted { color: var(--muted) } .link.bad { color: var(--bad) }
.row { display: flex; gap: .5rem 1rem; flex-wrap: wrap; align-items: center }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem var(--gap) }
.grid2 .full { grid-column: 1 / -1 }
@media (max-width: 30rem) { .grid2 { grid-template-columns: minmax(0, 1fr) } }
.toast { position: fixed; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--bg);
  padding: .6rem 1rem; border-radius: var(--r); font-weight: 600; font-size: .9rem; max-width: calc(100% - 2rem); z-index: 50 }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important } }
