@import url("https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;600&display=swap");

:root {
  --ink: #17191b;
  --muted: #666a6f;
  --quiet: #8c8f92;
  --line: #d7d4cd;
  --paper: #f7f5ef;
  --paper-2: #eeeae0;
  --dark: #0e1012;
  --dark-2: #17191c;
  --gold: #b08a4e;
  --gold-bright: #d1a85f;
  --green: #5e8c6b;
  --green-soft: #e2ece3;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body, .sheet, .sheet * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
body { margin: 0; color: var(--ink); background: #d8d6d0; font-family: Inter, Arial, sans-serif; }

.review-bar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 58px;
  padding: 9px 24px;
  border-bottom: 1px solid rgba(0,0,0,.1);
  background: rgba(247,245,239,.94);
  backdrop-filter: blur(18px);
}
.review-brand, .review-actions { display: flex; align-items: center; gap: 12px; }
.review-brand img { width: 25px; height: 20px; object-fit: contain; }
.review-brand span { font-size: 13px; font-weight: 700; }
.review-brand b { padding-left: 12px; border-left: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 500; }
.review-actions > span { color: var(--muted); font-size: 11px; }
.button { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; color: #fff; border: 1px solid var(--dark); border-radius: 4px; background: var(--dark); font-size: 12px; font-weight: 700; text-decoration: none; }
.button.secondary { color: var(--ink); border-color: var(--line); background: transparent; }

.client-room {
  min-height: 560px;
  padding: 96px 28px 68px;
  border-bottom: 1px solid var(--line);
  background: #f7f5ef;
}
.room-inner { width: min(8.5in, 100%); margin: 0 auto; }
.room-label {
  margin: 0 0 18px;
  color: #81612e;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.room-title {
  max-width: 720px;
  color: var(--ink);
  font-size: 58px;
  line-height: .98;
}
.room-lede {
  max-width: 680px;
  margin-top: 24px;
  color: #555a60;
  font-size: 17px;
  line-height: 1.65;
}
.room-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.room-primary { min-height: 46px; padding: 0 18px; gap: 9px; }
.room-actions .secondary { min-height: 46px; }
.room-brief-link {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 4px;
  color: #555a60;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.room-brief-link:hover { color: var(--ink); }
.document-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 64px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.document-facts > div { min-height: 88px; padding: 18px 18px 18px 0; }
.document-facts > div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.document-facts span { display: block; color: var(--quiet); font-family: "JetBrains Mono", monospace; font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.document-facts strong { display: block; margin-top: 10px; font-size: 13px; }

.brief-intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
  width: min(8.5in, calc(100% - 40px));
  margin: 64px auto 12px;
  padding: 0 0 24px;
  border-bottom: 1px solid #aaa79f;
}
.brief-intro > div { max-width: 600px; }
.brief-intro .room-label { margin-bottom: 12px; }
.brief-intro h2 { font-size: 32px; }
.brief-intro p:not(.room-label) { margin-top: 12px; color: #555a60; font-size: 13px; line-height: 1.6; }
.text-link { flex: 0 0 auto; padding-bottom: 3px; color: var(--ink); border-bottom: 1px solid var(--ink); font-size: 12px; font-weight: 700; text-decoration: none; }

.proposal { padding: 18px 0 48px; }
.sheet {
  position: relative;
  width: 8.5in;
  height: 11in;
  margin: 0 auto 18px;
  padding: .55in .6in .5in;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 14px 42px rgba(18,19,21,.15);
  page-break-after: always;
}
.sheet.light { background-image: linear-gradient(rgba(15,16,17,.024) 1px, transparent 1px), linear-gradient(90deg, rgba(15,16,17,.024) 1px, transparent 1px); background-size: 28px 28px; }
.sheet.dark { color: #efeee9; background: var(--dark); }
.sheet.dark::before { position: absolute; inset: 0; content: ""; opacity: .22; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 24px 24px; }
.sheet.dark > :not(.page-footer):not(.cover-footer) { position: relative; }
.sheet.dark > .page-footer,
.sheet.dark > .cover-footer { position: absolute; }
.sheet:last-child { page-break-after: auto; }

.page-header { display: flex; justify-content: space-between; align-items: center; min-height: 34px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.dark .page-header { border-color: rgba(255,255,255,.18); }
.page-meta, .mini-brand, .kicker, .eyebrow, .arch-no, .page-footer, .cover-footer span, .investment-panel span, .signal-strip span, .agenda > div > span, .meeting-output > span, .decision-path article > span { font-family: "JetBrains Mono", monospace; text-transform: uppercase; }
.page-meta { color: var(--quiet); font-size: 7px; line-height: 1.5; letter-spacing: .11em; text-align: right; }
.mini-brand { font-size: 7px; font-weight: 600; letter-spacing: .13em; }
.brand-lockup { display: flex; align-items: center; gap: 9px; height: 32px; }
.brand-lockup .orb { width: 27px; height: 24px; object-fit: contain; }
.brand-lockup .miosa-wordmark { width: 63px; height: 22px; object-fit: contain; filter: brightness(0) invert(1); }
.brand-lockup.dark-ink .miosa-wordmark { filter: none; }
.brand-lockup .brand-x { color: var(--quiet); font-family: "JetBrains Mono", monospace; font-size: 7px; }
.brand-lockup .merydian-mark { width: 24px; height: 24px; object-fit: contain; }
.brand-lockup .merydian-wordmark { font-size: 9px; font-weight: 700; }

.kicker { margin: 25px 0 10px; color: var(--gold); font-size: 8px; font-weight: 600; letter-spacing: .16em; }
h1, h2 { margin: 0; font-family: "DM Serif Display", Georgia, serif; font-weight: 400; }
h1 { font-size: 44px; line-height: .98; }
h2 { max-width: 680px; font-size: 28px; line-height: 1.08; }
h3 { margin: 0; font-size: 12px; line-height: 1.25; }
p { margin: 0; }
.lede { max-width: 610px; margin-top: 20px; color: #c0bdb5; font-size: 13px; line-height: 1.55; }
.page-footer { position: absolute; right: .6in; bottom: .2in; left: .6in; display: flex; justify-content: space-between; color: var(--quiet); font-size: 6px; letter-spacing: .08em; }

.cover { padding: .62in; }
.cover-copy { margin-top: 1.05in; max-width: 670px; }
.cover .kicker { color: var(--gold-bright); }
.investment-panel { display: flex; justify-content: space-between; align-items: end; margin-top: 56px; padding: 18px 0; border-top: 1px solid rgba(255,255,255,.22); border-bottom: 1px solid rgba(255,255,255,.22); }
.investment-panel > div { min-width: 260px; }
.investment-panel span { display: block; margin-bottom: 6px; color: var(--gold-bright); font-size: 7px; letter-spacing: .12em; }
.investment-panel strong { font-family: "DM Serif Display", Georgia, serif; font-size: 30px; font-weight: 400; }
.investment-panel p { max-width: 350px; color: #aaa79f; font-size: 9px; line-height: 1.55; }
.cover-footer { position: absolute; right: .62in; bottom: .55in; left: .62in; display: grid; grid-template-columns: 1.5fr 1fr .55fr; gap: 22px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.2); }
.cover-footer span { display: block; margin-bottom: 5px; color: var(--gold-bright); font-size: 6px; letter-spacing: .1em; }
.cover-footer strong { display: block; color: #bdbab2; font-size: 7px; line-height: 1.4; }

.requirement-grid, .acceptance-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 24px; border-top: 2px solid var(--ink); border-left: 1px solid var(--line); }
.requirement-grid article, .acceptance-grid article { min-height: 138px; padding: 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.42); }
.requirement-grid article > span, .acceptance-grid article > span { display: block; margin-bottom: 15px; color: var(--gold); font-family: "JetBrains Mono", monospace; font-size: 7px; }
.requirement-grid p, .acceptance-grid p { margin-top: 7px; color: var(--muted); font-size: 8px; line-height: 1.55; }
.signal-strip { display: flex; align-items: center; gap: 9px; margin-top: 22px; padding: 13px; border: 1px solid var(--line); background: var(--paper-2); }
.signal-strip span { color: var(--gold); font-size: 6px; }
.signal-strip b { padding: 5px 7px; border: 1px solid var(--line); background: #fff; font-size: 6.5px; }
.signal-strip i { color: var(--quiet); font-family: "DM Serif Display", Georgia, serif; }
.signal-strip strong { margin-left: auto; font-size: 8px; }

.architecture { display: grid; grid-template-columns: 1fr 28px 1fr 28px 1fr; align-items: stretch; margin-top: 22px; }
.architecture-column { min-height: 330px; padding: 20px; border: 1px solid #34373b; background: var(--dark-2); }
.architecture-column.engine { color: var(--ink); border-color: #c6b799; background: #eee9df; }
.architecture-column.cloud { border-color: #567462; background: #142018; }
.architecture-column h3 { margin: 12px 0 8px; font-family: "DM Serif Display", Georgia, serif; font-size: 20px; font-weight: 400; }
.architecture-column p { min-height: 60px; color: #aba8a1; font-size: 8px; line-height: 1.5; }
.architecture-column.engine p { color: #5d5c59; }
.architecture-column ul { margin: 18px 0 0; padding: 0; list-style: none; }
.architecture-column li { padding: 9px 0; border-top: 1px solid rgba(255,255,255,.12); font-size: 8px; }
.architecture-column.engine li { border-color: rgba(0,0,0,.12); }
.arch-no { color: var(--gold-bright); font-size: 6px; letter-spacing: .12em; }
.architecture-column.engine .arch-no { color: #80622f; }
.arch-arrow { display: flex; align-items: center; justify-content: center; color: var(--gold-bright); font-size: 24px; }
.ownership-line { display: flex; align-items: center; gap: 15px; margin-top: 18px; padding: 12px 15px; border-left: 3px solid var(--gold); background: #1e2024; }
.ownership-line strong { color: var(--gold-bright); font-size: 8px; }
.ownership-line span { color: #b9b6ae; font-size: 8px; }
.open-foundation { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 14px; border-top: 1px solid #393b3f; }
.open-foundation > div { padding: 13px 13px 0 0; }
.open-foundation > div + div { padding-left: 13px; border-left: 1px solid #393b3f; }
.open-foundation span { display: block; color: var(--gold-bright); font-family: "JetBrains Mono", monospace; font-size: 6px; text-transform: uppercase; }
.open-foundation strong { display: block; margin: 6px 0 4px; font-size: 9px; }
.open-foundation p { color: #95938d; font-size: 7px; line-height: 1.45; }

.intake-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; margin-top: 24px; }
.intake-list > h3 { padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.intake-list ol { margin: 0; padding: 0; list-style: none; counter-reset: input; }
.intake-list li { display: grid; grid-template-columns: 145px 1fr; gap: 12px; min-height: 62px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.intake-list b { font-size: 8px; }
.intake-list span { color: var(--muted); font-size: 7.5px; line-height: 1.5; }
.session-card { min-height: 455px; padding: 22px; color: #eee; background: var(--dark); }
.session-card .eyebrow, .eyebrow { color: var(--gold); font-size: 7px; letter-spacing: .1em; }
.session-card h3 { margin-top: 12px; font-family: "DM Serif Display", Georgia, serif; font-size: 21px; font-weight: 400; }
.session-card ul { margin: 20px 0 0; padding: 0; list-style: none; }
.session-card li { padding: 10px 0; border-top: 1px solid #34363a; color: #bcb9b1; font-size: 8px; }
.output-box { margin-top: 18px; padding: 14px; border: 1px solid #4a4b4d; background: #1a1c1f; }
.output-box span { color: var(--gold-bright); font-family: "JetBrains Mono", monospace; font-size: 6px; text-transform: uppercase; }
.output-box p { margin-top: 7px; color: #c4c1b9; font-size: 7.5px; line-height: 1.5; }

.delivery-sequence { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 25px; border: 1px solid #373a3e; }
.delivery-sequence article { position: relative; min-height: 184px; padding: 16px; background: #17191c; }
.delivery-sequence article + article { border-left: 1px solid #373a3e; }
.delivery-sequence article + article::before { position: absolute; top: 47px; left: -7px; width: 12px; height: 12px; color: var(--gold-bright); background: var(--dark); content: ">"; font-family: monospace; font-size: 12px; }
.delivery-sequence span { color: var(--gold-bright); font-family: "JetBrains Mono", monospace; font-size: 7px; }
.delivery-sequence h3 { margin-top: 18px; }
.delivery-sequence p { margin-top: 8px; color: #9f9d97; font-size: 7px; line-height: 1.5; }
.commercial-band { display: flex; align-items: center; justify-content: space-between; margin: 18px 0; padding: 18px; color: var(--ink); background: #f1ede4; }
.commercial-band span { display: block; color: #7b6238; font-family: "JetBrains Mono", monospace; font-size: 6px; text-transform: uppercase; }
.commercial-band strong { display: block; margin-top: 5px; font-family: "DM Serif Display", Georgia, serif; font-size: 27px; font-weight: 400; }
.commercial-band p { max-width: 390px; color: #5b5a57; font-size: 8px; line-height: 1.5; }
.scope-columns { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #3a3c40; }
.scope-columns > div { padding: 15px 15px 0 0; }
.scope-columns > div + div { padding-left: 15px; border-left: 1px solid #3a3c40; }
.scope-columns ul { margin: 10px 0 0; padding-left: 15px; }
.scope-columns li { margin-bottom: 6px; color: #aaa79f; font-size: 7px; line-height: 1.4; }

.acceptance-grid { margin-top: 24px; }
.acceptance-grid article { min-height: 128px; }
.ownership-table { margin-top: 24px; border-top: 2px solid var(--ink); }
.ownership-table > div { display: grid; grid-template-columns: 190px 1fr; padding: 13px 0; border-bottom: 1px solid var(--line); }
.ownership-table b { font-size: 8px; }
.ownership-table span { color: var(--muted); font-size: 8px; line-height: 1.5; }

.agenda { margin-top: 24px; border-top: 1px solid #3b3d41; }
.agenda > div { display: grid; grid-template-columns: 62px 190px 1fr; gap: 15px; align-items: start; min-height: 66px; padding: 13px 0; border-bottom: 1px solid #3b3d41; }
.agenda > div > span { color: var(--gold-bright); font-size: 7px; }
.agenda h3 { font-size: 10px; }
.agenda p { color: #aaa79f; font-size: 8px; line-height: 1.5; }
.meeting-output { margin-top: 18px; padding: 18px; border-left: 4px solid var(--gold); color: var(--ink); background: #f0ece3; }
.meeting-output > span { display: block; margin-bottom: 7px; color: #80622f; font-size: 6px; }
.meeting-output strong { font-family: "DM Serif Display", Georgia, serif; font-size: 16px; font-weight: 400; line-height: 1.3; }
.schedule-box { display: grid; grid-template-columns: .9fr 1.1fr; gap: 30px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #3b3d41; }
.schedule-box h3 { margin-top: 8px; font-size: 10px; }
.schedule-box p { color: #aaa79f; font-size: 8px; line-height: 1.5; }

.decision-page h2 { max-width: 620px; font-size: 34px; }
.decision-path { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 30px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.decision-path article { min-height: 185px; padding: 16px; }
.decision-path article + article { border-left: 1px solid var(--line); }
.decision-path article > span { color: var(--gold); font-size: 7px; }
.decision-path h3 { margin-top: 24px; font-size: 12px; }
.decision-path p { margin-top: 8px; color: var(--muted); font-size: 7.5px; line-height: 1.5; }
.final-investment { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 24px; color: #eee; background: var(--dark); }
.final-investment > div { min-height: 155px; padding: 20px; }
.final-investment > div + div { border-left: 1px solid #3b3d41; }
.final-investment span { color: var(--gold-bright); font-family: "JetBrains Mono", monospace; font-size: 6px; text-transform: uppercase; }
.final-investment strong { display: block; margin: 12px 0 7px; font-family: "DM Serif Display", Georgia, serif; font-size: 23px; font-weight: 400; }
.final-investment p { color: #aaa79f; font-size: 7.5px; line-height: 1.5; }
.next-action { margin-top: 24px; padding: 18px 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.next-action span { color: var(--gold); font-family: "JetBrains Mono", monospace; font-size: 7px; text-transform: uppercase; }
.next-action h3 { margin-top: 10px; font-family: "DM Serif Display", Georgia, serif; font-size: 22px; font-weight: 400; }
.next-action p { margin-top: 7px; color: var(--muted); font-size: 8px; }

@page { size: Letter; margin: 0; }
@media print {
  .review-bar { display: none; }
  .client-room, .brief-intro { display: none; }
  body, .proposal { padding: 0; background: #fff; }
  .sheet { margin: 0; box-shadow: none; }
  #architecture h2 { font-size: 26px; }
  #architecture .architecture { margin-top: 18px; }
  #architecture .architecture-column { min-height: 300px; padding: 18px; }
  #architecture .architecture-column p { min-height: 52px; }
  #architecture .architecture-column ul { margin-top: 14px; }
  #architecture .architecture-column li { padding: 8px 0; }
  #architecture .ownership-line { margin-top: 14px; padding: 10px 14px; }
  #architecture .open-foundation { margin-top: 10px; }
  #architecture .open-foundation > div { padding-top: 10px; }
  #delivery .delivery-sequence { margin-top: 20px; }
  #delivery .delivery-sequence article { min-height: 160px; padding: 14px; }
  #delivery .delivery-sequence h3 { margin-top: 14px; }
  #delivery .commercial-band { margin: 14px 0; padding: 15px 18px; }
  #delivery .scope-columns > div { padding-top: 12px; }
  #delivery .scope-columns ul { margin-top: 8px; }
  #delivery .scope-columns li { margin-bottom: 4px; }
}

@media screen and (max-width: 820px) {
  .review-bar { align-items: flex-start; padding: 10px 12px; }
  .review-brand b, .review-actions > span, .button.secondary { display: none; }
  .review-actions { margin-left: auto; }
  .client-room { min-height: 0; padding: 72px 22px 48px; }
  .room-title { font-size: 44px; }
  .room-lede { font-size: 15px; }
  .room-actions { flex-direction: column; }
  .room-actions .button { justify-content: center; width: 100%; }
  .document-facts { grid-template-columns: 1fr 1fr; margin-top: 46px; }
  .document-facts > div:nth-child(3) { border-left: 0; }
  .document-facts > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .brief-intro { align-items: flex-start; flex-direction: column; gap: 18px; width: calc(100% - 44px); margin-top: 44px; }
  .brief-intro h2 { font-size: 28px; }
  .proposal { padding: 10px; }
  .sheet { width: 100%; height: auto; min-height: 0; margin-bottom: 12px; padding: 34px 22px 50px; }
  .cover { min-height: calc(100vh - 78px); }
  .cover-copy { margin-top: 70px; }
  h1 { font-size: 42px; }
  h2 { font-size: 29px; }
  .sheet.dark > .page-footer { position: static; margin-top: 34px; }
  .investment-panel, .cover-footer, .signal-strip, .ownership-line { align-items: flex-start; flex-direction: column; }
  .investment-panel { gap: 14px; margin-top: 42px; }
  .investment-panel > div { min-width: 0; }
  .sheet.dark > .cover-footer { position: static; display: grid; grid-template-columns: 1fr; margin-top: 70px; }
  .requirement-grid, .acceptance-grid { grid-template-columns: 1fr; }
  .architecture { grid-template-columns: 1fr; }
  .architecture-column { min-height: 0; }
  .arch-arrow { min-height: 42px; transform: rotate(90deg); }
  .open-foundation, .intake-grid, .scope-columns, .schedule-box, .final-investment { grid-template-columns: 1fr; }
  .open-foundation > div + div, .scope-columns > div + div, .final-investment > div + div { padding-left: 0; border-left: 0; }
  .intake-list li, .ownership-table > div { grid-template-columns: 1fr; }
  .delivery-sequence, .decision-path { grid-template-columns: 1fr; }
  .delivery-sequence article { min-height: 0; }
  .delivery-sequence article + article, .decision-path article + article { border-top: 1px solid #373a3e; border-left: 0; }
  .delivery-sequence article + article::before { display: none; }
  .agenda > div { grid-template-columns: 52px 1fr; }
  .agenda p { grid-column: 2; }
  .commercial-band { align-items: flex-start; flex-direction: column; gap: 15px; }
}
