/* CHERT subscriber portal — on chert-tokens.css (verbatim design-system tokens). Logical properties only: the layout mirrors for Arabic.
   The rules mirror the shell's stylesheet where the same components appear (the two surfaces must read as one system) and add the
   portal's own: release page, media table, preview figure, feed badges. */
:root {
  /* status TEXT on tints: the functional tokens darkened half-way towards ink reach ≥ 5.3:1 (shell audit, CP10.02) */
  --portal-text-success: var(--chert-ink); --portal-text-success: color-mix(in srgb, var(--chert-success) 50%, var(--chert-ink));
  --portal-text-warning: var(--chert-ink); --portal-text-warning: color-mix(in srgb, var(--chert-warning) 50%, var(--chert-ink));
  --portal-text-error: var(--chert-ink); --portal-text-error: color-mix(in srgb, var(--chert-error) 50%, var(--chert-ink));
  --portal-text-info: var(--chert-ink); --portal-text-info: color-mix(in srgb, var(--chert-info) 50%, var(--chert-ink));
  --portal-text-orange: var(--chert-ink); --portal-text-orange: color-mix(in srgb, var(--chert-orange-deep) 50%, var(--chert-ink));
}
.skip-link { position: absolute; inset-inline-start: -9999px; top: 0; z-index: var(--z-toast); background: var(--chert-ink); color: var(--chert-cream); padding: 10px 16px; }
.skip-link:focus { inset-inline-start: 0; }
.topbar { position: sticky; inset-block-start: 0; z-index: var(--z-sticky); height: 64px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  padding-inline: var(--gutter); background: var(--chert-surface); border-block-end: 1px solid var(--chert-border); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--chert-ink); text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: 0; }
.brand b { font-weight: 400; }
.topbar__actions { display: flex; align-items: center; gap: var(--space-3); }
.topbar__actions form { margin: 0; }
.who { font-size: var(--fs-sm); color: var(--chert-muted); }
.container { max-width: var(--maxw); margin-inline: auto; padding: var(--space-6) var(--gutter) var(--space-8); display: grid; gap: var(--space-7); }
.container--tight { padding-block: var(--space-3) 0; }
.eyebrow { margin: 0 0 var(--space-3); font-size: var(--fs-overline); font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--chert-muted); }
[lang="ar"] .eyebrow { letter-spacing: normal; text-transform: none; font-size: var(--fs-sm); }
.eyebrow a { color: inherit; }
.hero { max-width: 68ch; padding-block: var(--space-8); }
.hero h1 { margin: 0 0 var(--space-4); font-size: var(--fs-h1); line-height: 1.1; letter-spacing: -1px; font-weight: 800; }
[lang="ar"] .hero h1 { letter-spacing: normal; }
.hero__note { margin-block-start: var(--space-4); }
.lead { font-size: var(--fs-lg); color: var(--chert-muted); margin: 0 0 var(--space-6); }
.h2 { margin: 0 0 var(--space-4); font-size: var(--fs-h2); font-weight: 700; }
.h3 { margin: 0 0 var(--space-3); font-size: var(--fs-h3); font-weight: 700; }
.h4 { margin: var(--space-4) 0 var(--space-2); font-size: var(--fs-base); font-weight: 700; }
.btn { font-family: inherit; font-size: var(--fs-sm); font-weight: 700; padding: 11px 22px; border-radius: var(--radius-sm); border: none; cursor: pointer; text-decoration: none; display: inline-block; }
.btn--primary { background: var(--chert-orange); color: var(--chert-ink); }
.btn--primary:hover { background: var(--chert-orange-deep); }
.btn--secondary { background: transparent; border: 1.5px solid var(--chert-ink); color: var(--chert-ink); }
.btn--secondary:hover { background: var(--chert-ink); color: var(--chert-cream); }
.btn--ghost { background: transparent; color: var(--chert-ink); padding-inline: 8px; text-decoration: underline; text-decoration-color: var(--chert-orange); text-underline-offset: 3px; }
.btn--lg { padding: 14px 28px; font-size: var(--fs-base); }
.grid-cards { display: grid; grid-template-columns: 1fr; gap: var(--space-5); }
@media (min-width: 640px) { .grid-cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--chert-surface); border: 1px solid var(--chert-border); border-radius: var(--radius-card); padding: 28px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: var(--space-2); }
.card--link { text-decoration: none; color: inherit; }
.card--link:hover { box-shadow: var(--shadow-hover); }
.card__title { margin: 0; font-size: var(--fs-h3); font-weight: 700; }
.card__desc { margin: 0; font-size: var(--fs-sm); color: var(--chert-muted); flex: 1; }
.card__link { font-size: var(--fs-sm); font-weight: 700; color: var(--chert-ink); text-decoration: underline; text-decoration-color: var(--chert-orange); text-underline-offset: 3px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--chert-border); border-radius: var(--radius-card); background: var(--chert-surface); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th { text-align: start; background: var(--chert-ink); color: var(--chert-cream); padding: 12px 16px; }
.table td { padding: 14px 16px; border-block-start: 1px solid var(--chert-border); vertical-align: top; }
.table tr:nth-child(even) td { background: var(--chert-surface-alt); }
.muted { color: var(--chert-muted); }
.small { font-size: var(--fs-sm); font-weight: 500; }
.mono { font-family: var(--font-mono); font-size: 0.92em; }
.hash { word-break: break-all; }
.callout { border-inline-start: 4px solid var(--chert-error); background: var(--chert-error-tint); padding: var(--space-4); border-radius: var(--radius-sm); margin-block-end: var(--space-5); }
.callout--ok { border-inline-start-color: var(--chert-success); background: var(--chert-success-tint); }
.callout--warn { border-inline-start-color: var(--chert-warning); background: var(--chert-warning-tint); }
.callout--info { border-inline-start-color: var(--chert-info); background: var(--chert-info-tint); }
.callout .helper { margin-block-start: var(--space-2); }
.foot { padding: var(--space-5) var(--gutter); border-block-start: 1px solid var(--chert-border); color: var(--chert-muted); font-size: var(--fs-sm); }
.foot a { color: inherit; }
/* forms (design system §6.4) */
.form { display: grid; gap: var(--space-3); max-width: 760px; margin-block-start: var(--space-4); }
.form--inline { grid-template-columns: 1fr; align-items: end; }
@media (min-width: 640px) { .form--inline { grid-template-columns: 2fr 1fr auto; } }
.form__actions { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: center; }
.label { font-size: var(--fs-sm); font-weight: 600; display: block; margin-block-end: 4px; }
.input { width: 100%; min-height: 44px; padding: 10px 14px; font: inherit; background: var(--chert-surface); border: 1px solid var(--chert-border); border-radius: var(--radius-sm); color: var(--chert-ink); }
.input:focus { outline: none; border-color: var(--chert-orange); box-shadow: 0 0 0 3px rgba(255,134,81,.25); }
.input--sm { width: auto; min-height: 36px; padding: 6px 10px; font-size: var(--fs-sm); }
.helper { margin: 0; font-size: var(--fs-xs); color: var(--chert-muted); }
.inline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.disclosure { display: inline-block; }
.disclosure summary { list-style: none; cursor: pointer; }
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure[open] summary { margin-block-end: var(--space-2); }
/* section navigation */
.subnav { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.subnav__item { padding: 6px 14px; border-radius: var(--radius-pill); font-size: var(--fs-sm); font-weight: 600; color: var(--chert-ink); text-decoration: none; border: 1px solid var(--chert-border); }
.subnav__item:hover { background: var(--chert-orange-tint); }
.subnav__item.is-active { background: var(--chert-ink); color: var(--chert-cream); border-color: var(--chert-ink); }
/* key/value, chips, badges */
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-3) var(--space-5); margin: 0 0 var(--space-4); }
.kv div { display: grid; gap: 2px; }
.kv dt { font-size: var(--fs-xs); font-weight: 600; color: var(--chert-muted); }
.kv dd { margin: 0; font-size: var(--fs-sm); }
.chips { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip { border-radius: var(--radius-sm); padding: 3px 8px; font-size: var(--fs-xs); background: var(--chert-tan); color: var(--chert-ink); }
.badge { display: inline-block; border-radius: var(--radius-pill); padding: 4px 12px; font-size: var(--fs-xs); font-weight: 600; background: var(--chert-surface-alt); color: var(--chert-muted); border: 1px solid var(--chert-border); }
.badge--s-released, .badge--e-released, .badge--r-cleared, .badge--c-active, .badge--a-active, .badge--w-active, .badge--t-rights_cleared, .badge--t-embargo_lifted { background: var(--chert-success-tint); color: var(--portal-text-success); border-color: transparent; }
.badge--s-corrected, .badge--e-corrected, .badge--c-trial { background: var(--chert-info-tint); color: var(--portal-text-info); border-color: transparent; }
.badge--r-not_cleared, .badge--c-suspended, .badge--w-disabled, .badge--t-rights_restricted { background: var(--chert-warning-tint); color: var(--portal-text-warning); border-color: transparent; }
.badge--s-withdrawn, .badge--e-withdrawn, .badge--c-ended, .badge--a-revoked { background: var(--chert-error-tint); color: var(--portal-text-error); border-color: transparent; }
.badge--lang { background: var(--chert-orange-tint); color: var(--portal-text-orange); border-color: transparent; }
/* release page */
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-4); font-size: var(--fs-sm); }
.prose { max-width: 76ch; line-height: 1.7; }
.prose p { margin: 0 0 var(--space-3); }
.body { margin-block-end: var(--space-5); }
.asset { margin-block-end: var(--space-5); }
.secret { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.secret .input { flex: 1 1 320px; }
.preview { margin: 0 0 var(--space-4); max-width: 640px; }
.preview img { display: block; max-width: 100%; height: auto; border: 1px solid var(--chert-border); border-radius: var(--radius-card); background: var(--chert-surface-alt); }
