:root {
  --gq-base: #3f3f3f;
  --gq-main: #3a98cd;
  --gq-accent: #eb6119;
  --gq-ink: #202020;
  --gq-muted: #626262;
  --gq-line: #d8dee4;
  --gq-surface: #ffffff;
  --gq-soft: #eef3f8;
  --gq-shell-width: 1180px;
}

.gq-site-header,
.gq-breadcrumb-wrap,
.gq-site-footer,
.gq-accordion {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP",
    "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
}

.gq-site-header *,
.gq-breadcrumb-wrap *,
.gq-site-footer *,
.gq-accordion * {
  box-sizing: border-box;
}

.gq-site-header {
  position: relative;
  z-index: 1000;
  width: 100%;
  margin: 0;
  background: var(--gq-surface);
  border-bottom: 1px solid var(--gq-line);
  color: var(--gq-ink);
}

.gq-header-inner,
.gq-breadcrumb,
.gq-footer-inner {
  width: min(var(--gq-shell-width), calc(100% - 32px));
  margin-inline: auto;
}

.gq-header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.gq-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gq-ink) !important;
  text-decoration: none !important;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.gq-brand-logo {
  width: 38px;
  height: 38px;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
}

.gq-brand-mark {
  width: 38px;
  height: 38px;
  display: none;
  place-items: center;
  border-radius: 10px;
  background: var(--gq-main);
  border-bottom: 4px solid var(--gq-accent);
  color: #fff;
  font-size: 0.75rem;
  line-height: 1;
}

.gq-brand-mark:not([hidden]) {
  display: grid;
}

.gq-header-tag {
  color: var(--gq-muted);
  font-size: 0.88rem;
}

.gq-breadcrumb-wrap {
  position: relative;
  z-index: 999;
  width: 100%;
  margin: 0;
  background: var(--gq-soft);
  border-bottom: 1px solid var(--gq-line);
  color: var(--gq-muted);
}

.gq-breadcrumb {
  padding-block: 9px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.gq-breadcrumb a {
  color: #287eaf !important;
  text-decoration: none !important;
}

.gq-breadcrumb a:hover {
  text-decoration: underline !important;
}

.gq-breadcrumb-separator {
  margin-inline: 0.45em;
  color: #89939d;
}

.gq-content-frame {
  width: 100%;
  min-width: 0;
}

.gq-learning-tools {
  position: relative;
  z-index: 997;
  width: min(var(--gq-shell-width), calc(100% - 32px));
  margin: 14px auto 0;
  color: var(--gq-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP",
    "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
}

.gq-learning-tools *,
.gq-remediation * {
  box-sizing: border-box;
}

.gq-learning-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 14px;
  background: var(--gq-surface);
  border: 1px solid var(--gq-line);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(31, 41, 55, 0.06);
}

.gq-progress-summary {
  min-width: 180px;
  display: grid;
  grid-template-columns: auto minmax(100px, 180px);
  align-items: center;
  gap: 10px;
}

.gq-progress-text {
  color: var(--gq-muted);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.gq-progress-meter {
  width: 100%;
  height: 9px;
  overflow: hidden;
  border: 0;
  border-radius: 99px;
  background: #dce7ed;
}

.gq-progress-meter::-webkit-progress-bar {
  background: #dce7ed;
  border-radius: 99px;
}

.gq-progress-meter::-webkit-progress-value {
  background: var(--gq-main);
  border-radius: 99px;
}

.gq-progress-meter::-moz-progress-bar {
  background: var(--gq-main);
  border-radius: 99px;
}

.gq-learning-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.gq-learning-actions button {
  width: auto !important;
  min-height: 38px;
  margin: 0 !important;
  padding: 7px 12px !important;
  border: 1px solid var(--gq-line) !important;
  border-radius: 9px !important;
  color: var(--gq-ink) !important;
  background: #fff !important;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  line-height: 1.2;
}

.gq-learning-actions button:hover {
  border-color: var(--gq-main) !important;
  background: #f1f8fb !important;
}

.gq-learning-actions button[aria-pressed="true"] {
  border-color: var(--gq-main) !important;
  color: #0b5d82 !important;
  background: #e8f4f9 !important;
}

.gq-learning-guide {
  margin-top: 8px;
  overflow: hidden;
  background: var(--gq-surface);
  border: 1px solid var(--gq-line);
  border-radius: 12px;
}

.gq-learning-guide > summary {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
  color: #0b5d82;
  font-size: 0.86rem;
  font-weight: 800;
}

.gq-learning-guide > summary::-webkit-details-marker {
  display: none;
}

.gq-learning-guide > summary::after {
  content: "＋";
  color: var(--gq-accent);
  font-size: 1.1rem;
}

.gq-learning-guide[open] > summary::after {
  content: "－";
}

.gq-learning-guide-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--gq-line);
  background: #f7fafc;
}

.gq-guide-card {
  min-width: 0;
  padding: 14px;
  background: #fff;
  border: 1px solid #e2e8ee;
  border-radius: 10px;
}

.gq-guide-card h3 {
  margin: 0 0 8px !important;
  padding: 0 !important;
  border: 0 !important;
  color: var(--gq-ink) !important;
  font-size: 0.93rem !important;
  line-height: 1.4;
  text-align: left !important;
}

.gq-guide-card p {
  margin: 0;
  color: var(--gq-muted);
  font-size: 0.82rem;
  line-height: 1.7;
}

.gq-concept-guide ul {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
  list-style: none;
}

.gq-concept-guide li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--gq-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.gq-concept-guide strong {
  color: var(--gq-ink);
}

.gq-concept-swatch {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  margin-top: 0.25em;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 50%;
}

.gq-glossary-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(72px, auto) 1fr;
  gap: 6px 10px;
  font-size: 0.78rem;
  line-height: 1.55;
}

.gq-glossary-card dt {
  color: #0b5d82;
  font-weight: 800;
}

.gq-glossary-card dd {
  margin: 0;
  color: var(--gq-muted);
}

.gq-next-lesson {
  display: inline-flex;
  margin-top: 10px;
  color: #0b5d82 !important;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none !important;
}

.gq-next-lesson:hover {
  text-decoration: underline !important;
}

.gq-remediation {
  width: 100%;
  margin: 12px 0;
  padding: 13px 15px;
  border: 1px solid #f6c28b;
  border-left: 5px solid var(--gq-accent);
  border-radius: 9px;
  color: #5e341d;
  background: #fff8ef;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP",
    "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  font-size: 0.88rem;
  line-height: 1.65;
  text-align: left;
}

.gq-remediation strong {
  display: block;
  margin-bottom: 4px;
  color: #8a3f13;
}

.gq-remediation p {
  margin: 0;
}

.gq-accordion {
  width: 100%;
  margin: 24px auto;
  overflow: hidden;
  background: var(--gq-surface);
  border: 1px solid var(--gq-line);
  border-radius: 12px;
  color: var(--gq-ink);
  box-shadow: 0 4px 14px rgba(31, 41, 55, 0.08);
}

.gq-accordion > summary {
  min-height: 58px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
  background: var(--gq-surface);
  border-left: 5px solid var(--gq-accent);
  color: var(--gq-ink);
  font-weight: 800;
  line-height: 1.5;
}

.gq-accordion > summary::-webkit-details-marker {
  display: none;
}

.gq-accordion > summary::after {
  content: "＋";
  flex: 0 0 auto;
  color: var(--gq-main);
  font-size: 1.3rem;
  line-height: 1;
}

.gq-accordion[open] > summary::after {
  content: "－";
}

.gq-accordion > summary:hover {
  background: #f7fafc;
}

.gq-accordion > summary:focus-visible {
  outline: 3px solid var(--gq-accent);
  outline-offset: -3px;
}

.gq-accordion-body,
.gq-accordion > .explanation-body {
  padding: 20px;
  border-top: 1px solid var(--gq-line);
}

.gq-accordion-body > :first-child,
.gq-accordion > .explanation-body > :first-child {
  margin-top: 0;
}

.gq-accordion-body > :last-child,
.gq-accordion > .explanation-body > :last-child {
  margin-bottom: 0;
}

.gq-supplemental-explanation {
  width: min(var(--gq-shell-width), calc(100% - 32px));
  margin-block: 28px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP",
    "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.75;
}

.gq-supplemental-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
}

.gq-supplemental-body > h2,
.gq-supplemental-body > p {
  grid-column: 1 / -1;
}

.gq-supplemental-body h2,
.gq-supplemental-body h3 {
  color: var(--gq-ink);
  line-height: 1.4;
}

.gq-supplemental-body h2 {
  margin-bottom: 0;
  font-size: 1.35rem;
}

.gq-supplemental-body h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.gq-supplemental-body section {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--gq-line);
  border-radius: 10px;
  background: #f8fbfc;
}

.gq-supplemental-body ul,
.gq-supplemental-body dl {
  margin: 0;
}

.gq-supplemental-body dt {
  color: var(--gq-main);
  font-weight: 800;
}

.gq-supplemental-body dd {
  margin: 2px 0 10px;
}

.gq-supplemental-hint {
  border-left: 5px solid var(--gq-accent) !important;
  background: #fff7ed !important;
}

.gq-site-footer {
  position: relative;
  z-index: 998;
  width: 100%;
  margin: 20px 0 0;
  padding: 20px 0;
  background: var(--gq-surface);
  border-top: 1px solid var(--gq-line);
  color: #6c757d;
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
}

.gq-site-footer,
body > footer,
.site-footer,
.company-footer {
  position: relative;
  width: 100%;
  margin: 20px 0 0;
  padding: 20px 0;
  background: var(--gq-surface);
  border-top: 1px solid var(--gq-line);
  color: #6c757d;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP",
    "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

.gq-site-footer a,
body > footer a,
.site-footer a,
.company-footer a,
.gq-footer-inner a {
  color: #287eaf !important;
  text-decoration: none !important;
}

.gq-site-footer a:hover,
body > footer a:hover,
.site-footer a:hover,
.company-footer a:hover,
.gq-footer-inner a:hover {
  text-decoration: underline !important;
}

body.gq-shell-ready footer:not([data-gq-shell-footer="primary"]),
body.gq-shell-ready .site-footer:not([data-gq-shell-footer="primary"]),
body.gq-shell-ready .company-footer:not([data-gq-shell-footer="primary"]),
body.gq-shell-ready .page-footer:not([data-gq-shell-footer="primary"]),
body.gq-shell-ready .app-footer:not([data-gq-shell-footer="primary"]),
body.gq-shell-ready .footer-container:not([data-gq-shell-footer="primary"]) {
  display: none !important;
}

@media (max-width: 640px) {
  .gq-header-inner {
    min-height: 60px;
  }

  .gq-header-tag {
    display: none;
  }

  .gq-breadcrumb {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .gq-learning-tools {
    width: min(var(--gq-shell-width), calc(100% - 20px));
    margin-top: 10px;
  }

  .gq-learning-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .gq-progress-summary {
    grid-template-columns: auto 1fr;
  }

  .gq-learning-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .gq-learning-actions button {
    width: 100% !important;
  }

  .gq-learning-guide-body {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .gq-accordion > summary {
    padding: 14px 16px;
  }

  .gq-accordion-body,
  .gq-accordion > .explanation-body {
    padding: 16px;
  }

  .gq-supplemental-explanation {
    width: calc(100% - 20px);
  }

  .gq-supplemental-body {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .gq-supplemental-body > h2,
  .gq-supplemental-body > p {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gq-site-header *,
  .gq-breadcrumb-wrap *,
  .gq-site-footer *,
  .gq-accordion * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
