
/* ═══════════════════════════════════════════════════════════════════════════
   AXK Release — Public Defensive-Publishing Record (/release/<token>)
   AXK Verification primitives — used by /fep and /release verification blocks
   ═══════════════════════════════════════════════════════════════════════════ */

.axk-rel-wrap {
    max-width: 920px;
    margin: 0 auto;
    padding: calc(var(--axk-unit) * 4) calc(var(--axk-unit) * 3) calc(var(--axk-unit) * 10);
    font-family: var(--axk-font);
    color: var(--axk-text);
    -webkit-font-smoothing: antialiased;
}

.axk-rel-hero {
    background: linear-gradient(135deg, var(--axk-deep) 0%, var(--axk-primary) 100%);
    color: #ffffff !important;
    border-radius: var(--axk-radius-lg);
    padding: calc(var(--axk-unit) * 5) calc(var(--axk-unit) * 5);
    margin-bottom: calc(var(--axk-unit) * 4);
    box-shadow: var(--axk-shadow-lg);
    position: relative;
    overflow: hidden;
}
/* Force every descendant of the hero to white. Frappe's web.html
   template sets descendant colors (body, headings, paragraphs, span)
   with higher specificity than .axk-rel-hero{color:#fff}, so without
   !important on the descendant rules the hero renders dark-on-dark.
*/
.axk-rel-hero,
.axk-rel-hero *,
.axk-rel-hero h1,
.axk-rel-hero h2,
.axk-rel-hero h3,
.axk-rel-hero p,
.axk-rel-hero span,
.axk-rel-hero strong,
.axk-rel-hero a {
    color: #ffffff !important;
}
.axk-rel-hero::after {
    content: "";
    position: absolute;
    top: -40%;
    right: -10%;
    width: 60%;
    height: 180%;
    background: radial-gradient(circle, rgba(200,150,62,0.18) 0%, transparent 60%);
    pointer-events: none;
}
.axk-rel-hero-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.85;
    color: #ffffff !important;
}
.axk-rel-hero-version {
    font-size: 36px !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    margin: calc(var(--axk-unit) * 1) 0 calc(var(--axk-unit) * 0.5) !important;
    letter-spacing: -0.01em;
    color: #ffffff !important;
}
.axk-rel-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--axk-unit) * 2.5);
    font-size: 13px;
    opacity: 0.95;
    color: #ffffff !important;
    margin-top: calc(var(--axk-unit) * 1.5);
}
.axk-rel-hero-stat {
    color: #ffffff !important;
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
}
.axk-rel-hero-stat strong {
    font-weight: 700 !important;
    color: #ffffff !important;
    font-size: 18px;
}
.axk-rel-hero-stat .axk-rel-hero-statlabel {
    opacity: 0.7;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #ffffff !important;
    font-weight: 500;
}

.axk-rel-card {
    background: var(--axk-surface);
    border: 1px solid var(--axk-border);
    border-radius: var(--axk-radius);
    padding: calc(var(--axk-unit) * 4) calc(var(--axk-unit) * 4);
    margin-bottom: calc(var(--axk-unit) * 2);
    box-shadow: var(--axk-shadow-sm);
}
.axk-rel-card h2 {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--axk-text-secondary);
    margin: 0 0 calc(var(--axk-unit) * 2.5);
}
.axk-rel-card p.lede {
    font-size: 13px;
    color: var(--axk-text-secondary);
    line-height: 1.6;
    margin: 0 0 calc(var(--axk-unit) * 2);
}

/* Definition list — clean key/value pairs */
.axk-dl {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: calc(var(--axk-unit) * 1.5) calc(var(--axk-unit) * 3);
    align-items: start;
}
.axk-dl dt {
    font-size: 12px;
    color: var(--axk-text-secondary);
    font-weight: 500;
    padding-top: 4px;
}
.axk-dl dd {
    margin: 0;
    font-size: 13px;
    color: var(--axk-text);
    word-break: break-all;
    line-height: 1.5;
}

/* ─── Hash + Copy row ──────────────────────────────────────────────
 *
 * Layout: flex row that keeps the icon button glued to the right of
 * the pill. The pill grows; the button stays compact.
 */
.axk-hash-row {
    display: flex;
    align-items: flex-start;
    gap: calc(var(--axk-unit));
    width: 100%;
}
.axk-hash-row .axk-hash {
    flex: 1 1 auto;
    min-width: 0;            /* allow shrink so word-break engages */
}
.axk-hash-row .axk-copy-btn {
    flex: 0 0 auto;
    margin-left: 0;
}

/* Hash / signature display — subtle monospace pill */
.axk-hash {
    display: inline-block;
    font-family: 'JetBrains Mono', 'SF Mono', ui-monospace, Menlo, monospace;
    font-size: 12px;
    color: var(--axk-text);
    background: var(--axk-mint);
    border: 1px solid var(--axk-border);
    border-radius: var(--axk-radius-sm);
    padding: 6px 12px;
    word-break: break-all;
    line-height: 1.55;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.axk-hash:hover { border-color: rgba(43, 112, 95, 0.3); background: #FBFEFD; }
.axk-hash a, .axk-hash a:visited { color: var(--axk-primary); text-decoration: none; }
.axk-hash a:hover { color: var(--axk-deep); text-decoration: underline; }

/* ─── Icon copy button ─────────────────────────────────────────────
 *
 * Square 32×32 button with two stacked SVG icons (clipboard + check).
 * Default: clipboard visible, check hidden.
 * On .copied class: clipboard hidden, check visible with a green flash.
 *
 * The text "Copy" / "Copied" is replaced by visual state; a sr-only
 * label keeps the button accessible to screen readers.
 */
.axk-copy-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--axk-border);
    border-radius: var(--axk-radius-sm);
    color: var(--axk-text-secondary);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease,
                color 0.15s ease, border-color 0.15s ease;
    flex-shrink: 0;
    line-height: 0;
}
.axk-copy-btn::before,
.axk-copy-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 14px;
    height: 14px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.axk-copy-btn::before {
    /* Clipboard icon — currentColor stroke via SVG */
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%234A6B62' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4.25' y='4.25' width='8.5' height='10' rx='1.25'/%3E%3Cpath d='M3 11.25V2.75A1.5 1.5 0 0 1 4.5 1.25H10'/%3E%3C/svg%3E");
    opacity: 1;
    transform: scale(1);
}
.axk-copy-btn::after {
    /* Check icon */
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5L6.25 11.5L13 4.5'/%3E%3C/svg%3E");
    opacity: 0;
    transform: scale(0.6);
}
.axk-copy-btn:hover {
    background: var(--axk-mint);
    border-color: var(--axk-primary);
    color: var(--axk-primary);
    transform: translateY(-1px);
}
.axk-copy-btn:hover::before {
    /* Switch stroke to AXK primary on hover */
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%232B705F' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4.25' y='4.25' width='8.5' height='10' rx='1.25'/%3E%3Cpath d='M3 11.25V2.75A1.5 1.5 0 0 1 4.5 1.25H10'/%3E%3C/svg%3E");
}
.axk-copy-btn:active { transform: translateY(0); }
.axk-copy-btn.copied {
    background: var(--axk-primary);
    border-color: var(--axk-primary);
    transform: translateY(-1px) scale(1.02);
    animation: axk-copy-pulse 0.32s ease;
}
.axk-copy-btn.copied::before { opacity: 0; transform: scale(0.6); }
.axk-copy-btn.copied::after  { opacity: 1; transform: scale(1); }

@keyframes axk-copy-pulse {
    0%   { transform: translateY(-1px) scale(1); }
    40%  { transform: translateY(-1px) scale(1.12); box-shadow: 0 0 0 6px rgba(43,112,95,0.18); }
    100% { transform: translateY(-1px) scale(1.02); box-shadow: 0 0 0 0 rgba(43,112,95,0); }
}

/* Tooltip on hover (using title via a CSS::after wouldn't work for
   browsers — rely on native title attribute we add in HTML) */
.axk-copy-btn .sr-only {
    position: absolute !important;
    width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* Concept cards */
.axk-concept-grid {
    display: grid;
    gap: calc(var(--axk-unit) * 1.5);
}
.axk-concept-card {
    border: 1px solid var(--axk-border);
    border-left: 3px solid var(--axk-primary);
    border-radius: var(--axk-radius-sm);
    padding: calc(var(--axk-unit) * 2) calc(var(--axk-unit) * 2.5);
    background: var(--axk-surface-raised);
    transition: all 0.15s ease;
}
.axk-concept-card:hover {
    border-left-color: var(--axk-gold);
    background: var(--axk-mint);
}
.axk-concept-card .id {
    font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
    font-size: 11px;
    font-weight: 600;
    color: var(--axk-primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.axk-concept-card .name {
    font-size: 15px;
    font-weight: 600;
    color: var(--axk-text);
    margin: calc(var(--axk-unit) * 0.75) 0 calc(var(--axk-unit) * 1);
    line-height: 1.4;
}
.axk-concept-card .summary {
    font-size: 13px;
    color: var(--axk-text-secondary);
    line-height: 1.6;
}

/* Code block — for canonical JSON */
.axk-code-toggle {
    display: inline-flex;
    align-items: center;
    gap: calc(var(--axk-unit));
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--axk-primary);
    margin-top: calc(var(--axk-unit) * 1);
    user-select: none;
}
.axk-code-toggle:hover { color: var(--axk-deep); }
.axk-code-toggle .chev {
    display: inline-block;
    transition: transform 0.2s ease;
    font-size: 10px;
}
details[open] > summary.axk-code-toggle .chev { transform: rotate(90deg); }

.axk-code-block {
    background: var(--axk-deep);
    color: #e2e8f0;
    border-radius: var(--axk-radius-sm);
    padding: calc(var(--axk-unit) * 2);
    margin-top: calc(var(--axk-unit) * 1.5);
    font-family: 'JetBrains Mono', 'SF Mono', ui-monospace, Menlo, monospace;
    font-size: 12px;
    line-height: 1.55;
    overflow-x: auto;
    max-height: 360px;
    position: relative;
}
.axk-code-block pre { margin: 0; white-space: pre-wrap; word-break: break-all; }
.axk-code-block .axk-code-copy {
    position: absolute;
    top: calc(var(--axk-unit) * 1.5);
    right: calc(var(--axk-unit) * 1.5);
    width: 32px;
    height: 32px;
    padding: 0;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.20);
    border-radius: var(--axk-radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.axk-code-block .axk-code-copy::before,
.axk-code-block .axk-code-copy::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 14px;
    height: 14px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.axk-code-block .axk-code-copy::before {
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23e2e8f0' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4.25' y='4.25' width='8.5' height='10' rx='1.25'/%3E%3Cpath d='M3 11.25V2.75A1.5 1.5 0 0 1 4.5 1.25H10'/%3E%3C/svg%3E");
    opacity: 1;
}
.axk-code-block .axk-code-copy::after {
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5L6.25 11.5L13 4.5'/%3E%3C/svg%3E");
    opacity: 0;
    transform: scale(0.6);
}
.axk-code-block .axk-code-copy:hover {
    background: var(--axk-gold);
    border-color: var(--axk-gold);
    transform: translateY(-1px);
}
.axk-code-block .axk-code-copy:hover::before {
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23163A32' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4.25' y='4.25' width='8.5' height='10' rx='1.25'/%3E%3Cpath d='M3 11.25V2.75A1.5 1.5 0 0 1 4.5 1.25H10'/%3E%3C/svg%3E");
}
.axk-code-block .axk-code-copy.copied {
    background: var(--axk-gold);
    border-color: var(--axk-gold);
    animation: axk-copy-pulse-gold 0.32s ease;
}
.axk-code-block .axk-code-copy.copied::before { opacity: 0; transform: scale(0.6); }
.axk-code-block .axk-code-copy.copied::after  { opacity: 1; transform: scale(1); }

@keyframes axk-copy-pulse-gold {
    0%   { transform: translateY(-1px) scale(1); }
    40%  { transform: translateY(-1px) scale(1.12); box-shadow: 0 0 0 6px rgba(200,150,62,0.22); }
    100% { transform: translateY(-1px) scale(1); box-shadow: 0 0 0 0 rgba(200,150,62,0); }
}

/* JSON syntax highlighting (added by client-side script) */
.axk-code-block .j-key   { color: #93c5fd; }
.axk-code-block .j-str   { color: #86efac; }
.axk-code-block .j-num   { color: #fbbf24; }
.axk-code-block .j-bool  { color: #f9a8d4; }
.axk-code-block .j-null  { color: #94a3b8; font-style: italic; }
.axk-code-block .j-punct { color: #cbd5e1; }

/* Verify-yourself help box */
.axk-verify-howto {
    background: var(--axk-mint);
    border-left: 3px solid var(--axk-gold);
    border-radius: var(--axk-radius-sm);
    padding: calc(var(--axk-unit) * 2) calc(var(--axk-unit) * 2.5);
    font-size: 12px;
    color: var(--axk-text-secondary);
    line-height: 1.6;
    margin-top: calc(var(--axk-unit) * 2);
}
.axk-verify-howto code {
    background: rgba(43,112,95,0.08);
    color: var(--axk-deep);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-family: ui-monospace, Menlo, monospace;
}
.axk-verify-howto strong { color: var(--axk-text); font-weight: 600; }

/* Status pills */
.axk-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: var(--axk-radius-pill);
}
.axk-pill::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 6px currentColor;
}
.axk-pill-anchored { background: rgba(43,112,95,0.12); color: var(--axk-success); }
.axk-pill-pending  { background: rgba(200,150,62,0.14); color: var(--axk-gold); }
.axk-pill-revoked  { background: rgba(197,48,48,0.10);  color: var(--axk-danger); }

/* When a pill sits inside the dark teal gradient hero, the default
   teal-on-teal makes it invisible. Override: white text + translucent
   white background for legibility against the gradient. */
.axk-rel-hero .axk-pill,
.axk-rel-hero .axk-pill-anchored,
.axk-rel-hero .axk-pill-pending,
.axk-rel-hero .axk-pill-revoked {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.22);
}
.axk-rel-hero .axk-pill::before {
    background: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
}

/* ─── Render rules — what gets a pill / copy / code block ─────────
 *
 * Use ``.axk-hash`` ONLY for opaque identifiers a verifier needs to
 * copy verbatim:
 *   - On-chain tx hashes (64-char hex)
 *   - SHA-256 / SHA-512 digests
 *   - ED25519 signatures + public keys
 *   - JWT / VC proofValue tokens
 *   - Watermark + watermark HMAC
 *   - Commit SHAs (when copy is useful)
 *
 * Pair every ``.axk-hash`` with a ``.axk-copy-btn[data-copy-target]``
 * since the entire point is byte-perfect copy.
 *
 * Use ``.axk-code-block`` ONLY for multi-line structured payloads:
 *   - Canonical JSON
 *   - Verifiable Credential bodies
 *   - Manifest JSON
 *
 * Pair every ``.axk-code-block`` with ``.axk-code-copy[data-copy-target]``
 * and add ``data-jsonblock="1"`` on the ``<pre>`` so the page-level
 * highlightJSON() applies syntax colours.
 *
 * EVERYTHING ELSE — counts, dates, names, prose, status labels — is
 * plain text inside ``.axk-dl dd`` with no pill, no copy. Don't wrap
 * a number in ``.axk-hash`` because it looks token-like; that's a
 * cargo-cult pattern that confuses readers about what's copyable.
 */
.axk-rel-notfound {
    text-align: center;
    padding: calc(var(--axk-unit) * 10) calc(var(--axk-unit) * 3);
    color: var(--axk-text-secondary);
    background: var(--axk-surface);
    border: 1px solid var(--axk-border);
    border-radius: var(--axk-radius);
}
.axk-rel-notfound h2 {
    font-size: 24px;
    color: var(--axk-text);
    margin: calc(var(--axk-unit) * 2) 0 var(--axk-unit);
}

@media (max-width: 720px) {
    .axk-rel-hero { padding: calc(var(--axk-unit) * 3) calc(var(--axk-unit) * 3); }
    .axk-rel-hero-version { font-size: 28px; }
    .axk-rel-hero-stats { gap: var(--axk-unit) * 1.5; }
    .axk-rel-card { padding: calc(var(--axk-unit) * 3) calc(var(--axk-unit) * 2.5); }
    .axk-dl { grid-template-columns: 1fr; gap: calc(var(--axk-unit) * 0.5); }
    .axk-dl dt { padding-top: calc(var(--axk-unit) * 1); }
    .axk-dl dd { padding-bottom: calc(var(--axk-unit) * 1); border-bottom: 1px solid var(--axk-border); }
    .axk-dl dd:last-child { border-bottom: none; }
}
