/* JSandhu AI: component styles. Load after tokens.css.
   Type comes from the type-style classes in tokens.css (.heading, .body, .label ...).
   These jsa- classes handle layout, colour and lines. Add data-theme="green" to any
   element to switch it, and everything inside it, to a green page. */

@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700&family=IBM+Plex+Sans:wght@400;600&display=swap");

/* Grounds */
.jsa-surface { background: var(--surface); color: var(--ink); }
.jsa-muted { color: var(--muted); }

/* The A4 page */
.jsa-page {
  box-sizing: border-box;
  width: var(--page-width);
  height: var(--page-height);
  padding: var(--page-margin-y) var(--page-margin-x);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.jsa-stack { display: flex; flex-direction: column; gap: var(--space-24); }
:where(.jsa-page, .jsa-surface, .jsa-panel, .jsa-card, .jsa-step, .jsa-next, .jsa-stack) :where(h1, h2, h3, h4, p) { margin: 0; }

/* Running header and footer */
.jsa-running { display: flex; justify-content: space-between; gap: var(--space-16); color: var(--muted); }

/* The one marigold moment */
.jsa-highlight {
  background: var(--highlight);
  color: var(--on-highlight);
  border-radius: var(--radius-sm);
  padding: 0 var(--space-6);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Wordmark: set the size with font-size; the stroke and gap scale with it */
.jsa-wordmark { font-family: var(--font-display); font-weight: 700; color: var(--ink); white-space: nowrap; }
.jsa-wordmark__accent { position: relative; display: inline-block; padding-bottom: 0.2em; }
.jsa-wordmark__accent::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0.125em;
  background: var(--highlight);
  border-radius: var(--radius-full);
}

/* Steps */
.jsa-step { display: flex; flex-direction: column; gap: var(--space-8); }
.jsa-divider { height: var(--rule); background: var(--line-strong); border: 0; margin: 0; }

/* Cards */
.jsa-card {
  box-sizing: border-box;
  border: var(--rule) solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-16);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.jsa-card--strong { border-color: var(--line-strong); }
.jsa-card--target { border-style: dashed; border-color: var(--line-strong); }
.jsa-card--roomy { padding: var(--space-20); }
.jsa-card--filled {
  background: var(--panel);
  border-color: var(--panel);
  color: var(--on-panel);
  --ink: var(--on-panel);
  --muted: var(--on-panel);
}
.jsa-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-12); }
.jsa-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-12); }

/* Panel: the inverse block, e.g. In your workbook */
.jsa-panel {
  background: var(--panel);
  color: var(--on-panel);
  --ink: var(--on-panel);
  --muted: var(--on-panel);
  --line: var(--on-panel);
  --line-strong: var(--on-panel);
  border-radius: var(--radius-lg);
  padding: var(--space-24);
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
}

/* Table: set the columns with --jsa-cols on .jsa-table */
.jsa-table { display: flex; flex-direction: column; }
.jsa-table__row {
  display: grid;
  grid-template-columns: var(--jsa-cols, repeat(3, minmax(0, 1fr)));
  border-bottom: var(--rule-hairline) solid var(--line);
}
.jsa-table__row > * { padding: 11px var(--space-12); }
.jsa-table__head {
  background: var(--panel);
  color: var(--on-panel);
  border-bottom: 0;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.jsa-table__head > * { padding: var(--space-10) var(--space-12); }
.jsa-table__key { font-weight: 600; }
.jsa-table__note { color: var(--muted); }

/* Checklist */
.jsa-checklist { display: flex; flex-direction: column; gap: var(--space-12); }
.jsa-check { display: flex; gap: var(--space-14); align-items: flex-start; }
.jsa-check__box {
  width: var(--checkbox);
  height: var(--checkbox);
  flex-shrink: 0;
  box-sizing: border-box;
  border: var(--rule) solid var(--line-strong);
  border-radius: var(--radius-sm);
  margin-top: 2px;
}

/* Next strip at the foot of a checkpoint */
.jsa-next {
  border-top: var(--rule) solid var(--line-strong);
  padding-top: var(--space-16);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-24);
}
.jsa-next__note { color: var(--muted); text-align: right; max-width: 280px; }

/* Pills: the three checks */
.jsa-pills { display: flex; flex-wrap: wrap; gap: var(--space-12); }
.jsa-pill { border: var(--rule) solid var(--line-strong); border-radius: var(--radius-full); padding: var(--space-6) var(--space-16); }

/* Flow: cards joined by arrows */
.jsa-flow { display: flex; align-items: stretch; gap: var(--space-8); }
.jsa-flow > .jsa-card { flex: 1 1 0; }
.jsa-flow__arrow { display: flex; align-items: center; font-weight: 600; }

/* Photo frame: real photos only */
.jsa-photo { box-sizing: border-box; border: var(--frame) solid var(--paper); border-radius: var(--radius-lg); object-fit: cover; }
