/* Sea Power Wall borrows the Every Acre Water Basin page whole: the same
   masthead, the same carousel, the same two-column body, the same cards.
   The portrait page shape comes from .portrait-carousel in that page's own
   stylesheet, shared with House Flood Barrier.

   What is genuinely new here is the two live panels. The carousel marks
   two of its own pages "Interactive in the web version", so the web page
   has to actually carry them or it is publishing a promise it does not
   keep. These are their styles and nothing else. */

/* A panel spans both columns, because a row of sliders reads badly in a
   column half the page wide. */
/* No box round a panel, asked for 2026-11-26: "Id rather no card type
   borders arount the text. Only on the pdf." The carousel of PDF pages
   keeps its border and nothing else on the page does. A panel's own
   readouts are tinted tiles, so the sliders and their figures still read
   as one thing with no line drawn round them. */
.spw-panel {
  break-inside: avoid;
  margin: 1rem 0 1.8rem;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
}
.spw-panel h3 { margin-top: 0; }
.spw-panel .spw-lead { margin-top: 0; }

.spw-sliders {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.9rem 1.5rem;
  margin: 0.9rem 0 1.1rem;
}
.spw-slider label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.spw-slider output { font-weight: 700; color: var(--accent-blue); }
/* The browser's own slider, sized so a finger can hit it. */
.spw-slider input[type="range"] {
  width: 100%;
  height: 44px;
  accent-color: var(--accent-blue);
  cursor: pointer;
}
.spw-slider input[type="range"]:focus-visible {
  outline: 3px solid var(--accent-blue);
  outline-offset: 2px;
}

/* The answers. Each one says what it is, then the figure, then what the
   figure means in houses, because a megawatt means nothing on its own. */
.spw-readouts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}
.spw-readout {
  padding: 0.8rem 0.9rem;
  background: var(--bg-subtle);
  border-radius: 6px;
}
.spw-readout .spw-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.spw-readout .spw-figure {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0.25rem 0 0.1rem;
}
.spw-readout .spw-homes { display: block; font-size: 0.9rem; color: var(--text-muted); }
/* The tide readout is the point of the whole exercise, so it is marked
   out rather than sitting level with the two surf figures. */
.spw-readout.is-tide { background: var(--warn-soft); }
.spw-readout.is-tide .spw-name { color: var(--warn); }

.spw-assumptions {
  margin: 0.9rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* The per-coast table's own figures line up right, because a column of
   numbers read against a ragged left edge is harder than it needs to be. */
.spw-coast-table td:nth-child(n+2) { text-align: right; }
.spw-coast-table th:nth-child(n+2) { text-align: right; }

/* The table's caption explains where its figures come from, so it reads
   as a line of prose above the table rather than a centred title. */
.spw-coast-table caption {
  caption-side: top;
  text-align: left;
  padding: 0 0 0.5rem;
  font-size: 0.92rem;
  opacity: 0.8;
}

/* The redrawn design at the foot of the page. Drawn here as real shapes
   rather than a picture, so it scales, stays sharp, and can be read out
   by a screen reader from its own title and description. Every colour is
   one of the site's own variables, the same discipline the rest of this
   page keeps. */
.spw-figure-block { margin: 0; }
.spw-drawing {
  display: block;
  width: 100%;
  height: auto;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 6px;
}
.spw-figure-block figcaption {
  margin-top: 0.6rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.spw-d-sea { fill: var(--accent-soft); }
.spw-d-wave { fill: none; stroke: var(--accent-blue); stroke-width: 2.5; }
.spw-d-ground { fill: var(--bg-subtle); }
.spw-d-wall, .spw-d-wall-body { fill: var(--text-muted); }
.spw-d-res { fill: var(--accent-soft); stroke: var(--white); stroke-width: 2; }
.spw-d-duct { fill: none; stroke: var(--white); stroke-width: 4; stroke-linecap: round; }
.spw-d-turbine { fill: var(--warn); }
.spw-d-axle { stroke: var(--warn); stroke-width: 3.5; stroke-linecap: round; }
.spw-d-flow { fill: none; stroke: var(--warn); stroke-width: 3; stroke-linecap: round; }
.spw-d-dash { fill: none; stroke: var(--accent-blue); stroke-width: 2; stroke-dasharray: 8 6; }
.spw-d-house { fill: none; stroke: var(--text-main); stroke-width: 2.5; stroke-linejoin: round; }

/* Three sizes of writing on the drawing: the name of a wall, a note about
   a part, and the name of a lip. */
.spw-d-name {
  font: 700 19px var(--font-stack);
  fill: var(--text-main);
  text-anchor: middle;
}
.spw-d-note { font: 15px var(--font-stack); fill: var(--text-muted); }
.spw-d-lip { font: 700 15px var(--font-stack); fill: var(--text-main); }
/* A number inside a reservoir, and a line of writing on the dark wall
   itself, which needs the light colour to be read at all. */
.spw-d-inres {
  font: 700 17px var(--font-stack);
  fill: var(--accent-blue);
  text-anchor: middle;
}
.spw-d-onwall { font: 700 16px var(--font-stack); fill: var(--white); }

/* On a phone the whole drawing squeezed to about 320 pixels wide, which
   left its writing at roughly four pixels. It scrolls sideways instead,
   in its own box, so the page itself never scrolls sideways. */
.spw-drawing-scroll { overflow-x: auto; }
.spw-drawing-scroll:focus-visible { outline: 3px solid var(--accent-blue); outline-offset: 2px; }
.spw-drawing { min-width: 760px; }

/* How to read the page, in the masthead under the sources note. It is a
   numbered list because the three things really did happen in that order,
   and the order is the point: the idea came first, the research came
   second and changed it, and the wider design came third. */
.spw-howtoread {
  margin: 0.9rem 0 0;
  padding: 0.85rem 1rem;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 6px;
}
.spw-howtoread > p:first-child { margin: 0 0 0.5rem; }
.spw-howtoread ol { margin: 0; padding-left: 1.2rem; }
.spw-howtoread li { margin-bottom: 0.45rem; }
.spw-howtoread > p:last-child {
  margin: 0.6rem 0 0;
  font-size: 0.93rem;
  color: var(--text-muted);
}

/* The wide layout caps prose at 78 characters, which is right for reading
   a column of text and wrong here: this block is a short numbered list in
   a box of its own, and the cap left it filling 704 pixels of a 1,058
   pixel box with nothing to the right of it. Written with .plan-wide in
   front so it really beats that rule -- ".plan-wide p" is one class plus
   an element, so a rule on this class alone would lose to it. */
.plan-wide .spw-howtoread p,
.plan-wide .spw-howtoread li { max-width: none; }

/* A panel can carry its own title now, so the heading does not float
   above the box it names. */
.spw-panel h2 { margin-top: 0; }

/* ---- The twelve column grid -------------------------------------------
   Asked for 2026-11-25: "stick to the 12 column bootstrap style content
   width". It replaces the CSS multi-column flow for this page only; the
   three other pages on this stylesheet keep the flow they were built
   with.

   The flow was the cause of every layout complaint in the days before
   this. Multi-column text does not lay out, it pours: a heading written
   directly above its table landed in a column beside it, a section began
   halfway down the second column, and column-span: all had to be pasted
   on one element at a time to fight it. A grid puts things where they are
   put. Everything spans the full twelve unless it is told otherwise, and
   the only thing told otherwise is a card, which takes six so cards pair
   up two across. */
.spw-page .basin-columns {
  column-count: initial;
  column-gap: initial;
  column-rule: 0;
  display: grid;
  /* minmax(0, 1fr) rather than 1fr: a grid track's minimum is its content
     by default, so one wide child -- the drawing, which is 760 pixels at
     its narrowest -- pushed every track out and made the whole page
     scroll sideways on a phone. */
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0 2.25rem;
  align-items: start;
}
/* Full width is the default, so nothing has to ask for it. */
.spw-page .basin-columns > * { grid-column: span 12; min-width: 0; }
/* The writing runs in two columns and carries on from one into the
   other, so there is nothing between one body of text and the next but
   the ordinary space under a paragraph. Asked for 2026-11-26: "Create
   two div side by side and run the text in the columns removing the
   space in between them", "Remove the space betwenn text bodies." and
   "Put all text in two column sections". A band is the full width of the
   page: a table, a panel and the rule, because none of those can be read
   down half a page. A table's own title is its caption, which travels
   inside the table. */
.spw-page .basin-columns > .spw-flow {
  grid-column: span 12;
  column-count: 2;
  column-gap: 2.25rem;
}
/* A title stays with the writing under it rather than being left at the
   foot of a column on its own. The writing itself is allowed to break
   across the columns, which is what fills them both to the same depth. */
.spw-page .spw-flow h2,
.spw-page .spw-flow h3 { break-after: avoid; }
.spw-page .spw-flow > :first-child { margin-top: 0; }
/* .basin-span is still on the tables, the panels and the rule, and still
   means the same thing here. */
.spw-page .basin-columns > .basin-span { grid-column: span 12; }

/* A grid does not collapse margins between its items, so the vertical
   rhythm has to be set here rather than inherited from the flow. */
.spw-page .basin-columns > * { margin-top: 0; margin-bottom: 1.2rem; }
.spw-page .basin-columns h2 { margin-top: 2.4rem; margin-bottom: 0.6rem; }
.spw-page .basin-columns h3 { margin-top: 1.6rem; margin-bottom: 0.5rem; }
/* A heading needs a line of air above it, or it sits flush against the
   paragraph that ended the body before it. That is one line, not the
   half-screen of nothing this layout replaced. */
.spw-page .basin-columns .basin-card h3 { margin-top: 1.2rem; }
.spw-page .spw-flow > .basin-card:first-child h3,
.spw-page .basin-card:first-child h3 { margin-top: 0; }

/* One column on a narrow screen, same as the flow did.

   Done by keeping the twelve tracks and closing the gap between them,
   not by switching to a single track. A single track looked right until
   the elements still carrying "span 12" created eleven implicit columns
   underneath it and shattered the page into 37 pixel slivers. Twelve
   tracks with no gap means a card spanning six is half the width and
   everything spanning twelve is all of it, which is what is wanted. */
@media (max-width: 900px) {
  .spw-page .basin-columns { column-gap: 0; }
  .spw-page .basin-columns > .spw-flow { column-count: 1; }
}

/* No box round a block of writing at all, asked for 2026-11-26: "Remove
   the boders aroung the rest of the blocks of text and just separate them
   by a space." The blue edge went the day before and the rest of the box
   goes now, so what was a card is a heading with its paragraph under it,
   held apart from the next one by the space between them. The class name
   stays because it is what the shared stylesheet and this page's own
   tests both know these blocks by. */
.spw-page .basin-card,
.spw-page .basin-card.is-water,
.spw-page .basin-card.is-dirt {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
}
/* The shared stylesheet closes a card's last paragraph with no space
   under it, which was right while the card was a box and wrong now: a
   paragraph written after one sat flush against it, and the space is the
   only thing separating one block of writing from the next. */
.spw-page .basin-card p:last-child { margin-bottom: 1rem; }
/* Likewise the quote block and the warning-style blocks this page adds. */
.spw-page .hfb-quote { border-left: 1px solid var(--border-color); }
