/* ============================================================
   Content Pages — Shared styles for docs, guides, legal, etc.
   Loaded after style.css on all content pages.
   ============================================================ */

/* ── Inline code ────────────────────────────────────────── */
code {
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: .8rem;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .1em .4em;
  color: var(--accent);
}

/* ── Command block ──────────────────────────────────────── */
.cmd-block {
  background: #0f172a;
  color: #fbbf24;
  border-radius: var(--radius-sm);
  padding: .85rem 1.25rem;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: .82rem;
  font-weight: 700;
  margin-top: .75rem;
  overflow-x: auto;
}

/* ── Note / warning / danger boxes ──────────────────────── */
.note,
.guide-note {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  font-size: .85rem;
  color: #78350f;
  margin-top: .75rem;
  line-height: 1.6;
}

.danger,
.guide-warning {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-left: 4px solid #ef4444;
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  font-size: .85rem;
  color: #7f1d1d;
  margin-top: .75rem;
  line-height: 1.6;
}

.warning-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  font-size: .9rem;
  color: #78350f;
  margin-top: .75rem;
  line-height: 1.6;
}

.highlight {
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
  padding: .75rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1rem 0;
}

.guarantee-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-left: 4px solid #16a34a;
  border-radius: var(--radius-sm);
  padding: .9rem 1.1rem;
  margin: 1rem 0;
}

.guarantee-box .guarantee-title {
  font-size: .9rem;
  font-weight: 700;
  color: #15803d;
  margin-bottom: .35rem;
}

.guarantee-box p {
  font-size: .85rem;
  color: #166534;
  line-height: 1.6;
}

/* ── req-section (docs, requirements) ───────────────────── */
.req-section {
  margin-bottom: 2rem;
}

.req-section h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .75rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--border);
}

.req-section h3 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
  margin: 1.25rem 0 .5rem;
}

.req-section p {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.req-section p + p {
  margin-top: .5rem;
}

/* ── Tables ─────────────────────────────────────────────── */
.req-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  margin-top: .75rem;
}

.req-table th {
  text-align: left;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  padding: .45rem .75rem;
  background: var(--bg);
  border: 1px solid var(--border);
}

.req-table td {
  padding: .55rem .75rem;
  border: 1px solid var(--border);
  vertical-align: top;
  color: var(--text);
  line-height: 1.5;
}

.req-table tr:nth-child(even) td {
  background: #fafafa;
}

/* ── Guide section (redmine-* pages) ────────────────────── */
.guide-section {
  margin-bottom: 1.9rem;
}

.guide-section h2 {
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .55rem;
  padding-bottom: .35rem;
  border-bottom: 2px solid var(--border);
}

.guide-section h3 {
  font-size: .92rem;
  font-weight: 700;
  color: var(--text);
  margin: 1.1rem 0 .45rem;
}

.guide-section p,
.guide-section li {
  font-size: .9rem;
  line-height: 1.68;
  color: #334155;
}

.guide-section ul {
  margin: .55rem 0 0 1.15rem;
}

.guide-links {
  display: grid;
  gap: .55rem;
  margin-top: .65rem;
}

.guide-links a {
  color: var(--accent);
  text-decoration: none;
  font-size: .9rem;
}

.guide-links a:hover {
  text-decoration: underline;
}

/* ── Guide tables ───────────────────────────────────────── */
.guide-table,
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .86rem;
  margin-top: .65rem;
}

.guide-table th,
.compare-table th {
  text-align: left;
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  padding: .45rem .7rem;
  background: var(--bg);
  border: 1px solid var(--border);
}

.guide-table td,
.compare-table td {
  padding: .5rem .7rem;
  border: 1px solid var(--border);
  vertical-align: top;
  color: var(--text);
  line-height: 1.5;
}

.guide-table tr:nth-child(even) td,
.compare-table tr:nth-child(even) td {
  background: #fafafa;
}

/* ── Legal sections (terms, privacy, refund inside .card) ── */
.legal-section h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: .25rem;
}

.legal-section .subtitle {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 2rem;
}

.legal-section h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.75rem 0 .5rem;
}

.legal-section p,
.legal-section li {
  font-size: .95rem;
  line-height: 1.7;
  color: #374151;
}

.legal-section ul {
  padding-left: 1.25rem;
}

.legal-section a {
  color: var(--accent);
}

/* ── Legal tabs (legal.html) ────────────────────────────── */
.legal-tabs {
  display: flex;
  gap: .25rem;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 2rem;
}

.legal-tab {
  padding: .6rem 1.1rem;
  font-size: .9rem;
  font-weight: 500;
  color: #6b7280;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}

.legal-tab:hover {
  color: var(--accent);
}

.legal-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.legal-section {
  display: none;
}

.legal-section.active {
  display: block;
}

/* ── Out-of-scope list ──────────────────────────────────── */
.oos-list {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  margin-top: .75rem;
}

.oos-list li {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  font-size: .95rem;
  color: #374151;
  line-height: 1.55;
}

.oos-list li::before {
  content: "\2715";
  font-size: .8rem;
  font-weight: 700;
  color: var(--danger);
  flex-shrink: 0;
  margin-top: .15rem;
}

/* ── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  padding: .15em .55em;
  border-radius: 3px;
  white-space: nowrap;
}

.badge-red   { background: #fee2e2; color: #991b1b; }
.badge-yellow{ background: #fef9c3; color: #92400e; }
.badge-green { background: #dcfce7; color: #166534; }

/* ── Checklist ──────────────────────────────────────────── */
.checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-top: .75rem;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .875rem;
  color: var(--text);
  line-height: 1.5;
}

.checklist li::before {
  content: "\2610";
  font-size: 1rem;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: .05rem;
}

.checklist li span {
  color: var(--text-muted);
  font-size: .8rem;
}

/* ── TOC (docs) ─────────────────────────────────────────── */
.toc {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .85rem 1.1rem;
  margin-bottom: 2rem;
}

.toc p {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: .5rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.toc ol li {
  font-size: .85rem;
}

.toc ol li a {
  color: var(--accent);
  text-decoration: none;
}

.toc ol li a:hover {
  text-decoration: underline;
}

/* ── Phase list (docs) ──────────────────────────────────── */
.phase-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.phase-list li {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .6rem .9rem;
  font-size: .875rem;
  color: var(--text);
  line-height: 1.5;
  border-bottom: 1px solid var(--border);
}

.phase-list li:last-child {
  border-bottom: none;
}

.phase-list li:nth-child(even) {
  background: #fafafa;
}

.phase-n {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: .1rem;
}

.phase-text {
  flex: 1;
}

.phase-text span {
  display: block;
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: .1rem;
}

/* ── Lightbox (CSS-only, :target) ───────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, .82);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}

.lightbox:target {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: min(92vw, 960px);
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .4);
}

.lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  font-size: 2.2rem;
  color: #fff;
  text-decoration: none;
  line-height: 1;
  opacity: .8;
  transition: opacity .15s;
}

.lightbox-close:hover {
  opacity: 1;
  text-decoration: none;
}

/* Legacy lightbox class aliases */
.doc-lightbox   { position: fixed; inset: 0; z-index: 9999; background: rgba(15, 23, 42, .82); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease; }
.doc-lightbox:target { opacity: 1; visibility: visible; }
.doc-lightbox img { max-width: min(92vw, 960px); max-height: 90vh; border-radius: 10px; box-shadow: 0 24px 64px rgba(0, 0, 0, .4); }
.doc-lightbox-close { position: absolute; top: 1.2rem; right: 1.5rem; font-size: 2.2rem; color: #fff; text-decoration: none; line-height: 1; opacity: .8; transition: opacity .15s; }
.doc-lightbox-close:hover { opacity: 1; text-decoration: none; }

.lp-lightbox    { position: fixed; inset: 0; z-index: 9999; background: rgba(15, 23, 42, .82); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease; }
.lp-lightbox:target { opacity: 1; visibility: visible; }
.lp-lightbox img { max-width: min(90vw, 900px); max-height: 85vh; border-radius: 10px; box-shadow: 0 24px 64px rgba(0, 0, 0, .4); }
.lp-lightbox-close { position: absolute; top: 1.2rem; right: 1.5rem; font-size: 2.2rem; color: #fff; text-decoration: none; line-height: 1; opacity: .8; transition: opacity .15s; }
.lp-lightbox-close:hover { opacity: 1; text-decoration: none; }

/* ── Screenshot gallery (docs) ──────────────────────────── */
.doc-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}

@media (max-width: 600px) {
  .doc-gallery { grid-template-columns: 1fr; }
}

.doc-gallery figure {
  margin: 0;
}

.doc-thumb {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: zoom-in;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.doc-thumb:hover {
  border-color: rgba(79, 70, 229, .4);
  box-shadow: 0 4px 12px rgba(15, 23, 42, .1);
  text-decoration: none;
}

.doc-thumb img {
  display: block;
  width: 100%;
  height: auto;
}

.doc-thumb-hint {
  display: block;
  text-align: center;
  font-size: .72rem;
  color: var(--text-muted);
  padding: .3rem 0;
  background: #f8fafc;
}

.doc-gallery figcaption {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .45rem;
  line-height: 1.5;
}

/* ── Search (docs) ──────────────────────────────────────── */
.doc-search {
  position: relative;
  margin-bottom: 2rem;
}

.doc-search input {
  width: 100%;
  padding: .75rem .75rem .75rem 2.6rem;
  font-size: .95rem;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius);
  background: #f8fafc;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.doc-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .1);
}

.doc-search input::placeholder { color: #94a3b8; }

.doc-search input:hover {
  border-color: #a5b4fc;
  background: #fff;
}

.doc-search-icon {
  position: absolute;
  left: .8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.1rem;
  height: 1.1rem;
  color: #6366f1;
  pointer-events: none;
}

.doc-search-clear {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: #94a3b8;
  cursor: pointer;
  display: none;
  line-height: 1;
}

.doc-search-clear:hover { color: var(--text); }

.doc-search-count {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .75rem;
  color: var(--text-muted);
  display: none;
}

.req-section.doc-hidden { display: none; }
.req-section.doc-no-match { opacity: .3; pointer-events: none; }

mark.doc-hl {
  background: #fef08a;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}

/* ── FAQ page styles ────────────────────────────────────── */
.faq-search {
  position: relative;
  margin-top: 1.5rem;
}

.faq-search input {
  width: 100%;
  padding: .75rem .75rem .75rem 2.6rem;
  font-size: .95rem;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius);
  background: #f8fafc;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.faq-search input:hover {
  border-color: #a5b4fc;
  background: #fff;
}

.faq-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .1);
}

.faq-search input::placeholder { color: #94a3b8; }

.faq-search-icon {
  position: absolute;
  left: .8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.1rem;
  height: 1.1rem;
  color: #6366f1;
  pointer-events: none;
}

.faq-search-clear {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: #94a3b8;
  cursor: pointer;
  display: none;
  line-height: 1;
}

.faq-search-clear:hover { color: var(--text); }

.faq-search-count {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .75rem;
  color: var(--text-muted);
  display: none;
}

.lp-faq {
  margin-top: 2rem;
}

.lp-faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}

.lp-faq-item:first-child {
  border-top: 1px solid var(--border);
}

.lp-faq-q {
  font-weight: 600;
  margin-bottom: .4rem;
  font-size: .95rem;
  color: var(--text);
}

.lp-faq-a {
  color: var(--text-muted);
  font-size: .875rem;
  line-height: 1.7;
}

.lp-faq-a a {
  color: var(--accent);
  text-decoration: none;
}

.lp-faq-a a:hover {
  text-decoration: underline;
}

.lp-faq-item.faq-hidden { display: none; }

mark.faq-hl {
  background: #fef08a;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}

.faq-no-results {
  text-align: center;
  color: var(--text-muted);
  font-size: .875rem;
  padding: 2rem 0;
  display: none;
}

/* ── FAQ thumbnail ──────────────────────────────────────── */
.lp-faq-thumb {
  display: block;
  max-width: 320px;
  margin-top: .85rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: zoom-in;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.lp-faq-thumb:hover {
  border-color: rgba(79, 70, 229, .4);
  box-shadow: 0 4px 12px rgba(15, 23, 42, .1);
  text-decoration: none;
}

.lp-faq-thumb img {
  display: block;
  width: 100%;
  height: auto;
}

.lp-faq-thumb-hint {
  display: block;
  text-align: center;
  font-size: .72rem;
  color: var(--text-muted);
  padding: .3rem 0;
  background: #f8fafc;
}

/* ── Support search ─────────────────────────────────────── */
.search-wrap {
  position: relative;
}

.search-wrap input {
  width: 100%;
  padding: .75rem 1rem .75rem 2.6rem;
  font-size: .95rem;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius);
  background: #f8fafc;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.search-wrap input:hover {
  border-color: #a5b4fc;
  background: #fff;
}

.search-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .1);
}

.search-wrap .search-icon {
  position: absolute;
  left: .8rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6366f1;
  pointer-events: none;
}

.search-results {
  margin-top: .75rem;
  display: none;
}

.search-results.active { display: block; }

.search-result-item {
  display: block;
  padding: .65rem .85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: .5rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s, background .15s;
}

.search-result-item:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.search-result-title {
  font-size: .875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.search-result-badge {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--accent);
  background: var(--accent-light);
  padding: .15rem .45rem;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.search-result-snippet {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .2rem;
  line-height: 1.5;
}

.search-result-snippet mark {
  background: #fef08a;
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

.search-empty {
  font-size: .85rem;
  color: var(--text-muted);
  text-align: center;
  padding: 1rem 0;
}

.search-divider {
  text-align: center;
  font-size: .82rem;
  color: var(--text-muted);
  margin: 1.5rem 0 .5rem;
}

.search-divider a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.search-divider a:hover {
  text-decoration: underline;
}

/* ── Breadcrumb ────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: .75rem;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

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

.breadcrumb span[aria-hidden] {
  color: #cbd5e1;
}

/* ── Guide intro & CTA ────────────────────────────────── */
.guide-intro {
  margin-bottom: 1.3rem;
}

.guide-cta {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1rem;
}

/* ── Architecture grid (guides) ───────────────────────── */
.arch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .9rem;
  margin-top: 1rem;
}

.arch-card {
  border: 1px solid #dbe4f0;
  border-radius: var(--radius-md);
  padding: 1rem;
  background: #f8fbff;
}

.arch-card h3 {
  margin: 0 0 .4rem;
  font-size: 1rem;
}

.arch-card p {
  margin: 0;
  font-size: .92rem;
  line-height: 1.65;
  color: var(--text-soft);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 480px) {
  .legal-tabs { gap: 0; }
  .legal-tab { padding: .5rem .65rem; font-size: .82rem; }
}
