/* Moved from websites/templates/websites/_pages_table_styles.html (redesign checklist: local CSS out of the
   templates). Loaded only by the pages that include that partial. */

/* The filter row (websites/_pages_filters.html) is styled by the
   shared .filter-chips / .filter-select rules of static/css/akoore.css,
   next to the search box — the report full-table pages use the same. */

.page-cell-note { margin-top: 2px; font-size: 12px; }

/* ---- Two lines per link ------------------------------------------
   Line 1 says what the page IS (category, the two actions, the address);
   line 2 is the data about it. One <tbody> per link holds the pair, so
   the hover and the closing rule cover both lines — and the two lines
   keep alignments of their own, line 1 through the colspans of its own
   heading bar. */
.pages-table tbody.page-row:hover { background: color-mix(in srgb, var(--color-text) 4%, transparent); }
.pages-table tbody.page-row tr:hover { background: none; }
/* The rows Auto select would switch on (the links list's auto_select_pks). */
.pages-table tbody.page-row--auto-select { background: color-mix(in srgb, var(--mint) 10%, transparent); }
.pages-table tbody.page-row--auto-select:hover { background: color-mix(in srgb, var(--mint) 16%, transparent); }
/* Second heading bar sits under the first: both are sticky, so the data
   bar is offset by the height of the identity bar above it. That height
   is PINNED here rather than left to the content — a sticky offset that
   does not match it lets the rows scroll through the gap between the two
   bars. Change one of these two values and you change both. */
.pages-table thead tr:first-child th { height: 36px; line-height: 1.2;
  padding-top: 4px; padding-bottom: 4px; }
/* The data headings wrap over two or three lines in 11px capitals; the
   body's 1.55 line-height spread them into loose stacks. Tight lines,
   sat on the rule just above the figures they name. */
.pages-table thead tr:last-child th { top: 36px; line-height: 1.15;
  vertical-align: bottom; }
.pages-table th[colspan] { border-bottom-width: 1px; }
/* Inside a link, the two lines are one block: no rule between them, the
   rule closes the pair. */
.pages-table tr.page-row-identity > td { border-bottom: 0;
  padding-bottom: 2px; }
.pages-table tr.page-row-data > td { padding-top: 2px;
  vertical-align: top; }
.pages-table tr.page-row-identity > td:first-child { padding-top: var(--space-3); }
.page-cell-url { overflow-wrap: anywhere; }
.page-cell-url a { font-weight: 600; }
.page-cell-title { font-size: 12px; margin-left: 4px; }
.page-row-identity .page-cell-note { margin: 0 0 0 6px; }
.page-row-identity .promotion-form { display: inline-flex;
  align-items: center; gap: 6px; margin: 0; }
/* A compact action button — the row is a line, not a toolbar. */
.btn-compact { padding: 3px 10px; font-size: 12px; }

/* ---- Level bars: a rule UNDER the number, not a bar beside it ----
   Deliberately narrow (44px): a dozen numeric columns cannot each spend
   the 110px the reports' .seo-meter takes. The neutral fill is for the
   columns measured against the best page of the site, where "less" is
   not "bad". */
.cell-meter { display: inline-block; min-width: 44px; }
.cell-meter-value { display: block; }
.cell-meter-bar { display: block; width: 44px; height: 3px; margin-top: 3px;
  background: var(--color-neutral-300); }
.cell-meter-bar > span { display: block; height: 100%;
  background: var(--color-neutral-500); }
.cell-meter--good .cell-meter-bar > span { background: var(--mint); }
.cell-meter--warn .cell-meter-bar > span { background: var(--amber); }
.cell-meter--bad .cell-meter-bar > span  { background: var(--coral); }
/* The 30-day movement next to the SEO score. */
.score-trend { font-size: 11px; font-weight: 600; margin-left: 4px;
  white-space: nowrap; }
.score-trend--up { color: var(--mint-text); }
.score-trend--down { color: var(--coral-text); }
/* The three-step how-to that replaced the intro paragraph: numbered,
   one idea per step, so a beginner can stop after step 1. */
.page-howto { margin: 0 0 var(--space-3); padding-left: 1.25rem;
  max-width: 90ch; }
.page-howto li { margin-top: var(--space-2); }
.page-howto .btn { margin-left: var(--space-1); }
/* ---- The list rendering (?view=list) -------------------------------
   _pages_ranked_cards_with_audit_toggle.html. One card per link, read
   top to bottom: identity + actions, the figures, the reason. The grid
   keeps every card's figures in the same place, so a column of cards
   still compares like a table column. */
.page-cards-sort { display: flex; align-items: center; gap: var(--space-2);
  margin: 0 0 var(--space-2); font-size: 12px; }
.page-cards-sort select { width: auto; min-height: 30px; padding: 2px 6px;
  font-size: 12px; }
.page-cards { list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: var(--space-2); }
.page-card {
  display: grid; align-items: start;
  grid-template-columns: 2.4rem 15rem minmax(0, 1fr) auto;
  grid-template-areas:
    "num id     id      act"
    ".   scores metrics metrics"
    ".   foot   foot    foot";
  gap: var(--space-2) var(--space-4, 24px);
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-2);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-left: 4px solid var(--color-neutral-300);
  border-radius: var(--radius-md);
}
.page-card:hover { border-color: var(--color-neutral-400);
  border-left-color: var(--color-neutral-500); }
/* Chosen for the deep audit: the edge and a faint wash say so. */
.page-card--on, .page-card--on:hover { border-left-color: var(--mint);
  background: color-mix(in srgb, var(--mint) 4%, var(--color-surface)); }
.page-card--broken, .page-card--broken:hover { border-left-color: var(--coral); }
/* Recommended Skip: still listed and still switchable, just quieter. */
.page-card--skip .page-card-id,
.page-card--skip .page-card-scores,
.page-card--skip .page-card-metrics,
.page-card--skip .page-card-foot { opacity: .62; }
.page-card--empty { display: block; padding: var(--space-4, 24px);
  text-align: center; }

.page-card-num { grid-area: num; padding-top: 2px; text-align: right;
  font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--color-text) 40%, transparent); }

.page-card-id { grid-area: id; min-width: 0; }
.page-card-kicker { display: flex; flex-wrap: wrap; align-items: center;
  line-height: 1.4;
  gap: 6px; margin-bottom: 2px; font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 55%, transparent); }
.page-card-kicker .seo-status { letter-spacing: 0; text-transform: none; }
.page-card-title { display: block; font-size: 15px; font-weight: 600;
  line-height: 1.35; color: var(--color-text); text-decoration: none;
  overflow-wrap: anywhere; }
.page-card-title:hover { text-decoration: underline; }
.page-card-url { display: block; margin-top: 1px; font-size: 12px;
  font-family: var(--font-mono, monospace); text-decoration: none;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-card-url:hover { color: var(--color-text); }
.page-card-id .pages-chip { margin-top: 4px; display: inline-block; }

.page-card-act { grid-area: act; display: flex; align-items: center;
  gap: var(--space-2); flex-wrap: wrap; justify-content: flex-end; }
.page-card-act .promotion-form { display: inline-flex; align-items: center;
  gap: 6px; margin: 0; }
.page-card-act .page-cell-note { margin: 0; }

/* The decision figures, large, their level bar full width. */
.page-card-scores { grid-area: scores; display: grid;
  grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.page-card-label, .page-card-metrics dt { display: block; font-size: 10px;
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 2px;
  line-height: 1.3; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
  color: color-mix(in srgb, var(--color-text) 55%, transparent); }
.page-card-score .cell-meter { display: block; }
.page-card-score .cell-meter-value { font-size: 22px; font-weight: 700;
  line-height: 1.1; font-variant-numeric: tabular-nums; }
.page-card-score .cell-meter-bar { width: 100%; height: 4px; }
/* The 30-day movement sits on the label line, so it costs no height. */
.page-card-score { position: relative; }
.page-card-score .score-trend { position: absolute; top: 0; right: 0;
  margin: 0; }

/* The six measured facts: equal cells, divided by hairlines. */
.page-card-metrics { grid-area: metrics; display: grid; margin: 0;
  grid-template-columns: repeat(6, minmax(0, 1fr)); }
.page-card-metrics > div { padding: 0 var(--space-2);
  border-left: 1px solid var(--color-divider); min-width: 0; }
.page-card-metrics dd { margin: 0; font-size: 14px; font-weight: 600;
  line-height: 1.3;
  font-variant-numeric: tabular-nums; }
.page-card-metrics .cell-meter { display: block; }
.page-card-metrics .cell-meter-bar { width: 100%; max-width: 72px; }

.page-card-foot { grid-area: foot; display: flex; flex-wrap: wrap;
  align-items: baseline; gap: var(--space-1) var(--space-3);
  padding-top: var(--space-2); border-top: 1px dashed var(--color-divider); }
.page-card-foot:not(:has(.page-card-why, .page-card-tag)) { display: none; }
.page-card-why { margin: 0; flex: 1 1 22rem; font-size: 13px;
  line-height: 1.45;
  color: color-mix(in srgb, var(--color-text) 78%, transparent); }
.page-card-tags { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0;
  max-width: 100%; }
.page-card-tag { font-size: 12px; padding: 1px 8px;
  border: 1px solid var(--color-divider); border-radius: 999px;
  background: var(--color-bg); max-width: min(17rem, 100%); overflow: hidden;
  line-height: 1.6;
  text-overflow: ellipsis; white-space: nowrap; }
.page-card-tag em { font-style: normal; margin-right: 3px;
  color: color-mix(in srgb, var(--color-text) 55%, transparent); }
.page-card-tag--fact { font-variant-numeric: tabular-nums; }

@media (max-width: 1100px) {
  .page-card { grid-template-columns: 2.4rem minmax(0, 1fr) auto;
    grid-template-areas:
      "num id      act"
      ".   scores  scores"
      ".   metrics metrics"
      ".   foot    foot"; }
  .page-card-scores { max-width: 22rem; }
}
@media (max-width: 640px) {
  .page-card { grid-template-columns: 1.8rem minmax(0, 1fr);
    grid-template-areas:
      "num id" ". act" ". scores" ". metrics" ". foot"; }
  .page-card-act { justify-content: flex-start; }
  .page-card-metrics { grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: var(--space-2); }
  .page-card-metrics > div:nth-child(3n+1) { border-left: 0; padding-left: 0; }
}
@media print {
  .page-cards-sort, .page-card-act { display: none !important; }
  .page-card { break-inside: avoid; }
}
