/* Tokens from the skillui extraction of faucetsol.app, retuned to a Robinhood-green accent. */
:root {
  --bg: #faf9f6;
  --card: #ffffff;
  --fg: #1c1c1c;
  --muted: #666;
  --border: #d9d9d6;
  --stripe: #f4f3ee;
  --primary: #00a805;
  --primary-ink: #ffffff;
  --primary-soft: #e8f7e4;
  --lime: #ccff00;
  --bad: #c2321f;
  --warn: #9a6a00;
  --pipe: #a9a9a6;
  --pipe-dark: #555;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Verdana, Geneva, Tahoma, sans-serif;
  --mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121311;
    --card: #1a1b19;
    --fg: #ecece8;
    --muted: #a3a39d;
    --border: #34352f;
    --stripe: #20211e;
    --primary: #2fd133;
    --primary-ink: #0b0b0b;
    --primary-soft: #16301a;
    --bad: #ff7a66;
    --warn: #e0b24a;
    --pipe: #4a4b46;
    --pipe-dark: #8a8b85;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 13px/1.5 var(--sans); }
a { color: var(--primary); }
code, .mono { font-family: var(--mono); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; margin: 0; }
h2 { font-size: 19px; margin-bottom: 16px; }
h3 { font-size: 15px; margin: 24px 0 8px; }
.wrap { max-width: 848px; margin: 0 auto; padding: 0 16px; }
section { padding: 32px 0; border-top: 1px solid var(--border); }
main > section:first-child { border-top: 0; }

/* top bar */
.topbar { background: #111; color: #eee; font-size: 11px; }
.topbar-in { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 16px; }
.topbar-label { font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.topbar code { color: #ddd; }
.topbar-sep { color: #777; }
.chip { font: inherit; background: #fff; color: #111; border: 0; padding: 4px 10px; cursor: pointer; }
.chip:hover { background: var(--lime); }
.topbar-link { margin-left: auto; color: #fff; }
.cabar { background: var(--lime); color: #111; font-size: 12px; }
.cabar[hidden] { display: none; }
.cabar code { color: #111; font-weight: 700; overflow-wrap: anywhere; min-width: 0; }
.cabar .chip { background: #111; color: #fff; }
.cabar .chip:hover { background: #333; }
.cabar .topbar-link { color: #111; }
.cabar.flash { animation: rise .3s ease-out; }

/* header */
.site-head { display: flex; gap: 16px; align-items: center; padding: 16px 0 8px; }
.logo { width: 56px; height: 56px; flex: none; display: grid; place-items: center; background: var(--lime); }
.logo-drop { animation: drip 2.4s ease-in infinite; }
.site-head h1 { font-size: 22px; }
.tagline { margin: 2px 0 0; font-family: var(--serif); font-style: italic; color: var(--muted); }
.sub { margin: 2px 0 0; color: var(--muted); font-size: 12px; }

.site-nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 8px 0 16px; border-bottom: 1px solid var(--border); }
.site-nav a { text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }
.tap-state { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--card); padding: 4px 10px; font-size: 12px; }
.tap-state i { width: 8px; height: 8px; background: var(--muted); }
.tap-state[data-state="flowing"] i { background: var(--primary); animation: pulse 2s ease-in-out infinite; }
.tap-state[data-state="dry"] i, .tap-state[data-state="offline"] i { background: var(--bad); }

/* the tap */
.tap { padding-top: 24px; }
.pipe { position: relative; height: 10px; background: var(--pipe); border-bottom: 2px solid var(--pipe-dark); }
.nozzle { position: absolute; left: 50%; top: 100%; width: 32px; height: 6px; margin-left: -16px; background: var(--pipe-dark); }
.drop { position: absolute; left: 50%; top: calc(100% + 6px); width: 8px; height: 11px; margin-left: -4px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: var(--primary); opacity: 0; pointer-events: none; z-index: 10; }
.drop.falling { animation: fall .9s ease-in forwards; }
.tap-body { background: var(--card); border: 1px solid var(--border); border-top: 0; padding: 20px 12px 12px; }
.tap-body h2 { padding-bottom: 8px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }

.kv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 16px; margin: 0 0 20px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv .good { color: var(--primary); font-weight: 700; }
.kv-plain { margin-top: 0; }

label { display: block; color: var(--muted); margin-bottom: 4px; }
input { width: 100%; font: 13px var(--mono); color: var(--fg); background: var(--card); border: 1px solid var(--border); border-radius: 0; padding: 8px; }
input:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
input[aria-invalid="true"] { border-color: var(--bad); }
.hint { color: var(--muted); font-size: 12px; margin: 4px 0 0; }

.captcha { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.captcha img { display: block; border: 1px solid var(--border); background: #f4f3ee; }
.captcha-field { flex: 1 1 140px; max-width: 200px; }
.captcha-field input { text-transform: uppercase; letter-spacing: .2em; }

button { font: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
.primary { background: var(--primary); color: var(--primary-ink); border: 0; padding: 8px 16px; font-size: 14px; transition: opacity .15s ease-out, transform .1s ease-out; }
.primary:hover:not(:disabled) { opacity: .9; }
.primary:active:not(:disabled) { transform: translateY(1px); }
.primary:disabled { opacity: .4; }
.primary[aria-busy="true"] { animation: pulse 1s ease-in-out infinite; }
.ghost { background: var(--card); color: var(--fg); border: 1px solid var(--border); padding: 4px 12px; font-size: 12px; }
.ghost:hover { border-color: var(--fg); }

.msg { margin: 12px 0 0; padding: 8px 12px; border: 1px solid var(--border); border-left: 4px solid var(--muted); background: var(--card); overflow-wrap: anywhere; animation: rise .2s ease-out; }
.msg[data-tone="ok"] { border-left-color: var(--primary); background: var(--primary-soft); }
.msg[data-tone="bad"] { border-left-color: var(--bad); }
.msg[data-tone="wait"] { border-left-color: var(--warn); }

/* totals */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border); background: var(--card); padding: 0; margin: 24px 0 8px; }
.stats div { padding: 12px; border-left: 1px solid var(--border); }
.stats div:first-child { border-left: 0; }
.stats span { display: block; color: var(--muted); }
.stats b { font-family: var(--serif); font-size: 14px; }

/* table */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { text-align: left; font-weight: 400; color: var(--muted); background: var(--stripe); border-bottom: 1px solid var(--border); }
th, td { padding: 6px 10px; white-space: nowrap; }
tbody tr:nth-child(even) { background: var(--stripe); }
tbody tr.fresh { animation: rise .4s ease-out; }
td.empty { color: var(--muted); text-align: center; padding: 16px; white-space: normal; }
.s-confirmed { color: var(--primary); }
.s-pending { color: var(--warn); }
.s-failed { color: var(--bad); }
#more { margin-top: 8px; }

/* essay */
.essay p { font-family: var(--serif); font-size: 16px; line-height: 1.6; max-width: 620px; margin: 0 0 16px; }
.essay .filed { font: 12px var(--sans); color: var(--muted); margin-bottom: 20px; }
.dropcap::first-letter { float: left; font-size: 52px; line-height: .9; padding: 4px 6px 0 0; font-weight: 700; }

/* numbered lists */
.lede { color: var(--muted); margin: -4px 0 12px; }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 48px 1fr; padding: 8px 0; border-bottom: 1px solid var(--border); }
.steps li::before { content: counter(s, decimal-leading-zero); grid-row: span 2; font: 11px var(--mono); color: var(--muted); padding-top: 2px; }
.steps b { font-weight: 700; }
.steps li > span { color: var(--muted); }

.reservoir { height: 14px; border: 1px solid var(--border); background: var(--card); }
.reservoir i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .6s ease-out; }
.addr-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.addr-row code { overflow-wrap: anywhere; background: var(--card); border: 1px solid var(--border); padding: 4px 8px; }

details { border-bottom: 1px solid var(--border); padding: 8px 0; }
summary { cursor: pointer; font-weight: 700; }
details p { color: var(--muted); margin: 6px 0 0; }

.admin-card form > .primary + .ghost { margin-left: 8px; }
.admin-card .kv { margin-bottom: 16px; }
label.gap { margin-top: 12px; }
.logo img { display: block; }

.site-foot { border-top: 1px solid var(--border); padding: 24px 0 40px; color: var(--muted); font-size: 12px; }
.site-foot p { margin: 0 0 8px; overflow-wrap: anywhere; }
.site-foot .fine { font-size: 11px; max-width: 640px; }

@keyframes drip { 0% { opacity: 0; transform: translateY(-4px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(6px); } }
@keyframes fall { 0% { opacity: 1; transform: translateY(0); } 90% { opacity: 1; } 100% { opacity: 0; transform: translateY(260px); } }
@keyframes rise { 0% { opacity: 0; transform: translateY(6px); } 100% { opacity: 1; transform: none; } }
@keyframes pulse { 50% { opacity: .5; } }

@media (max-width: 640px) {
  .kv { grid-template-columns: 1fr; gap: 0; }
  .kv dd { margin-bottom: 8px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats div:nth-child(3) { border-left: 0; }
  .stats div:nth-child(n+3) { border-top: 1px solid var(--border); }
  .topbar-link { margin-left: 0; }
  .site-head h1 { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
