/* Gate styling on top of gh-design v1.1 (tokens only; no new colours beyond the brand's). Glass frames, AA contrast,
   390 px safe, reduced-motion safe (gh-design already disables animation/transition under prefers-reduced-motion). */
@media screen { :root:not([data-theme="light"]) body.gh { background: linear-gradient(180deg, #002B7F 0, #0B1640 100%) fixed; } }
html { background: #0B1640; }
.gh-fine { font-family: var(--font-ui); font-size: .92rem; color: var(--fg-muted); }
.gh-sign { font-style: italic; }
.gate-staging { background: var(--ro-yellow); color: #1E2126; font-family: var(--font-ui); font-weight: 600; padding: .55rem .8rem;
  border-left: 6px solid var(--ro-red); margin: 0 0 var(--space-3); }
.gate-wide { max-width: 60rem; }
.card { background: var(--surface); border: 1px solid var(--rule-blue); border-radius: 6px; padding: var(--space-3) var(--space-4); margin: var(--space-4) 0; }
.card > h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
@media (max-width: 480px) { .card { padding: var(--space-3); } }

/* glass frames */
.glass-frame { position: relative; margin: var(--space-4) 0; padding: clamp(8px, 2.4vw, 20px); border-radius: 14px;
  background: linear-gradient(145deg, rgba(255,255,255,.18), rgba(255,255,255,.05) 45%, rgba(255,255,255,.11));
  border: 1px solid rgba(220,228,247,.55);
  box-shadow: 0 18px 50px rgba(3,10,40,.55), inset 0 1px 0 rgba(255,255,255,.35), inset 0 0 0 1px rgba(252,209,22,.20); }
.glass-frame img { display: block; width: 100%; height: auto; border-radius: 6px; background: #F7F7F5; }
.glass-frame figcaption { font-family: var(--font-ui); font-size: .9rem; color: var(--fg); margin-top: .8rem; overflow-wrap: anywhere; }
.pp-inner { background: rgba(7,21,64,.86); border-radius: 8px; padding: var(--space-3) var(--space-4); }
@media (max-width: 480px) { .pp-inner { padding: var(--space-3) .75rem; } }
.pp-text h2.pp-h { margin-top: .5rem; border-top: 0; }
.pp-text h3 { color: var(--ro-yellow); border-bottom-color: var(--rule-blue); }
.pp-text table { font-size: .92rem; } .pp-text td { overflow-wrap: anywhere; }
.pp-issuers { columns: 2 13rem; column-gap: var(--space-4); padding-left: 1.1rem; }
.pp-issuers li, .roster li, .issuer-links li { break-inside: avoid; }
.pp-parties li:target, #parties:target { outline: 3px solid var(--seal); outline-offset: 3px; background: var(--seal-ground); }
.pp-parties { scroll-margin-top: 1rem; } .pp-parties li { scroll-margin-top: 1rem; }
.roster, .issuer-links { columns: 2 14rem; column-gap: var(--space-4); padding-left: 1.1rem; }

/* forms */
.gate form { margin: .5rem 0 0; }
.gate label { display: block; margin: .8rem 0 .25rem; font-weight: 600; color: var(--structure); }
.gate input:not([type=checkbox]) { width: 100%; max-width: 30rem; padding: .6rem .7rem; border: 1px solid var(--rule-blue);
  border-radius: var(--radius); background: var(--deep); color: var(--fg); font-family: var(--font-ui); font-size: max(var(--ui-min), 1rem); }
.gate input::placeholder { color: #9FB0D9; }
.gate button, .card button { margin: .9rem .5rem 0 0; }
.gate .tick { display: flex; gap: .55rem; align-items: flex-start; margin: .9rem 0 0; }
.gate .tick input { width: auto; margin-top: .35rem; }
.decl { margin: .4rem 0 0; padding: .8rem 1rem; border-left: 3px solid var(--seal); background: var(--surface-2); font-size: .98rem; }
.gate-msg { min-height: 1.5em; font-family: var(--font-ui); font-weight: 600; color: var(--emphasis); margin: .6rem 0 0; }
.gate-msg.ok { color: var(--structure); }
.ts { margin: .9rem 0 0; min-height: 70px; max-width: 100%; overflow: hidden; }
fieldset { border: 1px solid var(--border-soft); border-radius: 6px; padding: var(--space-2) var(--space-3) var(--space-3); margin: var(--space-3) 0; min-width: 0; }
legend { font-family: var(--font-ui); font-weight: 600; color: var(--structure); padding: 0 .4rem; }
a.gh-btn { display: inline-block; text-decoration: none; margin: .5rem .5rem 0 0; }
button.small { padding: .25rem .6rem; font-size: .85rem; margin: 0; }

/* order / vault */
.licence { font-family: var(--font-mono); font-size: clamp(1.05rem, 4.6vw, 1.55rem); color: var(--seal-text); letter-spacing: .03em; overflow-wrap: anywhere; margin: .2rem 0 .8rem; }
.kv { display: grid; grid-template-columns: minmax(7rem, 14rem) minmax(0, 1fr); gap: .4rem 1rem; font-family: var(--font-ui); }
.kv dt { color: var(--fg-muted); } .kv dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
@media (max-width: 520px) { .kv { grid-template-columns: minmax(0, 1fr); } .kv dd { margin-bottom: .45rem; } }
table.wire td:first-child { font-family: var(--font-ui); color: var(--fg-muted); width: 38%; }
table.wire td { overflow-wrap: anywhere; }
.mailbox pre { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-mono); font-size: .9rem; background: var(--deep); padding: .6rem; }
