/* ==========================================================================
   THE DESKS, season two page components.
   Extends style.css and style2.css. Same tokens, same voice, one design
   system. Everything in this file is a component only this page needs:
   the profile panels, the desk head portrait crop, the standings table,
   and the honesty block. No new colors, no new type, no second system.
   ========================================================================== */

/* the profile grid rides the cards3 reveal stagger, wider columns for prose */
.dk-grid.cards3 { grid-template-columns: repeat(auto-fit, minmax(min(430px, 100%), 1fr)); }

.dk-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-m);
  box-shadow: var(--sh-1); overflow: hidden;
  display: flex; flex-direction: column;
}

.dk-head {
  display: flex; gap: 14px; align-items: center;
  padding: 14px 16px; background: #0d1015; border-bottom: 1px solid var(--line);
}

/* The portrait is a crop of the shipped crowned board strip. The image is
   eight equal slices, so with the background eight panels wide, slice n of 7
   maps to the percentage position n over 7. The vertical seat shows the
   crown, the head and the desk edge. */
.dk-port {
  width: 96px; flex: 0 0 96px; aspect-ratio: 1;
  image-rendering: pixelated;
  background-image: url("assets/desk row.png");
  background-size: 800% auto;
  background-position: calc(var(--slice, 0) / 7 * 100%) 68%;
  background-repeat: no-repeat;
  background-color: #14100c;
  border: 1px solid var(--line); border-radius: 6px;
}

.dk-id { min-width: 0; }
.dk-name { font-weight: 700; font-size: 16px; letter-spacing: .06em; line-height: 1.3; }
.dk-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.dk-family {
  border: 1px solid var(--green-dim); color: var(--green);
  font-size: 10.5px; padding: 1px 7px; border-radius: 3px; letter-spacing: .08em;
}
.dk-seat { color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.dk-wallet { display: block; margin-top: 4px; }
.dk-stamp { color: var(--muted); font-size: 11.5px; font-variant: small-caps; letter-spacing: .08em; margin-top: 4px; }

.dk-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.dk-strat { font-size: 13px; line-height: 1.65; color: var(--text); }
.dk-k { color: var(--amber); font-size: 10.5px; letter-spacing: .24em; }

.dk-rules { list-style: none; display: grid; gap: 5px; margin: 0; }
.dk-rules li { color: var(--muted); font-size: 12px; line-height: 1.55; padding-left: 16px; position: relative; }
.dk-rules li::before { content: "»"; position: absolute; left: 0; color: var(--green-dim); }

/* the stats block sits at the bottom of every card, feed driven only */
.dk-stats { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }

.dk-statrow {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: 4px; overflow: hidden;
}
.dk-statrow > div { background: #0d1015; padding: 6px 8px; text-align: center; }
.dk-statrow .k { display: block; color: var(--muted); font-size: 9.5px; letter-spacing: .14em; }
.dk-statrow .v { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dk-statrow .v.up { color: var(--green); }
.dk-statrow .v.down { color: var(--red); }

.dk-filllist { display: grid; }
.dk-fill {
  display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap;
  padding: 4px 0; border-bottom: 1px dashed var(--line);
  font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.dk-fill:last-child { border-bottom: none; }
.dk-fill b { color: var(--text); }
.dk-fill .g { font-weight: 700; color: var(--green); }
.dk-fill .g.down { color: var(--red); }
.dk-fill .t { font-size: 10.5px; }
.dk-fill a { color: var(--green-dim); text-decoration: none; font-size: 10.5px; margin-left: auto; }
.dk-fill a:hover { color: var(--green); }
.dk-nofill { color: var(--muted); font-size: 12px; }
.dk-notlive { color: var(--amber); font-size: 11px; letter-spacing: .12em; margin: 0; }

/* --------------------------------------------------- the standings table */
.dk-standings th, .dk-standings td { text-align: right; }
.dk-standings th:nth-child(1), .dk-standings td:nth-child(1),
.dk-standings th:nth-child(2), .dk-standings td:nth-child(2) { text-align: left; }
.dk-standings td.desk { font-weight: 700; color: var(--text); white-space: nowrap; }
.dk-standings td.beat { white-space: nowrap; }
.dk-standings td.beat.yes { color: var(--green); font-weight: 700; }
.dk-standings td.beat.no { color: var(--red); font-weight: 700; }
.dk-standings td.beat.na { color: var(--muted); }
.dk-standings .m { color: var(--muted); }
.dk-standings tr.rank1 td { box-shadow: inset 0 0 0 0 transparent; }
.dk-standings tr.rank1 td.desk { color: var(--amber); }

/* ------------------------------------------------------ the honesty block */
.dk-honesty {
  background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--amber); border-radius: 4px;
  padding: 18px 20px; box-shadow: var(--sh-1);
  display: grid; gap: 12px;
}
.dk-honesty p { font-size: 14px; line-height: 1.7; max-width: 78ch; }
.dk-honesty b { color: var(--amber); }
.dk-honesty .chips { margin: 4px 0 0; }

/* --------------------------------------------------------------- mobile */
@media (max-width: 520px) {
  .dk-head { padding: 12px; gap: 12px; }
  .dk-port { width: 80px; flex-basis: 80px; }
  .dk-body { padding: 12px 12px 14px; }
}
