/* Listed Ahead: an iOS-style web app, built like Paycheck Ahead. Light and dark follow the system. Phones get
   a bottom tab bar, computers a sidebar. Class names are shared by every view, so a change here changes all of them.

   Colors: "Salt and pepper", white #FFFFFF, light grey #D4D4D4, mid grey #B3B3B3 and charcoal #2B2B2B. Charcoal is
   the main button and the selected tab; the greys are backgrounds, insets and lines. Every text color reads at
   4.5:1 or better on its background. Green, red and amber stay for good, problems and warnings. */

:root {
  color-scheme: light;
  --plane: #f2f2f2;                      /* page background */
  --surface: #ffffff;                    /* cards */
  --surface-2: #f5f5f5;                  /* insets inside a card */
  --fill: rgba(43, 43, 43, 0.06);        /* fields, chips */
  --fill-2: rgba(43, 43, 43, 0.11);
  --ink: #2b2b2b;                        /* charcoal */
  --ink-2: #555555;
  --muted: #6b6b6b;
  --ahead: #8a8a8a;                      /* "Ahead" in the name, as in the logo */
  --grid: #e6e6e6;                       /* separators inside cards */
  --baseline: #d4d4d4;                   /* light grey */
  --border: rgba(43, 43, 43, 0.12);
  --hover: rgba(43, 43, 43, 0.05);
  --bar: rgba(250, 250, 250, 0.88);      /* tab bar, under a blur */
  --switch-off: #d4d4d4;
  --switch-on: #2b2b2b;
  --accent: #2b2b2b;                     /* buttons, the selected tab */
  --accent-ink: #ffffff;
  --accent-wash: rgba(43, 43, 43, 0.07);
  --accent-wash-2: rgba(43, 43, 43, 0.12);
  --in: #2e6b3a;
  --in-wash: rgba(46, 107, 58, 0.12);
  --critical: #b3261e;
  --critical-wash: rgba(179, 38, 30, 0.10);
  --warning: #b07a1a;
  --warning-ink: #7a5000;
  --warning-wash: rgba(201, 138, 43, 0.16);
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 20px rgba(0, 0, 0, 0.05);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --plane: #141414;
    --surface: #1f1f1f;
    --surface-2: #2a2a2a;
    --fill: rgba(255, 255, 255, 0.08);
    --fill-2: rgba(255, 255, 255, 0.14);
    --ink: #f2f2f2;
    --ink-2: #c4c4c4;
    --muted: #b3b3b3;                    /* mid grey */
    --ahead: #a3a3a3;
    --grid: #303030;
    --baseline: #4a4a4a;
    --border: rgba(255, 255, 255, 0.12);
    --hover: rgba(255, 255, 255, 0.06);
    --bar: rgba(24, 24, 24, 0.88);
    --switch-off: #3a3a3a;
    --switch-on: #9a9a9a;
    --accent: #d4d4d4;                   /* light grey, with charcoal text on buttons */
    --accent-ink: #1c1c1c;
    --accent-wash: rgba(255, 255, 255, 0.10);
    --accent-wash-2: rgba(255, 255, 255, 0.16);
    --in: #8fcf9c;
    --in-wash: rgba(143, 207, 156, 0.16);
    --critical: #ff8a80;
    --critical-wash: rgba(255, 138, 128, 0.16);
    --warning: #e8b85c;
    --warning-ink: #e8b85c;
    --warning-wash: rgba(232, 184, 92, 0.16);
    --shadow: none;
  }
}

* { box-sizing: border-box; }
.hidden, [hidden] { display: none !important; }

/* touch-action: a tap is a tap right away, with no wait to see if it's the first half of a double-tap zoom. */
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; margin: 0; }
body {
  margin: 0;
  padding-top: env(safe-area-inset-top);  /* under the status bar, opened from the home screen */
  background: var(--plane);
  color: var(--ink);
  font: 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a { color: var(--ink); }
h1, h2, h3 { margin: 0; line-height: 1.2; font-family: var(--font-display); }
h1 { font-size: 34px; font-weight: 700; letter-spacing: -0.022em; }
h2 { font-size: 20px; font-weight: 650; letter-spacing: -0.012em; }
h3 { font-size: 16px; font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 24px; height: 24px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* --- Sidebar (computers) and tab bar (phones) --------------------------------- */

.sidebar { display: none; }
.stage { font: 700 11px/1 var(--font); letter-spacing: 0.04em; text-transform: uppercase; padding: 4px 7px; border-radius: 999px; background: var(--warning-wash); color: var(--warning-ink); }
.phone-stage { position: fixed; top: calc(6px + env(safe-area-inset-top)); right: 10px; z-index: 21; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 6px 4px calc(4px + env(safe-area-inset-bottom));
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--border);
}
.tabbar button, .tabbar .tab-quick {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 2px 0;
  border: 0; background: none; cursor: pointer; font: inherit;
  color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: 0.01em;
}
.tabbar .icon { width: 27px; height: 27px; stroke-width: 1.7; }
.tabbar [aria-current="page"] { color: var(--ink); }
.tabbar [aria-current="page"] .icon { stroke-width: 2.1; }
.tabbar .tab-quick { justify-content: center; }
.tabbar .quick-plus {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.tabbar .quick-plus .icon { width: 26px; height: 26px; stroke-width: 2.2; }
.tabbar .tab-quick:active .quick-plus { filter: brightness(1.15); }

body.with-nav main.wrap { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }

@media (min-width: 900px) {
  body.with-nav { padding-left: 248px; }
  body.with-nav main.wrap { padding-bottom: 64px; }
  .tabbar, .phone-stage { display: none; }
  .sidebar {
    display: flex; flex-direction: column; gap: 2px;
    position: fixed; top: 0; bottom: 0; left: 0; width: 248px; padding: 22px 12px;
    background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto; z-index: 20;
  }
  .brand {
    display: flex; align-items: center; gap: 10px; padding: 2px 10px 18px;
    font: 700 19px/1 var(--font-display); letter-spacing: -0.02em; color: var(--ink); white-space: nowrap;
  }
  .brand img { border-radius: 7px; }
  .brand .stage { margin-left: auto; }
  .sidebar nav, .sidebar-extra { display: flex; flex-direction: column; gap: 2px; }
  .sidebar-extra { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--grid); }
  .sidebar nav button, .sidebar-extra button {
    display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 10px; width: 100%;
    border: 0; background: none; cursor: pointer; text-align: left;
    color: var(--ink); font: inherit; font-size: 15px; font-weight: 500;
  }
  .sidebar nav button:hover, .sidebar-extra button:hover { background: var(--hover); }
  .sidebar .icon { width: 22px; height: 22px; }
  .sidebar [aria-current="page"], .sidebar [aria-current="page"]:hover { background: var(--accent); color: var(--accent-ink); }
  .sidebar .who { padding: 10px 10px 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
}

/* --- Page structure -------------------------------------------------------------- */

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.page-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 12px 16px; margin: 32px 0 20px;
}
.page-head .sub { font-size: 15px; margin: 6px 0 0; max-width: 70ch; color: var(--ink-2); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions .spacer { flex: 1; }
.inline { display: flex; gap: 8px; align-items: center; }
.settings { display: grid; gap: 16px; max-width: 760px; }
.settings > .page-head { margin-bottom: 4px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* A content card. */
.panel {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px; display: grid; gap: 12px;
}
.panel.warn { background: var(--warning-wash); box-shadow: none; }
.panel.err { background: var(--critical-wash); box-shadow: none; }
.panel.accent { box-shadow: inset 0 0 0 2px var(--ink), var(--shadow); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* A grouped list, like iPhone Settings (the More page). */
.list-group {
  list-style: none; margin: 0 0 20px; padding: 0; overflow: hidden;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
}
.list-group button {
  position: relative; display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 10px 16px; width: 100%;
  border: 0; background: none; cursor: pointer; text-align: left; color: var(--ink); font: inherit; font-size: 16px;
}
.list-group button:hover { background: var(--hover); }
.list-group li + li button::before { content: ""; position: absolute; top: 0; left: 60px; right: 0; border-top: 1px solid var(--grid); }
.list-group .grow { flex: 1; }
.list-group .chev { width: 18px; height: 18px; color: var(--muted); }
.list-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); flex: none; }
.list-icon .icon { width: 19px; height: 19px; stroke-width: 2; }
.list-heading { margin: 22px 6px 8px; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-2); }

/* How it works */
.how .panel h2 { margin: 0; font-size: 20px; }
.how .panel p { margin: 0; }
.how-steps, .how-places { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
button.link { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* What's new */
.news-date { margin: 0 0 4px; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.news-list { margin: 6px 0 0; padding-left: 20px; }
.news-list li { padding: 3px 0; }

/* --- Messages ------------------------------------------------------------------- */

#banners:empty { display: none; }
.banner {
  margin-top: 16px; padding: 12px 16px; border-radius: var(--radius-sm);
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  background: var(--warning-wash); color: var(--ink);
}
.banner.info { background: var(--accent-wash); }
.banner > div { flex: 1; min-width: 200px; }

.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; background: var(--fill); color: var(--ink-2); }
.pill.needs_info, .pill.new { background: var(--warning-wash); color: var(--warning-ink); }
.pill.pending { background: var(--fill-2); color: var(--ink); }
.pill.ready { background: var(--accent); color: var(--accent-ink); }
.pill.posted, .pill.sold { background: var(--in-wash); color: var(--in); }
.pill.error { background: var(--critical-wash); color: var(--critical); }
.pill.analyzing::before, .pill.queued::before, .spinner {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty { text-align: center; padding: 56px 20px; color: var(--ink-2); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.empty h2 { color: var(--ink); margin-bottom: 8px; }

/* --- Buttons --------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 16px; border-radius: var(--radius-sm); border: 0;
  background: var(--accent-wash); color: var(--ink); font: inherit; font-size: 15px; font-weight: 600;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s, transform 0.1s;
}
.btn:hover { background: var(--accent-wash-2); }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent); filter: brightness(1.12); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--accent-wash); }
.btn.danger { color: var(--critical); }
.btn.danger:not(.ghost) { background: var(--critical-wash); }
.btn.small { min-height: 32px; padding: 0 12px; font-size: 14px; border-radius: 999px; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn.selected { background: var(--accent); color: var(--accent-ink); }
.btn .icon { width: 19px; height: 19px; stroke-width: 2.1; }

/* --- Fields ---------------------------------------------------------------------- */

input[type=text], input[type=email], input[type=number], input[type=password], input[type=url], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--fill);
  border: 0; border-radius: 10px; padding: 8px 12px; min-height: 42px;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
select {
  -webkit-appearance: none; appearance: none; padding-right: 32px; cursor: pointer;
  background: var(--fill) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M7 9.5l5 5 5-5' fill='none' stroke='%238e8e93' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/></svg>") right 10px center / 16px no-repeat;
}
textarea { resize: vertical; min-height: 120px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, .btn:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
label.field { display: block; }
label.field > span { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; min-height: 26px; }

/* A checkbox in a form row is an iOS switch. */
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; color: var(--ink); cursor: pointer; }
.check input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; flex: none; cursor: pointer; margin: 0;
  width: 51px; height: 31px; border-radius: 999px;
  background:
    radial-gradient(circle at 15.5px 50%, #fff 12.5px, transparent 13.5px),
    radial-gradient(circle at 15.5px 56%, rgba(0, 0, 0, 0.14) 13px, transparent 15px),
    var(--switch-off);
  transition: background 0.2s;
}
.check input[type="checkbox"]:checked {
  background:
    radial-gradient(circle at calc(100% - 15.5px) 50%, #fff 12.5px, transparent 13.5px),
    radial-gradient(circle at calc(100% - 15.5px) 56%, rgba(0, 0, 0, 0.14) 13px, transparent 15px),
    var(--switch-on);
}

/* --- Listings ---------------------------------------------------------------------- */

.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip {
  border: 0; background: var(--fill); color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 500; padding: 6px 14px; border-radius: 999px; cursor: pointer;
}
.chip:hover { background: var(--fill-2); }
.chip.active { background: var(--accent); color: var(--accent-ink); }
.chip .n { opacity: .7; margin-left: 4px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.card {
  background: var(--surface); border: 0; border-radius: var(--radius);
  overflow: hidden; cursor: pointer; display: flex; flex-direction: column; box-shadow: var(--shadow);
  text-align: left; padding: 0; font: inherit; color: inherit; min-width: 0; width: 100%;
  transition: transform 0.1s;
}
.card:hover { box-shadow: 0 0 0 1px var(--baseline), var(--shadow); }
.card:active { transform: scale(0.99); }
.card .thumb { aspect-ratio: 4 / 5; background: var(--surface-2) center / cover no-repeat; position: relative; }
.card .thumb .count { position: absolute; right: 8px; bottom: 8px; background: rgb(0 0 0 / 60%); color: #fff; font-size: 12px; padding: 2px 7px; border-radius: 999px; }
.card .body { padding: 10px 12px 12px; display: grid; gap: 4px; }
.card .title { font-weight: 600; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.card .row { display: flex; justify-content: space-between; align-items: center; gap: 4px 8px; flex-wrap: wrap; }
.card .working { margin-top: 2px; display: flex; gap: 6px; min-width: 0; }
.card .working .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.card .working [data-since] { flex: none; font-variant-numeric: tabular-nums; }
.price { font-weight: 700; font-variant-numeric: tabular-nums; }

/* --- A listing (the panel over the page) ------------------------------------------- */

.drawer-backdrop { position: fixed; inset: 0; background: rgb(0 0 0 / 35%); z-index: 30; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(760px, 100%); z-index: 31;
  background: var(--plane); overflow-y: auto; box-shadow: var(--shadow);
  padding-bottom: env(safe-area-inset-bottom);
}
.drawer-head {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; padding-top: max(12px, env(safe-area-inset-top));
  background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.drawer-head .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; font-size: 17px; }
.drawer-head .done-btn { font-weight: 700; }
.drawer-body { padding: 18px; display: grid; gap: 16px; }
.done-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.done-bar .done-btn { min-width: 140px; }

.photos { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.photo { position: relative; flex: 0 0 auto; width: 110px; }
.photo img { width: 110px; height: 138px; object-fit: cover; border-radius: 10px; display: block; cursor: zoom-in; background: var(--surface-2); }
.photo .tools { display: flex; gap: 2px; justify-content: center; margin-top: 4px; }
.photo .tools button { border: 0; background: var(--fill); color: var(--ink-2); font-size: 12px; border-radius: 6px; padding: 2px 6px; cursor: pointer; }
.photo .tools button:hover { color: var(--ink); background: var(--fill-2); }
.photo .badge { position: absolute; left: 6px; top: 6px; background: rgb(0 0 0 / 60%); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 999px; }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form .full { grid-column: 1 / -1; }
.conf { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.conf.low { background: var(--critical); }
.conf.medium { background: var(--warning); }
.conf.high { background: var(--in); }
.counter { margin-left: auto; font-weight: 500; }

.pricebox { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stat { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; }
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }

.question { display: grid; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.question:last-of-type { border-bottom: 0; }
.options { display: flex; flex-wrap: wrap; gap: 6px; }

.comps { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.comp { display: grid; gap: 3px; font-size: 12.5px; text-decoration: none; color: inherit; border-radius: 10px; padding: 4px; }
.comp:hover { background: var(--hover); }
.comp.used { box-shadow: inset 0 0 0 2px var(--ink); background: var(--accent-wash); }
.comp img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.comp .t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.comp-list { display: grid; gap: 6px; }
.comp-row { display: flex; gap: 10px; justify-content: space-between; font-size: 13.5px; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); }

.copyrow { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--grid); }
.copyrow:last-child { border-bottom: 0; }
.copyrow .k { font-size: 13px; font-weight: 600; color: var(--muted); padding-top: 4px; }
.copyrow .v { white-space: pre-wrap; word-break: break-word; }

/* Copy buttons and the "Ready to post" steps */
.copy-btn {
  margin-left: auto; border: 0; background: var(--fill); color: var(--ink);
  font: inherit; font-size: 12px; font-weight: 600; padding: 2px 10px; min-height: 26px; border-radius: 999px; cursor: pointer;
}
.counter + .copy-btn { margin-left: 8px; }
.copy-btn:hover { background: var(--fill-2); }
.copy-btn.copied, .copy-big.copied { background: var(--in-wash); color: var(--in); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; }
.step { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--grid); }
.step:last-child { border-bottom: 0; }
.step .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--fill); color: var(--ink-2); align-self: start; }
.step.paste .n { background: var(--accent); color: var(--accent-ink); }
.step .k { font-size: 13px; font-weight: 650; color: var(--muted); }
.step .v { white-space: pre-wrap; word-break: break-word; }
.step .v.long { max-height: 9.5em; overflow: auto; }
.step.pick .v { font-weight: 600; }
.step .v code, code.key { word-break: break-all; }
.pick-tag { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--fill); color: var(--ink-2); }
.copy-big { min-width: 92px; min-height: 42px; }
code.key { display: inline-block; margin-top: 6px; font-size: 13px; user-select: all; }
#albumPanel .steps { margin-top: 4px; }

/* Other sites */
.site-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px 16px; }
.site-picks .check input { flex: none; }
.xl-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.xl-price { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.xl-price .big { font-size: 24px; font-weight: 750; letter-spacing: -0.01em; }
.specs { display: grid; gap: 6px; margin-top: 4px; }
.spec { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 8px; align-items: center; }
.spec b { word-break: break-word; }
.xl-rewrite input { flex: 1; min-width: 0; }

/* Post to eBay */
.modal.wide { width: min(640px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; }
.ebay-direct { display: grid; gap: 8px; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius-sm); }
.eb-aspects, .eb-policies { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.eb-policies { grid-template-columns: repeat(3, 1fr); }
.req { font-size: 11px; font-weight: 650; color: var(--warning-ink); }
label.field.missing input, label.field.missing select { box-shadow: inset 0 0 0 2px var(--critical); }
details > summary { cursor: pointer; font-weight: 600; }

/* --- Tables ------------------------------------------------------------------------- */

.table { width: 100%; border-collapse: collapse; background: var(--surface); }
.table th, .table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--grid); font-size: 14px; }
.table tr:last-child td { border-bottom: 0; }
.table th { font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--ink-2); background: var(--surface-2); }
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--surface); }
.qr { background: #fff; padding: 10px; border-radius: 12px; width: 260px; }
.qr svg { display: block; width: 100%; height: auto; }
code, .mono { font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace; font-size: 13px; background: var(--fill); padding: 1px 5px; border-radius: 5px; word-break: break-all; }
pre.mono { background: var(--surface-2); }

/* --- Overlays ----------------------------------------------------------------------- */

.modal-backdrop { position: fixed; inset: 0; z-index: 40; background: rgb(0 0 0 / 40%); display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 18px; padding: 20px; width: min(440px, 100%); display: grid; gap: 14px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25); }
.lightbox { max-width: 96vw; max-height: 92vh; border-radius: 12px; }
.dropzone { position: fixed; inset: 0; z-index: 50; background: color-mix(in srgb, var(--accent) 22%, transparent); display: grid; place-items: center; pointer-events: none; }
.dropzone div { background: var(--surface); padding: 24px 32px; border-radius: 18px; font-weight: 650; font-size: 18px; box-shadow: var(--shadow); }
.toast {
  position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  background: var(--ink); color: var(--plane); padding: 10px 16px; border-radius: 12px; font-weight: 550; box-shadow: var(--shadow); max-width: calc(100% - 32px);
}
/* Shown while the app can't be reached (a restart after an update, or a dropped connection). */
.offline { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 16px; right: 16px; margin: 0 auto; width: fit-content; max-width: 560px; z-index: 60; padding: 9px 14px; border-radius: 14px; background: var(--warning-wash); color: var(--warning-ink); font-size: 13px; font-weight: 600; box-shadow: var(--shadow); text-align: center; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.show-phone { display: none; }

/* --- Sign-in page ------------------------------------------------------------------- */

.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--plane); }
.login .modal { width: min(380px, 100%); box-shadow: var(--shadow); }
.login h1 { font-size: 24px; display: flex; align-items: center; gap: 10px; }
.login .login-brand { font-size: 28px; letter-spacing: -0.02em; }
.login .login-tag { margin: -6px 0 2px; }
.ahead { color: var(--ahead); }
.login h1 img { border-radius: 8px; }

/* --- Phone -------------------------------------------------------------------------- */

@media (min-width: 900px) {
  .toast { bottom: max(24px, env(safe-area-inset-bottom)); }
}
@media (max-width: 899px) {
  .wrap { padding: 0 16px; }
  .page-head { margin: 14px 0 16px; }
  .hide-phone { display: none !important; }
  .show-phone { display: block; }
}
@media (max-width: 720px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .form, .row2 { grid-template-columns: 1fr; }
  .panel { padding: 16px; }
  .drawer-body { padding: 14px 16px 40px; }
  .copyrow { grid-template-columns: 1fr auto; }
  .copyrow .k { grid-column: 1 / -1; padding: 0; }
  .done-bar { flex-direction: column; align-items: stretch; text-align: center; gap: 8px; }
  .done-bar .done-btn { min-height: 46px; }
}
@media (max-width: 560px) {
  .eb-aspects, .eb-policies { grid-template-columns: 1fr; }
}

/* --- Worth buying? ------------------------------------------------------------------ */

.check-snap .btn.big { min-height: 52px; padding: 0 22px; font-size: 17px; flex: 1 1 200px; }
.check-snap .btn.big .icon { width: 22px; height: 22px; }
.check-top { display: flex; gap: 14px; align-items: flex-start; }
.check-top > div { display: grid; gap: 4px; min-width: 0; }
.check-thumb { width: 84px; height: 104px; object-fit: cover; border-radius: 12px; flex: none; cursor: zoom-in; background: var(--surface-2); }
.verdict { font: 700 19px/1.3 var(--font-display); letter-spacing: -0.01em; padding: 14px 16px; border-radius: var(--radius-sm); }
.verdict.v-buy, .pill.v-buy { background: var(--in-wash); color: var(--in); }
.verdict.v-maybe, .pill.v-maybe { background: var(--warning-wash); color: var(--warning-ink); }
.verdict.v-skip, .pill.v-skip { background: var(--critical-wash); color: var(--critical); }
.verdict.v-limit, .pill.v-limit { background: var(--accent-wash); color: var(--ink); }
.list-group.checks img { width: 40px; height: 50px; object-fit: cover; border-radius: 8px; flex: none; background: var(--surface-2); }
.list-group.checks .grow { display: grid; gap: 2px; min-width: 0; }
.list-group.checks .check-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.list-group.checks li + li button::before { left: 70px; }
.sold-row { text-decoration: none; color: inherit; }
.sold-row:hover { background: var(--fill-2); }
.price.loss { color: var(--critical); }
.login-links { display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; font-size: 14px; }
.login-links a { color: var(--ink); font-weight: 600; text-decoration: none; }
.login-links a:hover { text-decoration: underline; }
.login h2 { font-size: 20px; }
/* A heading inside a panel, like Signed in on under Your account */
.sub-head { margin: 10px 0 0; font-size: 14px; font-weight: 600; }
/* Settings → Your data: Delete my account opens to ask for the password */
.delete-account { padding-top: 12px; border-top: 1px solid var(--grid); }
.delete-account > summary { color: var(--critical); }
.delete-account > :not(summary) { margin-top: 10px; }
/* Request an invite's box that only bots fill in: off screen, never seen or tabbed to */
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Two-step sign-in (Settings → Your account) */
.modal-backdrop > .modal { max-height: calc(100dvh - 32px); overflow-y: auto; }
.two-step-steps { margin: 0; padding-left: 20px; display: grid; gap: 14px; }
.two-step-steps li > * + * { margin-top: 6px; }
.two-step-steps .qr { width: 180px; }
.recovery-codes { margin: 0; padding-left: 28px; columns: 2; column-gap: 28px; font-size: 15px; }
.recovery-codes li { padding: 2px 0; }
.recovery-codes code { user-select: all; }
.two-step-more > :not(summary) { margin-top: 10px; }
.save-photos { margin-top: 8px; }
