/* Public Regulatory Intelligence Ticker (AMD-504). Needs /assets/css/tokens.css. Governed by AILANE-AMD-REG-001. */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: var(--surface-deep); color: var(--text-body); font-family: var(--font-body); min-height: 100vh; }

.tk-page { max-width: var(--max-w); margin: 0 auto; padding: 56px 24px 72px; }

.tk-hero { max-width: 760px; margin-bottom: 36px; }
.tk-hero .tk-eyebrow { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan); margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.tk-live { width: 8px; height: 8px; border-radius: 50%; background: var(--status-ok); box-shadow: 0 0 0 0 var(--ac-10b981-a60, rgba(16, 185, 129, 0.6)); animation: tkPulse 2.4s ease-out infinite; }
.tk-hero h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1.15; color: var(--text-prime); margin-bottom: 16px; }
.tk-hero p { color: var(--text-sec); font-size: 1.02rem; line-height: 1.7; }
.tk-hero .tk-meta { margin-top: 14px; font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-mute); }

/* Scrolling strip, as on the landing page */
.tk-strip { overflow: hidden; border-top: 1px solid var(--border-dim); border-bottom: 1px solid var(--border-dim); padding: 14px 0; margin-bottom: 40px; background: var(--ac-0f172a-a40, rgba(15, 23, 42, 0.4)); }
.tk-track { display: inline-flex; white-space: nowrap; gap: 48px; animation: tkScroll 90s linear infinite; }
.tk-track span { font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-sec); padding-left: 28px; position: relative; }
.tk-track span::before { content: '\25CF'; color: var(--cyan); position: absolute; left: 6px; font-size: 0.6rem; top: 50%; transform: translateY(-50%); }
.tk-strip:hover .tk-track { animation-play-state: paused; }

.tk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }

.tk-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 28px; }
.tk-stat { background: var(--surface-card); border: 1px solid var(--border-dim); border-radius: var(--card-radius); padding: 18px 20px; }
.tk-stat strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.9rem; color: var(--text-prime); line-height: 1.1; margin-bottom: 6px; }
.tk-stat span { font-size: 0.86rem; color: var(--text-sec); line-height: 1.5; }

.tk-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tk-chip { font-family: var(--font-body); font-size: 0.82rem; color: var(--text-sec); background: transparent; border: 1px solid var(--border-mid); border-radius: 999px; padding: 6px 14px; cursor: pointer; transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease; }
.tk-chip:hover { color: var(--text-prime); border-color: var(--border-lit); }
.tk-chip[aria-pressed="true"] { color: var(--surface-deep); background: var(--cyan); border-color: var(--cyan); font-weight: 600; }
.tk-chip:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.tk-section-title { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-mute); margin: 8px 0 12px; }

.tk-list { list-style: none; border: 1px solid var(--border-dim); border-radius: var(--card-radius); background: var(--surface-card); overflow: hidden; margin-bottom: 28px; }
.tk-item { display: grid; grid-template-columns: 92px 1fr; gap: 16px; padding: 16px 20px; border-top: 1px solid var(--border-dim); }
.tk-item:first-child { border-top: 0; }
.tk-date { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-mute); padding-top: 3px; }
.tk-head { color: var(--text-prime); font-size: 0.97rem; line-height: 1.5; }
.tk-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; font-size: 0.8rem; color: var(--text-mute); }
.tk-kind { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid currentColor; }
.tk-kind[data-k="legislation"], .tk-kind[data-k="commencement"] { color: var(--tier-operational); }
.tk-kind[data-k="parliament"], .tk-kind[data-k="royal_assent"], .tk-kind[data-k="scheduled"] { color: var(--tier-governance); }
.tk-kind[data-k="guidance"] { color: var(--acei-10); }
.tk-empty { padding: 22px 20px; color: var(--text-sec); font-size: 0.92rem; }

.tk-side { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 16px; }
.tk-card { background: var(--surface-card); border: 1px solid var(--border-dim); border-radius: var(--card-radius); padding: 22px; }
.tk-card h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; color: var(--text-prime); margin-bottom: 10px; }
.tk-card p { color: var(--text-sec); font-size: 0.9rem; line-height: 1.65; margin-bottom: 12px; }
.tk-card ul { list-style: none; margin: 0 0 14px; }
.tk-card li { color: var(--text-body); font-size: 0.88rem; line-height: 1.55; padding: 6px 0 6px 20px; position: relative; }
.tk-card li::before { content: '\203A'; position: absolute; left: 4px; color: var(--cyan); }
.tk-card a.tk-btn { display: inline-block; font-size: 0.88rem; font-weight: 600; color: var(--surface-deep); background: var(--cyan); padding: 10px 16px; border-radius: var(--card-radius-sm); text-decoration: none; }
.tk-card a.tk-btn:hover { filter: brightness(1.08); }
.tk-card a.tk-btn:focus-visible { outline: 2px solid var(--text-prime); outline-offset: 2px; }
.tk-sources dt { font-size: 0.86rem; color: var(--text-prime); margin-top: 10px; }
.tk-sources dd { font-size: 0.82rem; color: var(--text-sec); line-height: 1.55; }

@keyframes tkScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes tkPulse { 0% { box-shadow: 0 0 0 0 var(--ac-10b981-a55, rgba(16, 185, 129, 0.55)); } 70% { box-shadow: 0 0 0 8px var(--ac-10b981-a0, rgba(16, 185, 129, 0)); } 100% { box-shadow: 0 0 0 0 var(--ac-10b981-a0, rgba(16, 185, 129, 0)); } }
@media (prefers-reduced-motion: reduce) { .tk-track, .tk-live { animation: none; } .tk-strip { overflow-x: auto; } }

@media (max-width: 960px) {
  .tk-grid { grid-template-columns: 1fr; }
  .tk-side { position: static; }
}
@media (max-width: 560px) {
  .tk-page { padding: 36px 16px 56px; }
  .tk-item { grid-template-columns: 1fr; gap: 4px; padding: 14px 16px; }
}

/* Subscriber layer (AMD-504 decision change, 21 Nov 2026) */
.tk-back { display: inline-block; margin-bottom: 18px; font-size: 0.86rem; color: var(--cyan); text-decoration: none; }
.tk-back::before { content: '\2190\00a0'; }
.tk-back:hover { text-decoration: underline; }
.tk-open { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--font-body); color: var(--text-prime); font-size: 0.97rem; line-height: 1.5; }
.tk-open::after { content: ' \25BE'; color: var(--text-mute); font-size: 0.8rem; }
.tk-open[aria-expanded="true"]::after { content: ' \25B4'; }
.tk-open:hover { color: var(--cyan); }
.tk-open:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
.tk-tag { display: inline-flex; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border-mid); font-size: 0.72rem; color: var(--text-sec); }
.tk-rel-badge { display: inline-flex; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--cyan); color: var(--cyan); font-size: 0.72rem; }
.tk-item.tk-rel { box-shadow: inset 3px 0 0 var(--cyan); }
.tk-brief { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border-dim); }
.tk-brief p { color: var(--text-body); font-size: 0.92rem; line-height: 1.7; margin-bottom: 10px; }
.tk-acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }
.tk-src { font-size: 0.86rem; color: var(--cyan); text-decoration: none; }
.tk-src::after { content: ' \2197'; }
.tk-src:hover { text-decoration: underline; }
.tk-ask { font-family: var(--font-body); font-size: 0.86rem; font-weight: 600; color: var(--cyan); background: transparent; border: 1px solid var(--cyan); border-radius: 6px; padding: 6px 12px; cursor: pointer; }
.tk-ask:hover { background: var(--ac-22d3ee-a8, rgba(34, 211, 238, 0.08)); }
.tk-ask:focus-visible { outline: 2px solid var(--text-prime); outline-offset: 2px; }
.tk-chip-rel[aria-pressed="true"] { background: var(--cyan); color: var(--surface-deep); border-color: var(--cyan); }
.tk-back[hidden], .tk-chip[hidden], .tk-brief[hidden] { display: none; }
/* In the signed-in workspace frame (AMD-510) the sidebar replaces the "Back to your workspace" link. */
body.wsf .tk-back { display: none; }
/* Signed-in subscribers in the workspace frame (AMD-510, approved mockup D-4): "Coming up in Parliament" and "This week"
   are side cards; the explainer cards and the scrolling strip are not shown (workspace-frame.js, data-wsf-*). */
#tk-week:has(#tk-summary[hidden]) { display: none; }
body.wsf .tk-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; }
body.wsf #tk-week .tk-summary { display: block; margin: 0; }
body.wsf #tk-week .tk-stat { background: none; border: 0; padding: 0; margin: 0 0 8px; }
body.wsf #tk-week .tk-stat strong { display: inline; margin: 0 6px 0 0; }
body.wsf .tk-side .tk-list { margin: 0; }
body.wsf .tk-side .tk-item { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; }
body.wsf .tk-side .tk-item .tk-date { order: 2; padding: 0; }
@media (max-width: 900px) { body.wsf .tk-grid { grid-template-columns: 1fr; } }
