/* Tokens match the DFS-AI website (v5, October 2026). */
:root {
  --ink: #1e1e4b;
  --ink-soft: #46496f;
  --paper: #ffffff;
  --mist: #f0f2f7;
  --rule: #d6d9e3;
  --rule-strong: #a9aec2;
  --marker: #f3d34a;
  --marker-deep: #e2bd1f;
  --error: #a4262c;

  --font: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-3: clamp(1.9rem, 1.4rem + 1.8vw, 2.6rem);

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;

  --wrap: 72rem;
  --measure: 40rem;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem);
  --radius-sm: 4px;
  --radius: 10px;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("manrope-latin.woff2") format("woff2");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.55;
}

[hidden] {
  display: none !important;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header, same brand block as the website */
.site-header {
  border-bottom: 1px solid var(--rule);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand img {
  width: 84px;
  height: auto;
}

.brand__name {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.account {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--step--1);
  color: var(--ink-soft);
  min-width: 0;
}

.account__email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Page */
.page > section,
.page > .status {
  max-width: var(--measure);
  padding: var(--space-5) 0;
}

h1 {
  margin: 0 0 var(--space-2);
  font-size: var(--step-3);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0 0 var(--space-4);
  color: var(--ink-soft);
}

.status {
  color: var(--ink-soft);
}

/* Form */
.field {
  margin-bottom: var(--space-3);
}

label,
.label {
  display: block;
  margin-bottom: var(--space-1);
  font-weight: 700;
}

input[type="text"],
input:not([type]) {
  width: 100%;
  max-width: 20rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.help {
  margin: var(--space-1) 0 0;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

.code {
  font-weight: 700;
  color: var(--ink);
}

.dropzone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 7.5rem;
  padding: var(--space-3);
  border: 1.5px dashed var(--rule-strong);
  border-radius: var(--radius);
  background: var(--mist);
  font-weight: 400;
  text-align: center;
  cursor: pointer;
}

.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone--active {
  border-color: var(--ink);
  border-style: solid;
}

.dropzone:focus-within {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

/* Upload queue: progress is drawn as a highlighter stroke behind the file name */
.queue {
  margin: 0 0 var(--space-3);
  padding: 0;
  list-style: none;
}

.queue__item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem var(--space-2);
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--rule);
}

.queue__name {
  margin-left: -0.15em;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* An inline background flows across wrapped lines in reading order, like a highlighter. */
.queue__mark {
  padding: 0.05em 0.15em;
  border-radius: 3px;
  background-image: linear-gradient(var(--marker), var(--marker));
  background-repeat: no-repeat;
  background-size: calc(var(--progress, 0) * 100%) 100%;
  transition: background-size 200ms linear;
}

.queue__item--done .queue__mark {
  background-size: 100% 100%;
}

.queue__size {
  font-size: var(--step--1);
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.queue__note {
  grid-column: 1 / -1;
  margin: 0;
  font-size: var(--step--1);
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.queue__item--error .queue__note {
  color: var(--error);
  font-weight: 600;
}

/* Buttons */
.button {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.button:hover:not(:disabled) {
  background: var(--ink-soft);
}

.button:disabled {
  background: var(--rule-strong);
  cursor: not-allowed;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.button:focus-visible,
.link-button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.error {
  margin: var(--space-2) 0 0;
  color: var(--error);
  font-weight: 600;
}

@media (max-width: 30rem) {
  .brand__name {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .queue__mark {
    transition: none;
  }
}
