:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #25282a;
  background: #f4f6f8;
  line-height: 1.5;
  --ink: #25282a;
  --muted: #5e666d;
  --quiet: #687178;
  --paper: #f4f6f8;
  --white: #ffffff;
  --accent: #bd4b2f;
  --footer: #282b2b;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

img { max-width: 100%; }

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

a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 55%, white);
  outline-offset: 4px;
}

.site-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  width: min(calc(100% - 56px), 1040px);
  margin: 0 auto;
}

.site-header {
  min-height: 0;
  padding: 26px 0;
  background: transparent;
}

.brand,
.footer-brand {
  font-family: inherit;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-mark { display: none; }

.site-nav { display: flex; gap: 18px; font-size: 0.9rem; }

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.projects-main,
.app-main {
  flex: 1;
  max-width: 900px;
  padding: 78px 0 108px;
}

.projects-intro { max-width: 560px; margin-bottom: 44px; }

.projects-intro h1,
.app-hero h1,
.document-intro h1 {
  margin: 0;
  color: var(--ink);
  font-family: inherit;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
}

.projects-intro h1 { font-size: clamp(2.8rem, 7vw, 4.6rem); }

.projects-intro p,
.app-summary {
  max-width: 560px;
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.project-list {
  max-width: 780px;
  container-type: inline-size;
}

.project-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 18px 36px -28px rgba(37, 40, 42, 0.65);
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.project-card:hover,
.project-card:focus-visible {
  box-shadow: 0 22px 42px -26px rgba(37, 40, 42, 0.7);
  transform: translateY(-2px);
}

.project-figure {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  aspect-ratio: 1;
  width: 100%;
  min-width: 0;
  min-height: 220px;
  margin: 0;
  overflow: hidden;
  border-radius: 18px 0 0 18px;
  background: #f5b23f;
}

.project-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card-body {
  display: flex;
  grid-column: 2;
  grid-row: 1;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  width: 100%;
  padding: 16px 38px;
}

.project-card .card-title {
  color: var(--ink);
  font-family: inherit;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
}

.project-card-body > p:not(.project-meta) {
  max-width: 330px;
  margin: 12px 0 24px;
  color: var(--muted);
  font-size: 0.98rem;
}

.project-action {
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
}

.project-action span { margin-left: 4px; }

.app-main { max-width: 780px; }

.app-hero {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  align-items: center;
  gap: 30px;
  margin-bottom: 76px;
}

.app-icon {
  display: block;
  width: 140px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 18px 34px -28px rgba(37, 40, 42, 0.75);
}

.app-hero h1 { font-size: clamp(2.8rem, 7vw, 4.7rem); }

.app-summary { margin-top: 16px; }

.app-documents { max-width: 680px; }

.app-documents h2 {
  margin: 0;
  color: var(--ink);
  font-family: inherit;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.app-documents > p {
  margin: 9px 0 25px;
  color: var(--muted);
}

.document-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.document-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 12px;
  background: rgba(255, 254, 250, 0.72);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.document-link span:last-child {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
}

.document-link:hover,
.document-link:focus-visible { background: var(--white); }

.document-link:hover span:first-child,
.document-link:focus-visible span:first-child {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.document-layout {
  max-width: 780px;
  padding: 54px 0 78px;
}

.document-intro { max-width: 700px; margin-bottom: 38px; }

.legal-thumb {
  display: block;
  width: 72px;
  height: 72px;
  margin-bottom: 22px;
  border-radius: 16px;
  object-fit: cover;
}

.eyebrow { display: none; }

.document-intro h1 { font-size: clamp(2.7rem, 6vw, 4.2rem); }

.document-intro .lead {
  max-width: 650px;
  margin: 14px 0 9px;
  color: var(--muted);
}

.updated { margin: 0; color: var(--quiet); font-size: 0.85rem; }

.document-card {
  max-width: 700px;
  padding: 0;
  border: 0;
  background: transparent;
}

.prose h2 {
  margin: 42px 0 12px;
  color: var(--ink);
  font-family: inherit;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.prose h2:first-child { margin-top: 0; }

.prose h3 {
  margin: 26px 0 8px;
  color: #4e5558;
  font-size: 1rem;
  line-height: 1.35;
}

.prose p,
.prose li { color: #596164; }

.prose p { max-width: 70ch; margin: 15px 0; }

.prose ul { margin: 15px 0; padding-left: 24px; }

.prose li { margin: 6px 0; }

.prose a { color: var(--accent); text-underline-offset: 3px; }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 24px;
  padding: 24px 26px;
  border-radius: 16px;
  background: var(--footer);
  color: #e8edf0;
}

.footer-brand { color: #ffffff; }

.footer-meta { display: flex; align-items: center; gap: 20px; color: #aeb2ae; font-size: 0.83rem; }

.site-footer a { color: inherit; text-decoration: none; }

.site-footer a:hover,
.site-footer a:focus-visible { color: #fffefa; text-decoration: underline; text-underline-offset: 4px; }

.document-footer { margin-top: 10px; }

.document-footer p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .project-card,
  .document-link { transition: none; }
}

@media (max-width: 680px) {
  .site-shell { width: min(calc(100% - 40px), 1040px); }

  .site-header { padding: 21px 0; }

  .projects-main,
  .app-main { padding: 50px 0 72px; }

  .projects-intro { margin-bottom: 32px; }

  .projects-intro h1,
  .app-hero h1 { font-size: clamp(2.65rem, 13vw, 3.8rem); }

  .app-hero h1 { font-size: clamp(2.2rem, 10vw, 3rem); }

  .projects-intro p,
  .app-summary { font-size: 0.98rem; }

  .project-card {
    grid-template-columns: 48% minmax(0, 1fr);
    height: 48cqw;
    border-radius: 14px;
  }

  .project-figure {
    aspect-ratio: 1;
    min-height: 0;
    border-radius: 14px 0 0 14px;
  }

  .project-card-body {
    padding: 12px 18px;
  }

  .project-card .card-title {
    font-size: 1.55rem;
    line-height: 0.98;
  }

  .project-card-body > p:not(.project-meta) {
    margin: 6px 0 12px;
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .project-action { font-size: 0.75rem; }

  .app-hero {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 18px;
    margin-bottom: 52px;
  }

  .app-icon { width: 92px; border-radius: 14px; }

  .app-summary { margin-top: 12px; }

  .app-documents h2 { font-size: 1.8rem; }

  .document-list { grid-template-columns: 1fr; gap: 8px; }

  .document-link { padding: 16px 17px; }

  .document-layout { padding: 40px 0 58px; }

  .document-intro { margin-bottom: 30px; }

  .document-intro h1 { font-size: clamp(2.55rem, 13vw, 3.7rem); }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
    padding: 20px;
  }
}
