:root {
  --ink: #22262f;
  --soft: #5c626f;
  --faint: #8a8f99;
  --line: #e2e0db;
  --line-strong: #c9c7c1;
  --bg: #ffffff;
  --wash: #f6f5f2;
  --accent: #22262f;
  --danger: #b3261e;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }

/* One window: a single column whose parts meet at hairlines. */
.shell {
  max-width: 720px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-top: 4px solid var(--accent);
}

.top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.app { font-weight: 700; letter-spacing: .02em; }
.who { color: var(--soft); display: flex; gap: 12px; align-items: center; }
.textbtn { background: none; border: 0; padding: 0; color: var(--soft); text-decoration: underline; cursor: pointer; }

.brands { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.brands a {
  padding: 13px 4px 10px;
  text-align: center; text-decoration: none;
  font-size: 14px; font-weight: 600; color: var(--faint);
  border-bottom: 3px solid transparent;
  border-right: 1px solid var(--line);
}
.brands a:last-child { border-right: 0; }
.brands a.on { color: var(--ink); border-bottom-color: var(--a); }

section { border-bottom: 1px solid var(--line); }
.label {
  font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  color: var(--faint); margin: 0 0 3px;
}

.facts { padding: 14px 16px; display: grid; gap: 12px; }
.facts p { margin: 0; }
.facts .note { color: var(--soft); font-size: 13px; margin-top: 2px; }

.dates { display: grid; grid-template-columns: 1fr 1fr; }
.dates > div { padding: 12px 16px; }
.dates > div + div { border-left: 1px solid var(--line); }
.dates .big { font-size: 19px; font-weight: 700; line-height: 1.2; }
.dates .when { color: var(--soft); font-size: 13px; }

.lineup header { padding: 14px 16px 10px; }
.head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
h2 { font-size: 17px; margin: 0; }
.state { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--soft); white-space: nowrap; }
.state.locked { color: var(--ink); }
.state.locked::before {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px;
  background: var(--accent);
}
.meta { margin: 3px 0 0; color: var(--soft); font-size: 13px; }
.lineup .tools { margin-top: 10px; }

ol.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row + .row { border-top: 1px solid var(--line); }
.line {
  display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center;
  padding: 9px 16px; min-height: 48px;
}
.num { color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; }
.title {
  background: none; border: 0; padding: 3px 0; margin: 0; text-align: left; cursor: pointer;
  font-size: 16px; font-weight: 500; line-height: 1.3; width: 100%;
}
.what { min-width: 0; }
.sub { font-size: 12px; color: var(--soft); margin-top: 1px; }
.sub a { color: var(--ink); font-weight: 600; }
.row.done .title { color: var(--faint); }
.row.empty .line { color: var(--faint); }
.row.empty .slot { font-size: 14px; }
.sublabel { padding: 12px 16px 6px; border-top: 1px solid var(--line); }
.sublabel .label { margin: 0; }

select, input[type="text"], input[type="url"], input[type="email"], textarea {
  border: 1px solid var(--line-strong); border-radius: 3px; background: #fff;
  padding: 8px 10px; width: 100%;
}
select { width: auto; padding: 6px 8px; font-size: 14px; }
textarea { min-height: 110px; resize: vertical; }
select:focus, input:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--ink); outline-offset: 1px;
}
/* 16px keeps iPhone Safari from zooming the page when a field is tapped. */
@media (pointer: coarse) {
  select, input[type="text"], input[type="url"], input[type="email"], textarea { font-size: 16px; }
}

.btn {
  border: 1px solid var(--line-strong); border-radius: 3px; background: #fff;
  padding: 8px 12px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.danger { color: var(--danger); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: default; }

.add { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.line form.add { grid-column: 2 / -1; }

.detail { padding: 4px 16px 16px; background: var(--wash); border-top: 1px solid var(--line); }
.detail form { display: grid; gap: 10px; padding-top: 10px; }
.detail label { display: grid; gap: 3px; }
.detail label > span { font-size: 12px; font-weight: 600; color: var(--soft); }
.detail .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.detail .actions .spacer { flex: 1; }
.detail dl { margin: 0; padding-top: 10px; display: grid; gap: 10px; }
.detail dt { font-size: 12px; font-weight: 600; color: var(--soft); }
.detail dd { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.none { color: var(--faint); margin: 0; padding-top: 10px; }

.error { padding: 10px 16px; background: #fdecea; color: var(--danger); border-bottom: 1px solid var(--line); font-size: 14px; }
.loading { padding: 24px 16px; color: var(--faint); }

a.btn { text-decoration: none; display: inline-block; }
.share { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; }
.kitrow { padding: 12px 16px 14px; }
.kitrow .share { padding-top: 4px; }

/* Editor kit and video brief */
.top a { color: var(--soft); }
.brief { padding: 16px; }
.brief h1 { font-size: 22px; line-height: 1.2; margin: 2px 0 14px; }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0 0 14px; }
.specs dt { font-size: 12px; font-weight: 600; color: var(--soft); }
.specs dd { margin: 1px 0 0; font-weight: 600; }
.golinks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; }
.kithead { padding: 14px 16px 12px; }
.kithead .head { align-items: center; }
.kitsec { padding: 12px 16px 14px; margin: 0; border: 0; border-bottom: 1px solid var(--line); min-width: 0; }
.kitsec .none { padding-top: 0; }
.kitsec .prose + .links { margin-top: 8px; }
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.links a { font-weight: 600; overflow-wrap: anywhere; }
fieldset.kitsec legend { padding: 0; float: left; width: 100%; margin-bottom: 6px; }
fieldset.kitsec .notes { clear: both; min-height: 84px; margin-bottom: 8px; }
.linkrow { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-bottom: 10px; }
.linkrow .l-url { grid-column: 1 / -1; }
.savebar {
  position: sticky; bottom: 0; display: flex; gap: 8px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--line-strong);
}

/* Sign-in page */
body.login { background: var(--wash); display: grid; place-items: start center; padding: 14vh 16px 0; }
.loginbox {
  width: 100%; max-width: 360px; display: grid; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--ink); padding: 22px 20px;
}
.loginbox h1 { font-size: 18px; margin: 0 0 6px; }
.loginbox label { font-size: 12px; font-weight: 600; color: var(--soft); }
.loginbox .btn { padding: 11px 12px; }
.msg { margin: 0; font-size: 14px; color: var(--soft); min-height: 1.4em; }
