/* design.armagi.co: page-specific rules on top of base.css */
.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rule { padding: 16px 18px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.rule .n { font-family: var(--mono); font-size: 12px; color: var(--gold-ink); }
.rule b { display: block; font-size: 17px; margin-top: 4px; }
.rule span:last-child { font-size: 14.5px; color: var(--ink-2); }

.swatches { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.swatch { display: grid; gap: 2px; }
.swatch i { height: 64px; border-radius: 14px; border: 1px solid var(--line); }
.swatch b { font-size: 14px; margin-top: 4px; }
.swatch span { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.type { margin-top: 12px; }
.t-row { display: grid; grid-template-columns: 11em minmax(0, 1fr); gap: 14px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); }
.t-row:last-child { border-bottom: 0; }
.t-row .fine { margin: 0; }
.t-display { font-size: clamp(32px, 5vw, 56px); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }
.t-heading { font-size: 30px; font-weight: 600; letter-spacing: -.02em; }
.t-body { font-size: 17px; color: var(--ink-2); }
.t-label { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-ink); }

.presence { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: center; }
.stage { display: flex; align-items: center; justify-content: center; gap: 12px; height: 180px; border-radius: var(--r); background: radial-gradient(circle at 30% 30%, #20448c, #0d1d42); }
.glyph { position: relative; width: 44px; height: 44px; border: 4px solid #e6ebf5; border-bottom: 12px solid var(--gold); }
.stage .dots, .stage .arrow { display: none; }
.stage .dots { gap: 5px; }
.stage .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-soft); animation: pulse 1s infinite; }
.stage .dots i:nth-child(2) { animation-delay: .18s; }
.stage .dots i:nth-child(3) { animation-delay: .36s; }
.stage .arrow { font-family: var(--mono); color: var(--gold-soft); font-size: 24px; }
.stage[data-state="idle"] .glyph { animation: breathe 3s ease-in-out infinite; }
.stage[data-state="listening"] .glyph::after { content: ''; position: absolute; inset: -14px; border-radius: 50%; border: 2px solid var(--gold-soft); animation: ring 1.6s ease-out infinite; }
.stage[data-state="speaking"] .glyph { animation: bob 1.2s ease-in-out infinite; }
.stage[data-state="speaking"] .dots { display: flex; }
.stage[data-state="pointing"] .glyph { animation: nudge 1.4s ease-in-out infinite; }
.stage[data-state="pointing"] .arrow { display: inline; }
.mark-v { font-size: 19px; font-weight: 500; margin: 10px 0 0; }
@keyframes breathe { 50% { transform: scale(1.06); } }
@keyframes ring { from { opacity: .9; transform: scale(.7); } to { opacity: 0; transform: scale(1.3); } }
@keyframes bob { 50% { transform: translateY(-6px); } }
@keyframes nudge { 50% { transform: translateX(8px); } }
@keyframes pulse { 50% { opacity: .3; } }

.budget { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 12px; align-items: start; }
.budget .panel + .panel { margin-top: 0; }
.budget .tag { color: var(--muted); font-size: 11px; }
.events { display: grid; gap: 6px; margin: 8px 0 16px; }
.event { min-height: 44px; text-align: left; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-size: 15px; }
.event.spark { border-color: var(--gold-line); }
.event.friction { border-color: #f5cfc3; }
.event.said { background: var(--tint); border-color: transparent; }
.event.reset { color: var(--muted); }
.log { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-family: var(--mono); font-size: 12.5px; }
.log .spark { color: var(--gold-ink); }
.log .friction { color: var(--red); }
.log .said { color: var(--navy); }
.log .empty { color: var(--muted); }
.lvl-top { display: flex; justify-content: space-between; align-items: baseline; }
.lvl-top b { font-size: 24px; letter-spacing: -.01em; }
.lvl-top .fine { margin: 0; }
.meter5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin: 10px 0 6px; }
.meter5 i { height: 12px; border-radius: 4px; }
.meter5 .on { background: #1B3A7B; }
.meter5 .open { background: var(--line); }
.meter5 .shut { background: var(--page); }
.meter5 .bound { box-shadow: 0 0 0 2px var(--gold); }
.caps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 12px 0 14px; }
.caps div { padding: 8px 10px; border-radius: 10px; background: var(--page); }
.caps b { display: block; font-size: 18px; }
.caps span { font-size: 12.5px; color: var(--muted); }
.shown { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.blk { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); animation: fade .3s ease-out; }
.blk.first { grid-column: 1 / -1; background: #1B3A7B; border-color: #1B3A7B; color: #fff; }
.blk.first span { color: #c9d2e3; }
.blk b { display: block; font-size: 14.5px; }
.blk span { font-size: 13px; color: var(--ink-2); }
.deferred { margin: 10px 0 0; font-size: 14px; color: var(--muted); min-height: 1.4em; }

@media (max-width: 860px) {
  .rules { grid-template-columns: minmax(0, 1fr); }
  .swatches { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .presence, .budget { grid-template-columns: minmax(0, 1fr); }
  .t-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .caps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
