/* Self-hosted so no request ever leaves the site for a third party. IBM Plex
   Mono is a SIL Open Font License face. Text and headings use the system
   sans, so there is nothing else to load. */
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500;
  font-display: swap; src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600;
  font-display: swap; src: url("/fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); }

/* The look is a printed scorecard: pale paper, dark ink, and fairway green for
   the heavy rule above each section, the selected segment, a ticked box and
   the primary button. --accent is that green and --rule is the heavy rule,
   which is the same green on paper and a step quieter on the dark theme.
   Hairlines between rows stay grey. Every other colour is kept for meaning:
   good, watch, warn, bad. */
:root {
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --bg: #f2f5ef; --panel: #ffffff; --panel2: #e4eae0;
  --line: #d3dace; --line2: #e1e7dc; --soft: #adb7a9; --edge: #66726a;
  --text: #15201a; --dim: #4a564e;
  --accent: #1b5e3a; --accent-ink: #ffffff; --accent-tint: rgba(27,94,58,.09);
  --rule: #1b5e3a;
  --good: #0f7a45; --good-tint: rgba(15,122,69,.10);
  --warn: #855600; --warn-tint: #fbf1dc;
  --bad: #a8261d; --bad-tint: rgba(168,38,29,.08);
  --watch: #4a3db8; --watch-tint: rgba(74,61,184,.09);
  --dim-tint: rgba(74,86,78,.12);
  --backdrop: rgba(12,26,18,.62);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d130f; --panel: #141b16; --panel2: #1e2721;
    --line: #28322b; --line2: #1e2721; --soft: #414d45; --edge: #76847b;
    --text: #e8eee9; --dim: #9fada4;
    --accent: #5fce90; --accent-ink: #08170e; --accent-tint: rgba(95,206,144,.11);
    --rule: #3f9c6a;
    --good: #6ad89b; --good-tint: rgba(106,216,155,.13);
    --warn: #e0b050; --warn-tint: rgba(224,176,80,.14);
    --bad: #f0766a; --bad-tint: rgba(240,118,106,.12);
    --watch: #a99cf5; --watch-tint: rgba(169,156,245,.14);
    --dim-tint: rgba(159,173,164,.16);
    --backdrop: rgba(0,0,0,.66);
  }
}
:root[data-theme="dark"] {
  --bg: #0d130f; --panel: #141b16; --panel2: #1e2721;
  --line: #28322b; --line2: #1e2721; --soft: #414d45; --edge: #76847b;
  --text: #e8eee9; --dim: #9fada4;
  --accent: #5fce90; --accent-ink: #08170e; --accent-tint: rgba(95,206,144,.11);
  --rule: #3f9c6a;
  --good: #6ad89b; --good-tint: rgba(106,216,155,.13);
  --warn: #e0b050; --warn-tint: rgba(224,176,80,.14);
  --bad: #f0766a; --bad-tint: rgba(240,118,106,.12);
  --watch: #a99cf5; --watch-tint: rgba(169,156,245,.14);
  --dim-tint: rgba(159,173,164,.16);
  --backdrop: rgba(0,0,0,.66);
}
:root { --gutter: 32px; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }
a { color: var(--text); }
a:hover { color: var(--accent); }
.spacer { margin-left: auto; }
.meta { color: var(--dim); font-size: 12px; }
.meta.mono { font-family: var(--mono); }
code { font-family: var(--mono); font-size: 12px; color: var(--text); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; margin: 0;
  font: 500 20px/1.2 var(--sans); letter-spacing: -.01em; white-space: nowrap; }
.wordmark b { font-weight: 700; color: var(--accent); }
/* The header wordmark is the way back to the search. It has to carry the
   flex layout itself, because the h1 is now only its container. */
#home { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0;
  background: none; border: 0; border-radius: 4px; font: inherit;
  color: inherit; letter-spacing: inherit; cursor: pointer; }
#home:hover:not(:disabled) { opacity: .72; color: inherit; }
/* The icon is drawn as a mask rather than an image, so one file takes the
   green of whichever theme is showing instead of the colour it was saved. */
.logo { flex: 0 0 auto; width: 1.3em; height: 1.3em; background: var(--accent);
  -webkit-mask: url(/icon.svg) center / contain no-repeat;
  mask: url(/icon.svg) center / contain no-repeat; }

/* ---- labels ---- */
/* The small capital label that names a field, a column or a group. */
.metalabel, .colhead, .ghead, .label, .sechead, .panel h2, .criteria h4, .stathead h2 {
  font: 600 11px/1.4 var(--sans); letter-spacing: .08em; text-transform: uppercase;
  color: var(--dim); margin: 0; }

/* ---- inputs & buttons ---- */
input, select, textarea {
  min-height: 44px; padding: 0 12px; background: var(--panel); color: var(--text);
  border: 1px solid var(--edge); border-radius: 4px; font: 400 13px/1.4 var(--mono); width: 100%;
}
textarea { padding: 10px 12px; line-height: 1.6; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--dim); opacity: .75; }
input:disabled, select:disabled { opacity: .55; }
button, .btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 16px; border-radius: 4px; border: 1px solid var(--soft);
  background: var(--panel); color: var(--text); font: 600 13px/1 var(--sans);
  text-decoration: none; white-space: nowrap; cursor: pointer;
}
button:hover:not(:disabled), .btn:hover { border-color: var(--accent); color: var(--text); }
button:disabled { opacity: .45; cursor: default; }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent);
  color: var(--accent-ink); }
button.primary:hover:not(:disabled), .btn.primary:hover { color: var(--accent-ink); opacity: .86; }
button.ghost { background: none; border-color: transparent; color: var(--text); padding: 0 10px;
  font-weight: 500; text-decoration: underline; }
.danger { border-color: var(--bad); color: var(--bad); background: none; }
.danger:hover:not(:disabled) { background: var(--bad-tint); border-color: var(--bad); color: var(--bad); }
.error { color: var(--bad); font-size: 13px; min-height: 18px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- tick boxes ---- */
/* Every on/off control is the same square box. The real checkbox sits over
   it, invisible, so the keyboard and the label both still work. */
.switch { position: relative; flex: 0 0 auto; display: inline-block; width: 16px; height: 16px;
  border: 1px solid var(--edge); border-radius: 3px; background: var(--panel); }
.switch input { position: absolute; inset: -14px; width: 44px; height: 44px; min-height: 0;
  opacity: 0; margin: 0; padding: 0; cursor: pointer; }
.switch i { position: absolute; left: 4px; top: 1px; width: 5px; height: 9px;
  border: solid var(--accent-ink); border-width: 0 2px 2px 0; transform: rotate(42deg);
  opacity: 0; pointer-events: none; }
.switch:has(input:checked) { background: var(--accent); border-color: var(--accent); }
.switch:has(input:checked) i { opacity: 1; }
.switch:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- segmented control ---- */
/* The club type, the hand and the theme are all one choice out of a few, so
   they share one control. */
.themeseg { display: inline-flex; border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.themeseg button { border: 0; border-radius: 0; border-left: 1px solid var(--rule);
  background: var(--panel); color: var(--text); padding: 0 16px; font-weight: 500; }
.themeseg button:first-child { border-left: 0; }
.themeseg button:hover:not(.active) { background: var(--accent-tint); }
.themeseg button.active { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.themeseg button.active:hover { color: var(--accent-ink); }
.metalrow { display: flex; align-items: center; gap: 10px; }

/* ---- sign-in overlay ---- */
/* The app is public; signing in only saves settings and email alerts, so the
   form floats over the app rather than replacing it. */
#login { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  padding: 24px; background: var(--backdrop); overflow-y: auto; }
.logincard { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px;
  padding: 30px 32px 24px; background: var(--panel); border-top: 3px solid var(--rule);
  border-radius: 4px; }
.logincard form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.logincard .wordmark { font-size: 24px; }
.logincard p { margin: 6px 0 4px; color: var(--dim); font-size: 13.5px; }
.logincard form > label { display: flex; flex-direction: column; gap: 5px;
  font: 600 12px/1.3 var(--sans); color: var(--dim); }
.logincard .primary { width: 100%; font-size: 15px; margin-top: 4px; }
.loginfoot { display: flex; flex-direction: column; gap: 10px; padding-top: 16px;
  border-top: 1px solid var(--line); }
/* Affiliate disclosure required by the eBay Partner Network: under the sign-in
   form, and as a footer on the app itself. */
.loginfoot .disclosure { margin: 0; color: var(--dim); font-size: 12px; line-height: 1.5; }
.login-close { width: 100%; }

/* ---- header ---- */
#app > header { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center;
  padding: 10px var(--gutter); background: var(--bg); border-bottom: 3px solid var(--rule);
  position: sticky; top: 0; z-index: 10; }
.headmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin-left: auto; }
.headmeta .meta { font-family: var(--mono); }
main { padding: 8px var(--gutter) 44px; }
.appfoot { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center;
  padding: 14px var(--gutter) 28px; border-top: 1px solid var(--line);
  color: var(--dim); font-size: 12.5px; }
.appfoot .disclosure { flex: 1 1 420px; max-width: 80ch; }
.appfoot .themeseg { border-color: var(--soft); }
.appfoot .themeseg button { border-left-color: var(--soft); padding: 0 12px; font-size: 12px; }
.footgroup { display: flex; align-items: center; gap: 10px; }

/* ---- tabs ---- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.tab { background: none; border-color: transparent; padding: 0 14px; font: 500 14px/1 var(--sans); }
.tab:hover:not(:disabled) { border-color: transparent; background: var(--accent-tint); }
.tab.active, .tab.active:hover { background: var(--accent); border-color: var(--accent);
  color: var(--accent-ink); font-weight: 600; }

/* ---- hamburger menu (phone only; see the 700px block) ---- */
#menu-btn { display: none; width: 44px; padding: 0; }
.bars, .bars::before, .bars::after { display: block; width: 18px; height: 2px;
  border-radius: 2px; background: var(--text); }
.bars { position: relative; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -6px; } .bars::after { top: 6px; }
#menu-btn[aria-expanded="true"] { background: var(--panel2); }
#menu { position: absolute; top: 100%; right: 12px; z-index: 20; width: 248px;
  background: var(--panel); border: 1px solid var(--rule); border-radius: 4px;
  padding: 6px; box-shadow: 0 14px 34px rgba(0,0,0,.22); }
.menuitem { display: flex; justify-content: flex-start; width: 100%; background: none;
  border: 0; padding: 0 12px; font: 500 14px/1 var(--sans); }
.menuitem:hover:not(:disabled) { background: var(--accent-tint); }
.menutheme { display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 6px 0; }
.menutheme .themeseg button { padding: 0 10px; font-size: 12px; }
.menulabel { flex: 1; font-size: 14px; }
.menufoot { padding: 9px 12px 5px; color: var(--dim); font: 400 12px/1.5 var(--mono); }
.menufoot span { display: block; }

/* ---- page bands and section heads ---- */
/* A band is the white strip under the header that holds a page's controls. */
.band { margin: 0 calc(-1 * var(--gutter)); padding: 18px var(--gutter) 22px;
  background: var(--panel); border-bottom: 1px solid var(--line); }
main > .band:first-child, #view-search > .band { margin-top: -8px; }
.pagehead { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 32px; }
.pagehead h1 { margin: 0; font: 600 26px/1.2 var(--sans); letter-spacing: -.01em; }
.pagehead p { flex: 1 1 360px; margin: 0; max-width: 78ch; color: var(--dim); font-size: 13px; }
/* A section opens with a heavy green rule, the way a scorecard starts a new
   nine. */
.rulehead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px;
  margin: 28px 0 0; padding: 14px 0 10px; border-top: 3px solid var(--rule);
  border-bottom: 1px solid var(--line); }
.rulehead h2, .rulehead h3 { margin: 0; font: 600 18px/1.3 var(--sans); letter-spacing: -.01em;
  text-transform: none; color: var(--text); }
.rulehead .count { font: 600 14px/1 var(--mono); color: var(--dim); }
/* A section head that carries its own button sits on the button's centre. */
.rulehead.withaction { align-items: center; padding: 8px 0; }
.hint { font: 400 11.5px/1.45 var(--sans); color: var(--dim); }
.lede { margin: 12px 0 4px; max-width: 86ch; color: var(--dim); font-size: 13px; }
.empty { color: var(--dim); font-size: 13px; padding: 12px 0; }
.warn-box { background: var(--bad-tint); border: 1px solid var(--bad);
  color: var(--bad); padding: 10px 12px; border-radius: 4px; font-size: 13px; margin: 16px 0 0; }
.saved { color: var(--good); font-size: 12px; }

/* ---- search criteria ---- */
#criteria { display: flex; flex-direction: column; gap: 14px; }
.critbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.runblock { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-left: auto; }
.runblock .primary { padding: 0 44px; font-size: 15px; }
/* The clubs, the conditions and the listing types, which fold away after a
   search. */
#crit-body { display: flex; flex-direction: column; gap: 14px; }
#criteria.stowed #crit-body { display: none; }
/* The fold button is two chevrons: pointing up while the clubs are open, and
   down once they are folded away. */
#crit-toggle { flex-direction: column; width: 44px; padding: 0; }
#crit-toggle::before, #crit-toggle::after { content: ""; width: 8px; height: 8px; margin: -1px 0;
  border-left: 2px solid var(--text); border-top: 2px solid var(--text);
  transform: translateY(3px) rotate(45deg); }
#crit-toggle[aria-expanded="false"]::before, #crit-toggle[aria-expanded="false"]::after {
  transform: translateY(-3px) rotate(225deg); }
.phead { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.phead .count { font: 400 12px/1 var(--mono); color: var(--dim); }
.phead .hint { margin-left: auto; }
/* A column of tick boxes under a small heading. On a schedule there is a
   column for each club type, then the conditions and the listing types. */
.matrix { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 18px 32px; }
/* Search shows one club type at a time, so its clubs take the width the two
   narrow columns leave and run two or three across. */
.matrix.search { grid-template-columns: minmax(0, 1fr) 290px 250px; }
.clubrows { display: grid; column-gap: 32px;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.cgroup { display: flex; flex-direction: column; min-width: 0; }
.ghead { padding: 0 2px 8px; border-bottom: 1px solid var(--rule); }
.coin { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 2px;
  border-bottom: 1px solid var(--line2); font-size: 13px; cursor: pointer; }
.coin .switch { order: -1; }
.coin .name { flex: 1; line-height: 1.3; }
.coin .thr { font: 400 12px/1 var(--mono); color: var(--dim); white-space: nowrap; }
.coin:has(input:not(:checked)) .name { color: var(--dim); }
/* A condition is a short name and a line saying what it covers. */
.condcol .coin .name { flex: 0 0 44px; font-weight: 600; }
.condcol .coin .thr { flex: 1; font: 400 12px/1.3 var(--sans); white-space: normal; }
/* The small tag on a club sold the other way from its type: a single iron, or
   a set of wedges. */
.tag { margin-left: 4px; padding: 1px 5px; border: 1px solid var(--soft); border-radius: 3px;
  font: 500 10px/1.4 var(--mono); color: var(--dim); }
@media (max-width: 1080px) {
  .matrix.search { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .matrix.search > .cgroup:first-child { grid-column: 1 / -1; }
}
/* On a phone the criteria fold away after a search. This strip stands in for
   them: what is being searched, and the two things you can do about it. */
#crit-summary { display: none; }

/* ---- results ---- */
.resultscol { padding: 20px 0 26px; min-width: 0; }
#summary { font-family: var(--mono); }
#summary:not(:empty) { margin-bottom: 8px; }
.rowgrid { display: grid; grid-template-columns: 156px 96px 112px minmax(0, 1fr) 176px 124px;
  column-gap: 20px; }
.colhead { padding: 18px 0 8px; }
.group { margin-bottom: 26px; }
.group > h3 { margin: 0; padding: 4px 0; border-top: 3px solid var(--rule);
  border-bottom: 1px solid var(--line); font: 600 18px/1.3 var(--sans); letter-spacing: -.01em; }
.grouptoggle { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: baseline;
  gap: 4px 14px; width: 100%; min-height: 44px; padding: 8px 0; background: none; border: 0;
  border-radius: 0; text-align: left; font: inherit; letter-spacing: inherit; color: inherit;
  white-space: normal; }
.grouptoggle .meta { font: 400 13px/1.4 var(--sans); letter-spacing: 0; }
.chev { flex: 0 0 auto; align-self: center; width: 8px; height: 8px; margin: 0 2px 3px;
  border-right: 2px solid var(--text); border-bottom: 2px solid var(--text);
  transform: rotate(45deg); transition: transform .15s; }
.group.collapsed .chev { transform: rotate(-45deg); margin-bottom: 0; }
.group.collapsed .groupbody { display: none; }
.pill { font: 600 14px/1 var(--mono); color: var(--dim); }
.pill.qualify { color: var(--good); }
.pill.watch { color: var(--watch); }

.row { align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.row > div { min-width: 0; }
.row .stack { display: flex; flex-direction: column; gap: 2px; font-family: var(--mono); }
.row .price { font: 600 17px/1.3 var(--mono); }
.row .sum { font: 400 11px/1.4 var(--mono); color: var(--dim); }
.row .thr { font: 500 15px/1.5 var(--mono); }
.row .pct { font: 600 17px/1.3 var(--mono); color: var(--dim); }
.row.qualify .pct { color: var(--good); }
.row.watch .pct { color: var(--watch); }
.row .c-listing { display: flex; flex-direction: column; gap: 5px; }
.row .title { font: 500 14px/1.4 var(--sans); text-wrap: pretty; }
.row .detail { display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font: 400 12px/1.5 var(--mono); color: var(--dim); }
.row .closes { font: 500 12px/1.5 var(--sans); color: var(--dim); }
.row.watch .closes { color: var(--watch); }
.row .c-seller { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.row .seller { font: 500 13px/1.4 var(--sans); overflow-wrap: anywhere; }
.row .buy .btn { width: 100%; }
/* The nearest misses are for reference, so they read a step quieter. */
.row.near .price, .row.near .pct { font-size: 15px; }
.row.near .thr { font-size: 14px; }
.row.near .title { font-size: 13px; color: var(--dim); }
.itemid { font: 400 11px/1.4 var(--mono); color: var(--dim); cursor: pointer; user-select: all;
  border-bottom: 1px dotted var(--soft); }
.itemid:hover { color: var(--text); border-bottom-color: var(--text); }
.itemid.copied { color: var(--good); border-bottom-color: var(--good); }
.badge { display: inline-block; font: 600 10px/1 var(--mono); letter-spacing: .04em;
  padding: 3px 6px; border-radius: 3px; border: 1px solid var(--soft); color: var(--dim);
  white-space: nowrap; }
.badge.auction { color: var(--watch); border-color: var(--watch); }
.badge.soon { color: var(--panel); background: var(--watch); border-color: var(--watch); }
.badge.offer { color: var(--text); border-color: var(--text); }
.badge.warn { color: var(--warn); border-color: var(--warn); background: var(--warn-tint); }
.badge.grade { color: var(--text); border-color: var(--soft); background: var(--panel2); }

/* Below this width six columns no longer fit, so a row becomes three lines:
   the figures, the listing, then the seller beside the eBay button. */
@media (max-width: 1080px) {
  .colhead.rowgrid { display: none; }
  .row.rowgrid { grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 16px; row-gap: 8px;
    grid-template-areas: "landed thr pct" "listing listing listing" "seller seller buy";
    align-items: baseline; }
  .row .c-landed { grid-area: landed; }
  .row .c-thr { grid-area: thr; text-align: right; }
  .row .c-thr .thr { font-size: 13px; color: var(--dim); }
  .row .c-pct { grid-area: pct; text-align: right; }
  .row .c-listing { grid-area: listing; }
  .row .c-seller { grid-area: seller; align-self: center; }
  .row .buy { grid-area: buy; align-self: center; }
  .row .buy .btn { width: auto; }
}

/* ---- settings: clubs and keyword groups as tables ---- */
.tablewrap { overflow-x: auto; }
.clubgrid { display: grid; column-gap: 16px; align-items: center; min-width: 960px;
  grid-template-columns: minmax(240px, 1.3fr) 108px 108px 128px minmax(200px, 1.5fr) 44px; }
.xgrid { display: grid; column-gap: 20px; align-items: start; min-width: 900px;
  grid-template-columns: minmax(200px, 1fr) 84px minmax(0, 2.6fr) 132px 44px; }
.tablehead { padding: 12px 0 8px; }
.tablehead.colhead { padding-top: 12px; }
.coinset { border-top: 1px solid var(--line); }
.coinset:first-of-type { border-top: 0; }
.coinline { padding: 8px 0; }
.xgrid.coinline { padding: 12px 0; }
.coinset .cname { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.coinset h3 { margin: 0; font: 500 14px/1.4 var(--sans); }
/* A dot marks a club whose thresholds are the signed-in account's own. */
.coinset h3.mine::after { content: " \25CF"; color: var(--good); font-size: 9px; vertical-align: 2px; }
.coinset .spec { color: var(--dim); font: 400 11.5px/1.4 var(--mono); overflow-wrap: anywhere; }
.coinset .money { font: 600 14px/1.3 var(--mono); }
.coinset .money.quiet { font-weight: 400; color: var(--dim); }
.coinset .q { font: 400 12px/1.5 var(--mono); color: var(--dim); overflow-wrap: anywhere; }
.coinset .f-thr { text-align: right; }
.f-thr::-webkit-outer-spin-button, .f-thr::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.coinset .why { margin: 0; color: var(--dim); font-size: 13px; text-wrap: pretty; }
.coinset .termcount { font: 400 13px/1.6 var(--mono); }
.coinset .applies { display: flex; align-items: center; gap: 9px; min-height: 24px;
  font: 500 13px/1 var(--sans); cursor: pointer; }
.coinset .applies.fixed { font: 400 12px/1.6 var(--mono); color: var(--dim); cursor: default; }
.coinset.off .cname, .coinset.off .why, .coinset.off .termcount { opacity: .55; }
.morebtn { width: 44px; padding: 0; }
.morebtn::before { content: ""; width: 7px; height: 7px; margin-top: -4px;
  border-right: 2px solid var(--text); border-bottom: 2px solid var(--text);
  transform: rotate(45deg); transition: transform .15s; }
.morebtn[aria-expanded="true"] { background: var(--panel2); }
.morebtn[aria-expanded="true"]::before { transform: rotate(-135deg); margin-top: 4px; }
/* The rest of a row's settings open underneath it, in a white panel. */
.coinmore { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 20px;
  padding: 14px 16px 16px; margin-bottom: 10px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 4px; }
.coinmore > label { flex: 1 1 420px; min-width: 0; }
.coinmore > label.narrow { flex: 0 1 220px; }
.coinmore > .full { flex: 1 1 100%; margin: 0; }
.coinmore .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-left: auto; }
.coinmore .criteria { flex: 1 1 100%; }
/* A club's fields carry a hint under some inputs and not others, so they line
   up by their tops, and the buttons drop by a label's height to sit level
   with the inputs. */
#club-settings .coinmore { align-items: flex-start; }
#club-settings .coinmore .actions { padding-top: 21px; }
label.field, .setgrid label, .addgrid label { display: flex; flex-direction: column;
  gap: 5px; font: 600 12px/1.3 var(--sans); color: var(--dim); }
label.field .hint, .setgrid .hint, .addgrid .hint { font-weight: 400; }
.setgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: 14px 20px; align-items: start; }
.addgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
  gap: 14px 20px; align-items: start; padding-top: 16px; }
.addgrid .wide { grid-column: span 2; }
.addgrid .full, .setgrid .wide { grid-column: 1 / -1; }
@media (max-width: 700px) { .addgrid .wide { grid-column: 1 / -1; } }
.panel[hidden] { display: none; }
.criteria { padding: 12px 14px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 4px; font: 400 12px/1.7 var(--mono); }
.criteria h4 { margin: 0 0 6px; }
.criteria code { word-break: break-all; }
.criteria ul { margin: 0 0 12px; padding-left: 18px; color: var(--dim); }
.criteria li { margin-bottom: 3px; }
.criteria .bandline { margin-bottom: 4px; color: var(--dim); }
.criteria .bandline b { color: var(--text); font-weight: 600; }

/* ---- notification schedules ---- */
.mailstate { flex: 1 1 360px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 4px; font: 400 12px/1.6 var(--mono); overflow-wrap: anywhere; }
.mailstate strong { display: block; font: 600 11px/1.4 var(--sans); letter-spacing: .08em;
  text-transform: uppercase; color: var(--dim); }
.mailstate.off { border-color: var(--warn); background: var(--warn-tint); color: var(--warn); }
.mailstate.off strong { color: var(--warn); }
.sechead { margin: 22px 0 0; }
.sched { display: flex; flex-direction: column; gap: 16px; padding-bottom: 18px; border-top: 0; }
.sched .rulehead { margin-top: 12px; align-items: center; padding: 8px 0; }
/* A schedule's name is a section title, not a table row's name. */
.sched .rulehead h3 { font: 600 18px/1.3 var(--sans); letter-spacing: -.01em; }
.sched .rulehead .next { font: 400 12px/1 var(--mono); color: var(--dim); }
.sched .rulehead .applies { margin-left: auto; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--soft); border-radius: 4px; background: var(--panel); }
.sched.off .setgrid, .sched.off .matrix, .sched.off .pickbar { opacity: .55; }
.sendto { display: flex; flex-direction: column; gap: 5px; font: 600 12px/1.3 var(--sans); color: var(--dim); }
.sendto .addr { display: flex; align-items: center; min-height: 44px; font: 400 13px/1.4 var(--mono);
  color: var(--text); overflow-wrap: anywhere; }
.pickbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pickbar .hint { margin-left: auto; }
.runline { font: 400 12px/1.6 var(--mono); color: var(--dim); }
.runline.over { color: var(--bad); }
.schedfoot { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center;
  gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.schedfoot .saved { margin-right: auto; }
.schedfoot .primary { padding: 0 30px; }

/* ---- trends (signed-in only) ---- */
.statpanel { margin-top: 20px; padding: 16px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 4px; }
.stathead { display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 8px 16px; margin-bottom: 10px; }
.cx { display: block; width: 100%; height: auto; margin: 2px 0 4px; }
.cx-grid { stroke: var(--line); stroke-width: 1; }
.cx-axis { fill: var(--dim); font: 400 10px/1 var(--mono); }
.cx-bar { fill: var(--accent); }
.cx-hit { fill: transparent; pointer-events: all; }
.cx-hit:hover { fill: var(--dim-tint); }
.stattable-wrap { overflow-x: auto; }
.stattable { width: 100%; border-collapse: collapse; font-size: 13px; }
.stattable th { text-align: right; font: 600 11px/1.3 var(--sans);
  text-transform: uppercase; letter-spacing: .08em; color: var(--dim);
  padding: 0 10px 8px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.stattable th:first-child { text-align: left; }
.stattable td { padding: 8px 10px; border-bottom: 1px solid var(--line);
  text-align: right; white-space: nowrap; }
.stattable td.coincell { text-align: left; font-weight: 500; white-space: normal; }
.stattable td.mono, .stattable td.num, .stattable td.daycell { font-family: var(--mono); }
.submeta { display: block; font: 400 10px/1.2 var(--mono); color: var(--dim); margin-top: 2px; }
.stattable tbody tr:last-child td { border-bottom: 0; }
.spark { display: block; width: 156px; height: 38px; }
.sparkcell { width: 156px; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 1.5;
  stroke-linejoin: round; stroke-linecap: round; }
.spark-dot { fill: var(--accent); }

/* ---- phone ---- */
@media (max-width: 700px) {
  :root { --gutter: 16px; }
  /* The header keeps its identity. Everything else moves into the menu,
     because at this width the controls wrapped onto four rows and pushed the
     results off the screen. */
  #app > header { gap: 6px 12px; padding-top: 8px; padding-bottom: 8px; }
  #app > header > .tabs, .headmeta > .meta, .headmeta > #logout, .headmeta > #signin { display: none; }
  #menu-btn { display: inline-flex; }
  .headmeta { gap: 10px; }
  .wordmark { font-size: 18px; }

  /* Five club types do not fit beside their label, so the label sits above
     and the strip takes the whole row. */
  .metalrow { flex: 1 1 100%; flex-wrap: wrap; gap: 6px 10px; }
  .typeseg { display: flex; flex: 1 1 100%; }
  .typeseg button { flex: 1 1 auto; padding: 0 6px; font-size: 12px; }
  .matrix.search { grid-template-columns: minmax(0, 1fr); }
  .phead .hint { flex: 1 1 100%; margin-left: 0; }

  /* The criteria are the whole screen here, so they are either open or folded
     into the summary strip. There is no half-open state to be in. */
  #criteria.stowed { display: none; }
  .runblock { margin-left: 0; flex: 1 1 100%; }
  .runblock .primary { flex: 1; }
  #criteria.stowed + #crit-summary { display: flex; flex-direction: column; gap: 10px; }
  #crit-summary .what { font-weight: 600; }
  #crit-summary .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .appfoot .footgroup { display: none; }
}
