/* ------------------------------------------------------------------
   Feelingss AI — staff portal (v1)

   Theme taken from the deployed site (its local copy), not from taste:
     css/flow.css                 (loaded last on the live page)
     css/feelings-ai.webflow.css

   Colours actually used here, each a measured brand value:

     #8F56FF  brand purple — header band, step discs, hover/focus accent
              (.footer          feelings-ai.webflow.css:1676)
     #8315F9  hover purple   (--purboflow-400, flow.css:2101)
     #2C005B  deep purple — headings, footer band (--deeep_purple-900, flow.css:2098)
     #6706CE  link colour    (--purple, flow.css:2093)
     #4B5563  body text      (--coolgray-600, flow.css:2091)
     #FFFFFF  default surface (body, flow.css:2330 — no background set there)
     #E6E6E6  card / hairline borders (feelings-ai.webflow.css:123, :372)
     #F3F4F6  code chips and tags (--coolgray-100, flow.css:2090 token block)

   Type: Inter, sans-serif (body, flow.css:2330). No Inter file exists in the
   repo or on this machine, so the family is declared with local fallbacks and
   nothing is fetched over the network.

   Spacing uses one scale: 8 / 12 / 16 / 24.
   ------------------------------------------------------------------ */

:root {
  --brand: #8F56FF;
  --button-hover: #8315F9;
  --deep: #2C005B;
  --purple: #6706CE;
  --text: #4B5563;
  --white: #FFFFFF;
  --page: #F7F3FF; /* #8F56FF at 7% over #FFFFFF — derived, not measured */
  --rule: #E6E6E6;
  --grey-100: #F3F4F6;

  --radius-card: 12px;
  --radius-pill: 100px;
  --wrap: 1200px;

  --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Ubuntu Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
    monospace;

  color-scheme: light;
}

/* ---------- reset ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

/* Top-aligned on purpose: centring the cards would move them with viewport
   height (and with the keyboard open), so content starts at the top and the
   footer is pinned to the bottom instead. */
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background-color: var(--page);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 {
  margin: 0;
  color: var(--deep);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-weight: 700; }
h2, h3 { font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }

a { color: var(--purple); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--button-hover); }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* ---------- header: one row, logo + Portal ---------- */

.band {
  background-color: var(--brand);
}

.band-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand-mark {
  width: auto;
  height: 28px;
  flex: 0 0 auto;
  object-fit: contain;
}

.band-bar h1 {
  color: var(--white);
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
}

/* ---------- links ---------- */

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  /* symmetric, so the auto margins above and below the block leave equal gaps */
  padding-block: 16px;
}

/* Centre the block in the space between header and footer with auto margins —
   not justify-content/place-content, which clip the top in a short viewport.
   Auto margins split the free space evenly and collapse to 0 when the guide is
   open and the content is taller than the screen, so nothing is ever clipped. */
.links-block {
  margin-block: auto;
}

/* label above the two cards: small, no rule, no banner feel */
.links-heading {
  margin-bottom: 8px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
}

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cards:empty { display: none; }

.card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 56px;
  padding: 16px;
  color: var(--text);
  text-align: center;
  text-decoration: none;
  background-color: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  transition: border-color 0.15s ease;
}

.card:hover,
.card:focus-visible {
  border-color: var(--brand);
}

.card-title {
  color: var(--deep);
  font-size: 18px;
  font-weight: 600;
}

.card-desc {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.5;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  list-style: none;
}

.card-tag {
  padding: 1px 8px;
  color: var(--purple);
  background-color: var(--grey-100);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
}

.cards-error {
  font-size: 16px;
}

.links-note {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.5;
}

/* what they are for — the one fact the note line no longer carries */
.use-cases {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}

.use-cases-label {
  color: var(--deep);
  font-weight: 600;
}

/* ---------- setup guide: collapsed <details>, opens without JS ---------- */

.guide {
  margin-top: 16px;
  scroll-margin-top: 16px;
}

.guide-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  background-color: var(--white);
  border: 1px solid var(--rule);
  border-radius: 8px;
  color: var(--deep);
  font-size: 16px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.guide-summary::-webkit-details-marker { display: none; }

.guide-summary::after {
  content: "+";
  color: var(--purple);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.guide[open] .guide-summary::after { content: "–"; }

/* long-form text keeps its white surface when the guide is open */
.guide[open] .guide-body {
  margin-top: 8px;
  padding: 16px;
  background-color: var(--white);
  border: 1px solid var(--rule);
  border-radius: 8px;
}

.guide-title {
  font-size: 18px;
  line-height: 1.25;
}

.guide-lede {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.5;
}

.guide-steps {
  counter-reset: step;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

/* Steps are a two-column grid: number in column 1, everything else in column 2.
   Every direct child must be placed explicitly (a bare <p> after <h3> would
   otherwise drop into column 1 of the next row and render one word per line). */
.guide-step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  row-gap: 4px;
  align-items: start;
}

.guide-step > h3,
.guide-step > p,
.guide-step > .picker,
.guide-step > .device-row,
.guide-step > .device-panel,
.guide-step > .fold { grid-column: 2; }

.guide-step::before {
  content: counter(step);
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--white);
  background-color: var(--brand);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.guide-step h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

.guide-step > p {
  font-size: 16px;
  line-height: 1.5;
}

.guide code {
  padding: 1px 4px;
  color: var(--deep);
  background-color: var(--grey-100);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.92em;
  word-break: break-word;
}

/* device picker inside step 1: radios + chip labels + one panel.
   Pure CSS, no JS: the radios sit above the row so the panel selectors can
   reach their panels as later siblings — that is why the chip rule uses `~`. */
.picker {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

/* Chips: 2×2 grid on phones so all four are visible with no scrolling at all;
   a single row from 421px, where four fit. Never scrolls. */
.device-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  min-width: 0;
}

.device-row label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-pill);
  color: var(--deep);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

#dev-mac:checked ~ .device-row label[for="dev-mac"],
#dev-windows:checked ~ .device-row label[for="dev-windows"],
#dev-iphone:checked ~ .device-row label[for="dev-iphone"],
#dev-android:checked ~ .device-row label[for="dev-android"] {
  background-color: var(--brand);
  border-color: var(--brand);
  color: var(--white);
}

#dev-mac:focus-visible ~ .device-row label[for="dev-mac"],
#dev-windows:focus-visible ~ .device-row label[for="dev-windows"],
#dev-iphone:focus-visible ~ .device-row label[for="dev-iphone"],
#dev-android:focus-visible ~ .device-row label[for="dev-android"] {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.device-panel {
  display: none;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 8px;
}

#dev-mac:checked ~ .panel-mac,
#dev-windows:checked ~ .panel-windows,
#dev-iphone:checked ~ .panel-iphone,
#dev-android:checked ~ .panel-android { display: block; }

.device-panel p {
  font-size: 16px;
  line-height: 1.5;
}

.store-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  font-weight: 600;
}

/* "Not working?" stays a <details>, so it keeps the +/– marker */
.fold {
  margin-top: 8px;
  border: 1px solid var(--rule);
  border-radius: 8px;
}

.trouble { margin-top: 16px; }

.fold summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  color: var(--deep);
  font-size: 16px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.fold summary::-webkit-details-marker { display: none; }

.fold summary::after {
  content: "+";
  color: var(--purple);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.fold[open] summary::after { content: "–"; }

.fold ul {
  list-style: none;
  padding: 0 12px;
}

.fold li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.5;
}

.fold li::before {
  content: "";
  position: absolute;
  top: 0.6em;
  left: 2px;
  width: 5px;
  height: 5px;
  background-color: var(--purple);
  border-radius: 50%;
}

.fold > p {
  padding: 0 12px 12px;
  font-size: 16px;
  line-height: 1.5;
}

/* ---------- footer ---------- */

.site-footer {
  margin-top: auto;
  padding: 24px 0;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
  background-color: var(--deep);
}

.footer-line {
  max-width: 60ch;
  color: var(--white);
  font-size: 16px;
  line-height: 1.5;
}

/* ---------- tablet and up ---------- */

@media (min-width: 421px) {
  .device-row {
    display: flex;
    gap: 8px;
  }

  .device-row label {
    display: inline-flex;
    flex: 0 0 auto;
  }
}

@media (min-width: 700px) {
  .wrap {
    padding-left: 24px;
    padding-right: 24px;
  }

  .band-bar {
    gap: 12px;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .brand-mark { height: 40px; }

  .band-bar h1 { font-size: 24px; }

  main {
    padding-block: 24px;
  }

  .cards {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .card { padding: 24px; }
  .card-title { font-size: 20px; }

  .guide {
    margin-top: 24px;
  }

  .guide[open] .guide-body {
    padding: 24px;
  }

  .guide-title { font-size: 32px; }
  .guide-steps { gap: 16px; }
  .guide-step h3 { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
}

