/* BlindSpot on the web.
   Colour and type are the report's own (auditor_v2/listing_score.css): Intent Farm blue as the only
   colour, navy ink, cool greys, Plus Jakarta Sans with Instrument Serif italic as the one accent.
   Sizes come from one scale (12, 13, 14, 15, 18, 24, 30) and spaces from one (4, 8, 12, 16, 24, 32, 48, 64). */

:root {
  --ink: #0B1533;
  --body: #3A4258;
  --muted: #6B7289;
  --blue: #1B4ECD;
  --navy: #092472;
  --pale: #BFD0FF;
  --surface: #F5F7FC;
  --tint: #E8EEFB;
  --line: #E4E7EF;
  --field: #C9CEDC;
  --green: #17764F;
  --green-tint: #DDF1E7;
  --amber: #8A5609;
  --amber-tint: #FAEFD9;
  --coral: #B8361B;
  --coral-tint: #FDE6DE;
  --sans: "Plus Jakarta Sans", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --radius: 10px;
  --page: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: #fff; color: var(--body);
       font: 400 15px/1.55 var(--sans); font-variant-numeric: tabular-nums; }
h1, h2, p, ul, fieldset { margin: 0; padding: 0; }
ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: var(--blue); }
b { font-weight: 600; color: var(--ink); }

/* ---- Top bar and footer ---- */
.top { display: flex; align-items: center; gap: 32px; padding: 14px 32px; border-bottom: 1px solid var(--line); }
.mark { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.mark img { display: block; height: 24px; width: auto; }
.mark .rule { width: 1px; height: 20px; background: var(--line); }
.mark .name { font: italic 400 24px/1 var(--serif); color: var(--ink); }
.top nav { display: flex; gap: 4px; }
.top nav a { padding: 6px 12px; border-radius: 8px; color: var(--body); text-decoration: none; font-weight: 500; font-size: 14px; }
.top nav a:hover { background: var(--surface); }
.top nav a.here { background: var(--tint); color: var(--navy); font-weight: 600; }
.who { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--muted); }
.foot { margin-top: auto; padding: 24px 32px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

/* ---- Page frames ---- */
main { width: 100%; max-width: var(--page); margin: 0 auto; padding: 48px 32px 64px; }
.wide main { max-width: 1360px; }
.narrow main { max-width: 520px; padding-top: 96px; }

h1 { font: 600 30px/1.2 var(--sans); color: var(--ink); letter-spacing: -0.02em; text-wrap: balance; }
h1 em { font: italic 400 1.14em/1 var(--serif); letter-spacing: 0; color: var(--blue); }
h2 { font: 600 18px/1.3 var(--sans); color: var(--ink); letter-spacing: -0.01em; }
.lede { margin-top: 16px; font-size: 15px; }
.fine { margin-top: 12px; max-width: 86ch; font-size: 13px; line-height: 1.5; color: var(--muted); }

.flash { margin-bottom: 24px; padding: 12px 16px; border-radius: var(--radius); font-weight: 500; font-size: 14px; }
.flash.good { background: var(--green-tint); color: var(--green); }
.flash.bad { background: var(--coral-tint); color: var(--coral); }

/* ---- Forms ---- */
label, legend { display: block; font-size: 13px; font-weight: 600; color: var(--ink); }
input[type="text"], input[type="email"], input[type="date"], input:not([type]), select {
  width: 100%; margin-top: 8px; padding: 11px 12px; border: 1px solid var(--field); border-radius: 8px; background: #fff;
  color: var(--ink); font: 400 15px/1.3 var(--sans); font-variant-numeric: tabular-nums;
}
input::placeholder { color: #9CA3B5; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
input[type="text"]:focus, input[type="email"]:focus, input:not([type]):focus { border-color: var(--blue); }
.stack { display: grid; margin-top: 32px; }
.stack > button { margin-top: 24px; }

button, .button {
  display: inline-flex; align-items: center; justify-content: center; padding: 12px 20px; border: 1px solid var(--blue); border-radius: 8px;
  background: var(--blue); color: #fff; font: 600 15px/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s;
}
button:hover, .button:hover { background: var(--navy); border-color: var(--navy); }
button.small, .button.small { padding: 8px 12px; font-size: 13px; }
button.quiet, .button.quiet { background: #fff; color: var(--navy); border-color: var(--field); }
button.quiet:hover, .button.quiet:hover { background: var(--surface); border-color: var(--blue); }
button.plain { padding: 0; border: 0; background: none; color: var(--blue); font: 500 13px/1 var(--sans); }
button.plain:hover { background: none; text-decoration: underline; }
.view { font-size: 13px; font-weight: 600; text-decoration: none; }
.view:hover { text-decoration: underline; }

/* ---- Logging in ---- */
.door .button { margin-top: 32px; }

/* ---- Reports: the request band. The one field of brand blue on the page. ---- */
.band { background: var(--blue); color: #fff; }
.band .inner { max-width: var(--page); margin: 0 auto; padding: 40px 32px 32px; }
.band-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.band h1 { color: #fff; }
.band h1 em { color: var(--pale); }
.left { display: flex; gap: 24px; flex-wrap: wrap; font-size: 13px; color: var(--pale); }
.left b { color: #fff; }
.ask { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: end; margin-top: 24px; }
.ask label, .ask legend { color: var(--pale); font-weight: 500; }
.ask .field input { height: 48px; margin-top: 8px; border-color: transparent; font-size: 15px; }
.ask .field input:focus { border-color: #fff; }
.ask input:focus-visible, .ask button:focus-visible, .segments input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }
.segments { display: flex; height: 48px; margin-top: 8px; padding: 4px; border-radius: 8px; background: rgba(9, 36, 114, .55); }
.segments label { display: flex; cursor: pointer; }
.segments input { position: absolute; opacity: 0; pointer-events: none; }
.segments span { display: flex; align-items: center; padding: 0 16px; border-radius: 6px; font-size: 14px; font-weight: 600; color: var(--pale); white-space: nowrap; transition: background .15s, color .15s; }
.segments label:hover span { color: #fff; }
.segments input:checked + span { background: #fff; color: var(--navy); }
.ask button { height: 48px; padding: 0 24px; background: #fff; border-color: #fff; color: var(--navy); }
.ask button:hover { background: var(--tint); border-color: var(--tint); }
.band-note { margin-top: 16px; max-width: 92ch; font-size: 13px; line-height: 1.5; color: var(--pale); }

/* ---- Tables: hairlines, no boxes ---- */
.list-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 8px; }
.list-head p { font-size: 13px; color: var(--muted); }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { padding: 12px 16px 12px 0; text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--field); white-space: nowrap; }
td { padding: 16px 16px 16px 0; vertical-align: top; border-bottom: 1px solid var(--line); }
th:last-child, td:last-child { padding-right: 0; }
.num { text-align: right; }
.when { white-space: nowrap; }
.brand { white-space: nowrap; }
.soft { color: var(--muted); }
.asin { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.why { display: block; margin-top: 8px; max-width: 52ch; font-size: 13px; color: var(--coral); }
.why.calm { color: var(--body); }
.get { white-space: nowrap; text-align: right; }
.get .view { margin-left: 12px; }
.none td { padding: 48px 0; text-align: center; color: var(--muted); border-bottom: 0; }
.cards .what { width: 36%; }

.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.pill.good { background: var(--green-tint); color: var(--green); }
.pill.work { background: var(--tint); color: var(--navy); }
.pill.wait { background: var(--amber-tint); color: var(--amber); }
.pill.bad { background: var(--coral-tint); color: var(--coral); }

/* ---- Admin: page head, tools, the numbers that matter ---- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 48px; flex-wrap: wrap; margin-bottom: 32px; }
.span { margin-top: 4px; font-size: 13px; color: var(--muted); }
.toolbar { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.toolbar label { font-size: 12px; font-weight: 500; color: var(--muted); }
.toolbar select, .toolbar input[type="date"] { width: auto; min-width: 152px; margin-top: 4px; padding: 8px 12px; font-size: 14px; }

.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 48px; border-top: 1px solid var(--field); border-bottom: 1px solid var(--line); }
.kpis li { padding: 24px 24px 24px 0; }
.kpis li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.kpis span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.kpis b { display: block; margin-top: 8px; font: 600 30px/1.1 var(--sans); letter-spacing: -0.02em; color: var(--ink); }
.kpis i { display: block; margin-top: 8px; font-style: normal; font-size: 13px; line-height: 1.4; color: var(--muted); }
.kpis li:first-child b { color: var(--blue); }
.kpis .alert b { color: var(--amber); }
.kpis a { color: var(--amber); font-weight: 600; }

.list-head .push { margin-left: auto; }
.usage .by { max-width: 200px; overflow-wrap: anywhere; }
.usage .what { width: 26%; }
.usage .cost { white-space: nowrap; }
tr.more td { padding: 0 0 16px; border-bottom: 1px solid var(--line); }
tr:has(+ tr.more) td { border-bottom: 0; }
.held { display: flex; gap: 24px; align-items: flex-start; justify-content: space-between; padding: 16px; border-radius: 8px; background: var(--amber-tint); font-size: 13px; }
.held.bad { background: var(--coral-tint); }
.held ul { margin-top: 8px; padding-left: 16px; list-style: disc; display: grid; gap: 4px; }
.held p { margin-top: 8px; word-break: break-word; }
.held form { flex: none; }

/* ---- People: a list to read, a sheet to add or change one person ---- */
.adder { margin-bottom: 32px; }
.adder summary { list-style: none; width: max-content; }
.adder summary::-webkit-details-marker { display: none; }
.adder[open] summary { background: #fff; color: var(--navy); border-color: var(--field); }
.sheet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; max-width: 720px; margin-top: 16px; padding: 24px; border-radius: var(--radius); background: var(--surface); }
.sheet .caps, .sheet .tick, .sheet .actions, .sheet .fine { grid-column: 1 / -1; }
.sheet .fine { margin-top: 0; }
.caps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.caps legend { margin-bottom: 4px; }
.caps label { font-weight: 500; color: var(--muted); }
.caps input { text-align: right; }
.tick { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.tick input { width: 16px; height: 16px; flex: none; accent-color: var(--blue); }
.roles { display: grid; gap: 12px; grid-column: 1 / -1; }
.roles legend { margin-bottom: 12px; }
.roles .tick { align-items: flex-start; font-weight: 400; color: var(--body); }
.roles .tick input { margin-top: 3px; }
.plain-sheet { grid-template-columns: minmax(0, 1fr); max-width: none; margin-top: 32px; padding: 0; background: none; }
.back { margin-bottom: 24px; }
.aside { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.aside form { margin-top: 16px; }
.people .person { width: 28%; }
.people .use { white-space: nowrap; color: var(--muted); }
.people .use .asin { display: inline; margin-left: 4px; }
.people tr.off td, .people tr.off b { color: var(--muted); }

/* ---- Narrow screens ---- */
@media (max-width: 900px) {
  .top { flex-wrap: wrap; gap: 12px 16px; padding: 12px 16px; }
  .top nav { order: 3; width: 100%; }
  .who span { display: none; }
  main, .narrow main { padding: 32px 16px 48px; }
  .foot { padding: 16px; }
  .band .inner { padding: 32px 16px 24px; }
  .ask { grid-template-columns: minmax(0, 1fr); }
  .segments label { flex: 1; }
  .segments span { flex: 1; justify-content: center; }
  .held { flex-direction: column; }

  /* The user's own list becomes one block per report, so nothing scrolls sideways:
     brand and status on the first line, the product under them, then the version and the time. */
  table.cards thead { display: none; }
  table.cards, table.cards tbody { display: block; }
  table.cards tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  table.cards td { display: block; width: auto; padding: 0; border: 0; }
  table.cards .brand { grid-area: 1 / 1; align-self: center; font-size: 13px; white-space: normal; }
  table.cards .state { grid-area: 1 / 2; justify-self: end; }
  table.cards .what { grid-column: 1 / -1; width: auto; font-size: 15px; font-weight: 600; color: var(--ink); }
  table.cards .what .asin, table.cards .what .why { font-weight: 400; }
  table.cards .kind, table.cards .when { margin-top: 4px; font-size: 13px; color: var(--muted); }
  table.cards .when { justify-self: end; }
  table.cards .get { grid-column: 1 / -1; margin-top: 12px; text-align: left; }
  table.cards .get:empty { display: none; }
  table.cards tr.none { display: block; padding: 0; border: 0; }
  table.cards tr.more { display: block; padding: 0 0 16px; }
  table.cards .by { grid-column: 1 / -1; font-size: 13px; color: var(--muted); max-width: none; }
  table.cards .by .asin { display: inline; margin-left: 4px; }
  table.cards .cost { grid-column: 1 / -1; text-align: left; font-size: 13px; }
  table.cards .cost .asin { display: inline; margin-left: 8px; }
  table.cards td.empty { display: none; }
  table.usage .by { grid-area: 1 / 1; }
  table.usage .state { grid-area: 1 / 2; }
  table.usage .brand { grid-area: auto / 1 / auto / -1; margin-top: 4px; }
  table.people .person { grid-area: 1 / 1; width: auto; }
  table.people .state { grid-area: 1 / 2; }
  table.people .use { grid-column: 1 / -1; text-align: left; font-size: 13px; }
  table.people .use::before { content: attr(data-label) ": "; }
  table.people .when { justify-self: start; grid-column: 1 / -1; }
  table.people .when::before { content: "Last login: "; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis li, .kpis li + li { padding: 16px 12px 16px 0; border-left: 0; border-top: 1px solid var(--line); }
  .kpis li:nth-child(-n+2) { border-top: 0; }
  .kpis b { font-size: 24px; }
  .toolbar { width: 100%; }
  .toolbar label, .toolbar select, .toolbar input[type="date"] { width: 100%; min-width: 0; }
  .sheet, .caps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet .wide-field { grid-column: 1 / -1; }
}
