/* GitHub wakes it: the card on the Machine page */
.machine .hook-card { gap: 16px; }
.hook-card > header { display: flex; align-items: flex-start; gap: 12px; }
.hook-card > header > div { flex: 1; min-width: 0; display: grid; gap: 3px; }
.hook-card > header small { font-size: 13px; line-height: 1.45; }
.hook-mark { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--amber-soft); color: var(--amber); }
/* 5px down puts the 24px switch level with the middle of the 34px mark. */
.hook-card > header > .toggle { flex: none; margin-top: 5px; }
/* Inputs trade their outline for an inner ring (style.css), and the switch's own shadow then covers that ring. */
.hook-card > header > .toggle input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hook-off { display: grid; align-content: start; gap: 12px; }
.hook-off p { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.hook-card .hook-note { margin: 0; color: var(--ink-3); font-size: 13px; line-height: 1.5; }
.hook-note .icon { margin-right: 6px; vertical-align: -2px; }
.hook-note .linky { padding: 0 1px; font-size: inherit; }
.hook-secret { display: block; padding: 7px 10px; border-radius: 8px; background: var(--well); word-break: break-all; }
.hook-steps { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 13.5px; line-height: 1.45; }
.hook-steps dt { color: var(--ink-3); }
.hook-steps dd { min-width: 0; margin: 0; color: var(--ink); }
.hook-steps code { color: var(--ink); overflow-wrap: anywhere; }

/* One bar for each wake, as long as the sleep before it */
.hook-sum { color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.hook-sum b { color: var(--ink); font-variant-numeric: tabular-nums; }
/* The rows share the list's columns, so every bar starts and ends at the same place and their lengths compare. */
.hook-slept { display: grid; grid-template-columns: minmax(150px, 0.9fr) minmax(0, 2fr) max-content; gap: 9px 14px; }
.hook-slept li { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; min-width: 0; }
.hook-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hook-who > div { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; line-height: 1.35; }
.hook-who b { font-size: 13.5px; overflow-wrap: anywhere; }
.hook-who .app-face { width: 30px; height: 30px; border-radius: 9px; }
.hook-bar { height: 10px; border-radius: 99px; background: var(--raised); }
/* The least width is the bar's height: a wake with no sleep before it still shows as a round stub. */
.hook-bar i { display: block; width: var(--w); min-width: 10px; height: 100%; border-radius: 99px; background: linear-gradient(90deg, color-mix(in srgb, var(--amber) 45%, var(--surface)), var(--amber)); }
/* Amber is for sleep that was measured. */
.hook-bar-none i { background: color-mix(in srgb, var(--ink-3) 45%, var(--raised)); }
.hook-long { color: var(--ink-2); font-size: 12.5px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.hook-address { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 9px 9px 9px 14px; border-radius: 12px; background: var(--well); }
.hook-address code { flex: 1 1 240px; min-width: 0; color: var(--ink); overflow-wrap: anywhere; }
.hook-more { min-width: 0; }
.hook-more > summary { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 8px; color: var(--ink-2); font-size: 13px; font-weight: 500; list-style: none; cursor: pointer; }
.hook-more > summary::-webkit-details-marker { display: none; }
.hook-more > summary:hover { background: var(--raised); color: var(--ink); }
/* The icon set has one chevron, pointing right: a quarter turn points it down, and the other way up once open. */
.hook-more > summary .icon { transform: rotate(90deg); }
.hook-more[open] > summary .icon { transform: rotate(-90deg); }
.hook-more > .stack { margin-top: 12px; }
@media (max-width: 760px) {
  /* The bar goes under the name, nearer to its own row than to the next wake. */
  .hook-slept { grid-template-columns: minmax(0, 1fr) max-content; row-gap: 14px; }
  .hook-slept li { row-gap: 7px; }
  .hook-bar { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 520px) {
  .hook-steps { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .hook-steps dd + dt { margin-top: 8px; }
}

/* Asked before a new secret or turning off: either breaks the webhook already on GitHub. */
.hook-sure { display: grid; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--amber-soft); }
.hook-sure p { margin: 0; color: var(--ink); font-size: 13.5px; line-height: 1.5; }
