:root {
  --tk-bg: #08111f;
  --tk-panel: #0f1c2f;
  --tk-panel-2: #13243b;
  --tk-line: rgba(255,255,255,.14);
  --tk-text: #f4f7fb;
  --tk-muted: #b8c4d6;
  --tk-blue: #3c88ff;
  --tk-orange: #f7a342;
  --tk-green: #2ac77b;
  --tk-yellow: #f4c84a;
  --tk-red: #ff5d5d;
  --tk-shadow: 0 24px 70px rgba(0,0,0,.32);
}

.tk-page, .tk-admin {
  background: radial-gradient(circle at 20% 0%, rgba(60,136,255,.16), transparent 34%), linear-gradient(180deg, #08111f, #0b1628 54%, #08111f);
  color: var(--tk-text);
  font-family: Calibri, Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

.tk-page *,.tk-admin * { box-sizing: border-box; }
.tk-page a,.tk-admin a { color: #a9ccff; }

.tk-container {
  width: min(1160px, calc(100vw - 32px));
  margin: 0 auto;
}

.tk-hero {
  padding: 70px 0 38px;
}

.tk-eyebrow {
  color: var(--tk-orange);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .82rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.tk-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: 28px;
  align-items: stretch;
}

.tk-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4.3rem);
  line-height: .98;
  letter-spacing: -.04em;
  margin: 0 0 18px;
}

.tk-lead {
  color: var(--tk-muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  max-width: 760px;
  margin: 0 0 28px;
}

.tk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.tk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: #fff !important;
  text-decoration: none;
  font-weight: 700;
}
.tk-btn-primary { background: linear-gradient(135deg, var(--tk-blue), #62a5ff); border: 0; }
.tk-btn-warn { background: linear-gradient(135deg, #e88428, var(--tk-orange)); border: 0; }

.tk-card {
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.035));
  border: 1px solid var(--tk-line);
  border-radius: 26px;
  box-shadow: var(--tk-shadow);
}

.tk-status-card {
  padding: 28px;
  min-height: 100%;
  position: relative;
  overflow: hidden;
}
.tk-status-card::after {
  content: "";
  position: absolute;
  inset: auto -60px -60px auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(60,136,255,.24), transparent 68%);
}

.tk-date { color: var(--tk-muted); font-size: .95rem; }
.tk-light-row { display: flex; align-items: center; gap: 14px; margin: 22px 0; }
.tk-light-dot { width: 70px; height: 70px; border-radius: 50%; box-shadow: 0 0 38px currentColor; }
.tk-light-dot.green { color: var(--tk-green); background: var(--tk-green); }
.tk-light-dot.yellow { color: var(--tk-yellow); background: var(--tk-yellow); }
.tk-light-dot.red { color: var(--tk-red); background: var(--tk-red); }
.tk-light-label { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; }
.tk-risk { color: var(--tk-muted); }

.tk-section { padding: 34px 0; }
.tk-section h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); margin: 0 0 18px; letter-spacing: -.025em; }
.tk-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tk-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.tk-info-card { padding: 24px; }
.tk-info-card h3 { margin: 0 0 12px; font-size: 1.2rem; }
.tk-info-card p { color: var(--tk-muted); margin: 0; }
.tk-list { margin: 0; padding-left: 1.2rem; color: var(--tk-muted); }
.tk-list li { margin: 8px 0; }
.tk-pill { display: inline-flex; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid var(--tk-line); color: var(--tk-muted); font-size: .88rem; }

.tk-source-list { display: grid; gap: 10px; }
.tk-source-item { padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid var(--tk-line); }
.tk-source-item strong { display: block; }
.tk-source-item span { color: var(--tk-muted); font-size: .95rem; }
.tk-source-status-list { display: grid; gap: 10px; }
.tk-source-status-item { display: flex; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px solid var(--tk-line); border-radius: 14px; background: rgba(255,255,255,.045); }
.tk-source-status-item span { color: var(--tk-muted); text-align: right; }
.tk-checked-sources { margin-top: 16px; display: grid; gap: 4px; max-width: 900px; color: var(--tk-muted); font-size: .92rem; }
.tk-checked-sources strong { color: var(--tk-text); font-size: .95rem; }

.tk-disclaimer { color: var(--tk-muted); font-size: .95rem; border-top: 1px solid var(--tk-line); padding-top: 18px; margin-top: 24px; }

.tk-admin { min-height: 100vh; padding: 32px 0; }
.tk-admin-header { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:24px; }
.tk-admin h1 { margin:0; font-size:2rem; }
.tk-admin-panel { padding:24px; margin-bottom:18px; }
.tk-form-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:16px; }
.tk-admin label { display:block; color:var(--tk-muted); font-weight:700; margin-bottom:7px; }
.tk-admin input[type="text"], .tk-admin input[type="password"], .tk-admin select, .tk-admin textarea {
  width:100%; border:1px solid var(--tk-line); background:rgba(0,0,0,.22); color:var(--tk-text); border-radius:14px; padding:12px 13px; font:inherit;
}
.tk-admin textarea { min-height: 95px; resize: vertical; }
.tk-admin .tk-wide { grid-column:1 / -1; }
.tk-admin .tk-msg { padding:12px 14px; border-radius:14px; background:rgba(42,199,123,.12); border:1px solid rgba(42,199,123,.35); margin-bottom:18px; }
.tk-admin .tk-error { background:rgba(255,93,93,.12); border-color:rgba(255,93,93,.35); }
.tk-admin table { width:100%; border-collapse: collapse; }
.tk-admin th,.tk-admin td { border-bottom:1px solid var(--tk-line); padding:10px; text-align:left; vertical-align:top; }
.tk-admin th { color:var(--tk-muted); font-size:.9rem; }
.tk-admin-groups { display:grid; gap:12px; }
.tk-admin-section-title { margin:24px 0 8px; font-size:1.05rem; color:var(--tk-text); }
.tk-admin-group { border:1px solid var(--tk-line); border-radius:16px; background:rgba(255,255,255,.04); overflow:hidden; }
.tk-admin-group summary { display:flex; justify-content:space-between; gap:12px; cursor:pointer; padding:14px 16px; color:var(--tk-text); }
.tk-admin-group summary span { color:var(--tk-muted); font-size:.92rem; }
.tk-admin-group-technical summary { background:rgba(255,255,255,.03); }
.tk-admin-item { display:grid; grid-template-columns:110px minmax(0,1fr) 220px; gap:14px; padding:14px 16px; border-top:1px solid var(--tk-line); }
.tk-admin-item p { margin:.4rem 0 0; color:var(--tk-muted); }
.tk-admin-score { display:grid; gap:8px; align-content:start; }
.tk-admin-score strong { font-size:1.5rem; }
.tk-admin-actions { display:grid; gap:8px; align-content:start; }
.tk-admin-actions form { margin:0; }

@media (max-width: 900px) {
  .tk-admin-item { grid-template-columns: 1fr; }
  .tk-hero-grid, .tk-grid-3, .tk-grid-2, .tk-form-grid { grid-template-columns: 1fr; }
  .tk-hero { padding-top: 42px; }
}

@media (max-width: 560px) {
  .tk-page { overflow-x: hidden; }
  .tk-container, .tk-hero-grid, .tk-lead, .tk-status-card { min-width: 0; max-width: 100%; }
  .tk-lead, .tk-status-card p { overflow-wrap: anywhere; }
  .tk-actions { flex-direction: column; align-items: stretch; }
  .tk-btn { width: 100%; max-width: 100%; white-space: normal; text-align: center; }
}


.tk-hero-copy { display:grid; align-content:start; }
.tk-quick-box { margin-top:24px; padding:18px 20px; border-radius:20px; border:1px solid var(--tk-line); background:rgba(255,255,255,.055); box-shadow:0 18px 45px rgba(0,0,0,.2); }
.tk-quick-box h2 { margin:0 0 10px; font-size:1.05rem; letter-spacing:0; }
.tk-quick-box ul { margin:0; padding-left:1.1rem; color:var(--tk-muted); }
.tk-quick-box li { margin:6px 0; }
.tk-metrics { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; margin-top:22px; }
.tk-metrics > div { padding:14px 16px; border-radius:16px; border:1px solid var(--tk-line); background:rgba(255,255,255,.055); }
.tk-metrics span { display:block; color:var(--tk-muted); font-size:.82rem; }
.tk-metrics strong { display:block; margin-top:4px; font-size:1.02rem; }
.tk-metrics-inline { margin-top:20px; }
.tk-status-links { display:flex; gap:14px; flex-wrap:wrap; margin-top:20px; position:relative; z-index:1; }
.tk-section-heading { margin-bottom:16px; }
.tk-muted { color:var(--tk-muted); }
.tk-topic-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.tk-topic-card { padding:24px; min-height:100%; display:flex; flex-direction:column; gap:12px; }
.tk-topic-card h3 { margin:0; font-size:1.35rem; }
.tk-topic-card p { color:var(--tk-muted); margin:0; }
.tk-topic-card a { margin-top:auto; font-weight:700; }
.tk-audience-grid .tk-info-card { min-height:100%; border-top:3px solid rgba(247,163,66,.45); }
.tk-cta-panel { padding:28px; display:flex; justify-content:space-between; gap:24px; align-items:center; }
.tk-cta-panel h2 { margin-bottom:10px; }
.tk-subhero { padding-bottom:22px; }
.tk-detail-list { display:grid; gap:12px; }
.tk-detail-topic { border:1px solid var(--tk-line); border-radius:18px; background:rgba(255,255,255,.05); overflow:hidden; }
.tk-detail-topic summary { cursor:pointer; padding:16px 18px; display:flex; justify-content:space-between; gap:14px; }
.tk-detail-topic summary span { color:var(--tk-muted); font-size:.92rem; }
.tk-detail-topic > p { color:var(--tk-muted); margin:0; padding:0 18px 14px; }
.tk-detail-topic .tk-source-item { margin:0 18px 12px; }
.tk-detail-technical { opacity:.82; }
.tk-timeline { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:10px; }
.tk-timeline-item,.tk-archive-card { padding:16px; border-radius:18px; border:1px solid var(--tk-line); background:rgba(255,255,255,.05); }
.tk-timeline-item span,.tk-archive-meta span { color:var(--tk-muted); }
.tk-mini-dot { display:inline-block; width:12px; height:12px; border-radius:999px; margin-right:8px; background:var(--tk-yellow); box-shadow:0 0 18px currentColor; }
.tk-mini-dot.green { color:var(--tk-green); background:var(--tk-green); }
.tk-mini-dot.yellow { color:var(--tk-yellow); background:var(--tk-yellow); }
.tk-mini-dot.red { color:var(--tk-red); background:var(--tk-red); }
.tk-archive-list { display:grid; gap:14px; }
.tk-archive-meta { display:flex; gap:8px; align-items:center; flex-wrap:wrap; color:var(--tk-muted); }
.tk-archive-card h3 { margin:12px 0 8px; }
.tk-archive-card p { color:var(--tk-muted); margin:0; }

@media (max-width: 1000px) {
  .tk-metrics, .tk-topic-grid, .tk-timeline { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tk-cta-panel { flex-direction:column; align-items:flex-start; }
}
@media (max-width: 560px) {
  .tk-metrics, .tk-topic-grid, .tk-timeline { grid-template-columns:1fr; }
  .tk-detail-topic summary { flex-direction:column; }
}


/* Dashboard consistency refinements */
.tk-hero { padding: 46px 0 18px; }
.tk-hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr); gap: 22px; }
.tk-hero h1 { font-size: clamp(2rem, 4.2vw, 3.7rem); margin-bottom: 14px; }
.tk-lead { margin-bottom: 18px; max-width: 700px; }
.tk-action-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 560px; gap:10px; }
.tk-action-grid .tk-btn { width:100%; padding-inline:14px; }
.tk-status-card { padding:22px; }
.tk-status-card h2 { font-size:1.3rem; line-height:1.18; margin: 8px 0 10px; }
.tk-status-card p { font-size:.98rem; color:var(--tk-muted); }
.tk-light-row { margin:16px 0; }
.tk-light-dot { width:56px; height:56px; }
.tk-light-label { font-size:1.65rem; }
.tk-status-links { margin-top:14px; }
.tk-quick-box { margin-top:18px; padding:16px 18px; }
.tk-metrics { margin-top:14px; gap:10px; }
.tk-metrics > div { padding:12px 14px; }
.tk-section { padding:24px 0; }
.tk-section-heading { margin-bottom:12px; }
.tk-topic-card { padding:22px; border-top:3px solid rgba(60,136,255,.46); }
.tk-topic-card h3 { font-size:1.28rem; }
.tk-topic-card .tk-pill { width:max-content; }
@media (max-width: 900px) {
  .tk-action-grid { grid-template-columns:1fr; max-width:none; }
}


/* Mobile layout hardening */
html, body { max-width: 100%; overflow-x: hidden; }
.tk-page { overflow-x: clip; }
.tk-hero-grid > * { min-width: 0; }
.tk-hero-copy { grid-column: 1; grid-row: 1; }
.tk-status-card { grid-column: 2; grid-row: 1 / span 2; align-self: start; max-width: 100%; }
.tk-quick-box { grid-column: 1; grid-row: 2; max-width: 100%; }

@media (max-width: 767px) {
  .tk-page,
  .tk-page * {
    max-width: 100%;
  }

  .tk-hero {
    display: block;
    padding: 28px 0 14px;
  }

  .tk-hero-grid {
    display: block;
    width: min(1160px, calc(100vw - 28px));
  }

  .tk-hero-copy,
  .tk-status-card,
  .tk-quick-box {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: none;
    position: relative;
    inset: auto;
    transform: none;
  }

  .tk-eyebrow {
    font-size: .72rem;
    letter-spacing: .08em;
    margin-bottom: 8px;
  }

  .tk-hero h1 {
    font-size: clamp(2.15rem, 10.5vw, 3rem);
    line-height: 1.07;
    letter-spacing: 0;
    margin: 0 0 12px;
    overflow-wrap: normal;
    word-break: normal;
  }

  .tk-lead {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0 0 16px;
    overflow-wrap: normal;
  }

  .tk-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-width: none;
    margin: 16px 0 0;
  }

  .tk-action-grid .tk-btn {
    min-height: 46px;
    padding: 10px 12px;
    border-radius: 16px;
    line-height: 1.22;
  }

  .tk-status-card {
    margin: 22px 0 0;
    padding: 18px;
    border-radius: 20px;
    min-height: 0;
    overflow: hidden;
    z-index: 0;
  }

  .tk-status-card::after {
    width: 120px;
    height: 120px;
    inset: auto -46px -46px auto;
  }

  .tk-date {
    font-size: .88rem;
  }

  .tk-light-row {
    gap: 12px;
    margin: 12px 0;
  }

  .tk-light-dot {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }

  .tk-light-label {
    font-size: 1.35rem;
    line-height: 1.1;
  }

  .tk-risk,
  .tk-status-card p {
    font-size: .95rem;
    line-height: 1.45;
  }

  .tk-status-card h2 {
    font-size: clamp(1.22rem, 5vw, 1.5rem);
    line-height: 1.18;
    margin: 10px 0 8px;
    letter-spacing: 0;
  }

  .tk-status-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
  }

  .tk-status-links a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--tk-line);
    border-radius: 14px;
    background: rgba(255,255,255,.055);
    text-decoration: none;
    font-weight: 700;
  }

  .tk-quick-box {
    margin: 18px 0 0;
    padding: 16px;
    border-radius: 18px;
  }

  .tk-quick-box h2 {
    font-size: 1rem;
  }

  .tk-quick-box ul {
    padding-left: 1rem;
  }

  .tk-quick-box li {
    line-height: 1.42;
  }

  .tk-metrics {
    width: min(1160px, calc(100vw - 28px));
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
  }

  .tk-metrics > div {
    padding: 12px;
    border-radius: 14px;
    min-width: 0;
  }

  .tk-metrics span,
  .tk-metrics strong {
    overflow-wrap: anywhere;
  }

  .tk-section {
    padding: 20px 0;
  }

  .tk-section h2 {
    font-size: clamp(1.45rem, 7vw, 2rem);
    letter-spacing: 0;
  }

  .tk-topic-grid,
  .tk-grid-3,
  .tk-grid-2,
  .tk-timeline {
    grid-template-columns: 1fr;
  }

  .tk-topic-card,
  .tk-info-card,
  .tk-cta-panel,
  .tk-detail-topic,
  .tk-archive-card,
  .tk-timeline-item {
    border-radius: 18px;
  }

  .tk-topic-card {
    padding: 18px;
  }

  .tk-topic-card h3,
  .tk-info-card h3 {
    overflow-wrap: normal;
    word-break: normal;
  }

  .tk-detail-topic summary,
  .tk-admin-group summary {
    display: grid;
    grid-template-columns: 1fr;
  }

  .tk-source-item,
  .tk-source-status-item,
  .tk-checked-sources {
    overflow-wrap: anywhere;
  }
  .tk-source-status-item {
    display: grid;
    grid-template-columns: 1fr;
  }
  .tk-source-status-item span {
    text-align: left;
  }
}

@media (max-width: 420px) {
  .tk-action-grid,
  .tk-status-links,
  .tk-metrics {
    grid-template-columns: 1fr;
  }

  .tk-container,
  .tk-hero-grid,
  .tk-metrics {
    width: min(1160px, calc(100vw - 24px));
  }
}


/* Narrow phone stacking */
@media (max-width: 520px) {
  .tk-action-grid,
  .tk-status-links,
  .tk-metrics {
    grid-template-columns: 1fr;
  }

  .tk-action-grid .tk-btn,
  .tk-status-links a {
    width: 100%;
  }

  .tk-container,
  .tk-hero-grid,
  .tk-metrics {
    width: min(1160px, calc(100vw - 24px));
  }
}


/* Narrow phone text wrapping */
@media (max-width: 520px) {
  .tk-hero h1 {
    font-size: clamp(1.9rem, 9vw, 2.35rem);
    line-height: 1.1;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  .tk-lead,
  .tk-status-card h2,
  .tk-status-card p,
  .tk-quick-box li,
  .tk-topic-card p,
  .tk-info-card p {
    overflow-wrap: anywhere;
  }

  .tk-status-card {
    contain: layout paint;
  }
}


/* Hard overflow guard */
@media (max-width: 520px) {
  body .tk-page {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  body .tk-page .tk-container,
  body .tk-page .tk-hero-grid,
  body .tk-page .tk-metrics {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0;
    margin-right: 0;
  }

  body .tk-page .tk-hero,
  body .tk-page .tk-section {
    padding-left: 14px;
    padding-right: 14px;
  }

  body .tk-page .tk-card,
  body .tk-page .tk-status-card,
  body .tk-page .tk-quick-box,
  body .tk-page .tk-topic-card,
  body .tk-page .tk-info-card,
  body .tk-page .tk-btn {
    width: 100%;
    max-width: 100%;
  }

  body .tk-page .tk-status-card h2 {
    font-size: 1.18rem;
  }
}
