:root {
  --navy: #0c1e39;
  --teal: #45b390;
  --teal-dark: #1c926c;
  --cyan: #2dc0d4;
  --ivory: #f6f3ed;
  --card: #fffcf8;
  --ink: #0c1e39;
  --muted: #5b6573;
  --line: #e4ddd2;
  --serif: "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  background: var(--ivory);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--teal-dark); }
img { max-width: 100%; }

.site-bar {
  background: var(--navy);
  color: #f7f4ef;
  border-bottom: 3px solid var(--teal);
}
.site-bar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.brand-lockup img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  background: #fff;
}
.brand-lockup strong { display: block; font-size: 0.95rem; }
.brand-lockup em {
  display: block;
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}
.pills { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.38rem 0.9rem;
  border: 1px solid rgba(255,255,255,0.28);
  color: #fff;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pill:hover { background: rgba(255,255,255,0.1); }
.pill.accent, .pill-accent {
  background: var(--teal);
  border-color: var(--teal);
}
.pill.ghost { opacity: 0.9; }

.hero {
  background: var(--navy);
  color: #f7f4ef;
  padding: 2.5rem 1rem 2.75rem;
}
.hero-inner, .wrap {
  max-width: 1080px;
  margin: 0 auto;
}
.hero .kicker {
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--cyan);
  margin: 0 0 0.7rem;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin: 0 0 0.6rem;
  font-weight: 600;
  line-height: 1.15;
}
.hero p { max-width: 36rem; color: rgba(247,244,239,0.72); line-height: 1.55; }
.uc-logo { height: 28px; width: auto; margin-top: 1.2rem; }

.wrap { padding: 1.75rem 1rem 3rem; flex: 1; }
.section-head h2 {
  font-family: var(--serif);
  font-size: 2rem;
  margin: 0.2rem 0 0;
}
.kicker {
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--teal-dark);
  margin: 0;
}

.grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
@media (min-width: 800px) { .grid { grid-template-columns: 1fr 1fr; } }

.card {
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(12,30,57,0.08);
  text-decoration: none;
  color: inherit;
  display: block;
}
.pair { display: grid; grid-template-columns: 1fr 1fr; }
.pair figure { margin: 0; position: relative; background: var(--navy); }
.pair img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; }
.pair figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.45rem 0.6rem;
  background: linear-gradient(transparent, rgba(12,30,57,0.8));
  color: #fff;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.card-body { padding: 1rem 1.15rem 1.2rem; }
.card-body h2 { font-family: var(--serif); margin: 0; font-size: 1.6rem; }
.card-body .type { color: var(--teal-dark); margin: 0.25rem 0 0; }
.card-body .meta { color: var(--muted); font-size: 0.8rem; }

.login-shell {
  min-height: 100vh;
  background: var(--navy);
  color: #f7f4ef;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}
.login-card {
  width: min(420px, 100%);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  padding: 1.6rem;
}
.login-card h1 { font-family: var(--serif); margin: 0 0 0.4rem; }
.login-card p { color: rgba(247,244,239,0.65); }
.login-card label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 1rem 0 0.4rem;
}
.login-card input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  color: #fff;
  padding: 0.75rem 0.85rem;
  font: inherit;
}
.login-card button, .btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.75rem 1.2rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.login-card button { width: 100%; margin-top: 1rem; }
.btn.secondary { background: var(--navy); }
.btn.danger { background: #b42318; }
.err { color: #f9b87e; }

.case-layout {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 960px) {
  .case-layout { grid-template-columns: 1.15fr 0.85fr; align-items: start; }
}
.panel {
  background: #fff;
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: 0 10px 30px rgba(12,30,57,0.06);
}
.panel h2, .panel h3 { font-family: var(--serif); margin-top: 0; }
.note { white-space: pre-wrap; line-height: 1.55; color: #334; }
.aside {
  background: var(--navy);
  color: #f7f4ef;
  border-radius: 18px;
  padding: 1.2rem;
}
.aside .kicker { color: var(--cyan); }
.aside ul { padding-left: 1.1rem; color: rgba(247,244,239,0.75); line-height: 1.5; }

.mode-toggle {
  display: inline-flex;
  background: var(--navy);
  border-radius: 999px;
  padding: 0.2rem;
  margin-bottom: 0.9rem;
}
.mode-toggle button {
  border: 0;
  background: transparent;
  color: rgba(247,244,239,0.7);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.7rem;
  cursor: pointer;
}
.mode-toggle button.active { background: var(--teal); color: #fff; }

.stage {
  background: var(--navy);
  border-radius: 18px;
  overflow: hidden;
  color: #fff;
}
.stage img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; }
.stage-cap { padding: 0.9rem 1rem 1.1rem; }
.stage-cap h2 { font-family: var(--serif); margin: 0; }

.compare {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
  display: none;
}
.compare.on { display: block; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare .before { clip-path: inset(0 50% 0 0); }
.compare .handle {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  background: #fff;
}
.compare .knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid #fff;
  background: rgba(12,30,57,0.75);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.6rem;
  margin-top: 0.9rem;
}
.thumbs button {
  border: 0;
  padding: 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--line);
}
.thumbs button.active { box-shadow: 0 0 0 2px var(--teal); }
.thumbs img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; }
.thumbs span {
  display: block;
  padding: 0.35rem 0.3rem 0.45rem;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.field { margin: 0.85rem 0; }
.field label { display: block; font-weight: 650; margin-bottom: 0.35rem; }
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  font: inherit;
}
.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }

.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 16px; overflow: hidden; }
.table th {
  background: var(--navy);
  color: #fff;
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.7rem 0.9rem;
}
.table td { padding: 0.8rem 0.9rem; border-top: 1px solid var(--line); vertical-align: middle; }
.table img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }

.photo-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
}
.photo-row img { width: 72px; height: 90px; object-fit: cover; border-radius: 8px; }

.site-foot {
  background: var(--navy);
  color: rgba(247,244,239,0.7);
  margin-top: auto;
  padding: 1.4rem 1rem;
  font-size: 0.85rem;
}
.site-foot-inner { max-width: 1080px; margin: 0 auto; }
.site-foot a { color: var(--teal); }
.fine { opacity: 0.7; font-size: 0.78rem; }

.empty {
  margin-top: 1.5rem;
  padding: 2.5rem 1rem;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: #fff;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(12,30,57,0.92);
  display: none;
  place-items: center;
  z-index: 50;
  padding: 1rem;
}
.lightbox.on { display: grid; }
.lightbox img { max-height: 78vh; max-width: 90vw; border-radius: 10px; }
.lightbox p { color: #fff; text-align: center; font-family: var(--serif); font-size: 1.4rem; }

@media (max-width: 640px) {
  .brand-lockup span { display: none; }
  .photo-row { grid-template-columns: 1fr; }
}
