/* ============================================================
   fixlin.com — Remote Device Diagnostic & Troubleshooting Guidance
   Shared stylesheet (B2B / industrial / clean light theme)
   ============================================================ */

:root {
  --primary: #0f766e;        /* teal-700 — technical, trustworthy */
  --primary-dark: #115e59;
  --primary-light: #ccfbf1;
  --accent: #0ea5e9;         /* sky-500 */
  --ink: #0f172a;            /* slate-900 */
  --body: #334155;           /* slate-700 */
  --muted: #64748b;          /* slate-500 */
  --line: #e2e8f0;           /* slate-200 */
  --bg: #ffffff;
  --bg-soft: #f8fafc;        /* slate-50 */
  --bg-dark: #0b1220;
  --danger: #b91c1c;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.08);
  --shadow-md: 0 4px 12px rgba(15,23,42,.08), 0 2px 4px rgba(15,23,42,.06);
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section.soft { background: var(--bg-soft); }
.section.dark { background: var(--bg-dark); color: #cbd5e1; }
.section.dark h2, .section.dark h3 { color: #fff; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); font-size: 1.15rem; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: grid; place-items: center; color: #fff; font-weight: 900; font-size: .9rem;
}
.brand:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--body); font-weight: 600; font-size: .95rem; }
.nav-links a:hover { color: var(--primary); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; transition: .2s; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; font-weight: 700; font-size: .98rem;
  border: 2px solid transparent; cursor: pointer; transition: .18s; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; color: #fff; }
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; text-decoration: none; }
.btn-ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }
.btn-ghost:hover { background: rgba(255,255,255,.18); text-decoration: none; color: #fff; }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; }

/* ---------- Hero ---------- */
.hero { padding: 84px 0 72px; background:
    radial-gradient(1200px 400px at 80% -10%, rgba(14,165,233,.12), transparent),
    radial-gradient(900px 360px at 0% 0%, rgba(15,118,110,.12), transparent); }
.hero h1 { max-width: 16ch; }
.hero .lede { font-size: 1.18rem; color: var(--muted); max-width: 60ch; margin-bottom: 28px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Cards / Grid ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm);
}
.card h3 { margin-top: 0; }
.card .icon {
  width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center;
  background: var(--primary-light); color: var(--primary-dark); font-size: 1.3rem; margin-bottom: 14px;
}
.card.feature { border-top: 3px solid var(--primary); }

/* ---------- Badges / Notices ---------- */
.notice {
  border: 1px solid var(--line); border-left: 4px solid var(--primary);
  background: var(--bg-soft); border-radius: 10px; padding: 18px 20px;
}
.notice.warn { border-left-color: #f59e0b; background: #fffbeb; }
.notice.danger { border-left-color: var(--danger); background: #fef2f2; }
.notice h4 { margin: 0 0 6px; color: var(--ink); }
.badge {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .03em;
  padding: 4px 10px; border-radius: 999px; background: var(--primary-light); color: var(--primary-dark);
  text-transform: uppercase;
}

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; gap: 22px; grid-template-columns: repeat(3,1fr); }
.step { position: relative; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -16px; left: 24px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 800;
}
.step h3 { margin-top: 10px; }

/* ---------- Lists ---------- */
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--primary); font-weight: 900; }
.checks.x li::before { content: "✕"; color: var(--danger); }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 6px; font-size: .92rem; }
.field .req { color: var(--danger); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 1rem; font-family: inherit; color: var(--ink); background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15,118,110,.15);
}
.field textarea { min-height: 140px; resize: vertical; }
.consent { display: flex; gap: 10px; align-items: flex-start; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin: 8px 0 20px; }
.consent input { margin-top: 4px; flex: 0 0 auto; width: 18px; height: 18px; }
.consent label { font-size: .9rem; color: var(--body); margin: 0; }
.form-note { font-size: .85rem; color: var(--muted); }
.form-msg { margin-top: 16px; padding: 14px 16px; border-radius: 10px; display: none; }
.form-msg.ok { display: block; background: #ecfdf5; border: 1px solid #6ee7b7; color: #065f46; }
.form-msg.err { display: block; background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; margin: 0 0 1em; }
.table th, .table td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.table th { background: var(--bg-soft); color: var(--ink); }

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 0; margin-bottom: 12px; overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 18px 20px; font-weight: 700; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--primary); font-size: 1.4rem; line-height: 1; }
.faq-item[open] summary::after { content: "−"; }
.faq-item .answer { padding: 0 20px 18px; color: var(--body); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-dark); color: #94a3b8; padding: 52px 0 28px; }
.site-footer h4 { color: #fff; font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 30px; }
.footer-grid .brand { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 36px; padding-top: 20px; font-size: .85rem; color: #64748b; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 20px rgba(15,23,42,.12);
  padding: 16px 20px; display: none;
}
.cookie-banner.show { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.cookie-banner p { margin: 0; font-size: .9rem; color: var(--body); flex: 1 1 320px; }
.cookie-banner .actions { display: flex; gap: 10px; }

/* ---------- Breadcrumb / page header ---------- */
.page-head { padding: 56px 0 28px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.page-head h1 { margin-bottom: .25em; }
.page-head p { color: var(--muted); max-width: 64ch; }

/* ---------- Misc ---------- */
.lead { font-size: 1.1rem; color: var(--body); }
.divider { height: 1px; background: var(--line); border: 0; margin: 40px 0; }
.stat-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.stat { text-align: center; padding: 22px; }
.stat .num { font-size: 2rem; font-weight: 800; color: var(--primary); }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 20px 16px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Phase 1.5 — New structural classes (no new color tokens)
   All colors reference existing :root tokens via var(--...).
   ============================================================ */

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: .875rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0 0 14px;
}
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.breadcrumb li { display: flex; align-items: center; gap: 6px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); text-decoration: none; }
.breadcrumb li[aria-current="page"] { color: var(--body); font-weight: 600; }
/* separator: 16px inline SVG chevron (currentColor → var(--muted)) */
.breadcrumb li:not(:last-child)::after {
  content: "";
  width: 16px; height: 16px;
  flex: 0 0 auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  opacity: .75;
}

/* ---------- Card link (anchor styled as a card) ---------- */
.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.card-link:hover {
  text-decoration: none;
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.card-link .card-link-arrow { color: var(--primary); transition: transform .18s ease; flex: 0 0 auto; }
.card-link:hover .card-link-arrow { transform: translateX(2px); }

/* ---------- Hub CTA rows ---------- */
.hub-cta, .cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
@media (max-width: 720px) {
  .hub-cta, .cta-row { flex-direction: column; align-items: stretch; }
  .hub-cta .btn, .cta-row .btn { width: 100%; }
}

/* ---------- YouTube facade ---------- */
.yt-card { /* reuses .card */ }
.yt-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-poster {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: var(--bg-soft);
  border: 0; cursor: pointer;
  color: var(--primary);
  width: 100%; height: 100%;
  padding: 0;
}
.yt-poster .yt-play {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: grid; place-items: center;
}
.yt-cap { font-size: .85rem; color: var(--muted); margin: 10px 0 0; }

/* ---------- Related links ---------- */
.related { margin-top: 32px; }
.related h3 { margin-top: 0; }
.related ul { list-style: none; margin: 0; padding: 0; }
.related li { padding: 12px 0; border-top: 1px solid var(--line); }
.related li:first-child { border-top: 0; }
.related a { color: var(--primary); font-weight: 600; }
.related a:hover { color: var(--primary-dark); text-decoration: none; }

/* ---------- Definition block (carried by .notice / .table) ---------- */
.def-block { margin: 16px 0; }

/* ---------- Check list (inline SVG check, reuses .checks visual) ---------- */
.list-check { list-style: none; padding: 0; margin: 0; }
.list-check li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.list-check li::before {
  content: "";
  position: absolute; left: 0; top: 2px;
  width: 20px; height: 20px;
  color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* ---------- Icon size utilities (size only, viewBox unchanged) ---------- */
.i-16 { width: 16px; height: 16px; }
.i-20 { width: 20px; height: 20px; }
.i-24 { width: 24px; height: 24px; }
