:root {
  --bg: oklch(1 0 0);
  --surface: oklch(0.965 0.006 60);
  --surface-strong: oklch(0.925 0.012 60);
  --ink: oklch(0.19 0.015 60);
  --muted: oklch(0.47 0.018 60);
  --primary: oklch(0.56 0.14 52);
  --primary-hover: oklch(0.50 0.14 52);
  --olive: oklch(0.39 0.07 125);
  --olive-soft: oklch(0.91 0.035 125);
  --amber-soft: oklch(0.93 0.055 78);
  --line: oklch(0.87 0.012 60);
  --focus: oklch(0.59 0.18 250);
  --radius: 14px;
  --content: 1180px;
  --ease: 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 30;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100% - 40px, var(--content));
  min-height: 72px;
  margin: 0 auto;
  background: color-mix(in oklch, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 720;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: var(--bg);
}

nav { display: flex; gap: 22px; }
nav a { color: var(--muted); font-size: 0.92rem; font-weight: 650; text-decoration: none; }
nav a:hover { color: var(--primary); }

main, footer { width: min(100% - 40px, var(--content)); margin-inline: auto; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(380px, 1.08fr);
  align-items: center;
  gap: clamp(36px, 7vw, 96px);
  min-height: calc(100vh - 72px);
  padding: clamp(60px, 9vw, 118px) 0;
}

.context-line { margin: 0 0 20px; color: var(--primary); font-weight: 760; }

h1, h2, h3 { margin-top: 0; line-height: 1.08; letter-spacing: -0.03em; text-wrap: balance; }
h1 { max-width: 13ch; margin-bottom: 24px; font-size: clamp(2.8rem, 6.2vw, 5.4rem); }
h2 { margin-bottom: 18px; font-size: clamp(2rem, 3.7vw, 3.3rem); }
h3 { margin-bottom: 10px; font-size: 1.35rem; }

.hero-lead, .section-heading p { max-width: 68ch; color: var(--muted); text-wrap: pretty; }
.hero-lead { margin: 0 0 32px; font-size: 1.15rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 720;
  text-decoration: none;
  transition: background var(--ease), color var(--ease), transform var(--ease);
}

.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--primary); color: var(--bg); }
.button-primary:hover { background: var(--primary-hover); }
.button-secondary { border: 1px solid var(--line); }
.button-secondary:hover { background: var(--surface); }

.plan-figure { margin: 0; }
.plan-figure img { width: 100%; max-height: 680px; object-fit: contain; background: var(--surface); }
figcaption { margin-top: 12px; color: var(--muted); font-size: 0.86rem; }

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.status-strip div { padding: 24px; }
.status-strip div + div { border-left: 1px solid var(--line); }
.status-strip strong, .status-strip span { display: block; }
.status-strip strong { margin-bottom: 4px; color: var(--primary); }
.status-strip span { color: var(--muted); }

.section { padding: clamp(76px, 11vw, 148px) 0; }
.split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(420px, 1.2fr); gap: clamp(48px, 9vw, 130px); }
.section-heading p { margin: 0; }

.priority-list { margin: 0; padding: 0; list-style: none; }
.priority-list li { display: grid; grid-template-columns: 56px 1fr; gap: 18px; padding: 22px 0; border-top: 1px solid var(--line); }
.priority-list li:last-child { border-bottom: 1px solid var(--line); }
.priority-list li > span { color: var(--primary); font-weight: 760; }
.priority-list strong { font-size: 1.08rem; }
.priority-list p { margin: 4px 0 0; color: var(--muted); }

.ideas-section { padding-inline: clamp(20px, 5vw, 72px); background: var(--ink); color: var(--bg); }
.ideas-section .section-heading p { color: color-mix(in oklch, var(--bg) 68%, var(--ink)); }
.inline-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 48px; }
.inline-heading a { color: var(--bg); font-weight: 700; text-underline-offset: 4px; }

.idea-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) minmax(210px, 0.45fr); gap: 34px; padding: 32px 0; border-top: 1px solid color-mix(in oklch, var(--bg) 18%, var(--ink)); }
.idea-row:last-child { border-bottom: 1px solid color-mix(in oklch, var(--bg) 18%, var(--ink)); }
.idea-status { align-self: start; width: fit-content; padding: 5px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 760; }
.status-check { background: var(--amber-soft); color: var(--ink); }
.status-progress { background: var(--olive-soft); color: var(--olive); }
.idea-body p { max-width: 62ch; margin: 0; color: color-mix(in oklch, var(--bg) 70%, var(--ink)); }
.idea-next { color: color-mix(in oklch, var(--bg) 76%, var(--ink)); font-size: 0.92rem; }
.idea-next span { display: block; margin-bottom: 5px; color: var(--bg); font-weight: 750; }

.office-section {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: clamp(48px, 8vw, 110px);
  align-items: center;
}

.office-visual { margin: 0; }
.office-visual img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center; }
.office-visual p { margin: 12px 0 0; color: var(--muted); font-size: 0.86rem; }
.office-copy .section-heading { margin-bottom: 30px; }
.office-facts { margin: 0 0 28px; border-top: 1px solid var(--line); }
.office-facts div { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.office-facts dt { color: var(--primary); font-weight: 760; }
.office-facts dd { margin: 0; color: var(--muted); }
.text-link { color: var(--primary); font-weight: 740; text-underline-offset: 4px; }

.references { padding-bottom: 48px; }
.references .section-heading { display: grid; grid-template-columns: 1fr 0.8fr; gap: 60px; align-items: end; margin-bottom: 48px; }
.image-pair { display: grid; grid-template-columns: 1.22fr 0.78fr; gap: 18px; align-items: start; }
.image-pair figure { margin: 0; }
.image-pair img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.docs-section { display: grid; grid-template-columns: 0.78fr 1.22fr; gap: clamp(48px, 9vw, 130px); }
.docs-list { border-top: 1px solid var(--line); }
.docs-list a { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: color var(--ease), transform var(--ease); }
.docs-list a:hover { color: var(--primary); transform: translateX(8px); }
.docs-list span { color: var(--muted); }

footer { display: flex; justify-content: space-between; gap: 24px; padding: 36px 0 48px; border-top: 1px solid var(--line); color: var(--muted); }
footer p { margin: 0; }
footer a { font-weight: 700; }

body:has(.document-dialog[open]) { overflow: hidden; }

.document-dialog {
  width: min(920px, calc(100% - 32px));
  max-height: min(88dvh, 920px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 24px 64px oklch(0.08 0 0 / 0.34);
  overflow: hidden;
}

.document-dialog::backdrop { background: oklch(0.08 0 0 / 0.68); }

.document-dialog-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px clamp(20px, 4vw, 42px);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.document-dialog-header p { margin: 0 0 2px; color: var(--primary); font-size: 0.78rem; font-weight: 760; }
.document-dialog-header h2 { margin: 0; font-size: 1.35rem; letter-spacing: -0.02em; }
.dialog-close { min-height: 42px; padding: 8px 15px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink); font: inherit; font-weight: 720; cursor: pointer; }
.dialog-close:hover { background: var(--surface); }
.document-dialog-body { max-height: calc(min(88dvh, 920px) - 84px); padding: clamp(28px, 5vw, 54px) clamp(20px, 6vw, 68px) 70px; overflow-y: auto; }
.document-loading, .document-error { padding: 40px 0; color: var(--muted); }
.document-error a { color: var(--primary); font-weight: 720; }

.markdown-body { max-width: 72ch; margin: 0 auto; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 { margin: 1.7em 0 0.55em; line-height: 1.18; letter-spacing: -0.025em; }
.markdown-body h1 { margin-top: 0; font-size: clamp(2rem, 5vw, 3.2rem); }
.markdown-body h2 { padding-bottom: 0.35em; border-bottom: 1px solid var(--line); font-size: 1.75rem; }
.markdown-body h3 { font-size: 1.3rem; }
.markdown-body p, .markdown-body li { color: oklch(0.31 0.015 60); }
.markdown-body p { margin: 0 0 1em; }
.markdown-body ul, .markdown-body ol { margin: 0 0 1.2em; padding-left: 1.45em; }
.markdown-body li + li { margin-top: 0.38em; }
.markdown-body strong { color: var(--ink); }
.markdown-body a { color: var(--primary); text-underline-offset: 3px; }
.markdown-body code { padding: 0.16em 0.38em; border-radius: 5px; background: var(--surface-strong); font-family: ui-monospace, "Cascadia Code", monospace; font-size: 0.9em; }
.markdown-body pre { margin: 1.4em 0; padding: 18px; border-radius: 10px; background: var(--ink); color: var(--bg); overflow-x: auto; }
.markdown-body pre code { padding: 0; background: transparent; color: inherit; }
.markdown-body blockquote { margin: 1.4em 0; padding: 18px 20px; background: var(--surface); color: var(--muted); }
.markdown-body hr { margin: 2.2em 0; border: 0; border-top: 1px solid var(--line); }
.table-scroll { margin: 1.4em 0; overflow-x: auto; }
.markdown-body table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.markdown-body th, .markdown-body td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.markdown-body th { background: var(--surface); color: var(--ink); }

@media (max-width: 900px) {
  .hero, .split, .docs-section, .office-section { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .references .section-heading { grid-template-columns: 1fr; gap: 12px; }
  .idea-row { grid-template-columns: 120px 1fr; }
  .idea-next { grid-column: 2; }
}

@media (max-width: 700px) {
  .site-header { align-items: flex-start; min-height: auto; padding: 14px 0; }
  .brand > span:last-child { display: none; }
  nav { gap: 14px; overflow-x: auto; }
  nav a { white-space: nowrap; }
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 54px; }
  h1 { font-size: clamp(2.65rem, 14vw, 4rem); }
  .status-strip { grid-template-columns: 1fr; }
  .status-strip div + div { border-top: 1px solid var(--line); border-left: 0; }
  .inline-heading { align-items: flex-start; flex-direction: column; }
  .idea-row { grid-template-columns: 1fr; gap: 16px; }
  .idea-next { grid-column: auto; }
  .image-pair { grid-template-columns: 1fr; }
  .docs-list a { grid-template-columns: 1fr; gap: 4px; }
  .document-dialog { width: calc(100% - 16px); max-height: 94dvh; border-radius: 12px; }
  .document-dialog-body { max-height: calc(94dvh - 78px); }
  .document-dialog-header { padding: 16px 18px; }
  .document-dialog-header p { display: none; }
  .document-dialog-header h2 { font-size: 1.05rem; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
