/* /demos/aegean-placement — the page's own chrome.
 *
 * Colors come from the site's custom properties so the page follows the theme
 * toggle. Anything hard-coded here would be a light-mode-only decision, and the
 * map is the half of the page that would look worst getting that wrong.
 */

.aegean-claims {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.aegean-claim {
  border: 1px solid var(--border-color, #d0d7de);
  border-left-width: 4px;
  border-radius: 6px;
  padding: 0.85rem 1rem;
  background: var(--card-bg, transparent);
}

.aegean-claim h3 {
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}

.aegean-claim p {
  margin: 0;
}

/* The two borders are the page's only use of color to carry meaning, so each
 * is backed by a word in the heading as well — "guaranteed" and "no guarantee".
 * A reader who cannot tell the two hues apart still gets the distinction. */
.aegean-claim-guaranteed {
  border-left-color: #2f855a;
}

.aegean-claim-unguaranteed {
  border-left-color: #b7791f;
}

.aegean-tag {
  font-size: 0.78rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--border-color, #d0d7de);
  white-space: nowrap;
}

.aegean-tag-proof {
  border-color: #2f855a;
}

.aegean-stage {
  margin: 1rem 0 1.5rem;
}

.aegean-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.aegean-modes {
  border: 1px solid var(--border-color, #d0d7de);
  border-radius: 6px;
  padding: 0.4rem 0.75rem 0.6rem;
  margin: 0;
}

.aegean-modes legend {
  font-size: 0.8rem;
  width: auto;
  padding: 0 0.3rem;
  margin: 0;
}

.aegean-modes label {
  display: block;
  white-space: nowrap;
}

.aegean-slider {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  gap: 0.2rem;
}

/* THE RADIUS CONTROL IS HIDDEN FOR p-median, WHICH HAS NO RADIUS, and this rule
 * is what actually hides it. `display: flex` above is an AUTHOR rule and the
 * browser's `[hidden] { display: none }` is a USER-AGENT rule, so the class wins
 * and the `hidden` attribute does nothing on its own. The control stayed on
 * screen offering a number the p-median solver never reads — caught by
 * tests/aegean-demo.spec.js, which asserted the attribute's EFFECT rather than
 * its presence. Any hidden flex or grid element needs this; the attribute alone
 * is not enough. */
.aegean-slider[hidden] {
  display: none;
}

.aegean-slider input[type="range"] {
  min-width: 150px;
}

.aegean-slider input[type="number"] {
  width: 6rem;
}

.aegean-slider output {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* The map is an inline SVG the page script draws into. A min-height keeps the
 * document from jumping when the module finishes loading and the first render
 * arrives. */
.aegean-map {
  display: block;
  width: 100%;
  height: auto;
  min-height: 320px;
  border: 1px solid var(--border-color, #d0d7de);
  border-radius: 6px;
  background: var(--card-bg, transparent);
}

.aegean-coast {
  fill: none;
  stroke: var(--border-color, #9aa4ae);
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
}

.aegean-spoke {
  stroke: #6b7280;
  stroke-width: 1;
  opacity: 0.55;
}

.aegean-port {
  fill: #6b7280;
}

.aegean-depot {
  fill: #2f855a;
  stroke: var(--card-bg, #fff);
  stroke-width: 1.5;
}

.aegean-radius-ring {
  fill: #2f855a;
  fill-opacity: 0.08;
  stroke: #2f855a;
  stroke-opacity: 0.5;
  stroke-width: 1;
}

.aegean-uncovered {
  fill: #b7791f;
}

.aegean-label {
  font-size: 10px;
  fill: var(--body-color, #333);
  paint-order: stroke;
  stroke: var(--card-bg, #fff);
  stroke-width: 2.5px;
}

.aegean-status {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
}

.aegean-results {
  margin-bottom: 1.5rem;
}

.aegean-verdict {
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.aegean-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin: 0 0 0.6rem;
}

.aegean-figures dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.75;
  font-weight: 500;
}

.aegean-figures dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
}

.aegean-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.aegean-table caption {
  caption-side: top;
  font-size: 0.85rem;
  padding-bottom: 0.4rem;
}

@media (max-width: 640px) {
  .aegean-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .aegean-slider input[type="range"] {
    min-width: 0;
    width: 100%;
  }
}
