/* Flow update panel. Same language as the Flow site: true black, white type, white primary actions. */
:root {
  color-scheme: dark;
  --fg: #f5f5f5;
  --mute: #8d8d8d;
  --dim: #5a5a5a;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.2);
  --field: rgba(255, 255, 255, 0.045);
  --good: #7ad7a4;
  --bad: #ff8a80;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Display", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Cascadia Code", Consolas, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

body {
  background: #000;
  color: var(--fg);
  font: 400 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; }
h2 { font-size: 20px; line-height: 1.25; }
h3 { font-size: 15px; letter-spacing: -0.01em; }
strong { font-weight: 600; color: var(--fg); }
code, .mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0; }
code { color: var(--mute); }
.wrap { overflow-wrap: anywhere; min-width: 0; }
.lede { color: var(--mute); max-width: 56ch; }
.fine { margin-top: 16px; color: var(--dim); font-size: 13px; }
.dim { color: var(--mute); }

/* ---------- controls ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.5s var(--ease), background-color 0.25s var(--ease), border-color 0.25s var(--ease), opacity 0.25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn.primary { background: var(--fg); color: #000; }
.btn.primary:hover { background: #fff; transform: translate3d(0, -1px, 0); }
.btn.ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.07); }
.btn:active { transform: scale(0.98); transition-duration: 0.1s; }
.btn:disabled { cursor: not-allowed; transform: none; }
.btn.primary:disabled { background: transparent; color: var(--dim); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:disabled { opacity: 0.4; }
.btn.small { height: 34px; padding: 0 13px; font-size: 13px; }
.btn.wide { width: 100%; height: 52px; font-size: 15px; border-radius: 12px; }

.textlink { color: var(--mute); font-size: 14px; text-underline-offset: 4px; text-decoration-color: var(--line-strong); transition: color 0.25s var(--ease); }
.textlink:hover { color: var(--fg); }

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-label { font-size: 13px; color: var(--mute); }
.hint { font-size: 12.5px; color: var(--dim); }

input:not([type="file"]), select {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
input.mono { font-family: var(--mono); font-size: 13px; }
input::placeholder { color: var(--dim); }
input:not([type="file"]):hover, select:hover { border-color: var(--line-strong); }
select {
  appearance: none;
  padding-right: 36px;
  text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%238d8d8d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 12px;
}
select option { background: #111; color: var(--fg); }

input.code {
  width: 10.5em;
  font-family: var(--mono);
  font-size: 17px;
  letter-spacing: 0.32em;
  text-align: center;
  padding: 0 0 0 0.32em;
  font-variant-numeric: tabular-nums;
}
input.code::placeholder { letter-spacing: 0.32em; }

input[type="file"] { flex: 1 1 220px; min-width: 0; color: var(--mute); font: inherit; font-size: 13px; }
input[type="file"]::file-selector-button {
  height: 42px;
  margin-right: 12px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--fg);
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.25s var(--ease);
}
input[type="file"]::file-selector-button:hover { background: rgba(255, 255, 255, 0.07); }

:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 8px; }
input:not([type="file"]):focus-visible, select:focus-visible { outline-offset: 0; border-color: transparent; border-radius: 10px; }

.msg { margin-top: 14px; padding: 10px 13px; border-radius: 10px; font-size: 13.5px; overflow-wrap: anywhere; }
.msg.bad { color: var(--bad); background: rgba(255, 138, 128, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 138, 128, 0.22); }
.msg.good { color: var(--good); background: rgba(122, 215, 164, 0.08); box-shadow: inset 0 0 0 1px rgba(122, 215, 164, 0.22); }

.pill {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 99px;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pill.empty { color: var(--dim); font-weight: 400; box-shadow: inset 0 0 0 1px var(--line); }
.pill.on { margin-left: 10px; height: 20px; padding: 0 8px 0 7px; gap: 6px; color: var(--good); box-shadow: inset 0 0 0 1px rgba(122, 215, 164, 0.3); font-size: 11.5px; }
.pill.on::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--good); }

/* ---------- sign in ---------- */

.gate {
  min-height: 100vh;
  min-height: 100svh;
  width: min(100%, 392px);
  margin: 0 auto;
  padding: 40px 24px 12vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  text-align: center;
}
.gate .mark { width: 48px; height: auto; margin: 0 auto 26px; }
.gate h1 { font-size: 30px; letter-spacing: -0.035em; line-height: 1.1; }
.gate .lede { margin: 12px auto 30px; }
.gate-form { display: flex; flex-direction: column; gap: 16px; text-align: left; }
.gate-form .field { align-items: center; gap: 10px; }
.gate-form input.code { width: 100%; height: 60px; font-size: 26px; border-radius: 12px; }
.gate .textlink { margin-top: 22px; }
.gate .msg { text-align: left; }

/* ---------- shell ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 34px;
  background: #000;
  box-shadow: 0 1px 0 var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; }
.brand img { width: 20px; height: auto; display: block; }
.brand span { padding-left: 12px; margin-left: 2px; border-left: 1px solid var(--line-strong); color: var(--mute); font-weight: 400; }
.who { display: flex; align-items: center; gap: 14px; min-width: 0; color: var(--mute); font-size: 14px; }

.page { width: min(100%, 1180px); margin: 0 auto; padding: 0 34px 96px; }

/* ---------- what is live ---------- */

.live { padding: 64px 0 44px; }
.live h1 { font-size: clamp(38px, 6.2vw, 68px); letter-spacing: -0.05em; line-height: 1; }
.live .lede { margin-top: 16px; font-size: 16px; }
.facts { display: flex; flex-wrap: wrap; gap: 22px 48px; margin-top: 34px; }
.facts dt { font-size: 13px; color: var(--mute); }
.facts dd { margin-top: 3px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }

.live.enter h1 { animation: rise 0.9s var(--ease) both; }
.live.enter .lede, .live.enter .facts { animation: rise 0.9s var(--ease) 0.12s both; }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 14px, 0); } to { opacity: 1; transform: none; } }

/* ---------- files + publishing ---------- */

.bench {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.files, .publish { padding: 30px 32px 32px; min-width: 0; }
.bench > .publish { border-left: 1px solid var(--line); }
.download {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  min-width: 0;
}
.download-about, .download-form { padding: 0 32px; min-width: 0; }
.download-form { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: end; gap: 14px 14px; }
.download-form .grow { min-width: 0; }
.download-form input.code { width: 9em; }
.download > div:last-child { grid-column: 1 / -1; padding: 0 32px; }
.bench h2 + .lede { margin-top: 6px; font-size: 14px; }

.slot { padding: 22px 0; border-top: 1px solid var(--line); }
.files .lede + .slot { margin-top: 24px; }
.slot:last-child { padding-bottom: 0; }
.slot-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.slot-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 6px; color: var(--mute); font-size: 13.5px; }
.slot-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }

.progress { height: 3px; margin-top: 16px; border-radius: 2px; background: var(--line); overflow: hidden; }
.progress > div { height: 100%; width: 0; background: var(--fg); transition: width 0.2s linear; }

.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; margin-top: 24px; }
.fields .span { grid-column: 1 / -1; }
.confirm { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px 18px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.confirm .btn { margin-top: 27px; }

/* ---------- history ---------- */

.history { margin-top: 64px; }
.tabs { display: flex; gap: 28px; box-shadow: inset 0 -1px 0 var(--line); }
.tab {
  padding: 0 0 14px;
  border: 0;
  background: none;
  color: var(--mute);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: inset 0 -2px 0 transparent;
  transition: color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.tab:hover { color: var(--fg); }
.tab[aria-selected="true"] { color: var(--fg); box-shadow: inset 0 -2px 0 var(--fg); }

.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 13px 20px 13px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th:last-child, td:last-child { padding-right: 0; }
th { padding-top: 20px; color: var(--mute); font-weight: 400; font-size: 13px; white-space: nowrap; }
td.num, td.when { white-space: nowrap; font-variant-numeric: tabular-nums; }
td.when { color: var(--mute); }
td code.wrap { display: block; max-width: 34ch; }
tr.alarm td:nth-child(3) { color: var(--bad); }
.none { padding: 36px 0; color: var(--mute); }

/* ---------- small screens ---------- */

@media (max-width: 920px) {
  .bench { grid-template-columns: minmax(0, 1fr); }
  .bench > .publish { border-left: 0; border-top: 1px solid var(--line); }
  .download { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
@media (max-width: 600px) {
  .top { padding: 14px 18px; }
  .brand span { display: none; }
  .page { padding: 0 18px 72px; }
  .live { padding: 44px 0 32px; }
  .facts { gap: 18px 32px; }
  .files, .publish { padding: 24px 20px 26px; }
  .download-about, .download-form, .download > div:last-child { padding: 0 20px; }
  .download-form { grid-template-columns: minmax(0, 1fr); }
  .download-form input.code, .download-form .btn { width: 100%; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .confirm .btn { margin-top: 0; width: 100%; }
  .confirm .field, input.code { width: 100%; }
  .tabs { gap: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
