/* GAPIVO design system - PI27. THE single stylesheet.
   Every screen imports this and defines NO colours of its own (verified).
   Tone reference: the accepted PI23 page - clear, factual, no hype;
   evidence and assumption visually distinct; honesty states first-class.

   Colour code, used consistently (a reader learns it without a legend):
     --ev    green  = evidence (came from something real, links to it)
     --as    amber  = assumption (we picked it - change it and see)
     --warn  red    = warnings, losses, honest tensions
     --lock  slate  = deliberately locked content (never looks broken)     */

:root {
  --ink: #1c2733;         /* text + structure */
  --bg: #faf9f6;          /* page */
  --card: #ffffff;        /* surfaces */
  --line: #d8d8d2;        /* hairlines */
  --muted: #5c6670;       /* secondary text - 4.6:1 on --bg */
  --ev: #1e7d46;          /* evidence green - 4.5:1+ on white */
  --as: #8a6207;          /* assumption amber - darkened for 4.5:1 on white */
  --warn: #b03a2e;        /* warning red */
  --lock: #46525e;        /* locked-state slate */
  --lock-bg: #eef1f4;
  --accent: #1a4a73;      /* links + actions - 7:1 on white */
    --focus: #8fc1e8;
  /* PI42 - seven tokens lifted from the admin mockup (ADR-043). Names are
     ours, values are the mockup's, not re-derived. --card stays #ffffff:
     the SYSTEM's six-digit form wins over the mockup's three-digit one -
     the stylesheet is the only source of colour, so the mockup conforms
     to it, never the reverse. */
  --on-color: #fff;                  /* text on --accent / --ev / --as */
  --shadow: rgba(28,39,51,.07);      /* card shadow - --ink at 7% */
  --as-bg: #fffdf7;                  /* attention surface, pairs with --as */
  --warn-bg: #fff8f6;                /* warn surface, pairs with --warn */
  --ev-bg: #f4faf6;                  /* ok surface soft, pairs with --ev */
  --ev-bg-selected: #f2f9f4;         /* ok surface selected, pairs with --ev */
  --rule-faint: #eee;                /* faint rule, lighter than --line */
  /* PI50 - measured from the design file's inline styles, not from a
     summary of it. Architecture's 'discard if decorative' on the pale
     green is OVERTURNED ON MEASUREMENT: it is the signature circle and
     the category pill. The dark surface is the card itself. */
  --mint: #c3edcd;                   /* signature circle + category pill */
  --card-dark: #26313b;              /* the idea card surface */
  --radius: 8px;
  --font: Georgia, 'Times New Roman', serif;
  --font-ui: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
body { font-family: var(--font); background: var(--bg); color: var(--ink);
       margin: 0; line-height: 1.6; }
.g-wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }

/* ---- type ---- */
h1, h2, h3 { line-height: 1.25; }
.g-hero-figure { font-size: 64px; font-weight: bold; letter-spacing: -2px; margin: 0; }
.g-kicker { font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px;
            color: var(--muted); font-family: var(--font-ui); }

/* ---- idea card ---- */
.g-card { background: var(--card); border: 1px solid var(--line);
          border-radius: var(--radius); padding: 20px 22px; margin: 18px 0;
          box-shadow: 0 1px 3px rgba(28, 39, 51, .07); }
.g-card > h2 { margin-top: 0; }
.g-card-glance { display: flex; flex-wrap: wrap; gap: 10px; }
.g-card-glance .g-fact { flex: 1 1 150px; background: var(--bg);
  border-radius: 6px; padding: 8px 12px; font-size: 13px; }
.g-card-glance .g-fact b { display: block; font-size: 15px; }

/* ---- evidence panel + labels ---- */
.g-evidence { border-left: 3px solid var(--line); background: var(--card);
              padding: 8px 14px; margin: 10px 0; font-size: 14px; }
.g-quote { font-size: 18px; font-style: italic; border-left: 5px solid var(--warn);
           background: var(--warn-bg); padding: 8px 16px; margin: 14px 0; }
.g-tag { display: inline-block; font-family: var(--font-ui); font-size: 11px;
         font-weight: 700; letter-spacing: 1px; padding: 2px 8px;
         border-radius: 3px; color: var(--on-color); }
.g-tag--evidence { background: var(--ev); }
.g-tag--assumption { background: var(--as); }
.g-tag--provisional { background: var(--warn); }

/* ---- difficulty + roi visuals ---- */
.g-blocks { font-size: 20px; letter-spacing: 3px; color: var(--warn); }
.g-blocks .off { color: var(--line); }
.g-bar { background: var(--ev); height: 26px; border-radius: 3px; }
.g-bar--loss { background: var(--warn); }
.g-costline { border-left: 2px dashed var(--as); }
.g-result { font-size: 16px; background: #f0f5f0; border: 1px solid var(--ev);
            border-radius: 6px; padding: 10px 14px; }

/* ---- honesty states ---- */
.g-tension { background: #fff3f1; border-left: 4px solid var(--warn);
             padding: 10px 16px; font-size: 14px; }
.g-plain { background: var(--lock-bg); border-left: 4px solid var(--ink);
           padding: 12px 16px; font-size: 15px; }

/* ---- forms + buttons ---- */
.g-input { font-family: var(--font-ui); font-size: 15px; padding: 8px 10px;
           border: 1px solid var(--muted); border-radius: 5px; width: 100%;
           max-width: 320px; background: var(--card); color: var(--ink); }
.g-input:focus, .g-btn:focus { outline: 3px solid var(--focus); outline-offset: 1px; }
.g-label { font-family: var(--font-ui); font-size: 13px; font-weight: 600;
           display: block; margin: 12px 0 4px; }
.g-btn { font-family: var(--font-ui); font-size: 15px; font-weight: 600;
         padding: 10px 22px; border-radius: 6px; border: 1px solid transparent;
         cursor: pointer; }
.g-btn--primary { background: var(--accent); color: var(--on-color); }
.g-btn--secondary { background: var(--card); color: var(--accent);
                    border-color: var(--accent); }
.g-btn--danger { background: var(--warn); color: var(--on-color); }
.g-btn[disabled] { background: var(--line); color: var(--muted); cursor: not-allowed; }

/* ---- empty + error states ---- */
.g-empty { text-align: center; padding: 36px 20px; color: var(--muted);
           border: 1px dashed var(--line); border-radius: var(--radius); }
.g-error { background: #fff3f1; border: 1px solid var(--warn);
           border-radius: var(--radius); padding: 14px 18px; }
.g-error b { color: var(--warn); }

/* ---- THE LOCKED STATE - deliberately locked, never broken ---- */
.g-locked { position: relative; background: var(--lock-bg);
            border: 1px solid var(--lock); border-radius: var(--radius);
            padding: 22px; text-align: center; color: var(--lock); }
.g-locked::before { content: "\1F512"; display: block; font-size: 26px;
                    margin-bottom: 6px; }
.g-locked .g-locked-title { font-family: var(--font-ui); font-weight: 700;
                            font-size: 15px; letter-spacing: .5px; }
.g-locked .g-locked-why { font-size: 14px; margin: 6px 0 12px; }
.g-locked-preview { filter: blur(4px); user-select: none; pointer-events: none;
                    opacity: .55; }

/* ---- PI42 token swatches (gallery-only rendering, one class per token) */
.g-sw { display: inline-block; min-width: 150px; padding: 10px 12px;
        border: 1px solid var(--line); border-radius: var(--radius);
        font-family: var(--font-ui); font-size: 13px; margin: 4px; }
.g-sw--on-color { background: var(--accent); color: var(--on-color); }
.g-sw--shadow { background: var(--card); box-shadow: 0 2px 8px var(--shadow); }
.g-sw--as-bg { background: var(--as-bg); color: var(--as); }
.g-sw--warn-bg { background: var(--warn-bg); color: var(--warn); }
.g-sw--ev-bg { background: var(--ev-bg); color: var(--ev); }
.g-sw--ev-bg-selected { background: var(--ev-bg-selected); color: var(--ev);
                        border-color: var(--ev); }
.g-sw--rule-faint { border-top: 3px solid var(--rule-faint); }

/* ---- PI46: the idea board - THE LAUNCH STATE IS TWO CARDS ----------------
   Ruled by the human: the board ships at 2 REAL ideas and grows as budget
   allows. Sparse is not an edge case - it is the launch state, and it must
   look DELIBERATE, not unfinished. Mechanism: auto-fit columns bounded to a
   readable card width and CENTERED - two cards sit as a composed pair in
   the middle of the page, not as survivors of a six-slot grid. No fixed
   column count anywhere: 1 centers, 2 pairs, 8 and 12 flow into rows.
   The guess-badge class does NOT exist: no guesses left to mark.
   Zero new colours - every value below is a var() from the system. */
.g-board { display: grid;
           grid-template-columns: repeat(auto-fit, minmax(280px, 400px));
           justify-content: center; gap: 18px; margin: 24px 0; }
.g-idea-card { background: var(--card); border: 1px solid var(--line);
               border-radius: var(--radius); padding: 18px 20px;
               box-shadow: 0 1px 3px var(--shadow);
               display: flex; flex-direction: column; gap: 8px; }
.g-idea-card .g-kicker { margin: 0; }
.g-idea-card h3 { margin: 0; font-size: 20px; line-height: 1.25; }
.g-idea-card .g-payer { font-family: var(--font-ui); font-size: 13px;
                        background: var(--ev-bg); color: var(--ev);
                        border-radius: 5px; padding: 5px 10px; }
.g-idea-card .g-payer b { display: block; font-size: 14px; }
/* .g-meter EXTENDS .g-blocks (the existing idiom, lines above) - it adds
   ONLY a labelled row layout, no second meter vocabulary, no colour. Use
   as <span class="g-blocks g-meter">...</span> beside its label. */
.g-meter-row { display: flex; justify-content: space-between;
               align-items: baseline; font-family: var(--font-ui);
               font-size: 13px; color: var(--muted); }
.g-meter { font-size: 16px; letter-spacing: 2px; }

/* ---- PI50: the layout, DIFFED against the design file -------------------
   Values below are the design's own inline styles, moved into classes so
   the page stays colour-literal-free. verify_PI50 extracts each value from
   BOTH the design file and this stylesheet and asserts equality, printing
   both sides - a presence grep is how PI49 went green on the wrong page.
   RESPONSIVE DECISION (mine, stated): the design is drawn at desktop width
   only; under 900px the shell collapses to one column and the circle is
   hidden - a 1040px disc cannot not-overflow a phone, and content beats
   decoration when they compete. */
.g-shell { display: grid; grid-template-columns: 500px 1fr; min-height: 100vh; }
.g-intro { position: relative; overflow: hidden; padding: 48px; }
.g-circle { position: absolute; left: -540px; top: 50%; width: 1040px;
            height: 1040px; border-radius: 50%; background: var(--mint);
            transform: translateY(-50%); z-index: -1; }
.g-boardwrap { padding: 48px 48px 48px 6px; }
.g-board--two { grid-template-columns: 1fr 1fr; gap: 20px; justify-content: stretch; }
.g-idea-card--dark { background: var(--card-dark); color: var(--on-color);
                     border: none; border-radius: 12px; padding: 22px 24px; }
.g-idea-card--dark h3 { color: var(--on-color); }
.g-idea-card--dark .g-meter-row { color: var(--rule-faint); }
.g-idea-card--dark .g-meter-row b { color: var(--on-color); }
.g-idea-card--dark .g-tension { background: transparent; padding-left: 0; }
.g-pill { display: inline-block; font-family: var(--font-ui); font-size: 11px;
          font-weight: 700; letter-spacing: 1px; background: var(--mint);
          color: var(--card-dark); padding: 3px 8px; border-radius: 3px; }
@media (max-width: 900px) {
  .g-shell { grid-template-columns: 1fr; }
  .g-circle { display: none; }
  .g-boardwrap { padding: 24px; }
}

/* ---- 375px ---- */
@media (max-width: 420px) {
  .g-hero-figure { font-size: 42px; }
  .g-card { padding: 14px; }
  .g-card-glance .g-fact { flex: 1 1 100%; }
}
