:root {
  --paper: oklch(1 0 0);
  --ink: oklch(0.145 0.008 265);
  --muted: oklch(0.47 0.012 265);
  --faint: oklch(0.56 0.008 265);
  --rule: oklch(0.9 0.006 265);
  --surface: oklch(0.975 0.003 265);
  --black: oklch(0.05 0 0);
  --berry: oklch(0.42 0.163 350);
  --blue: oklch(0.62 0.15 245);
  --font: "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;

  --text-display: clamp(2rem, 4.5vw, 3.5rem);
  --text-headline: 1.5rem;
  --text-body: 1rem;
  --text-label: 0.8125rem;

  --leading-display: 1.05;
  --leading-headline: 1.25;
  --leading-body: 1.65;
  --leading-label: 1.35;

  --weight-regular: 400;
  --weight-semibold: 600;
  --weight-display: 650;

  --tracking-display: -0.035em;
  --tracking-headline: -0.02em;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:active {
  opacity: 0.68;
}

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

.index {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  display: flex;
  flex-direction: column;
  padding: 32px 36px;
  border-right: 1px solid var(--rule);
  background: var(--paper);
}

.identity {
  display: grid;
  gap: 12px;
  font-size: var(--text-label);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-label);
  letter-spacing: 0;
  text-decoration: none;
}

.identity-mark {
  width: 96px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: white;
  background: var(--ink);
  font-size: 42px;
}

.index-note {
  margin: 6px 0 30px;
  color: var(--muted);
  font-size: var(--text-label);
  font-weight: var(--weight-regular);
  line-height: var(--leading-label);
}

.index nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  font-size: var(--text-label);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-label);
}

.index nav a {
  text-decoration: none;
}

.index nav a:hover {
  color: var(--berry);
}

.index-meta {
  margin-top: auto;
  display: grid;
  gap: 2px;
  color: var(--faint);
  font-size: var(--text-label);
  font-weight: var(--weight-regular);
  line-height: var(--leading-label);
}

main {
  width: min(100% - 320px, 780px);
  margin-left: clamp(320px, 30vw, 430px);
  padding: 34px 0 80px;
}

.hero {
  padding: 0 0 18px;
}

.hero-symbol {
  display: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 15ch;
  margin-bottom: 24px;
  font-size: var(--text-display);
  font-weight: var(--weight-display);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}

h2 {
  margin-bottom: 0;
  font-size: var(--text-headline);
  font-weight: var(--weight-display);
  line-height: var(--leading-headline);
  letter-spacing: var(--tracking-headline);
}

.lede {
  max-width: 64ch;
  color: var(--muted);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
}

hr {
  margin: 24px 0 48px;
  border: 0;
  border-top: 1px solid var(--rule);
}

section {
  scroll-margin-top: 24px;
  margin-bottom: 56px;
}

.section-heading {
  margin-bottom: 24px;
}

.capability-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 12px;
  border-block: 1px solid var(--rule);
}

.capability-strip > div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1px 8px;
  align-items: center;
  padding: 12px 0;
  font-size: var(--text-label);
  font-weight: var(--weight-regular);
  line-height: var(--leading-label);
}

.capability-strip strong {
  grid-column: 2;
  font-weight: var(--weight-semibold);
}

.capability-strip > div + div {
  padding-left: 18px;
  border-left: 1px solid var(--rule);
}

.status-dot {
  grid-row: 1 / span 2;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--faint);
}

.status-dot[data-state="pass"] {
  background: var(--berry);
}

.status-dot[data-state="info"] {
  background: var(--blue);
}

.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

figure {
  min-width: 0;
  margin: 0;
}

.target {
  position: relative;
  min-height: 238px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--black);
}

.target-sdr {
  color: white;
  dynamic-range-limit: standard;
}

.sdr-mark {
  width: 98px;
  height: 98px;
  background:
    linear-gradient(white, white) center / 14px 98px no-repeat,
    linear-gradient(90deg, white, white) center / 98px 14px no-repeat,
    linear-gradient(45deg, transparent 45%, white 45% 55%, transparent 55%) center / 92px 92px no-repeat,
    linear-gradient(-45deg, transparent 45%, white 45% 55%, transparent 55%) center / 92px 92px no-repeat;
}

#hdr-canvas {
  display: block;
  width: 100%;
  height: 238px;
}

.canvas-fallback {
  position: absolute;
  inset: auto 16px 16px;
  margin: 0;
  color: oklch(0.75 0 0);
  font-size: var(--text-label);
  font-weight: var(--weight-regular);
  line-height: var(--leading-label);
  text-align: center;
}

figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 2px 0;
  font-size: var(--text-label);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-label);
}

figcaption span {
  color: var(--muted);
  font-weight: var(--weight-regular);
  text-align: right;
}

.control-row {
  margin-top: 28px;
  padding: 18px 0;
  border-block: 1px solid var(--rule);
}

.control-row label {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
  font-size: var(--text-label);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-label);
}

.control-row output {
  color: var(--berry);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--berry);
}

.control-row p,
.result {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: var(--text-label);
  font-weight: var(--weight-regular);
  line-height: var(--leading-label);
}

.result {
  padding: 12px 0;
  color: var(--ink);
  font-weight: var(--weight-semibold);
}

.result::before {
  content: "→ ";
  color: var(--berry);
}

.prose {
  max-width: 68ch;
}

.prose p {
  text-wrap: pretty;
}

code {
  padding: 0.1em 0.25em;
  border-radius: 4px;
  background: var(--surface);
  font: inherit;
  font-size: 0.9375em;
}

.export-tool {
  margin-top: 20px;
}

.dropzone {
  display: grid;
  gap: 6px;
  padding: 28px 20px;
  border: 1px dashed var(--rule);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.dropzone:focus-visible {
  outline: 2px solid var(--berry);
  outline-offset: 4px;
}

.dropzone[data-active="true"] {
  border-color: var(--berry);
  background: oklch(0.985 0.01 350);
}

.dropzone-title {
  font-size: var(--text-label);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-label);
}

.dropzone-meta {
  color: var(--muted);
  font-size: var(--text-label);
  line-height: var(--leading-label);
}

.export-preview-wrap {
  margin: 16px 0 0;
}

.export-preview-wrap img {
  display: block;
  width: min(100%, 280px);
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper);
}

.export-preview-wrap figcaption {
  padding-top: 8px;
  color: var(--muted);
  font-weight: var(--weight-regular);
}

.export-controls {
  margin-top: 20px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-size: var(--text-label);
  font-weight: var(--weight-regular);
  line-height: var(--leading-label);
}

.checkbox-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--berry);
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  padding: 0.7rem 1rem;
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  font-size: var(--text-label);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-label);
  text-decoration: none;
}

.download-button:hover {
  text-decoration: none;
  opacity: 0.9;
}

#export-status[data-state="pass"]::before,
#linkedin-status[data-state="pass"]::before {
  color: var(--berry);
}

#export-status[data-state="fail"]::before,
#linkedin-status[data-state="fail"]::before {
  color: var(--berry);
}

#export-status[data-state="busy"]::before,
#linkedin-status[data-state="busy"]::before {
  color: var(--blue);
}

details {
  margin-top: 28px;
  border-block: 1px solid var(--rule);
}

summary {
  padding: 14px 0;
  cursor: pointer;
  font-size: var(--text-label);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-label);
}

details ul {
  margin: 0 0 18px;
  padding-left: 20px;
  color: var(--muted);
  font-size: var(--text-label);
  font-weight: var(--weight-regular);
  line-height: var(--leading-label);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: var(--text-label);
  font-weight: var(--weight-regular);
  line-height: var(--leading-label);
}

footer p {
  margin: 0;
}

@media (max-width: 900px) {
  .index {
    position: static;
    width: auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px 24px;
    padding: 22px 24px;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .identity {
    display: flex;
    align-items: center;
  }

  .identity-mark {
    width: 34px;
    font-size: 18px;
  }

  .index-note,
  .index-meta {
    display: none;
  }

  .index nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  main {
    width: min(100% - 48px, 780px);
    margin: 0 auto;
    padding-top: 42px;
  }
}

@media (max-width: 640px) {
  .index {
    display: flex;
    align-items: flex-start;
  }

  .index nav {
    justify-content: flex-start;
    gap: 0 12px;
  }

  .identity,
  .index nav a,
  footer a {
    min-height: 44px;
  }

  .index nav a,
  footer a {
    display: inline-flex;
    align-items: center;
  }

  main {
    width: min(100% - 32px, 780px);
  }

  .hero-symbol {
    display: block;
    font-size: 2rem;
  }

  .export-preview-wrap:not([hidden]) {
    display: block;
  }

  .section-heading,
  .capability-strip,
  .comparison {
    grid-template-columns: 1fr;
  }

  .capability-strip > div + div {
    padding-left: 0;
    border-top: 1px solid var(--rule);
    border-left: 0;
  }

  footer {
    flex-direction: column;
  }

  input[type="range"] {
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
