:root {
  --bg: #f4efe3;
  --paper: #fcfaf4;
  --paper-strong: #fffdf8;
  --ink: #142746;
  --muted: #57667d;
  --line: rgba(20, 39, 70, 0.12);
  --gold: #c5962f;
  --gold-deep: #8a6414;
  --navy: #173d7a;
  --navy-deep: #0e244c;
  --shadow: 0 24px 80px rgba(10, 25, 52, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top, rgba(197, 150, 47, 0.12), transparent 28%),
    linear-gradient(180deg, #f8f4ea 0%, var(--bg) 100%);
  font-family: Georgia, "Times New Roman", serif;
}

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

code {
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: rgba(23, 61, 122, 0.08);
  font-family: "Courier New", monospace;
  font-size: 0.95em;
}

.shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.hero,
.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.94));
  box-shadow: var(--shadow);
}

.hero {
  padding: 56px 28px;
}

.hero::after,
.panel::after {
  content: "";
  position: absolute;
  inset: auto -30px -40px auto;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(197, 150, 47, 0.22), transparent 70%);
  pointer-events: none;
}

.hero h1,
.panel h2,
.app-card h3,
.contact-card h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 0.98;
}

.lede,
.panel-copy,
.app-card p,
.contact-card p,
.content p,
.content li {
  color: var(--muted);
  font-size: 1.07rem;
  line-height: 1.8;
}

.eyebrow,
.app-kicker {
  margin: 0 0 14px;
  color: var(--gold-deep);
  font-family: Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero-actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-family: Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  transition: filter 0.15s ease;
}

.button-primary:hover {
  filter: brightness(1.15);
}

.button-secondary {
  color: var(--navy);
  background: rgba(23, 61, 122, 0.08);
  transition: background 0.15s ease;
}

.button-secondary:hover {
  background: rgba(23, 61, 122, 0.15);
}

.panel {
  margin-top: 22px;
  padding: 28px;
}

.panel-header {
  margin-bottom: 18px;
}

.panel h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.contact-grid,
.app-grid {
  display: grid;
  gap: 16px;
}

.contact-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.app-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.contact-card,
.app-card,
.content-card,
.note-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper-strong);
}

.contact-card,
.app-card {
  padding: 20px;
}

.text-link {
  font-family: Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration-thickness: 2px;
}

.muted-panel {
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.96), rgba(252, 248, 238, 0.98));
}

.subpage-shell {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 72px;
}

.subpage-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-family: Arial, sans-serif;
  font-size: 0.94rem;
}

.subpage-topbar a {
  font-weight: 700;
}

.app-icon {
  display: block;
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(10, 25, 52, 0.22);
  object-fit: cover;
}

.masthead {
  margin-bottom: 22px;
  padding: 38px 28px;
}

.masthead h1 {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 3.8rem);
  line-height: 1.02;
}

.masthead p {
  max-width: 58ch;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 0.95fr);
  gap: 22px;
}

.content-card,
.note-card {
  padding: 24px;
}

.content h2,
.note-card h2 {
  margin: 2rem 0 14px;
  font-size: 1.55rem;
}

.content h2:first-of-type {
  margin-top: 0;
}

.content ul {
  padding-left: 20px;
}

.note-stack {
  display: grid;
  gap: 18px;
}

.label {
  display: inline-block;
  margin-bottom: 12px;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  color: var(--gold-deep);
  background: rgba(197, 150, 47, 0.12);
  font-family: Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta-list {
  display: grid;
  gap: 12px;
}

.meta-list div {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.meta-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.meta-list dt {
  margin-bottom: 4px;
  font-family: Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.meta-list dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 820px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .panel,
  .masthead,
  .content-card,
  .note-card {
    border-radius: 22px;
  }
}

@media (max-width: 520px) {
  .shell,
  .subpage-shell {
    width: min(100% - 20px, 980px);
  }

  .hero,
  .panel,
  .masthead,
  .content-card,
  .note-card {
    padding-left: 18px;
    padding-right: 18px;
  }

  .subpage-topbar {
    flex-direction: column;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1520;
    --paper: #131e2e;
    --paper-strong: #172030;
    --ink: #e8e2d4;
    --muted: #8a9ab5;
    --line: rgba(232, 226, 212, 0.15);
    --gold: #d4a842;
    --gold-deep: #c4963a;
    --navy: #6b9fd4;
    --navy-deep: #4a7cb8;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  }

  body {
    background:
      radial-gradient(circle at top, rgba(197, 150, 47, 0.08), transparent 28%),
      linear-gradient(180deg, #111b2a 0%, var(--bg) 100%);
  }

  .hero,
  .panel {
    background: linear-gradient(180deg, rgba(19, 30, 46, 0.92), rgba(23, 32, 48, 0.96));
  }

  .muted-panel {
    background: linear-gradient(180deg, rgba(17, 27, 42, 0.96), rgba(15, 24, 38, 0.98));
  }

  .button-secondary {
    color: var(--navy);
    background: rgba(107, 159, 212, 0.12);
  }

  .button-secondary:hover {
    background: rgba(107, 159, 212, 0.2);
  }

  code {
    background: rgba(107, 159, 212, 0.12);
  }

  .label {
    background: rgba(197, 150, 47, 0.15);
  }
}
