:root {
  color-scheme: dark;
  --bg: #0b1019;
  --surface: #17222e;
  --text: #f3f6fa;
  --muted: #bbc7d3;
  --accent: #b7ded9;
  --line: rgba(213,230,242,.2);
  font: 16px/1.5 "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 110px; scrollbar-gutter: stable; }
body { margin: 0; color: var(--text); background: radial-gradient(ellipse at 8% 50%, #142735 0, transparent 55%), var(--bg); }
.wrap { width: min(1080px, calc(100% - 64px)); margin-inline: auto; }
.skip { position: fixed; left: 24px; top: -90px; z-index: 100; padding: 12px 20px; border-radius: 20px; color: var(--bg); background: var(--text); }
.skip:focus { top: 20px; }
.topbar, .intro, .footer { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", sans-serif; }
.topbar { position: sticky; top: 18px; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 66px; padding: 10px 22px; margin-top: 18px; border: 1px solid rgba(227,238,255,.14); border-radius: 24px; background: rgba(31,40,55,.66); box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 16px 48px -24px rgba(0,0,0,.55); -webkit-backdrop-filter: blur(28px) saturate(135%); backdrop-filter: blur(28px) saturate(135%); }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; font-size: 19px; font-weight: 550; letter-spacing: -.4px; text-decoration: none; }
.brand svg { flex: none; color: #dceafa; }
.header-version { flex: none; margin-left: auto; white-space: nowrap; color: #bec8d7; font-size: 12px; }
.intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding: 58px 2px 32px; }
h1, h2, h3, p { margin: 0; }
.intro h1 { max-width: 730px; font-size: clamp(32px, 4.4vw, 54px); line-height: 1.12; letter-spacing: -1.6px; font-weight: 580; }
.setup-panel { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 16px 40px; margin-bottom: 28px; padding: clamp(16px, 2.2vw, 24px); border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.setup-panel h2 { margin: 2px 0 6px; font-size: clamp(1.3rem, 2.4vw, 1.6rem); line-height: 1.2; }
.setup-intro p { max-width: 50ch; color: var(--muted); }
.setup-panel a { color: var(--accent); text-underline-offset: 3px; }
.setup-check { min-width: 0; }
.setup-check label { display: block; margin-bottom: 6px; font-weight: 600; }
.setup-command { display: flex; align-items: stretch; gap: 8px; }
.setup-command .prompt { min-width: 0; padding: 8px 12px; }
.setup-command .copy { flex: none; }
.setup-check .copy-status:not(:empty) { display: block; margin-top: 6px; }
.card-body .download { display: inline-flex; align-items: center; justify-self: start; min-height: 44px; margin-bottom: 12px; padding: 8px 14px; border: 1px solid var(--accent); border-radius: 9px; text-decoration: none; }
.card-body .download:hover { color: #10202a; background: var(--accent); }
@media (max-width: 720px) { .setup-panel { grid-template-columns: 1fr; } }
.worked-example > summary { min-height: 44px; padding: 10px 0; color: var(--accent); font-weight: 600; cursor: pointer; }
.worked-drawing { color: var(--accent); text-underline-offset: 3px; }
.worked-drawing { display: inline-block; margin-top: 14px; }
.tide-exchange-plans { display: flex; flex-wrap: wrap; gap: 0 20px; }
#steps-title { margin-bottom: 12px; font-size: 1.35rem; font-weight: 570; letter-spacing: -.025em; }
.step-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 20px; }
.step-card { min-width: 0; container-type: inline-size; background: var(--surface); border: 1px solid var(--line); border-radius: 17px; }
.download:hover, footer a:hover { color: #fff; }
.step-card:target, .step-card:focus-within { border-color: #8bb0b4; }
.step-thumb { display: block; width: 100%; height: auto; background: #f5f4ee; border-radius: 16px 16px 0 0; }
.drawing-thumbnail { display: block; border-radius: 16px 16px 0 0; cursor: zoom-in; }
.drawing-thumbnail:focus-visible { outline-offset: -3px; }
.supporting-drawing { margin: 8px 0 12px; }
.supporting-drawing img { display: block; width: 100%; height: auto; }
.supporting-drawing figcaption { margin-top: 4px; color: var(--muted); font-size: .85rem; }
#step-1:has(#site-analysis-sample[open]) { grid-column: 1 / -1; }
@media (min-width: 701px) {
  #step-1:has(#site-analysis-sample[open]) > .step-thumb { max-height: 185px; object-fit: contain; }
}
.outline-study { margin: .75rem 0; }
.outline-study .drawing-thumbnail { border-radius: 0; }
.site-files { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: .7rem 0; font-size: .87rem; }
.site-files a { color: var(--accent); }
.drawing-viewer { width: max-content; box-sizing: border-box; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); margin: auto; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: var(--surface); color: var(--text); }
.drawing-viewer::backdrop { background: rgba(5,10,16,.86); }
.drawing-viewer form { display: flex; justify-content: flex-end; gap: 8px; padding-bottom: 8px; }
.drawing-viewer button { min-height: 44px; padding: 5px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); }
.drawing-scroll { overflow: auto; max-width: calc(100vw - 50px); max-height: calc(100dvh - 108px); }
.drawing-scroll img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 108px); margin: auto; }
.drawing-viewer.actual-size img { max-width: none; max-height: none; }
html:has(.drawing-viewer[open]) { overflow: hidden; }
.step-thumb.rhino-capture { aspect-ratio: 760 / 300; object-fit: cover; object-position: center 54%; }
.card-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; column-gap: 8px; padding: 16px 18px 18px; }
.card-body > * { grid-column: 1 / -1; min-width: 0; }
.step-number { color: var(--accent); font-size: .82rem; font-weight: 600; }
.card-body h3 { margin: 2px 0 12px; font-size: clamp(1.15rem, 2vw, 1.4rem); letter-spacing: -.028em; font-weight: 570; line-height: 1.25; }
.download { color: var(--accent); font-size: .9rem; font-weight: 550; }
.download { text-underline-offset: 4px; }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 32px 2px 35px; color: #a6b3c6; font-size: 15px; }
.footer-credit { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-credit span { font-size: 14px; color: #bec8d7; }
.footer-credit a { display: block; max-width: 100%; }
.footer-credit img { display: block; width: 280px; max-width: 100%; height: auto; }
.worked-example { margin-top: 12px; border-top: 1px solid var(--line); }
.precedents { font-size: .95rem; }
.precedents .study-question { margin: 6px 0 14px; color: var(--muted); }
.precedent-sketches { display: block; width: 100%; height: auto; }
.workshop-sketch { margin: 18px 0 0; }
.workshop-sketch figcaption { margin-bottom: 6px; color: var(--muted); font-size: .85rem; }
.precedents article { border-top: 1px solid var(--line); padding: 11px 0 4px; margin-top: 10px; }
.precedents article h4 { font-size: 1rem; margin: 0 0 5px; }
.precedents article p { margin: 4px 0; }
.precedents article a { display: inline-block; margin-top: 2px; }
.precedents a { color: var(--accent); text-underline-offset: 3px; }
.case-photo-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; border-radius: 16px 16px 0 0; overflow: hidden; }
.case-photo-strip a { display: flex; flex-direction: column; background: #202c34; color: var(--text); text-decoration: none; }
.case-photo-strip img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.case-photo-strip .source-tile { display: grid; align-content: center; padding: 8px; flex: 1; font-size: .83rem; color: var(--accent); }
.case-photo-strip span { padding: 6px 8px; font-size: .78rem; font-weight: 600; line-height: 1.25; }
.case-photo-strip a:hover span, .case-photo-strip a:focus-visible span { text-decoration: underline; }
.case-photo-strip a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.concept-strip .drawing-thumbnail { border-radius: 0; }
.concept-strip img { aspect-ratio: 16 / 9; object-fit: contain; background: #faf8f2; }
.case-photo { margin: 8px 0 12px; }
.precedents .photo-original { display: block; background: #111a20; }
.case-photo img { display: block; width: 100%; max-height: 365px; object-fit: contain; }
.case-photo figcaption { margin-top: 6px; line-height: 1.4; }
.photo-caption, .photo-credit { display: block; }
.photo-credit { margin-top: 3px; color: var(--muted); font-size: .78rem; }
.precedents .photo-credit a { margin: 0; color: inherit; }
.source-figures { padding-left: 1.15rem; margin: 8px 0 0; }
.source-figures li { margin: 3px 0; color: var(--muted); font-size: .85rem; }
.case-drawing { margin: 12px 0; }
.case-drawing img { width: 100%; height: auto; display: block; }
.case-drawing figcaption { font-size: .82rem; color: var(--muted); margin-top: 5px; }
.comparison-question { margin: 5px 0 14px; }
.comparison-board { display: block; color: var(--accent); font-size: .9rem; text-underline-offset: 3px; }
.comparison-board img { display: block; width: 100%; height: auto; margin-bottom: 6px; }
.comparison-list { display: grid; gap: 10px; margin: 14px 0; padding: 0; list-style-position: inside; }
.comparison-list li { border-top: 1px solid var(--line); padding-top: 8px; color: var(--muted); font-size: .92rem; }
.comparison-list strong { color: var(--text); }
.drawing-method { display: block; color: var(--accent); margin: 5px 0; font-weight: 600; }
.comparison-list a { display: block; margin-top: 6px; color: var(--accent); text-underline-offset: 3px; }
.method-archive { margin-top: 15px; border-top: 1px solid var(--line); padding-top: 10px; }
.method-archive summary { cursor: pointer; width: fit-content; color: var(--accent); }
.method-archive figure { margin: 12px 0 4px; display: grid; gap: 8px; }
.method-archive img { display: block; width: 100%; height: auto; }
.method-archive figcaption span { display: block; margin-top: 5px; color: var(--muted); font-size: .93rem; }
.comparison-model { color: var(--accent); text-underline-offset: 3px; }
.model-guide { margin-top: 4px; font-size: .85rem; color: var(--muted); }
.tide-variants { margin-top: 16px; padding: 12px 0 0; border-top: 1px solid var(--line); }
.tide-variants summary { width: fit-content; color: var(--accent); font-weight: 600; cursor: pointer; }
.tide-variants p { margin: 10px 0; }
.tide-variants .comparison-model { display: inline-block; margin-top: 10px; }
.card-body .prompt { padding: 8px 12px; min-height: 44px; }
.card-body .prompt[readonly] { grid-column: 1; resize: none; }
.card-body .prompt-actions { display: contents; }
.card-body .copy { grid-column: 2; min-height: 44px; justify-self: start; }
.card-body .prompt:not([readonly]) + .prompt-actions .copy, #step-4 .copy { grid-column: 1 / -1; margin-top: 8px; }
#step-4 .prompt { grid-column: 1 / -1; }
.card-body .copy-status { grid-column: 1 / -1; margin-top: 6px; }
.card-body .copy-status:empty { display: none; }
.copy-status { color: var(--muted); font-size: .85rem; }
button { cursor: pointer; font: inherit; }
.copy { padding: 7px 15px; border-radius: 9px; border: 1px solid transparent; color: #10202a; background: var(--accent); font-weight: 600; }
.prompt { display: block; width: 100%; padding: 15px 16px; background: #0e1720; border: 1px solid var(--line); border-radius: 10px; color: var(--text); font: 1rem/1.6 "Segoe UI Variable", "Segoe UI", Arial, sans-serif; resize: vertical; }
:focus-visible { outline: 3px solid #b7dfef; outline-offset: 3px; }
@media (max-width: 700px) { .step-grid { grid-template-columns: 1fr; gap: 14px; } }
@media (min-width: 1600px) {
  .wrap { width: min(1160px, calc(100% - 64px)); }
  .intro { padding-top: 66px; }
}
@media (max-width: 800px) {
  .wrap { width: calc(100% - 40px); }
  .topbar { gap: 12px; padding-inline: 17px; }
  .intro { padding-top: 39px; gap: 24px; }
}
@media (max-width: 600px) {
  html { scroll-padding-top: 95px; }
  .wrap { width: calc(100% - 32px); }
  .topbar { top: 10px; margin-top: 10px; flex-wrap: wrap; gap: 7px 10px; padding: 13px 14px; border-radius: 21px; }
  .brand { font-size: 16px; gap: 7px; }
  .brand svg { width: 21px; height: 24px; }
  .header-version { font-size: 10px; }
  .intro { display: block; padding: 31px 4px 26px; }
  .intro h1 { font-size: 36px; }
  .footer { display: block; padding: 32px 5px 29px; }
}
@media (max-width: 350px) { .header-version { width: 100%; text-align: right; } }
@media (prefers-reduced-transparency: reduce) { .topbar { background: #1c2837; -webkit-backdrop-filter: none; backdrop-filter: none; } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .topbar { background: #1a2533; } }
@container (max-width: 320px) {
  .card-body .prompt[readonly], .card-body .copy { grid-column: 1 / -1; }
  .card-body .copy { margin-top: 8px; }
}


