/* The one-click app pages, /one-click and /one-click/<template>
   (internal/web/oneclick.go). Linked only from templates/oneclick.html, after
   style.css and diagrams.css, which it builds on: .alt-hero, .alt-stats,
   .alt-section, .alternatives-index, .alt-note and the buttons are style.css's.
   Colours are the site's tokens only, so it follows a theme. */

/* The app's name beside its own project's logo. */
.oc-title { display: flex; align-items: center; gap: 16px; margin: 0 0 18px; }
.oc-title h1 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.oc-logo { flex: none; width: 56px; height: 56px; padding: 7px; border: 1px solid var(--line); border-radius: 14px;
  background: #fff; object-fit: contain; }
.oc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 26px 0 0; }
.oc-note { margin-top: 18px; }
.oc-preview { max-width: 62em; margin: 16px 0 0; padding: 12px 16px; border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--line));
  border-radius: 10px; background: color-mix(in srgb, var(--warn) 6%, var(--panel)); color: var(--warn); font-size: 14px; line-height: 1.6; }

/* What the install makes: a card per service, the one with the public
   address first and marked, each with what it runs and what it reserves. */
.oc-stack { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; margin: 0; padding: 0;
  list-style: none; }
.oc-svc { display: grid; align-content: start; gap: 6px; min-width: 0; padding: 16px 18px; border: 1px solid var(--line-strong);
  border-radius: 14px; background: var(--panel); }
.oc-svc-public { border-color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
.oc-role { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.oc-svc-public .oc-role { color: var(--accent); }
.oc-svc-public .oc-role::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--signal);
  box-shadow: 0 0 0 1px var(--signal-edge); }
.oc-what { color: var(--text); font: 700 19px/1.25 var(--display); overflow-wrap: anywhere; }
.oc-image { color: var(--muted); font: 12.5px/1.5 var(--mono); overflow-wrap: anywhere; }
.oc-metrics { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 13px; }
.oc-metrics b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* The room it takes: one bar per resource, against the smallest plan's quota. */
.oc-room { max-width: 720px; margin-top: 28px; }
.oc-room h3 { margin: 0 0 12px; font-size: 16px; }
.oc-meters { display: grid; gap: 10px; margin: 0 0 10px; padding: 0; list-style: none; }
.oc-meters li { display: grid; grid-template-columns: 72px minmax(0, 1fr) 10.5em; align-items: center; gap: 14px; font-size: 14px; }
.oc-meter-label { color: var(--muted); font-weight: 600; }
/* The bar is drawn stretched to its row (preserveAspectRatio="none"), so its
   ends are rounded by the box it is drawn in, not by the drawing. */
.oc-meter { display: block; width: 100%; height: 8px; border-radius: 4px; overflow: hidden; }
.oc-meter-track { fill: var(--line); }
.oc-meter-fill { fill: var(--accent); }
.oc-meter-said { color: var(--text); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* What it replaces, where its paid apps' own pages are not served. */
.oc-paid { display: grid; gap: 4px; height: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.oc-paid span { color: var(--muted); font-size: 13.5px; line-height: 1.5; }

/* About the project: each fact a cell of its own. */
.oc-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; margin: 0; }
.oc-facts > div { min-width: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.oc-facts dt { margin: 0 0 6px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.oc-facts dd { margin: 0; color: var(--text); font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }

/* A day is read whole, never broken at its hyphens; so is each number of the
   at-a-glance strip. */
.oneclick-page time, .oc-stats b { white-space: nowrap; }

/* The one-click diagram, as wide as the front page's. */
.oc-how .dg-figure { max-width: 880px; margin-top: 0; }

/* An app as a list shows it: its logo, its category, its name and a line of
   facts. */
.oc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; margin: 0; padding: 0;
  list-style: none; }
.oc-card a { display: flex; align-items: flex-start; gap: 12px; height: 100%; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--panel); color: var(--text); transition: border-color .15s; }
.oc-card a:hover { border-color: var(--accent); text-decoration: none; }
.oc-card img { flex: none; width: 40px; height: 40px; padding: 4px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; object-fit: contain; }
.oc-card-text { display: grid; gap: 3px; min-width: 0; }
.oc-card-cat { color: var(--accent); font: 500 12px/1.4 var(--mono); }
.oc-card strong { font: 700 17px/1.3 var(--display); overflow-wrap: anywhere; }
.oc-card-line { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.oc-jump { margin-top: 26px; }
.oc-group { padding-top: 48px; }
/* A jump to a part of the list lands below the header, not under it. */
.oc-group h2 { scroll-margin-top: 96px; }
.oc-group .section-head { margin-bottom: 16px; }
.oc-group .section-head h2 { font-size: clamp(22px, 2.4vw, 28px); }
.oc-all { margin: 8px 0 0; }

@media (max-width: 760px) {
  .oc-title { gap: 12px; }
  .oc-logo { width: 44px; height: 44px; padding: 5px; border-radius: 11px; }
  .oc-group { padding-top: 36px; }
}
@media (max-width: 400px) {
  /* Two cells to a row on the narrowest phones: a day (2026-11-29) fits one. */
  .oc-stats li { padding: 12px 14px; }
  .oc-stats b { font-size: 19px; }
}
@media (max-width: 480px) {
  .oc-meters li { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .oc-meter { grid-column: 1 / -1; grid-row: 2; }
  .oc-meter-said { text-align: right; }
}
