﻿/* =========================================================
   Help Center：系統說明書與操作手冊
   ========================================================= */
.help-eyebrow {
  margin-bottom: .25rem;
  color: var(--smartexam-primary);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.help-hero-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.help-entry-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  min-height: 190px;
  padding: 1.35rem;
  border: 1px solid var(--smartexam-border);
  border-radius: var(--smartexam-radius-lg, .9rem);
  background: var(--smartexam-surface);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--smartexam-shadow-sm, 0 .1rem .35rem rgba(16,24,40,.06));
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.help-entry-card:hover {
  transform: translateY(-2px);
  border-color: #9db4d4;
  color: inherit;
  box-shadow: var(--smartexam-shadow-md, 0 .4rem 1.2rem rgba(16,24,40,.09));
}

.help-entry-icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: .85rem;
  background: var(--smartexam-primary-soft);
  color: var(--smartexam-primary);
  font-size: 1.2rem;
  font-weight: 800;
}

.help-entry-card h2 {
  margin-bottom: .45rem;
  font-size: 1.25rem;
}

.help-entry-card p {
  margin-bottom: .8rem;
  color: var(--smartexam-text-muted);
  line-height: 1.7;
}

.help-entry-link {
  color: var(--smartexam-primary);
  font-weight: 700;
}

.help-quick-section { padding: 1.25rem; }
.help-section-heading h2 { margin-bottom: .25rem; font-size: 1.2rem; }
.help-section-heading p { margin: 0 0 1rem; color: var(--smartexam-text-muted); }

.help-role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}

.help-role-card {
  display: grid;
  gap: .3rem;
  padding: 1rem;
  border: 1px solid var(--smartexam-border);
  border-radius: var(--smartexam-radius-md, .75rem);
  background: #fbfcfe;
  color: inherit;
  text-decoration: none;
}

.help-role-card:hover {
  border-color: var(--smartexam-primary);
  background: var(--smartexam-primary-soft);
  color: inherit;
}

.help-role-card span {
  color: var(--smartexam-text-muted);
  font-size: .88rem;
  line-height: 1.55;
}

.help-common-notes { margin-top: 1rem; }

.help-document-layout {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.help-document-sidebar {
  position: sticky;
  top: 78px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
}

.help-document { min-width: 0; }
.help-document-header { align-items: center; }

.help-toc {
  display: grid;
  gap: .2rem;
  padding: .8rem;
  border: 1px solid var(--smartexam-border);
  border-radius: var(--smartexam-radius-md, .75rem);
  background: var(--smartexam-surface);
}

.help-toc-title {
  padding: .4rem .55rem .65rem;
  color: var(--smartexam-text-muted);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
}

.help-toc a {
  display: block;
  padding: .55rem .65rem;
  border-radius: .5rem;
  color: #344054;
  text-decoration: none;
  font-size: .9rem;
}

.help-toc a:hover,
.help-toc a.active {
  background: var(--smartexam-primary-soft);
  color: var(--smartexam-primary);
  font-weight: 700;
}

.help-mobile-toc-button {
  display: none;
  width: 100%;
  margin-bottom: .75rem;
}

.help-search-panel {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--smartexam-border);
  border-radius: var(--smartexam-radius-md, .75rem);
  background: #fbfcfe;
}

.help-search-panel label {
  display: block;
  margin-bottom: .45rem;
  font-weight: 700;
}

.help-search-result {
  min-height: 1.25rem;
  margin-top: .4rem;
  color: var(--smartexam-text-muted);
  font-size: .84rem;
}

.help-section {
  scroll-margin-top: 90px;
  margin-bottom: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--smartexam-border);
  border-radius: var(--smartexam-radius-lg, .9rem);
  background: var(--smartexam-surface);
  box-shadow: var(--smartexam-shadow-sm, 0 .1rem .35rem rgba(16,24,40,.06));
}

.help-section[hidden] { display: none !important; }

.help-section h2 {
  margin-bottom: .9rem;
  color: #1d2939;
  font-size: 1.35rem;
}

.help-section h3 {
  margin-top: 1.2rem;
  margin-bottom: .55rem;
  font-size: 1.05rem;
}

.help-section p,
.help-section li {
  line-height: 1.75;
}

.help-section code {
  color: #7a271a;
  word-break: break-word;
}

.help-definition-grid,
.help-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}

.help-definition-grid > div,
.help-feature-item {
  padding: .9rem 1rem;
  border: 1px solid var(--smartexam-border);
  border-radius: var(--smartexam-radius-md, .75rem);
  background: #fbfcfe;
}

.help-definition-grid h3,
.help-feature-item h3 {
  margin-top: 0;
}

.help-definition-grid p,
.help-feature-item p {
  margin-bottom: 0;
  color: var(--smartexam-text-muted);
}

.help-architecture {
  display: grid;
  justify-items: stretch;
  max-width: 720px;
  margin: 0 auto;
}

.help-architecture-layer {
  display: grid;
  gap: .25rem;
  padding: .9rem 1rem;
  border: 1px solid #b8c7dc;
  border-radius: .7rem;
  background: linear-gradient(135deg, #f7faff, #eef4ff);
  text-align: center;
}

.help-architecture-layer strong { color: var(--smartexam-primary); }
.help-architecture-layer span { color: var(--smartexam-text-muted); }
.help-architecture-arrow { padding: .22rem; color: #667085; text-align: center; }

.help-code-rule {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}

.help-code-rule > div {
  display: grid;
  gap: .4rem;
  padding: .85rem;
  border-radius: .7rem;
  background: #f8fafc;
}

.help-code-rule span {
  color: var(--smartexam-text-muted);
  font-size: .88rem;
}

.help-check-list {
  padding-left: 0;
  list-style: none;
}

.help-check-list li {
  position: relative;
  margin-bottom: .55rem;
  padding-left: 1.55rem;
}

.help-check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--smartexam-success, #14804a);
  font-weight: 800;
}

.help-step-list {
  padding-left: 1.35rem;
}

.help-step-list li {
  margin-bottom: .6rem;
  padding-left: .25rem;
}

.help-role-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1rem;
  padding: .35rem;
  border: 1px solid var(--smartexam-border);
  border-radius: .75rem;
  background: var(--smartexam-surface);
}

.help-role-switcher a {
  flex: 1 1 150px;
  padding: .65rem .8rem;
  border-radius: .55rem;
  color: #344054;
  text-align: center;
  text-decoration: none;
  font-weight: 650;
}

.help-role-switcher a:hover,
.help-role-switcher a.active {
  background: var(--smartexam-primary-soft);
  color: var(--smartexam-primary);
}

.help-action-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1rem;
}

.help-faq {
  margin-bottom: .55rem;
  border: 1px solid var(--smartexam-border);
  border-radius: .65rem;
  background: #fbfcfe;
}

.help-faq summary {
  padding: .8rem .9rem;
  cursor: pointer;
  font-weight: 700;
}

.help-faq p {
  padding: 0 .9rem .9rem;
  margin: 0;
  color: var(--smartexam-text-muted);
}

.help-document-footer {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  margin-top: 1.25rem;
}

.help-toc-offcanvas { width: min(88vw, 340px); }

.footer-help-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-left: .75rem;
}

.footer-help-links a {
  color: inherit;
  text-decoration: none;
}

.footer-help-links a:hover { color: var(--smartexam-primary); }

@media (max-width: 991.98px) {
  .help-document-layout { grid-template-columns: 1fr; }
  .help-document-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .help-mobile-toc-button { display: block; }
}

@media (max-width: 767.98px) {
  .help-hero-grid,
  .help-role-grid,
  .help-definition-grid,
  .help-feature-grid,
  .help-code-rule {
    grid-template-columns: 1fr;
  }

  .help-entry-card { min-height: 0; }
  .help-document-header { align-items: stretch; }
}

@media (max-width: 575.98px) {
  .help-entry-card {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .help-entry-icon {
    width: 2.8rem;
    height: 2.8rem;
  }

  .help-section { padding: 1rem; }
  .help-role-switcher a { flex-basis: 100%; }
  .help-document-footer { flex-direction: column; }
  .help-document-footer .btn { width: 100%; }
  .footer-help-links {
    display: flex;
    margin: .25rem 0 0;
  }
}

@media print {
  .smartexam-header,
  .smartexam-mobile-management-bar,
  .smartexam-sidebar,
  footer,
  .help-print-hidden,
  .help-document-sidebar,
  .help-toc-offcanvas {
    display: none !important;
  }

  body.smartexam-body {
    margin: 0;
    background: #fff;
    color: #000;
  }

  .smartexam-page-shell,
  .smartexam-main-content {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
  }

  .help-document-layout { display: block; }
  .help-section {
    break-inside: avoid;
    border: 0;
    box-shadow: none;
    padding: .3rem 0;
  }

  .help-section[hidden] { display: block !important; }
  a { color: #000 !important; text-decoration: none !important; }
}
