/* ==========================================================================
   HARDWARE SECURITY CHRONICLE — OFFICIAL PUBLICATION STYLESHEET
   Domain: g-ledger.at
   Theme: Modern Tech Digest & Investigation Dispatch
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --hsc-bg: #ffffff;
  --hsc-panel: #f8fafc;
  --hsc-text: #0f172a;
  --hsc-muted: #64748b;
  --hsc-faint: #94a3b8;
  --hsc-emerald: #059669;
  --hsc-emerald-hover: #047857;
  --hsc-emerald-tint: #ecfdf5;
  --hsc-border: #e2e8f0;
  --hsc-border-strong: #cbd5e1;
  --hsc-font-head: 'Plus Jakarta Sans', system-ui, sans-serif;
  --hsc-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --hsc-font-code: 'JetBrains Mono', monospace;
  --hsc-width: 800px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 17px;
  line-height: 1.72;
  color: var(--hsc-text);
  background-color: var(--hsc-bg);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--hsc-font-body);
  background-color: var(--hsc-bg);
}

/* Top Navigation Bar */
.hsc-topbar {
  border-bottom: 1px solid var(--hsc-border);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 1.5rem;
}

.hsc-topbar-inner {
  max-width: var(--hsc-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hsc-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--hsc-text);
}

.hsc-brand-badge {
  background: var(--hsc-emerald);
  color: #fff;
  font-family: var(--hsc-font-head);
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.hsc-brand-name {
  font-family: var(--hsc-font-head);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.hsc-share-btn {
  background: var(--hsc-panel);
  border: 1px solid var(--hsc-border);
  color: var(--hsc-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.hsc-share-btn:hover {
  background: var(--hsc-border);
  color: var(--hsc-text);
}

/* Article Shell */
.hsc-article-wrap {
  max-width: var(--hsc-width);
  margin: 3rem auto 6rem;
  padding: 0 1.5rem;
}

.hsc-meta-tag-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.hsc-pill {
  background-color: var(--hsc-emerald-tint);
  color: var(--hsc-emerald);
  font-family: var(--hsc-font-head);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hsc-read-time {
  font-size: 0.8rem;
  color: var(--hsc-muted);
}

.hsc-title {
  font-family: var(--hsc-font-head);
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--hsc-text);
  margin-bottom: 1.2rem;
}

.hsc-author-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0 2rem;
  border-bottom: 1px solid var(--hsc-border);
  margin-bottom: 2.2rem;
  font-size: 0.85rem;
  color: var(--hsc-muted);
}

.hsc-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #059669, #0284c7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Prose */
.hsc-lede {
  font-size: 1.22rem;
  line-height: 1.65;
  color: #334155;
  margin-bottom: 1.8rem;
  font-weight: 400;
}

.hsc-body p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--hsc-text);
  margin-bottom: 1.5rem;
}

/* Headings */
.hsc-h2 {
  font-family: var(--hsc-font-head);
  font-size: 1.7rem;
  font-weight: 750;
  line-height: 1.32;
  color: var(--hsc-text);
  margin: 3rem 0 1.2rem;
  letter-spacing: -0.02em;
}

.hsc-h3 {
  font-family: var(--hsc-font-head);
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.4;
  color: #1e293b;
  margin: 2rem 0 0.8rem;
  letter-spacing: -0.01em;
}

/* Media Figures */
.hsc-figure {
  margin: 2.5rem 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--hsc-border);
  background-color: var(--hsc-panel);
}

.hsc-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.hsc-figure figcaption {
  font-size: 0.85rem;
  color: var(--hsc-muted);
  padding: 0.8rem 1.2rem;
  border-top: 1px solid var(--hsc-border);
  background: var(--hsc-panel);
}

/* Lists */
.hsc-bullet-list, .hsc-ordered-list {
  margin: 1.2rem 0 1.8rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.hsc-bullet-list li, .hsc-ordered-list li {
  line-height: 1.65;
  color: #1e293b;
}

.hsc-bullet-list li::marker {
  color: var(--hsc-emerald);
}

.hsc-ordered-list li::marker {
  font-family: var(--hsc-font-code);
  font-weight: 700;
  color: var(--hsc-emerald);
}

/* Tables */
.hsc-table-container {
  overflow-x: auto;
  margin: 2.5rem 0;
  border-radius: 8px;
  border: 1px solid var(--hsc-border);
}

.hsc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  text-align: left;
}

.hsc-table th {
  background: #f1f5f9;
  font-family: var(--hsc-font-head);
  font-weight: 700;
  padding: 0.9rem 1.1rem;
  color: #1e293b;
  border-bottom: 2px solid var(--hsc-border);
}

.hsc-table td {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--hsc-border);
}

.hsc-table tr:last-child td {
  border-bottom: none;
}

.hsc-table tr:hover {
  background-color: #f8fafc;
}

/* Related Guides Card */
.hsc-series-card {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border: 1px solid var(--hsc-border-strong);
  border-radius: 12px;
  padding: 2.2rem;
  margin: 3.5rem 0;
}

.hsc-series-card h2 {
  font-family: var(--hsc-font-head);
  font-size: 1.35rem;
  font-weight: 750;
  margin-bottom: 0.6rem;
  color: var(--hsc-text);
}

.hsc-series-card p {
  color: var(--hsc-muted);
  font-size: 0.95rem;
  margin-bottom: 1.4rem;
}

.hsc-series-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hsc-series-links li {
  padding: 1rem 1.2rem;
  background: #fff;
  border: 1px solid var(--hsc-border);
  border-radius: 8px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.hsc-series-links li:hover {
  transform: translateY(-2px);
  border-color: var(--hsc-emerald);
}

.hsc-series-links a {
  color: var(--hsc-text);
  font-weight: 700;
  text-decoration: none;
  font-size: 1.05rem;
}

.hsc-series-links a:hover {
  color: var(--hsc-emerald);
}

.hsc-series-summary {
  display: block;
  font-size: 0.88rem;
  color: var(--hsc-muted);
  margin-top: 0.3rem;
}

/* Native Details FAQ */
.hsc-faq-wrap {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 2px solid var(--hsc-border);
}

.hsc-faq-details {
  border: 1px solid var(--hsc-border);
  border-radius: 8px;
  margin-bottom: 0.8rem;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.hsc-faq-details[open] {
  border-color: var(--hsc-emerald);
}

.hsc-faq-summary {
  padding: 1.1rem 1.3rem;
  font-family: var(--hsc-font-head);
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  background: var(--hsc-panel);
  user-select: none;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hsc-faq-summary::-webkit-details-marker {
  display: none;
}

.hsc-faq-summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--hsc-emerald);
  font-weight: 600;
  transition: transform 0.2s ease;
}

.hsc-faq-details[open] .hsc-faq-summary::after {
  content: '−';
}

.hsc-faq-body {
  padding: 1.2rem 1.3rem;
  background: #ffffff;
  border-top: 1px solid var(--hsc-border);
  font-size: 1rem;
  line-height: 1.7;
  color: #334155;
}

/* Toast */
#hsc-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #0f172a;
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  display: none;
  z-index: 1000;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Footer */
.hsc-footer {
  border-top: 1px solid var(--hsc-border);
  padding: 3rem 1.5rem;
  background-color: var(--hsc-panel);
  text-align: center;
  font-size: 0.85rem;
  color: var(--hsc-muted);
}

.hsc-back-nav {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-weight: 600;
  color: var(--hsc-emerald);
  text-decoration: none;
}

.hsc-back-nav:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  html { font-size: 16px; }
  .hsc-title { font-size: 1.95rem; }
}
