/* =============================================================
   start-here.css — the card draw (start-here.js).
   Loaded by index.html and platform.html. Tokens come from styles.css.

   The drawn card is a LOFL fold-card, the same as the printed decks:
   a FRONT (the old word, what it means, what to do) and a BACK
   ("your side": what you need, what to keep, one line you write).
   Both sides are the same size, in A5 card proportions, side by side
   from 56rem up and stacked on a phone. Colour rides the frame,
   the corner marks and the glyphs; the glyph and the suit name carry
   the meaning, so nothing depends on colour alone.
   ============================================================= */

.start-here .sh { display: grid; gap: var(--gap, 1.5rem); align-items: start; }
.start-here .sh-note { font-size: var(--step--1); color: var(--ink-2); max-width: 52ch; margin: 0; }
.start-here .sh-start { display: grid; gap: .8rem; justify-items: start; }
.start-here .sh-draw { font-size: var(--step-1); padding: .85rem 1.6rem; }

/* -------- The fold-card: two sides, one size -------- */
.sh-fold {
  --suit: var(--ink-3); --suit-text: var(--ink-3);
  display: grid; gap: 1.1rem; grid-template-columns: minmax(0, 1fr);
  max-width: 64rem; animation: sh-deal .35s ease-out;
}
.sh-fold[data-suit="learning"] { --suit: var(--c-blue);   --suit-text: #2F6596; }
.sh-fold[data-suit="skill"]    { --suit: var(--saffron);  --suit-text: var(--saffron-dk); }
.sh-fold[data-suit="culture"]  { --suit: var(--c-violet); --suit-text: var(--c-violet); }
.sh-fold[data-suit="green"]    { --suit: var(--palm);     --suit-text: #2F6B42; }

.sh-face {
  background: #fff; border-radius: 16px; padding: .7rem;
  box-shadow: 0 1px 2px rgba(40, 51, 46, .10), 0 14px 32px -14px rgba(40, 51, 46, .32);
  display: flex; flex-direction: column;
}
.sh-face:focus { outline: none; }
.sh-face:focus-visible { outline: 2.5px solid var(--teal); outline-offset: 3px; }
.sh-frame {
  flex: 1; position: relative; display: flex; flex-direction: column;
  border: 1.5px solid var(--suit); outline: .6px solid var(--suit); outline-offset: 2px; border-radius: 11px;
  padding: clamp(1.6rem, 1.3rem + 1vw, 2rem) clamp(2rem, 1.6rem + 1vw, 2.3rem) 1.6rem;
}

/* playing-card corner marks */
.sh-idx { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: 1;
  font-family: var(--font-geo); font-weight: 600; color: var(--suit-text); }
.sh-idx .n { font-size: .95rem; } .sh-idx .g { font-size: .78rem; margin-top: 2px; }
.sh-idx.tl { top: .55rem; left: .6rem; }
.sh-idx.br { bottom: .55rem; right: .6rem; flex-direction: column-reverse; }
.sh-idx.br .g { margin: 0 0 2px; }

.sh-line { margin: 0 0 .5rem; display: flex; justify-content: space-between; gap: 1rem;
  font-family: var(--font-geo); font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); }
.sh-sn { color: var(--suit-text); font-weight: 600; }
.sh-k { font-family: var(--font-geo); font-size: .66rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--suit-text); }

/* the hook: the old word, then what it means in plain words */
.sh-hook { margin: .2rem 0 0; display: grid; }
.sh-deva { font-family: var(--font-deva); font-weight: 600; font-size: clamp(2.3rem, 1.8rem + 2vw, 3.1rem); line-height: 1.22; color: var(--ink); }
.sh-rom { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: var(--step-1); line-height: 1.15; color: var(--ink-2); }
.sh-mean { margin-top: .45rem; font-size: var(--step-0); color: var(--ink); line-height: 1.4; }
.sh-mean .sh-k { margin-right: .35rem; }
.sh-spectrum { height: 2.5px; margin: .9rem 0 1rem; border-radius: 2px;
  background: linear-gradient(90deg, #BF4131, #E07D38, #E9B23E, #6B9A40, #346FA6, #7B4F9E); }

/* what to do */
.sh-title { margin: 0 0 .35rem; font-family: var(--font-display); font-weight: 600; font-size: var(--step-2); line-height: 1.15; color: var(--ink); }
.sh-front .note { margin: 0 0 .5rem; font-size: var(--step--1); color: var(--ink-2); }
.sh-k-do { margin: .3rem 0 .35rem; }
.sh-steps { margin: 0 0 .6rem; padding: 0; list-style: none; counter-reset: s; display: grid; gap: .3rem; }
.sh-steps li { counter-increment: s; position: relative; padding-left: 1.5rem; line-height: 1.45; color: var(--ink); }
.sh-steps li::before { content: counter(s); position: absolute; left: 0; top: .05em; width: 1rem; text-align: right;
  font-family: var(--font-geo); font-weight: 600; font-size: .85rem; color: var(--suit-text); }
.sh-prompt { margin: 0 0 .6rem; font-family: var(--font-display); font-size: var(--step-1); line-height: 1.42; color: var(--ink); text-wrap: pretty; }
.sh-aside { border-left: 2.5px solid var(--suit); padding: .1rem 0 .1rem .75rem; margin: .2rem 0 .6rem; font-size: var(--step--1); color: var(--ink-2); }
.sh-aside p { margin: 0 0 .25rem; }
.sh-pip { flex: 1 1 0; min-height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center;
  font-size: clamp(3.5rem, 2rem + 4vw, 6rem); line-height: 1; color: var(--suit); opacity: .15; }
.pill { display: inline-block; font-family: var(--font-geo); font-size: .62rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid currentColor; border-radius: var(--radius-pill, 999px); padding: .1rem .55rem; line-height: 1.5; white-space: nowrap; }
.pill-untested { color: var(--ink-2); } .pill-testing { color: #2F6596; } .pill-tested { color: var(--teal); }
.pill-ready { color: var(--teal); border-width: 1.5px; } .pill-on-hold { color: var(--saffron-dk); }
.sh-foot { align-items: center; }
.sh-test { display: grid; gap: .4rem; padding: .8rem 0 .2rem; border-top: 1px solid var(--line); }
.sh-foot { margin: auto 0 0; padding-top: .6rem; padding-right: .3rem; display: flex; justify-content: space-between; gap: 1rem;
  font-family: var(--font-geo); font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); }

/* the back: your side */
.sh-need { margin: 0 0 .8rem; display: grid; gap: .3rem; font-size: var(--step--1); }
.sh-need > div { display: block; }
.sh-need dt { display: inline; margin-right: .4rem; font-family: var(--font-geo); font-weight: 600; font-size: .66rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--suit-text); }
.sh-need dd { display: inline; margin: 0; color: var(--ink); }
.sh-do { display: grid; gap: .55rem; margin-top: auto; padding-top: .8rem; border-top: 1px solid var(--ink); }
.sh-do .sh-now { margin: 0; color: var(--ink-2); font-size: var(--step--1); }
.sh-do .sh-now strong { color: var(--ink); }
.sh-keep { margin: 0; font-size: var(--step--1); color: var(--ink); }
.sh-keep .sh-k { margin-right: .35rem; }
.sh-do label { margin-top: .2rem; font-family: var(--font-display); font-weight: 600; font-size: var(--step-1); color: var(--ink); }
/* the textarea looks like ruled card lines; the lines are part of the field, not a picture */
.sh-do textarea {
  width: 100%; font: inherit; font-size: 1.02rem; color: #1B3A6B; resize: vertical;
  line-height: 2rem; padding: 0 .35rem; border: 0; border-radius: 0; background-color: transparent;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(2rem - 1px), #B9AD94 calc(2rem - 1px), #B9AD94 2rem);
  background-attachment: local; min-height: 6rem;
}
.sh-do textarea:focus-visible { outline: 2.5px solid var(--teal); outline-offset: 3px; background-color: rgba(31, 111, 92, .04); }
.sh-do textarea[aria-invalid="true"] { outline: 2px solid var(--saffron-dk); outline-offset: 3px; }
.sh-do .btn-row, .sh-kept .btn-row { margin-top: .3rem; }
.sh-err { margin: 0; font-size: var(--step--1); font-weight: 600; color: var(--saffron-dk); }
.sh-led { margin: .9rem 0 0; padding-top: .45rem; border-top: 1px solid var(--line); font-size: .72rem; color: var(--ink-2); overflow-wrap: anywhere; }

@keyframes sh-deal { from { opacity: 0; transform: translateY(10px) rotate(-1deg); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sh-fold { animation: none; } }

/* -------- After you keep it -------- */
.sh-kept {
  display: grid; gap: .8rem; max-width: 40rem;
  background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--teal);
  border-radius: var(--radius); padding: clamp(1.1rem, 1rem + 1vw, 1.8rem);
}
.sh-kept:focus { outline: none; }
.sh-kept h3 { font-size: var(--step-2); margin: 0; }
.sh-kept blockquote { margin: 0; font-family: var(--font-display); font-size: var(--step-1); font-style: italic; color: var(--ink); }
.sh-kept p { margin: 0; }
.sh-ask { padding-top: .2rem; }

.sh-list { max-width: 40rem; font-size: var(--step--1); }
.sh-list summary { cursor: pointer; font-weight: 600; color: var(--ink); padding-block: .4rem; }
.sh-list ol { margin: .4rem 0 .9rem; padding-left: 1.4rem; display: grid; gap: .45rem; }
.sh-list time { font-family: var(--font-geo); color: var(--ink-3); margin-right: .4rem; }
.sh-list small { display: block; color: var(--ink-2); }

@media (min-width: 56rem) {
  /* front on the left, your side on the right: the same size, like the two halves of a folded card */
  .sh-fold { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem; }
  .sh-face { aspect-ratio: 148.5 / 210; }        /* A5 card proportions; grows if the words need more room */
}

/* Inside a dark band the card stays paper; the text around it turns light. */
.band-ink .sh-note, .band-ink .sh-list summary { color: rgba(251, 246, 236, .86); }
.band-ink .sh-list, .band-ink .sh-list small, .band-ink .sh-list time { color: rgba(251, 246, 236, .78); }
.band-ink .sh-note a { color: #fff; }
.band-ink .sh-face .sh-note { color: var(--ink-2); }
.band-ink .sh-kept .sh-note { color: var(--ink-2); }
.band-ink .sh-kept .sh-note a { color: var(--teal); }
