/* #112 Simple mode (simple.js; Settings > Look). Home as a plain sheet: today's leads as rows, one copy-and-message
   button per row, a header with the day's progress. Built from the desk's own tokens and .btn, so every theme and skin
   still colours it. The sheet is quiet on purpose: one red button (the row you're on), everything else in bone. */
.stagebox.is-simple { place-items: stretch center; }
@media (min-width: 861px) { .stagebox.is-simple { grid-template-rows: minmax(0, 1fr); } }
#panel.is-simple { width: min(1240px, 100%); height: 100%; max-height: 100%; display: block; padding: 0; overflow: hidden; }
.sm { height: 100%; display: flex; flex-direction: column; min-height: 0; }

/* ---------- the header: the day in words, the progress, the pack ---------- */
.sm-head { flex: none; display: flex; align-items: center; gap: 16px 32px; flex-wrap: wrap; padding: var(--pad-panel) var(--pad-panel) 16px; }
.sm-title { min-width: 0; margin-right: auto; }
.sm-title h2 { margin: 0; font: 400 clamp(26px, 2.2vw, 34px)/1.1 var(--serif); color: #fff; }
.sm-title p { margin: 6px 0 0; font: 500 15px/1.4 var(--sans); color: var(--bone-2); }
.sm-progress { display: grid; gap: 8px; min-width: 210px; }
.sm-progress p { display: flex; align-items: baseline; gap: 4px; margin: 0; }
.sm-progress b { font: 400 26px/1 var(--serif); color: #fff; font-variant-numeric: lining-nums tabular-nums; }
.sm-progress span { font: 500 15px/1 var(--sans); color: var(--bone-2); }
.sm-progress em { margin-left: auto; padding-left: 12px; font: 600 13.5px/1 var(--sans); font-style: normal; color: var(--t-titan); }
.sm-meter { display: block; height: 4px; border-radius: 2px; overflow: hidden; background: rgba(236, 228, 216, .1); }
.sm-meter > i { display: block; height: 100%; background: var(--red-hi); transform-origin: 0 50%; transition: transform var(--dur-slow) var(--ease); }
.sm-head .btn { min-height: 44px; padding: 0 20px; font-size: 16px; }
/* the two-week timeline sits under the header, flat to the sheet */
.sm > .hm-trial { left: 0; width: auto; margin: 0 var(--pad-panel) 14px; border-radius: 10px; }

/* ---------- the sheet ---------- */
.sm-sheet { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 0 var(--pad-panel) var(--pad-panel); scrollbar-color: #715b52 transparent; }
.sm-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; font: 500 15.5px/1.4 var(--sans); color: var(--bone); }
/* the message is the point of the row, so it gets the room: genre and city sit under the name, and get their own
   columns only on wide screens */
.sm-k-check { width: 48px; } .sm-k-artist { width: 25%; } .sm-k-genre, .sm-k-city { display: none; width: 10%; } .sm-k-f { width: 92px; }
.sm-k-status { width: 124px; } .sm-k-act { width: 252px; }
.sm-table .sm-c-genre, .sm-table .sm-c-city { display: none; }
.sm-table thead th { position: sticky; top: 0; z-index: 1; padding: 10px 12px; text-align: left; font: 600 13.5px/1.2 var(--sans); color: var(--bone-3);
  background: var(--surface-solid); box-shadow: inset 0 -1px 0 var(--line-hi); }
.sm-table thead th svg { width: 15px; height: 15px; fill: none; stroke: var(--bone-3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.sm-table td { padding: 10px 12px; vertical-align: middle; border-bottom: 1px solid var(--line); }
.sm-table .sm-c-check { padding-right: 0; text-align: center; }
.sm-table .sm-c-f { text-align: right; font-variant-numeric: tabular-nums; color: var(--bone-2); }
.sm-table td.sm-c-genre, .sm-table td.sm-c-city { color: var(--bone-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-row { transition: background-color var(--dur-fast) ease; }
@media (hover: hover) and (pointer: fine) { .sm-row:hover { background-color: rgba(236, 228, 216, .035); } }
.sm-row:focus-within { background-color: rgba(236, 228, 216, .04); }
/* the row you're on: a red edge on the left, its button the one red thing on the page */
.sm-row.is-next { background-color: color-mix(in oklab, var(--red) 10%, transparent); }
.sm-row.is-next > td:first-child { box-shadow: inset 2px 0 0 var(--red-hi); }

/* the artist: tier diamond, name, the handle under it */
.sm-c-artist { min-width: 0; }
.sm-name { display: flex; align-items: center; gap: 9px; min-width: 0; }
.sm-name b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: #fff; }
.sm-tier { flex: none; width: 7px; height: 7px; transform: rotate(45deg); border-radius: 1px; background: var(--c); box-shadow: 0 0 6px color-mix(in srgb, var(--c) 55%, transparent); }
.sm-line2 { display: flex; gap: 10px; min-width: 0; margin: 2px 0 0 16px; font-size: 14.5px; white-space: nowrap; }
.sm-handle { flex: 0 1 auto; min-width: 3em; overflow: hidden; text-overflow: ellipsis; color: var(--bone-2); text-decoration: none; }
.sm-handle:hover { color: var(--bone); text-decoration: underline; text-underline-offset: 3px; }
.sm-meta { flex: 0 1000 auto; min-width: 0; color: var(--bone-2); overflow: hidden; text-overflow: ellipsis; }

/* the first message: two lines (it's what you're about to send); a click shows all of it */
.sm-msg { display: block; width: 100%; padding: 6px 8px; margin: -6px -8px; border: 0; border-radius: var(--r-sm); background: none; text-align: left; cursor: pointer;
  font: 500 15px/1.45 var(--sans); color: var(--bone-2); transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease; box-sizing: content-box; max-width: 100%; }
.sm-msg span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
@media (hover: hover) and (pointer: fine) { .sm-msg:hover { background-color: rgba(236, 228, 216, .05); color: var(--bone); } }
.sm-row.is-open .sm-msg span { -webkit-line-clamp: unset; line-clamp: none; color: var(--bone); }

/* where they stand */
.sm-status { display: inline-flex; align-items: center; gap: 8px; font: 600 14px/1.2 var(--sans); color: var(--bone-2); white-space: nowrap; }
.sm-status::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px currentColor; }
.is-copied .sm-status { color: #f0d9a8; }
.is-copied .sm-status::before { background: var(--t-titan); box-shadow: 0 0 6px rgba(240, 200, 112, .6); }
.is-messaged .sm-status { color: var(--t-hero); }
.is-messaged .sm-status::before, .is-replied .sm-status::before { background: currentColor; box-shadow: none; }
.is-replied .sm-status { color: var(--t-titan); }
.sm-row.is-messaged .sm-name b, .sm-row.is-replied .sm-name b { color: var(--bone-2); }
.sm-row.is-messaged .sm-msg span { color: var(--bone-3); }

/* the one button */
.sm-c-act .btn { width: 100%; min-height: 42px; padding: 0 14px; gap: 9px; font-size: 15px; }
.sm-c-act .btn svg { width: 16px; height: 16px; flex: none; }
.sm-c-act .btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-c-act .btn-red::before { inset: 3px; }
/* the other rows' buttons are there but quiet (a hairline, bone text); they light up under the pointer or the keyboard */
.sm-c-act .btn-ghost { color: var(--bone-2); background: none; box-shadow: inset 0 0 0 1px var(--line); transition: color var(--dur-fast) ease, background-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease, transform 160ms var(--ease); }
.sm-c-act .btn-ghost svg { opacity: .7; }
.sm-row:hover .sm-c-act .btn-ghost, .sm-c-act .btn-ghost:focus-visible { color: var(--bone); box-shadow: inset 0 0 0 1px var(--line-hi); }
.sm-c-act .btn-ghost:hover { background-color: rgba(236, 228, 216, .07); }
.sm-c-act .sm-open { color: var(--bone-3); }
.is-copied .sm-c-act .btn-ghost { color: #f0d9a8; box-shadow: inset 0 0 0 1px rgba(240, 200, 112, .4); }

/* Messaged: a square box, ticked in bone */
.sm-check { appearance: none; -webkit-appearance: none; position: relative; width: 22px; height: 22px; margin: 0; border-radius: 6px; cursor: pointer; vertical-align: middle;
  background: rgba(0, 0, 0, .3); box-shadow: inset 0 0 0 1.5px var(--line-hi); transition: background-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease, transform 160ms var(--ease); }
.sm-check::after { content: ""; position: absolute; left: 7.5px; top: 3.5px; width: 5px; height: 10px; border: solid var(--black); border-width: 0 2.2px 2.2px 0; transform: rotate(45deg) scale(.6); opacity: 0;
  transition: opacity var(--dur-fast) ease, transform 180ms var(--ease); }
.sm-check:checked { background: var(--bone); box-shadow: none; }
.sm-check:checked::after { opacity: 1; transform: rotate(45deg); }
.sm-check:active { transform: scale(.9); }
.sm-check:disabled { cursor: default; opacity: .7; }
@media (hover: hover) and (pointer: fine) { .sm-check:not(:checked):hover { box-shadow: inset 0 0 0 1.5px var(--bone-2); } }
.is-copied .sm-check:not(:checked) { box-shadow: inset 0 0 0 1.5px var(--t-titan), 0 0 0 3px rgba(240, 200, 112, .14); }

.sm :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sm-msg:focus-visible { outline-offset: 0; }

/* earlier artists still to message, under their own line */
.sm-sep th { padding: 26px 12px 10px; text-align: left; font: 400 17px/1.2 var(--serif); color: var(--bone); border-bottom: 1px solid var(--line-hi); }
.sm-sep th span { margin-left: 6px; font: 500 14px/1 var(--sans); color: var(--bone-3); }

/* nothing in the list yet */
.sm-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 48px var(--pad-panel) 64px; text-align: center; }
.sm-empty h3 { margin: 0; font: 400 clamp(26px, 2.4vw, 36px)/1.15 var(--serif); color: #fff; }
.sm-empty p { margin: 0 0 12px; max-width: 46ch; color: var(--bone-2); font-size: 16px; line-height: 1.55; }
.sm-empty .btn { min-width: 240px; }

/* ---------- wide screens: genre and city get their own columns ---------- */
@media (min-width: 1640px) {
  .sm-k-genre, .sm-k-city { display: table-column; }
  .sm-table .sm-c-genre, .sm-table .sm-c-city { display: table-cell; }
  .sm-k-artist { width: 20%; }
  .sm-meta { display: none; }
}
@media (max-width: 1180px) { .sm-k-act { width: 220px; } .sm-k-status { width: 112px; } }
@media (max-width: 1060px) and (min-width: 861px) {
  .sm-k-f { display: none; } .sm-table .sm-c-f { display: none; }
  .sm-k-act { width: 64px; }
  .sm-c-act .btn { padding: 0; } .sm-c-act .btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* ---------- phones: each artist is a small block; the page scrolls, not the sheet ---------- */
@media (max-width: 860px) {
  .stagebox.is-simple { place-items: start stretch; }
  #panel.is-simple { height: auto; max-height: none; overflow: visible; }
  .sm { height: auto; }
  .sm-head { padding: 18px 16px 12px; gap: 12px; }
  .sm-progress { width: 100%; }
  .sm-head .btn { width: 100%; }
  .sm > .hm-trial { margin: 0 16px 12px; }
  .sm-sheet { overflow: visible; padding: 0 12px 16px; }
  .sm-table, .sm-table tbody { display: block; }
  .sm-table colgroup, .sm-table thead { display: none; }
  .sm-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; grid-template-areas: "check artist f" ". msg msg" ". status status" ". act act"; align-items: center; gap: 6px 10px;
    padding: 12px 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .sm-row > td { display: block; padding: 0; border: 0; }
  .sm-row > .sm-c-check { grid-area: check; }
  .sm-row > .sm-c-artist { grid-area: artist; }
  .sm-row > .sm-c-f { grid-area: f; display: block !important; font-size: 14px; }
  .sm-row > .sm-c-msg { grid-area: msg; }
  .sm-row > .sm-c-status { grid-area: status; }
  .sm-row > .sm-c-act { grid-area: act; }
  .sm-row.is-next > td:first-child { box-shadow: none; }
  .sm-row.is-next { box-shadow: inset 2px 0 0 var(--red-hi); }
  .sm-msg { margin: 0; padding: 4px 0; }
  .sm-c-act .btn span { position: static; width: auto; height: auto; clip: auto; }
  .sm-row > .sm-c-act .btn { min-height: 44px; }
  .sm-row.is-to:not(.is-next) > .sm-c-status { display: none; } /* the empty box says it; Copied and Messaged still show */
  .sm-sep { display: block; }
  .sm-sep th { display: block; padding: 22px 8px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .sm-meter > i, .sm-check, .sm-check::after, .sm-row, .sm-msg { transition: none; }
}
