:root {
  color-scheme: dark;
  --ink: #e7e1d6;
  --muted: #a39888;
  --line: #3a342c;
  --paper: #16130f;
  --panel: #221c16;
  --amber: #e2a23a;
  --amber-ink: #1a1206;
  font-family: "Segoe UI", Candara, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(226, 162, 58, 0.16), transparent 55%),
    var(--paper);
  color: var(--ink);
}

a { color: var(--amber); }

.wrap {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 64px;
}

.eyebrow {
  margin: 0 0 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--amber);
}

h1 {
  margin: 0 0 12px;
  font-size: 40px;
  line-height: 1.05;
  font-weight: 650;
}

.lead {
  max-width: 68ch;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}

.principle {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 12px;
  margin: 28px 0;
}

.principle article, form, .note {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.principle article { padding: 16px 18px 8px; }
.principle h2, form h2 { margin: 0 0 8px; font-size: 16px; }
.principle p, .note p { color: var(--muted); line-height: 1.45; }

form { padding: 18px; }
form.login-form > button { margin-top: 28px; }
form.login-form .hint { margin: 14px 0 0; }
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
label { display: block; font-size: 13px; color: var(--muted); }
input[type="text"], input[type="url"], input[type="email"], input[type="password"], textarea, select, input[type="file"] {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #100e0b;
  color: var(--ink);
  font: inherit;
}
textarea { min-height: 280px; resize: vertical; font-family: Consolas, "Courier New", monospace; font-size: 13px; }
textarea.short { min-height: 64px; font-family: "Segoe UI", Candara, sans-serif; font-size: 14px; }
.span-2 { grid-column: 1 / -1; }
.formats { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 8px 0 16px; }
.formats label { color: var(--ink); }
.unit-switch { display: flex; gap: 8px; margin: 0; }
.size-head { display: flex; align-items: center; justify-content: flex-start; gap: 14px; margin: 8px 0 6px; }
.size-head h2 { margin: 0; }
.step-upload { display: block; margin: 8px 0 0; }
.size-grid { display: flex; flex-direction: column; gap: 8px; margin: 0 0 18px; }
.size-line { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.size-line h3 { margin: 0; min-width: 52px; font-size: 15px; }
.size-line label { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); }
.size-line input[type="text"] { width: 5.5em; margin: 0; padding: 8px 10px; }
button, a.button {
  border: 0;
  border-radius: 999px;
  background: var(--amber);
  color: var(--amber-ink);
  font: inherit;
  font-weight: 700;
  padding: 12px 22px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button.small { padding: 6px 12px; font-size: 13px; }
button.ghost, a.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.note { margin-top: 16px; padding: 4px 18px; }
code { color: var(--ink); }
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  margin-bottom: 22px;
}
.nav a { text-decoration: none; }
.brand { line-height: 0; margin-right: 10px; }
.brand img { height: 52px; width: auto; display: block; }
.nav .who { margin-left: auto; color: var(--muted); }
form.inline, form.flat {
  display: inline;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
}
form.flat { display: block; }
form.inline select, form.inline button { width: auto; margin-top: 0; }
.flash {
  padding: 12px 14px;
  border: 1px solid var(--amber);
  border-radius: 12px;
  background: rgba(226, 162, 58, 0.08);
}
.wrap.narrow { width: min(640px, calc(100% - 32px)); }
.wrap.wide { width: min(1360px, calc(100% - 32px)); }
table.dmx td.wrap { white-space: normal; min-width: 120px; }
table.editor input {
  width: 100%;
  min-width: 72px;
  margin: 0;
  padding: 6px 8px;
  font-size: 13px;
}
table.editor th, table.editor td { padding: 6px; }
table.editor td:last-child { width: 1%; }
.hint, .muted, .comment { color: var(--muted); }
.comment { margin: 8px 0 0; font-size: 13px; }
.stars { font-size: 16px; letter-spacing: 0.04em; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; background: var(--panel); }
th, td { padding: 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: var(--muted); font-weight: 650; }
.file-cell { white-space: nowrap; }
.file-cell a, .file-cell button, .file-cell form { margin-right: 6px; }
fieldset.roles {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
fieldset.roles legend { padding: 0 6px; color: var(--muted); }
fieldset.roles label { display: inline-block; margin-right: 16px; color: var(--ink); }
main h2 { margin: 28px 0 10px; }
.rate { display: grid; gap: 8px; min-width: 180px; }
.rate label { margin: 0; }
.search-bar { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: end; margin: 0 0 14px; }
.brand-list { display: flex; flex-direction: column; gap: 10px; }
.brand-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.brand-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.brand-name { font-size: 18px; }
.brand-count { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 13px; }
.brand-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  flex: 0 0 auto;
}
.brand-block.open .brand-chevron { transform: rotate(45deg); }
.brand-panel[hidden] { display: none; }
.brand-block.open .brand-toggle { box-shadow: inset 0 -1px 0 var(--line); }
.brand-panel .table-wrap { border: 0; border-radius: 0; }
.download-sheet { max-height: calc(100vh - 180px); overflow: auto; }
.download-sheet thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel);
  box-shadow: 0 1px 0 var(--line);
}
button.sort {
  background: transparent;
  color: inherit;
  border: 0;
  border-radius: 0;
  font: inherit;
  font-weight: 650;
  padding: 0;
  text-align: left;
  cursor: pointer;
}
button.sort .dir { display: inline-block; width: 0.9em; color: var(--amber); }
button.share {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 6px 13px 6px 10px;
  border: 1px solid #2f6fe0;
  border-radius: 999px;
  background: #2f6fe0;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset;
}
button.share svg {
  width: 15px;
  height: 15px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
button.share .ico-check { display: none; }
button.share:hover,
button.share.copied {
  background: #4b86f0;
  color: #fff;
  border-color: #4b86f0;
}
button.share.copied .ico-share { display: none; }
button.share.copied .ico-check { display: block; }
tr.go { cursor: pointer; }
tr.go:hover td { background: rgba(226, 162, 58, 0.06); }
.search { max-width: 420px; flex: 1; }
.search input { margin-top: 6px; }
button.maker, button.linkish {
  background: none;
  border: 0;
  border-radius: 0;
  color: var(--amber);
  font-weight: 650;
  padding: 0;
  display: inline;
}
button.maker { text-align: left; }
.account-tools { margin-top: 28px; }
#password-form { margin-top: 12px; }
#filter-note { margin: 0 0 4px; }

body.home {
  background:
    radial-gradient(880px 420px at 12% -10%, rgba(226, 162, 58, 0.18), transparent 58%),
    radial-gradient(640px 360px at 96% 0%, rgba(14, 174, 178, 0.12), transparent 55%),
    var(--paper);
}
body.home .nav {
  margin-bottom: 42px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
body.home .hero { max-width: 740px; }
body.home h1 {
  font-size: 48px;
  letter-spacing: -0.03em;
  line-height: 1.04;
}
body.home .lead { font-size: 18px; }
body.home .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
body.home .promo {
  margin: 28px 0 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}
body.home .promo { position: relative; }
body.home .promo video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #000;
}
body.home .promo-sound {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: #2f6fe0;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
body.home .promo-sound.on { background: #214e9e; }
body.home .home-formats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
}
body.home .home-formats li {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}
body.home .home-cards {
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}
body.home .home-cards article {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 22px 22px 18px;
}
body.home .home-cards article:nth-child(1) {
  background:
    linear-gradient(180deg, rgba(14, 174, 178, 0.09), transparent 46%),
    var(--panel);
}
body.home .home-cards .figure {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1;
}
body.home .home-cards h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 18px;
}
body.home .home-cards article > p:nth-child(3) { flex: 1; }
body.home .home-cards article > p:last-child { margin: 18px 0 0; }
body.home .home-cards a { font-weight: 650; }

@media (max-width: 800px) {
  .principle, .grid { grid-template-columns: 1fr; }
  h1 { font-size: 32px; }
  .nav .who { margin-left: 0; }
  body.home h1 { font-size: 34px; }
  body.home .home-cards { grid-template-columns: 1fr; }
}
