figure, blockquote, dl, dd { margin: 0; }

section[id] { scroll-margin-top: 1.5rem; }

.wrap {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  z-index: 2;
  top: 0.75rem;
  left: 0.75rem;
  transform: translateY(calc(-100% - 0.75rem));
  padding: 0.6rem 0.9rem;
  background: var(--surface);
}

.skip-link:focus { transform: translateY(0); }
.masthead { border-bottom: 1px solid var(--line); }

.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}

.brand img { width: clamp(126px, 15vw, 170px); }
.client-mark { width: clamp(68px, 8vw, 78px); }

.hero {
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.hero-inner {
  display: grid;
  align-items: center;
  gap: clamp(1.7rem, 5vw, 4rem);
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

.hero h1 {
  max-width: 15ch;
  font-size: clamp(2.3rem, 4.8vw, 4rem);
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero-lead {
  max-width: 43ch;
  margin-top: 1rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.1rem);
}

.site-message {
  max-width: 29rem;
  padding: clamp(0.95rem, 3vw, 1.3rem);
  border: 1px solid #dddcd4;
  border-radius: var(--radius);
  background: #edeae3;
  color: #202b2b;
  font: 0.92rem/1.45 system-ui, sans-serif;
}

.site-message figcaption {
  margin-bottom: 0.65rem;
  color: #1b584d;
  font-weight: 700;
}

.message-bubble {
  padding: clamp(0.85rem, 2.6vw, 1.15rem);
  border-radius: 4px 12px 12px 12px;
  background: var(--surface);
}

.message-bubble p + p { margin-top: 0.65rem; }
.message-bubble .attachment { color: #53665e; font-size: 0.8rem; }

.story-section {
  padding-block: clamp(2.6rem, 5.5vw, 4.65rem);
  border-bottom: 1px solid var(--line);
}

.story-section:last-child { border-bottom: 0; }
.section-heading { margin-bottom: 1.4rem; }

h2 {
  font-size: clamp(1.75rem, 3.7vw, 2.85rem);
  letter-spacing: -0.035em;
  text-wrap: balance;
}

h3 { font-size: 1.15rem; line-height: 1.3; }

.section-lead {
  max-width: 67ch;
  margin-top: 0.65rem;
  color: var(--muted);
}

.workbook {
  border: 1px solid #cbd7cd;
  border-radius: var(--radius-sm);
  background: #fff;
  color: #18231c;
  font: 0.875rem/1.4 system-ui, sans-serif;
}

.workbook-title {
  padding: 0.65rem 0.9rem;
  border-radius: 9px 9px 0 0;
  background: #225a40;
  color: #fff;
  font: 650 0.93rem/1.4 system-ui, sans-serif;
}

.workbook-cell {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.38rem 0.65rem;
  border-bottom: 1px solid #d6ded8;
  background: #f5f7f5;
}

.workbook-cell span {
  min-width: 3rem;
  padding: 0.12rem 0.48rem;
  border: 1px solid #cbd7cd;
  background: #fff;
  color: #35463c;
  text-align: center;
}

.sheet-sample, .tool-map-frame { overflow-x: auto; }

.sheet-sample:focus-visible, .tool-map-frame:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.sheet-sample table {
  width: 100%;
  min-width: 53rem;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.sheet-sample th, .sheet-sample td {
  padding: 0.55rem 0.65rem;
  border-right: 1px solid #d6ded8;
  border-bottom: 1px solid #d6ded8;
  text-align: left;
  white-space: nowrap;
}

.sheet-sample tr > :last-child { border-right: 0; }
.sheet-sample thead { background: #e7f0e9; }
.sheet-sample .sheet-columns, .sheet-sample tr > :first-child {
  background: #f2f4f2;
  color: #45564b;
}

.sheet-sample .sheet-columns th, .sheet-sample tr > :first-child { text-align: center; }
.sheet-sample .sheet-columns th { padding-block: 0.3rem; font-weight: 500; }
.sheet-sample .selected-cell { box-shadow: inset 0 0 0 2px #217346; font-weight: 700; }

.workbook-tab {
  display: inline-block;
  margin-left: 2rem;
  padding: 0.48rem 0.8rem 0.4rem;
  border-bottom: 3px solid #217346;
  color: #225a40;
  font-weight: 700;
}

.sheet-note, .sheet-hint { margin-top: 0.7rem; color: var(--muted); font-size: 0.88rem; }

.timeline, .agent-lanes {
  display: grid;
  padding: 0;
  list-style: none;
}

.timeline { margin: 0; border-left: 2px solid var(--brand-tint-2); }
.timeline li { position: relative; padding: 0 0 1.2rem 1rem; }
.timeline li:last-child { padding-bottom: 0.15rem; }

.timeline li::before {
  position: absolute;
  top: 0.36rem;
  left: -6px;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--brand);
  content: '';
}

.timeline strong, .agent-lanes dt { display: block; color: var(--ink); font-weight: 700; }
.timeline p, .agent-lanes dd { margin-top: 0.28rem; color: var(--muted); font-size: 0.88rem; }

.shared-context {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin-top: 1.6rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--brand-strong);
  color: #fff;
  font-size: 0.9rem;
}

.shared-context::before {
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: 2px;
  height: 1.6rem;
  background: var(--brand-tint-2);
  content: '';
}

.agent-lanes {
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.agent-lanes > div { padding: 0.85rem 1rem; }
.agent-lanes > div + div { border-top: 1px solid var(--line); }

.programme-layout { display: grid; gap: 1.3rem; align-items: start; }
.stream-menu { border-block: 1px solid var(--line); }
.stream-item + .stream-item { border-top: 1px solid var(--line); }

.stream-item summary {
  min-height: 44px;
  padding: 0.75rem 0.5rem;
  cursor: pointer;
  font-weight: 600;
}

.stream-item summary::marker { color: var(--brand); }
.stream-item summary:hover, .stream-item[open] summary { color: var(--brand-strong); }
.stream-item summary:focus-visible { outline-offset: -2px; }
.stream-data { display: grid; gap: 0.55rem 1rem; padding: 0 0.55rem 0.85rem; }
.stream-data dt { font-size: 0.83rem; font-weight: 700; }
.stream-data dd { margin-top: 0.16rem; color: var(--muted); font-size: 0.88rem; }

.decision {
  padding: 1rem 1.15rem;
  border-left: 3px solid var(--brand);
  background: var(--brand-tint);
}

.programme-counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-block: 0.8rem;
}

.programme-counts dt { color: var(--muted); font-size: 0.82rem; }
.programme-counts dd { color: var(--brand-strong); font-size: 1.6rem; font-weight: 700; }
.decision p { color: var(--muted); font-size: 0.88rem; }

.planning-block + .planning-block { margin-top: 1.5rem; }
.planning-block > p { max-width: 75ch; margin-top: 0.45rem; color: var(--muted); font-size: 0.92rem; }

.planning-rates {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.7rem;
  padding: 0;
  list-style: none;
}

.planning-rates li { padding-top: 0.65rem; border-top: 1px solid var(--line); }

.planning-rates strong {
  display: block;
  color: var(--brand-strong);
  font-size: clamp(1.18rem, 2vw, 1.6rem);
  line-height: 1.25;
}

.planning-rates p { margin-top: 0.25rem; color: var(--muted); font-size: 0.87rem; }
.planning-rates h4 { margin-bottom: 0.24rem; font-size: 0.92rem; }

.piling-totals {
  display: grid;
  gap: 1.35rem 2rem;
  margin-top: 1.35rem;
}

.piling-totals > div { padding-top: 0.9rem; border-top: 1px solid var(--line); }

.piling-number {
  margin-block: 0.45rem;
  color: var(--brand-strong);
  font-size: clamp(3.2rem, 7vw, 5.7rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.055em;
  line-height: 1;
}

.piling-period { color: var(--muted); font-size: 0.86rem; }
.tool-map-frame { margin-top: 1.05rem; }
.tool-map-frame img { width: 100%; min-width: 680px; }

@media (min-width: 42rem) {
  .stream-data, .floor-rates, .piling-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rig-rates { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 49rem) {
  .hero-inner { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .programme-layout { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); }
  .tool-map-frame img { min-width: 0; }
}

@media (min-width: 57rem) {
  .wrap { width: min(1120px, calc(100% - 5rem)); }
  .agent-map { --agent-label-width: 12rem; }
  .timeline {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-left: var(--agent-label-width);
    border-left: 0;
    border-top: 2px solid var(--brand-tint-2);
  }
  .timeline li, .timeline li:last-child { padding: 0.75rem 0.95rem 0 0; }
  .timeline li::before { top: -6px; left: 0; }
  .agent-lanes > div {
    display: grid;
    grid-template-columns: var(--agent-label-width) repeat(5, minmax(0, 1fr));
    align-items: center;
    padding: 0.35rem 0;
  }
  .agent-lanes dt { padding: 0.3rem 0.9rem; font-size: 0.88rem; }
  .agent-lanes dd {
    grid-column: 2 / -1;
    margin: 0 0.35rem 0 0;
    padding: 0.45rem 0.7rem;
    border-left: 2px solid var(--brand-soft);
    border-radius: 0 4px 4px 0;
    background: var(--brand-tint);
  }
  .agent-lanes .foundation-to-structure { grid-column: 2 / 4; }
  .agent-lanes .installation-to-handover { grid-column: 5 / -1; }
}

@media (min-width: 59rem) { .sheet-hint { display: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media print {
  .wrap { width: 100%; }
  .skip-link, .sheet-hint { display: none; }
  .story-section, .hero-inner { padding-block: 1.2rem; }
  .site-message, .workbook, .agent-map, .planning-block { break-inside: avoid; }
  .workbook, .shared-context { print-color-adjust: exact; }
  .sheet-sample table, .tool-map-frame img { min-width: 0; }
  .sheet-sample th, .sheet-sample td { white-space: normal; }
  .stream-item::details-content { content-visibility: visible; }
}
