:root {
  --canvas: #e8e5dd;
  --paper: #fbfaf6;
  --ink: #1f2722;
  --muted: #69716c;
  --green: #2f4238;
  --accent: #a54b3c;
  --line: #d6d3ca;
  --soft: #f0eee7;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 10; background: white; padding: .75rem 1rem; }
.skip-link:focus { left: 1rem; top: 1rem; }

.page-shell {
  width: min(calc(100% - 32px), var(--max));
  margin: 28px auto;
  background: var(--paper);
  border: 1px solid #cbc8bf;
  box-shadow: 0 18px 55px rgb(41 48 43 / 10%);
}
.brief-header {
  min-height: 150px;
  padding: 30px 34px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}
.eyebrow { margin: 0 0 .45rem; color: var(--accent); font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.025em; line-height: 1.08; }
h1 { font-size: clamp(2.3rem, 5vw, 4.4rem); }
h2 { font-size: clamp(2rem, 3.6vw, 3.25rem); }
h3 { margin: 0; font-size: .85rem; }
p { margin: 0; }
.subtitle { margin-top: .45rem; color: var(--muted); }
.project-meta { margin: 0; display: grid; grid-template-columns: repeat(3, auto); gap: 1.8rem; }
.project-meta div { min-width: 96px; }
.project-meta dt { color: var(--muted); font-size: .63rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.project-meta dd { margin: .2rem 0 0; font-family: Georgia, serif; font-size: 1rem; }

.tab-bar {
  min-height: 58px;
  padding: 0 18px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  overflow-x: auto;
  background: var(--green);
}
.tab-bar button {
  min-width: 150px;
  min-height: 45px;
  padding: .75rem 1rem;
  border: 0;
  border-radius: 7px 7px 0 0;
  background: #43574d;
  color: #eef0ed;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 750;
  text-align: left;
  white-space: nowrap;
}
.tab-bar button span { margin-right: .45rem; color: #bac4be; font-size: .62rem; }
.tab-bar button:hover { background: #53685d; }
.tab-bar button[aria-selected="true"] { background: var(--paper); color: var(--ink); }
.tab-bar button[aria-selected="true"] span { color: var(--accent); }
.tab-bar button:focus-visible { outline: 3px solid #e9b461; outline-offset: -4px; }

.tab-content { min-height: 660px; }
.tab-panel { padding: 42px 34px 50px; }
.tab-panel[hidden] { display: none; }
.panel-heading { margin-bottom: 30px; display: grid; grid-template-columns: 1.4fr .8fr; gap: 4rem; align-items: end; }
.panel-heading > p { color: var(--muted); font-size: .88rem; }

.summary-panel { padding-top: 48px; }
.summary-heading { max-width: 760px; margin-bottom: 30px; }
.summary-heading > p:last-child { max-width: 530px; margin-top: .8rem; color: var(--muted); }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.summary-card { display: block; overflow: hidden; border: 1px solid var(--line); background: white; text-decoration: none; }
.summary-image { height: 220px; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--soft); }
.summary-image img { width: 100%; height: 100%; object-fit: cover; }
.summary-card:first-child .summary-image img,
.summary-card:last-child .summary-image img { object-fit: contain; }
.summary-card > div:last-child { padding: 1rem; }
.summary-card span { color: var(--accent); font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.summary-card h3 { margin: .35rem 0 .3rem; font-family: Georgia, serif; font-size: 1.25rem; font-weight: 400; }
.summary-card p { color: var(--muted); font-size: .76rem; }
.summary-card:hover { border-color: var(--green); }
.summary-note { margin-top: 16px; padding: .85rem 1rem; display: flex; flex-wrap: wrap; gap: .45rem 1.4rem; background: #eee6d3; color: #655b47; font-size: .76rem; }
.summary-note strong { color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }

.drawing { position: relative; display: block; overflow: hidden; border: 1px solid var(--line); background: white; text-decoration: none; }
.drawing img { width: 100%; }
.drawing span { position: absolute; right: 10px; bottom: 10px; padding: .55rem .7rem; background: var(--green); color: white; font-size: .7rem; font-weight: 750; }
.open-questions { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.open-questions p { color: var(--muted); font-size: .78rem; }
.open-questions strong { display: block; margin-bottom: .2rem; color: var(--accent); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; }
.disclaimer { margin-top: 14px; color: var(--muted); font-size: .68rem; }

.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.plan-card { position: relative; display: grid; grid-template-columns: 1.25fr .75fr; min-height: 250px; overflow: hidden; border: 1px solid var(--line); background: white; text-decoration: none; }
.plan-card img { width: 100%; height: 100%; object-fit: cover; object-position: top left; border-right: 1px solid var(--line); }
.plan-card > div { padding: 1rem; align-self: end; }
.plan-card h3 { margin-bottom: .25rem; font-family: Georgia, serif; font-size: 1.25rem; font-weight: 400; }
.plan-card p { color: var(--muted); font-size: .76rem; }
.plan-card:hover { border-color: var(--green); }
.plan-card.recommended { border: 2px solid var(--green); }
.tag { display: inline-block; margin-bottom: .6rem; padding: .18rem .38rem; background: var(--green); color: white; font-size: .58rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tag.new { background: var(--accent); }

.image-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.image-grid figure { margin: 0; padding: 5px; border: 1px solid var(--line); background: white; }
.image-grid figure.featured { grid-column: span 2; grid-row: span 2; }
.image-grid img { width: 100%; height: 210px; object-fit: cover; }
.image-grid .featured img { height: calc(100% - 28px); min-height: 440px; }
.image-grid figcaption { padding: .5rem .35rem .25rem; color: var(--muted); font-size: .68rem; }

.file-list { border-top: 1px solid var(--line); }
.file-list a { min-height: 74px; padding: .9rem .35rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; border-bottom: 1px solid var(--line); text-decoration: none; }
.file-list a:hover { background: var(--soft); }
.file-list strong, .file-list span { display: block; }
.file-list strong { font-family: Georgia, serif; font-size: 1.12rem; font-weight: 400; }
.file-list span { margin-top: .15rem; color: var(--muted); font-size: .72rem; }
.file-list b { color: var(--accent); font-size: .67rem; letter-spacing: .08em; }

footer { min-height: 68px; padding: 0 34px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font-size: .68rem; }
footer a { color: var(--green); font-weight: 750; text-underline-offset: .2em; }

@media (max-width: 800px) {
  .brief-header { align-items: flex-start; flex-direction: column; }
  .project-meta { width: 100%; }
  .panel-heading { grid-template-columns: 1fr; gap: 1rem; }
  .summary-grid { grid-template-columns: 1fr; }
  .summary-card { display: grid; grid-template-columns: .9fr 1.1fr; }
  .summary-image { height: 190px; border-right: 1px solid var(--line); border-bottom: 0; }
  .plan-card { grid-template-columns: 1fr; }
  .plan-card img { height: 230px; border-right: 0; border-bottom: 1px solid var(--line); }
  .image-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .page-shell { width: 100%; margin: 0; border: 0; }
  .brief-header { min-height: 0; padding: 24px 18px; }
  .project-meta { grid-template-columns: 1fr 1fr; gap: .9rem; }
  .tab-bar { padding: 0 8px; }
  .tab-bar button { min-width: 132px; padding-inline: .75rem; }
  .tab-panel { padding: 30px 18px 38px; }
  .summary-card { display: block; }
  .summary-image { height: 210px; border-right: 0; border-bottom: 1px solid var(--line); }
  .open-questions, .plan-grid, .image-grid { grid-template-columns: 1fr; }
  .image-grid figure.featured { grid-column: auto; grid-row: auto; }
  .image-grid .featured img, .image-grid img { height: auto; min-height: 0; max-height: 420px; }
  footer { padding: 18px; align-items: flex-start; flex-direction: column; gap: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
