:root {
  color-scheme: light;
  --utd-orange: #e87500;
  --utd-orange-dark: #c96500;
  --utd-green: #154734;
  --ink: #121514;
  --muted: #6e7774;
  --paper: #fbfbfa;
  --surface: #ffffff;
  --line: rgba(21, 71, 52, 0.28);
  --danger: #b3261e;
  --font-ui: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(232, 117, 0, 0.08) 0 1px, transparent 1px 100%),
    var(--paper);
  background-size: 86px 100%;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 550;
  line-height: 1.5;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.app-header,
.app-shell,
.app-footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.app-header,
.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.app-header {
  min-height: 92px;
  border-bottom: 1px solid var(--line);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--utd-green);
  font-size: 1rem;
  font-weight: 750;
}

.brand-lockup img {
  display: block;
}

.utility-label,
.section-label,
.field span,
.preview-head,
.status,
.swatch-row,
.app-footer,
.app-footer a {
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.utility-label,
.section-label,
.field span,
.preview-head span:first-child {
  color: var(--utd-green);
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(360px, 1.15fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
  padding-top: clamp(36px, 6vw, 72px);
}

.control-pane {
  position: sticky;
  top: 28px;
  display: grid;
  gap: 1.1rem;
}

.section-label {
  margin: 0;
  color: var(--utd-orange);
}

h1 {
  max-width: 720px;
  margin: 0;
  color: var(--utd-green);
  font-size: clamp(3.4rem, 6.8vw, 5.8rem);
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: 0;
}

.lead {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.qr-controls {
  display: grid;
  gap: 1rem;
  margin-top: clamp(1rem, 3vw, 2rem);
  padding-top: 1.1rem;
  border-top: 1px solid var(--utd-green);
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  font: 700 0.98rem/1.2 var(--font-ui);
  letter-spacing: 0;
}

.field input {
  padding: 0 0.9rem;
}

.field select {
  padding: 0 0.75rem;
}

.field input:focus,
.field select:focus,
.button:focus-visible {
  outline: 3px solid rgba(232, 117, 0, 0.25);
  outline-offset: 2px;
}

.field input[aria-invalid="true"] {
  border-color: var(--danger);
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.8rem;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.button {
  min-height: 48px;
  border: 1px solid var(--utd-green);
  border-radius: 4px;
  background: var(--surface);
  color: var(--utd-green);
  cursor: pointer;
  font: 800 0.76rem/1 var(--font-ui);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.button.primary {
  border-color: var(--utd-orange);
  background: var(--utd-orange);
  color: var(--surface);
}

.button:hover {
  background: rgba(21, 71, 52, 0.08);
}

.button.primary:hover {
  background: var(--utd-orange-dark);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.54;
}

.status {
  min-height: 1.2rem;
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.preview-pane {
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 1.4rem);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 16px 16px 0 rgba(21, 71, 52, 0.08);
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.preview-head span:last-child {
  color: var(--muted);
  text-align: right;
}

.canvas-wrap {
  display: grid;
  place-items: center;
  border: 1px solid rgba(21, 71, 52, 0.18);
  background:
    linear-gradient(45deg, rgba(21, 71, 52, 0.04) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(21, 71, 52, 0.04) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(21, 71, 52, 0.04) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(21, 71, 52, 0.04) 75%),
    var(--surface);
  background-position: 0 0, 0 14px, 14px -14px, -14px 0;
  background-size: 28px 28px;
  aspect-ratio: 1;
}

.canvas-wrap canvas {
  display: block;
  width: min(100%, 620px);
  height: auto;
}

.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.2rem;
  color: var(--muted);
}

.swatch-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.swatch-row i {
  display: inline-block;
  width: 0.8rem;
  height: 0.8rem;
  border: 1px solid rgba(17, 17, 17, 0.22);
  border-radius: 50%;
}

.swatch-row .orange {
  background: var(--utd-orange);
}

.swatch-row .green {
  background: var(--utd-green);
}

.app-footer {
  min-height: 92px;
  margin-top: 64px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.app-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.85rem, 2vw, 1.5rem);
}

.app-footer a {
  color: var(--muted);
  text-decoration: none;
}

.app-footer a:hover {
  color: var(--ink);
}

@media (max-width: 820px) {
  .app-header,
  .app-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 1rem 0;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .control-pane {
    position: static;
  }
}

@media (max-width: 560px) {
  .app-header,
  .app-shell,
  .app-footer {
    width: min(100% - 24px, 1120px);
  }

  h1 {
    font-size: 3rem;
  }

  .control-grid,
  .button-row,
  .preview-head {
    grid-template-columns: 1fr;
  }

  .button-row,
  .preview-head {
    display: grid;
  }

  .preview-head span:last-child {
    text-align: left;
  }
}
