/* Daylight phase 2, group de: styles for the pages that group converts. Kept in its own file so the four groups never edit the same lines. Folded into site.css afterwards. */

/* the old .band paragraph rule indents plain paragraphs; a prose panel sets its own */
.band.prose > p:not([class]) { margin: .9rem 0 0; max-width: 72ch; color: var(--ink); }

/* ---- the first sentence of a section, in larger type ---- */
.prose > .de-first { font-size: 1.15rem; line-height: 1.5; color: var(--ink-deep); font-weight: 520; }

/* ---- DeFacts: a term on the left, the words on the right ---- */
.prose > .de-facts, .de-facts { max-width: 960px; }
.de-facts-h { font-size: 1.1rem; margin-bottom: .4rem; }
.de-facts dl { border-top: 1px solid var(--edge); }
.de-fact { display: grid; grid-template-columns: 11.5rem minmax(0, 1fr); gap: .4rem 1.6rem; padding: .85rem 0; border-bottom: 1px solid var(--edge); }
.de-fact dt { font-size: .78rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--green-deep); padding-top: .2rem; }
.de-fact dd { margin: 0; max-width: 70ch; }
.de-fact dd a { overflow-wrap: anywhere; }
.de-facts-foot { padding-top: .8rem; display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; }

/* ---- a short aside ---- */
.de-note { max-width: 70ch; padding: .7rem 1rem; border-left: 4px solid var(--green); background: var(--green-wash); border-radius: 0 12px 12px 0; font-size: .95rem; }
.de-note b { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--green-deep); margin-right: .35rem; }

/* ---- what it does not do yet ---- */
.de-limits { display: grid; gap: 1.2rem; max-width: 72ch; }
.de-limits section ul { display: grid; gap: .5rem; margin-top: .6rem; }
.de-limits section li { position: relative; padding-left: 1.2rem; }
.de-limits section:first-child li::before { content: ""; position: absolute; left: 0; top: .7em; width: .5rem; height: .5rem; border-radius: 50%; background: var(--amber); }
.de-limits section + section li { padding-left: 0; }
.de-limits section + section li::before { content: none; }
.de-limits h3 { margin-top: 0; }

/* ---- plain tables ---- */
.de-tablewrap { overflow-x: auto; max-width: 100%; }
.de-table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.45; }
.de-table th, .de-table td { text-align: left; vertical-align: top; padding: .65rem 1rem .65rem 0; border-top: 1px solid var(--edge); }
.de-table thead th { border-top: 0; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); font-weight: 700; }
.de-table th[scope="row"] { font-weight: 650; color: var(--ink-deep); width: 11rem; }
.de-table td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.prose > .de-tablewrap { max-width: 960px; }

/* ---- two columns that say who does what ---- */
.de-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 960px; }
.de-two > div { border: 1px solid var(--edge-strong); border-radius: 16px; padding: 1rem 1.2rem; background: var(--card); }
.de-two > div + div { background: var(--green-wash); }
.de-two h3 { margin-top: 0; font-size: 1.05rem; }
.de-two p + p { margin-top: .6rem; }
.prose > .de-two { max-width: 960px; }

/* ---- an in-page list of links ---- */
.de-toc { display: flex; flex-wrap: wrap; gap: .5rem; max-width: none; }
.de-toc a { display: inline-block; padding: .4rem .85rem; border: 1px solid var(--edge-strong); border-radius: 999px; background: var(--card); color: var(--ink); text-decoration: none; font-size: .92rem; }
.de-toc a:hover { border-color: var(--green-deep); background: var(--green-wash); }
.prose > .de-toc { max-width: none; }

/* ---- code, for the API pages ---- */
.de-code { position: relative; max-width: 960px; }
.de-code .de-tag { display: inline-block; margin-bottom: .3rem; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green-deep); }
.de-code pre { margin: 0; padding: 1rem 1.2rem; border-radius: 14px; background: var(--ink-deep); color: #e8eef4; overflow-x: auto; font: 500 .85rem/1.55 var(--mono, ui-monospace, monospace); }
.prose code { font-family: var(--mono, ui-monospace, monospace); font-size: .88em; overflow-wrap: anywhere; }
.prose > .de-code { max-width: 960px; }

/* ---- an API route, closed until it is opened ---- */
.de-routes { display: grid; gap: .6rem; max-width: 1040px; }
.de-route { border: 1px solid var(--edge-strong); border-radius: 14px; background: var(--card); }
.de-route[open] { border-color: var(--green-deep); }
.de-route > summary { cursor: pointer; list-style: none; display: grid; grid-template-columns: 4.2rem minmax(0, 18rem) minmax(0, 1fr); gap: .3rem 1rem; align-items: baseline; padding: .8rem 1rem; }
.de-route > summary::-webkit-details-marker { display: none; }
.de-route > summary::after { content: none; }
.de-route > summary:hover { background: var(--green-wash); border-radius: 14px; }
.de-route-m { font: 700 .78rem/1.2 var(--mono, ui-monospace, monospace); letter-spacing: .06em; color: var(--green-deep); }
.de-route-path { font: 600 .88rem/1.3 var(--mono, ui-monospace, monospace); color: var(--ink-deep); overflow-wrap: anywhere; }
.de-route-p { font-size: .95rem; color: var(--ink); }
.de-route-body { display: grid; gap: .7rem; padding: .4rem 1.2rem 1.2rem; border-top: 1px solid var(--edge); }
.de-route-body > h4 { margin-top: .5rem; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--green-deep); }
.de-route-body > p { max-width: 70ch; }

/* ---- diagrams (hosting, the build checks) ---- */
.de-diagram { max-width: 760px; padding: .6rem; border: 1px solid var(--edge); border-radius: 16px; background: var(--card); }
.de-dia { width: 100%; height: auto; }
.de-dia .box { fill: #fff; stroke: var(--ink-deep); stroke-width: 2; }
.de-dia .box--in { fill: var(--green-wash); }
.de-dia .zone { fill: none; stroke: var(--soft); stroke-width: 1.5; stroke-dasharray: 6 5; }
.de-dia .wire { fill: none; stroke: var(--ink-deep); stroke-width: 2; }
.de-dia .wire--priv { stroke-dasharray: 2 5; stroke-linecap: round; stroke-width: 3; }
.de-dia .head { fill: var(--ink-deep); }
.de-dia text { font: 600 13px var(--sans); fill: var(--ink-deep); }
.de-dia .t-big { font: 720 15px var(--sans); }
.de-dia .t-mono { font: 600 10.5px var(--mono, ui-monospace, monospace); letter-spacing: .07em; fill: var(--soft); text-transform: uppercase; }
.de-dia .t-sm { font: 500 12px var(--sans); fill: var(--soft); }
.de-diagram-cap { margin-top: .5rem; font-size: .85rem; color: var(--soft); }

/* ---- a status line under a heading ---- */
.de-statuses { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }

@media (max-width: 720px) {
  .de-fact { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
  .de-two { grid-template-columns: minmax(0, 1fr); }
  .de-route > summary { grid-template-columns: 3.6rem minmax(0, 1fr); }
  .de-route-p { grid-column: 1 / -1; }
  .de-table th[scope="row"] { width: auto; }
  .de-table { min-width: 32rem; }
}
