/* Chordis corporate identity: self-hosted Inter, Chordis palette. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/Inter-Variable.woff2') format('woff2');
}

:root {
  --fg: hsl(218 67% 9%); /* #081428, also the logo colour */
  --muted: hsl(218 30% 38%);
  --bg: hsl(233 100% 99%);
  --card: #fff;
  --border: hsl(233 25% 90%);
  --accent: hsl(255 73% 57%); /* primary violet */
  --accent-hover: hsl(255 73% 47%);
  --accent-soft: hsl(233 40% 95%); /* dropzone hover / surface */
  --emerald: hsl(169 80% 53%); /* decorative only: too light for text on white */
  --err: hsl(0 72% 45%); /* darker than Chordis destructive so the text passes AA */
  --warn: #9a6700;
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  color-scheme: light;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: 100%;
  box-sizing: border-box;
  max-width: 46rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

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

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  font-weight: 700;
}

h1 {
  font-size: 2.25rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.375rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-top: 2rem;
}

h3 {
  font-size: 1rem;
  margin: 1.25rem 0 0.25rem;
}

.highlight {
  background: linear-gradient(135deg, hsl(255 73% 47%), hsl(280 70% 45%));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand {
  display: inline-block;
  margin-bottom: 2rem;
  border-radius: var(--radius-sm);
}

.brand img {
  display: block;
  width: auto;
  height: 1.75rem;
}

.lead {
  color: var(--muted);
  font-size: 1.0625rem;
  margin-top: 0;
}

.lead strong {
  color: var(--fg);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 2.5rem 1rem;
  margin-top: 1.5rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}

.dropzone:hover,
.dropzone:focus-within,
.dropzone.dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* The real input is visually hidden, so show the focus ring on the label. */
.dropzone:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.dropzone-title {
  font-weight: 600;
  font-size: 1.1rem;
}

.dropzone-sub {
  color: var(--muted);
}

.dropzone input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.results {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.result {
  background: var(--card);
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}

.result.ok {
  border-left-color: var(--emerald);
}

.result.failed {
  border-left-color: var(--err);
}

.result-title {
  font-weight: 600;
  word-break: break-all;
}

.result progress {
  width: 100%;
  height: 0.5rem;
  margin: 0.4rem 0;
  accent-color: var(--accent);
}

.summary {
  margin: 0.25rem 0 0.75rem;
  padding-left: 1.25rem;
}

.warning {
  color: var(--warn);
}

.error {
  color: var(--err);
  margin: 0.25rem 0;
}

.button {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  word-break: break-all;
  transition: background 0.15s;
}

.button:hover,
.button:focus {
  background: var(--accent-hover);
  color: #fff;
}

.explainer {
  margin-top: 2.5rem;
  padding: 0.5rem 1.5rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.explainer h2:first-child {
  margin-top: 1rem;
}

.columns {
  columns: 2;
  padding-left: 1.25rem;
  margin: 0.25rem 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
  padding: 0.1em 0.3em;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 0.875rem;
}

.site-footer-inner {
  box-sizing: border-box;
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  align-items: center;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  gap: 1.25rem;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.site-footer a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}
