/* Shared styles for Noise-Meter sub-pages (Contact, Sitemap, Privacy).
   The home page (index.html) keeps its own inline styles with the same tokens. */

:root {
  --page: #0b0d12;
  --page-glow-1: rgba(42,120,214,0.16);
  --page-glow-2: rgba(124,92,224,0.12);
  --surface-1: rgba(255,255,255,0.045);
  --surface-solid: #14171e;
  --surface-raise: rgba(255,255,255,0.07);
  --text-primary: #f4f5f7;
  --text-secondary: #b6bac4;
  --text-muted: #7d818c;
  --grid: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.09);
  --series-1: #4d94ec;
  --accent-2: #8b6ef0;
  --good: #2ecc71;
  --warning: #f5b82e;
  --serious: #f2814f;
  --critical: #ef5350;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
}
/* Dark is the default (the :root tokens above). Light applies only when the
   visitor explicitly picks it with the top-right toggle. */
:root[data-theme="light"] {
  --page: #eef1f7;
  --page-glow-1: rgba(42,120,214,0.14);
  --page-glow-2: rgba(124,92,224,0.10);
  --surface-1: rgba(255,255,255,0.75);
  --surface-solid: #ffffff;
  --surface-raise: rgba(255,255,255,0.95);
  --text-primary: #14161c;
  --text-secondary: #4c5160;
  --text-muted: #82879a;
  --grid: rgba(20,22,28,0.08);
  --border: rgba(20,22,28,0.08);
  --series-1: #2a78d6;
  --accent-2: #6b4de0;
  --good: #14a24a;
  --warning: #d99a0b;
  --serious: #e06a34;
  --critical: #d03b3b;
  --shadow: 0 10px 30px rgba(30,44,80,0.10);
}

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

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(1100px 550px at 15% -10%, var(--page-glow-1), transparent 60%),
    radial-gradient(900px 500px at 90% 5%, var(--page-glow-2), transparent 60%),
    var(--page);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  padding: 28px 16px 56px;
  min-height: 100vh;
}

.wrap { max-width: 880px; margin: 0 auto; display: grid; gap: 18px; }
.wrap > * { min-width: 0; }

/* ---------- Header & navigation ---------- */
header { min-height: 42px; }
.site-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 750; font-size: 1.02rem; letter-spacing: -0.01em;
  color: var(--text-primary); text-decoration: none;
  margin-right: 8px;
}
.brand-logo { height: 28px; width: auto; display: block; }
.nav-links { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-links a {
  color: var(--text-secondary); text-decoration: none;
  font-size: 0.87rem; font-weight: 600;
  padding: 7px 14px; border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover { background: var(--surface-raise); color: var(--text-primary); }
.nav-links a.active {
  background: linear-gradient(135deg, var(--series-1), var(--accent-2));
  color: #fff;
}
.head-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.theme-btn {
  width: 42px; height: 42px; padding: 0;
  display: grid; place-items: center;
  font-size: 18px; line-height: 1;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-raise);
  color: var(--text-primary);
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s;
}
.theme-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.menu-toggle {
  display: none;
  width: 42px; height: 42px; padding: 0;
  align-items: center; justify-content: center;
  font-size: 18px; line-height: 1;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-raise);
  color: var(--text-primary);
  cursor: pointer;
}
@media (max-width: 700px) {
  .site-nav { flex-wrap: wrap; }
  .menu-toggle { display: flex; }
  .nav-links {
    display: none;
    flex-basis: 100%;
    order: 5;
    flex-direction: column;
    gap: 4px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 14px; }
}

/* ---------- Cards & typography ---------- */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
h1.page-title {
  font-size: clamp(1.5rem, 5vw, 1.9rem);
  font-weight: 750; letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 12px;
}
.page-intro { color: var(--text-secondary); font-size: 0.95rem; margin-top: 6px; }
.card h2 { font-size: 1.386rem; font-weight: 650; margin-bottom: 8px; }
.card h2:not(:first-child) { margin-top: 22px; }
.card p { color: var(--text-secondary); font-size: 0.92rem; }
.card p + p { margin-top: 10px; }
.card ul { color: var(--text-secondary); font-size: 0.92rem; padding-left: 22px; display: grid; gap: 6px; }
.card a { color: var(--series-1); font-weight: 600; text-decoration: none; }
.card a:hover { text-decoration: underline; }
.muted { color: var(--text-muted); font-size: 0.8rem; }

/* ---------- Buttons ---------- */
button, .btn {
  font: inherit; font-weight: 600; font-size: 0.92rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 11px 22px;
  cursor: pointer;
  background: var(--surface-raise);
  color: var(--text-primary);
  text-decoration: none;
  display: inline-block;
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}
button:hover, .btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
button.primary, .btn.primary {
  background: linear-gradient(135deg, var(--series-1), var(--accent-2));
  color: #fff; border-color: transparent;
  box-shadow: 0 6px 20px rgba(77,148,236,0.35);
}

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 14px; margin-top: 16px; }
.form-row { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
label.field { display: grid; gap: 6px; font-size: 0.84rem; font-weight: 600; color: var(--text-secondary); }
input[type="text"], input[type="email"], select, textarea {
  font: inherit; font-size: 0.92rem;
  color: var(--text-primary);
  background: var(--surface-raise);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 14px;
  outline: none;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--series-1);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--series-1) 25%, transparent);
}
textarea { min-height: 130px; resize: vertical; }

/* ---------- Sitemap list ---------- */
.site-list { list-style: none; padding: 0; display: grid; gap: 12px; }
.site-list li {
  background: var(--surface-raise);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
}
.site-list .page-link { font-size: 0.98rem; font-weight: 650; color: var(--series-1); text-decoration: none; }
.site-list .page-link:hover { text-decoration: underline; }
.site-list p { margin-top: 3px; font-size: 0.86rem; color: var(--text-secondary); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 12px; padding-top: 24px;
  display: grid; gap: 12px; justify-items: center; text-align: center;
}
.foot-brand { font-weight: 700; font-size: 0.95rem; }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.foot-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.85rem; font-weight: 600; }
.foot-links a:hover { color: var(--text-primary); }
.foot-copy { font-size: 0.78rem; color: var(--text-muted); }

/* ---------- Cookie notice ---------- */
.cookie-notice {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  max-width: 560px; margin: 0 auto;
  display: none;
  align-items: center; gap: 12px; flex-wrap: wrap;
  justify-content: center; text-align: center;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
  font-size: 0.85rem; color: var(--text-secondary);
  z-index: 50;
}
.cookie-notice.show { display: flex; animation: cookie-in 0.3s ease; }
.cookie-notice.hide { opacity: 0; transform: translateY(8px); transition: opacity 0.25s, transform 0.25s; }
.cookie-notice a { color: var(--series-1); font-weight: 600; text-decoration: none; }
.cookie-notice a:hover { text-decoration: underline; }
.cookie-ok {
  padding: 8px 18px; font-size: 0.85rem;
  background: linear-gradient(135deg, var(--series-1), var(--accent-2));
  color: #fff; border-color: transparent;
}
@keyframes cookie-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Blog index / category grid ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 20px;
}
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-raise);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, filter 0.15s;
}
.blog-card:hover { transform: translateY(-3px); filter: brightness(1.06); }
.blog-card .blog-thumb { aspect-ratio: 2 / 1; background: var(--surface-1); }
.blog-card .blog-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card-body { padding: 16px 18px 20px; display: grid; gap: 8px; }
.blog-card h2 { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); letter-spacing: -0.01em; }
.blog-card p { color: var(--text-secondary); font-size: 0.88rem; margin: 0; }
.blog-card .read-more { font-size: 0.82rem; font-weight: 650; color: var(--series-1); margin-top: 4px; }
.blog-card:hover .read-more { text-decoration: underline; }

/* ---------- Blog article banner ---------- */
.article-banner {
  margin: 16px 0 22px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 2 / 1;
  background: var(--surface-raise);
}
.article-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Blog article body ---------- */
.card article { margin-top: 26px; }
.card article section { margin-top: 26px; }
.card article section:first-child { margin-top: 0; }
.card article h2 { margin-top: 0; }
.card article p { line-height: 1.7; }
.card article ul { margin-top: 10px; margin-bottom: 10px; line-height: 1.6; }
.card article ul li::marker { color: var(--series-1); }
.card article .table-wrap + p { margin-top: 14px; }

.table-wrap { overflow-x: auto; margin-top: 14px; border-radius: 14px; border: 1px solid var(--border); }
.card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: var(--surface-raise);
}
.card caption {
  caption-side: top;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 16px 8px;
}
.card th, .card td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  white-space: normal;
}
.card thead th {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: color-mix(in srgb, var(--series-1) 12%, transparent);
}
.card tbody tr:last-child td { border-bottom: none; }
.card tbody tr:nth-child(even) { background: var(--surface-1); }
.card tbody tr:hover { background: color-mix(in srgb, var(--series-1) 8%, transparent); }
.card td:first-child, .card th:first-child { font-weight: 650; color: var(--text-primary); }

/* ---------- Section heading + FAQ accordion (shared) ---------- */
h2.section { font-size: 1.386rem; font-weight: 650; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.faq details {
  border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface-raise); padding: 0 18px;
}
.faq details + details { margin-top: 10px; }
.faq summary {
  cursor: pointer; font-weight: 650; font-size: 0.94rem;
  padding: 15px 0; list-style: none; position: relative; padding-right: 26px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 2px; top: 13px; color: var(--text-muted); font-size: 1.15rem; font-weight: 600; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { padding-bottom: 15px; color: var(--text-secondary); font-size: 0.9rem; }
