
:root {
  --ink: #000;
  --body: #333;
  --meta: #555;
  --faint: #888;
  --faded: #999;
  --ghost: #bbb;
  --link: #1a4f8f;
  --up: #177245;
  --down: #b3382c;
  --rule: #ddd;
  --row-rule: #e5e5e5;
  --hair: #eee;
  --zebra: #fafaf8;
  --hover: #f2f1e8;
  --serif: Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--body);
  font-family: var(--serif);
}
a { color: var(--link); }
a:hover { color: #0d3260; }
img { max-width: 100%; }

.page { max-width: 1010px; margin: 0 auto; padding: 28px 36px 34px; }
.page-home { max-width: 820px; padding: 36px 44px 34px; }

/* Header: the 2008 wordmark, at 2008 size on the homepage and shrunk elsewhere. */
.topbar { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.brand { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.brand img { display: block; width: 232px; height: 32px; }
.home-brand img { width: 387px; height: 53px; }
.slug { font: 400 11px var(--mono); color: var(--faded); }
.synced { font: 400 13px var(--serif); color: var(--meta); text-align: right; }

h1 { font: 700 32px/1.15 var(--serif); color: var(--ink); margin: 24px 0 10px; }
.index-desc { font: 400 15px/1.55 var(--serif); color: var(--body); margin: 0; max-width: 620px; text-wrap: pretty; }
.index-meta { font: italic 400 13px/1.5 var(--serif); color: var(--faint); margin: 8px 0 0; }
/* Inline edit: the text itself is the summary, and an italic "edit" hint hangs
   off it — the design's affordance, done by <details> instead of jeditable. */
.edit-attr > summary { list-style: none; cursor: pointer; display: block; }
.edit-attr > summary::-webkit-details-marker { display: none; }
.edit-attr > summary::after {
  content: "edit"; font: italic 400 12px var(--serif); color: var(--ghost);
  margin-left: 8px; vertical-align: middle;
}
.edit-attr > summary:hover::after { color: var(--faint); }
/* The heading is inline inside its summary so the "edit" hint sits beside it
   rather than on its own line; the spacing it would have carried moves to the
   <details>, which is the block-level element now. */
.edit-name { margin: 24px 0 10px; }
.edit-name > summary > h1 { display: inline; margin: 0; }
.edit-description > summary { max-width: 620px; }
.edit-attr form { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 0; max-width: 620px; }
.edit-attr form input[type="text"], .edit-attr form textarea { flex: 1; font-family: var(--serif); font-size: 14px; }
.tap-hint { display: none; }

/* Chart */
.chart { margin: 20px 0 0; }
.chart-title { font: 700 13px var(--serif); color: var(--ink); margin: 0 0 8px; }
.chart-body { display: flex; gap: 18px; align-items: flex-start; }
.chart-body svg { flex: none; max-width: 100%; height: auto; }
.chart-legend { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; }
.legend-item { display: flex; align-items: center; gap: 7px; font: 400 12.5px var(--serif); color: var(--body); }
.legend-swatch { width: 13px; height: 2.5px; flex: none; }

/* This week */
.movers {
  font: italic 400 14px/1.6 var(--serif); color: #444; margin: 16px 0 0;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 10px 0;
}
.movers b { font-style: normal; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--faded); }

/* Note-filter chips. A wrapped block, not a scroll row: /yc has ~42 batches, and
   the whole history of YC visible at a glance is on-theme for an index about
   time. The era label is a gutter in the chart's axis-label style, so the rows
   read as a timeline rather than a pile. */
.chips { margin: 14px 0 0; }
.chip-row { display: flex; align-items: baseline; gap: 0 4px; flex-wrap: wrap; font: 400 13.5px var(--serif); color: var(--meta); padding: 1px 0; }
.chip-era { font: 400 11px var(--mono); color: #aaa; flex: none; width: 62px; }
.chip-sep { color: var(--ghost); }
.chips b { color: var(--ink); }

/* The filter you're under, and the way back out of it. */
.filter-head { font: 400 13.5px var(--serif); color: var(--meta); margin: 12px 0 0; }
.filter-head b { color: var(--ink); }

/* "4,812 live · 159 parked or gone — show all". A disclosure, in the same
   register as the filter header: this is the page admitting what it hides. */
.showline { font: 400 13px var(--serif); color: var(--meta); margin: 10px 0 0; }

/* Pager. Bottom only, no page-number list — at 51 pages the list would be
   longer than the table it navigates. A dead direction is gray text, because
   there is nowhere to go. */
.pager { font: 400 13px var(--serif); color: var(--meta); margin: 14px 0 0; text-align: center; }
.pager span { color: #aaa; }

/* Table. Divs, not a <table>: every row is a <details> so the per-source columns
   have somewhere to go on a phone, and a <details> cannot be a table row. */
.table { margin: 18px 0 0; }
.thead, .site-main {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 148px 82px repeat(5, 56px) 58px;
  gap: 0 10px;
  align-items: center;
}
.thead {
  padding: 0 0 7px; border-bottom: 2px solid var(--ink);
  font: 700 12px var(--serif); color: var(--ink);
}
.thead .c-avg, .thead .c-src, .thead .c-checked { text-align: right; }
.site { border-bottom: 1px solid var(--row-rule); }
.site-main { padding: 7px 8px 7px 8px; margin: 0 -8px; cursor: default; list-style: none; }
.site-main::-webkit-details-marker { display: none; }
.site:nth-of-type(even) > .site-main { background: var(--zebra); }
.site > .site-main:hover { background: var(--hover); }
.c-rank { font: 400 14px var(--serif); color: var(--ink); }
.c-site { display: flex; align-items: baseline; gap: 9px; min-width: 0; white-space: nowrap; overflow: hidden; }
.site-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.site-name img { width: 13px; height: 13px; vertical-align: -2px; margin-right: 7px; }
.site-name a { font: 400 15px var(--serif); }
.site-meta { font: italic 400 12.5px var(--serif); color: var(--faded); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub-avg { display: none; }
.c-move { display: flex; align-items: center; gap: 8px; }
.delta { font: 500 12.5px var(--mono); font-variant-numeric: tabular-nums; min-width: 58px; }
.spark { width: 60px; height: 17px; flex: none; }
.c-avg { font: 500 13.5px var(--mono); color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
/* The per-source ranks recede on purpose: the average is the site's claim, and
   these are the working. Small, gray, mono. */
.c-src { font: 400 11.5px var(--mono); color: var(--faded); text-align: right; font-variant-numeric: tabular-nums; }
.c-checked { font: italic 400 10.5px var(--serif); color: var(--ghost); text-align: right; }
.gap {
  padding: 7px 0; border-bottom: 1px solid var(--row-rule);
  font: italic 400 12.5px var(--serif); color: #aaa; text-align: center;
}
.site-more { display: none; }
.tablenote { font: 400 13px var(--serif); color: #777; margin: 12px 0 0; }

/* A row whose domain stopped being its company's. Only ever visible under
   ?show=all. Faded rather than struck through or reddened: it isn't an error,
   and the rank on it is real — it just isn't about the name beside it. The
   chip says which of the three things happened; the reason and the evidence
   are in the disclosed panel, where there's room for a sentence. */
.not-live > .site-main { opacity: 0.62; }
.state-chip {
  font: 400 10px var(--mono); color: var(--meta); text-transform: uppercase; letter-spacing: 0.04em;
  border: 1px solid var(--rule); border-radius: 2px; padding: 1px 4px; margin-left: 7px; white-space: nowrap;
}
.state-why { font: italic 400 12px var(--serif); color: var(--meta); margin: 0 0 8px; padding: 0 8px; }

/* Forms — 2008 chrome: a box, a button, no shadows. */
input[type="text"], textarea {
  font: 400 13px var(--mono); color: var(--ink);
  border: 1px solid #aaa; background: #fff; padding: 5px 10px;
}
textarea { font-family: var(--serif); font-size: 14px; }
button {
  font: 400 13px var(--serif); color: var(--ink);
  border: 1px solid #888; background: #eee; padding: 5px 14px; cursor: pointer;
}
button:hover { background: #e4e4e4; }
.addsite { margin: 20px 0 0; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.addsite label { font: 400 14px var(--serif); color: var(--ink); }
.addsite .site-input { width: 200px; }
.addsite .note-input { width: 150px; font-family: var(--serif); font-size: 13.5px; }
.hint { font: italic 400 12px var(--serif); color: var(--faded); }
.error { font: 400 13px var(--serif); color: var(--down); margin: 8px 0 0; }

/* History */
.history { margin: 26px 0 0; border-top: 1px solid var(--rule); padding: 14px 0 0; }
.history h2 { font: 700 14px var(--serif); color: var(--ink); margin: 0 0 8px; }
.history h2 span { font: italic 400 12px var(--serif); color: var(--faded); }
.hist-list { display: flex; flex-direction: column; gap: 5px; font: 400 13px var(--serif); color: #444; }
.stamp { font: 400 11px var(--mono); color: #aaa; margin-right: 10px; }
/* Undo mutates, so it is a POST — styled as the link the design drew, because a
   button that looks like a button here would read as the primary action. */
.undo { display: inline; margin-left: 6px; }
.undo button {
  font: 400 12px var(--serif); color: var(--link);
  border: 0; background: none; padding: 0; cursor: pointer; text-decoration: underline;
}
.undo button:hover { color: #0d3260; background: none; }
.footnote { font: italic 400 12.5px var(--serif); color: var(--faded); margin: 14px 0 0; }

/* Homepage */
.thesis { font: 400 16px/1.6 var(--serif); color: #222; margin: 22px 0 0; max-width: 560px; text-wrap: pretty; }
.thesis + .thesis { margin-top: 8px; }
h2.section { font: 700 22px var(--serif); color: var(--ink); margin: 30px 0 10px; }
.section-dek { font: 400 14.5px/1.5 var(--serif); color: #444; margin: 0 0 14px; }
.create { border: 1px solid var(--rule); padding: 18px 20px; background: #fcfcfa; }
.create-slug { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.create-slug .prefix { font: 400 13.5px var(--mono); color: var(--faint); }
.create-slug input { width: 140px; font-weight: 500; }
.create-row { display: flex; margin: 10px 0 0; }
.create-row input { flex: 1; font-family: var(--serif); font-size: 14px; }
.create-actions { display: flex; gap: 10px; margin: 10px 0 0; align-items: flex-start; }
.create-actions textarea { flex: 1; min-height: 44px; resize: vertical; }
.create-actions button { white-space: nowrap; padding: 6px 16px; font-size: 14px; }
/* Filled by the slug check; empty and invisible until it says something. */
.availability { font: italic 400 13px var(--serif); }
.availability.free { color: var(--up); }
.availability.taken { color: var(--down); }
.example {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) 240px; gap: 0 16px;
  align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--hair);
}
.example-slug { font: 500 13.5px var(--mono); }
.example-name { font: 400 14px var(--serif); color: var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.example-name span { font-style: italic; color: #aaa; }
.example-mover { font: 500 12px var(--mono); text-align: right; white-space: nowrap; }
.home-foot { font: 400 13px var(--serif); color: #777; margin: 22px 0 0; }
.home-foot + .footnote { margin-top: 8px; }

/* The frozen /2008 archive. A quieter cousin of the live table: same type, same
   rules, but its own grid (three dead sources, not five live ones) and a banner
   that says the numbers here never move. */
.arch-banner {
  font: 400 13.5px/1.6 var(--serif); color: var(--meta); margin: 16px 0 0; max-width: 660px;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 10px 0; text-wrap: pretty;
}
.arch-banner b { color: var(--ink); }
.arch-list { margin: 20px 0 0; }
.arch-list-row {
  display: grid; grid-template-columns: 120px minmax(0, 1fr) 90px; gap: 0 16px;
  align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--hair);
  text-decoration: none; color: inherit;
}
.arch-list-row:hover { background: var(--hover); }
.arch-list-slug { font: 500 13.5px var(--mono); color: var(--link); }
.arch-list-name { font: 400 14px var(--serif); color: var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arch-list-name span { font-style: italic; color: #aaa; }
.arch-list-date { font: 400 11.5px var(--mono); color: var(--faded); text-align: right; }

.arch-table { margin: 18px 0 0; }
.arch-thead, .arch-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 74px 74px 74px 74px;
  gap: 0 10px; align-items: baseline;
}
.arch-thead {
  padding: 0 0 7px; border-bottom: 2px solid var(--ink);
  font: 700 12px var(--serif); color: var(--ink);
}
.arch-row { padding: 7px 8px; margin: 0 -8px; border-bottom: 1px solid var(--row-rule); }
.arch-row:nth-of-type(even) { background: var(--zebra); }
.arch-row:hover { background: var(--hover); }
.arch-rank { font: 400 14px var(--serif); color: var(--ink); }
.arch-site { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.arch-site-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.arch-site-name img { width: 13px; height: 13px; vertical-align: -2px; margin-right: 7px; }
.arch-site-name a { font: 400 15px var(--serif); }
.arch-note { font: italic 400 12.5px var(--serif); color: var(--faded); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arch-num { font: 400 12px var(--mono); color: var(--faded); text-align: right; font-variant-numeric: tabular-nums; }
.arch-thead .arch-num { font: 700 12px var(--serif); color: var(--ink); }
.arch-avg { font: 500 13px var(--mono); color: var(--ink); }

@media (max-width: 760px) {
  /* Drop Compete and Quantcast on a phone; the average and Alexa are the story. */
  .arch-thead, .arch-row { grid-template-columns: 26px minmax(0, 1fr) 60px 60px; }
  .arch-thead span:nth-child(5), .arch-thead span:nth-child(6),
  .arch-row span:nth-child(5), .arch-row span:nth-child(6) { display: none; }
  .arch-site { display: block; }
  .arch-site-name { display: block; }
  .arch-note { display: block; font-size: 11px; }
  .arch-list-row { grid-template-columns: minmax(0, 1fr) auto; }
  .arch-list-slug { grid-row: 1; }
  .arch-list-date { grid-row: 1; }
  .arch-list-name { grid-column: 1 / -1; grid-row: 2; white-space: normal; }
}

/* About */
.about p { font: 400 15px/1.6 var(--serif); color: var(--body); max-width: 620px; margin: 0 0 14px; text-wrap: pretty; }
.about dl { max-width: 620px; margin: 0 0 18px; }
.about dt { font: 700 14px var(--serif); color: var(--ink); margin: 12px 0 2px; }
.about dd { font: 400 14px/1.5 var(--serif); color: var(--meta); margin: 0; }

/* 2c — mobile. The per-source ranks fold behind the disclosure; rank, domain,
   movement and the sparkline survive, because those are the row. */
@media (max-width: 760px) {
  .page { padding: 20px 18px 6px; }
  .brand img { width: 174px; height: 24px; }
  .home-brand img { width: 100%; height: auto; }
  h1 { font-size: 22px; margin: 14px 0 5px; }
  .index-desc { font-size: 14px; }
  .index-meta { font-size: 11.5px; }
  .tap-hint { display: inline; }
  .chart-body { display: none; }
  .movers { font-size: 12.5px; }
  /* The chip block wraps on a phone rather than scrolling sideways: a hidden
     horizontal scroller full of batches is a filter nobody discovers. */
  .chips { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 7px 0; }
  .chip-row { font-size: 12.5px; }
  .chip-era { width: 100%; }
  .table { margin: 0; }
  .thead { display: none; }
  .site-main {
    grid-template-columns: 26px minmax(0, 1fr) 70px 54px;
    padding: 10px 0; margin: 0; min-height: 44px; cursor: pointer;
  }
  .c-src, .c-checked, .c-avg { display: none; }
  .c-site { display: block; }
  .site-name { display: block; white-space: nowrap; }
  .site-name a { font-size: 14px; }
  .site-meta { display: block; font-size: 11px; margin-top: 1px; }
  .sub-avg { display: inline; }
  /* The delta and the sparkline share one cell on desktop but are their own
     columns on 2c. display:contents promotes them into the row's grid rather
     than duplicating them in the markup. */
  .c-move { display: contents; }
  .delta { font-size: 11.5px; text-align: right; min-width: 0; }
  .spark { width: 50px; height: 16px; justify-self: end; }
  .site[open] .site-more {
    display: flex; flex-wrap: wrap; gap: 4px 18px;
    padding: 0 0 11px 35px; font: 400 11px var(--mono); color: var(--faint);
  }
  .site-more b { color: var(--ink); font-weight: 500; }
  .site-more .checked { font: italic 400 11px var(--serif); color: var(--ghost); flex-basis: 100%; }
  .addsite { gap: 8px; }
  .addsite .site-input, .addsite .note-input { width: 100%; }
  .create-actions { flex-direction: column; }
  .example { grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; }
  .example-slug { grid-row: 1; }
  .example-mover { grid-row: 1; }
  .example-name { grid-column: 1 / -1; grid-row: 2; white-space: normal; }
}
