/* Homepage long-form guide (#guide), 2026-10-18.
   Desktop: sticky table of contents + open parts. Phones: each part is a collapsible card. */
.hm-guide { padding: 88px 24px; background: var(--bg-secondary, #f8fafc); border-top: 1px solid var(--border, #e2e8f0); border-bottom: 1px solid var(--border, #e2e8f0); }
.hm-guide .section-container { max-width: 1160px; padding: 0; }
.hm-guide .section-header { max-width: 760px; margin-bottom: 48px; }
.hm-guide .section-header h2 { font-size: 36px; line-height: 1.2; }
.hm-guide .section-header p { font-size: 17px; line-height: 1.65; }

.hg-wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; }

/* Table of contents */
.hg-toc { position: sticky; top: 96px; }
.hg-toc-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-tertiary, #94a3b8); margin: 0 0 12px; }
.hg-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid #dbe4f0; counter-reset: hgtoc; }
.hg-toc li { counter-increment: hgtoc; }
.hg-toc a { display: flex; gap: 10px; padding: 7px 0 7px 16px; margin-left: -2px; border-left: 2px solid transparent; color: #475569; font-size: 14.5px; font-weight: 500; line-height: 1.35; text-decoration: none; transition: color .15s ease, border-color .15s ease; }
.hg-toc a::before { content: counter(hgtoc, decimal-leading-zero); color: #94a3b8; font-variant-numeric: tabular-nums; font-size: 12.5px; padding-top: 1px; }
.hg-toc a:hover, .hg-toc a:focus-visible { color: var(--primary, #0a66c2); border-left-color: var(--primary, #0a66c2); }

/* Parts */
.hg-body { max-width: 780px; min-width: 0; }
.hg-part { border-top: 1px solid var(--border, #e2e8f0); padding: 30px 0 6px; scroll-margin-top: 90px; }
.hg-part:first-child { border-top: 0; padding-top: 0; }
.hg-part > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: default; }
.hg-part > summary::-webkit-details-marker { display: none; }
.hg-part > summary h3 { margin: 0 0 14px; font-size: 25px; line-height: 1.3; font-weight: 800; letter-spacing: -0.015em; color: var(--text-primary, #1e293b); }
.hg-chev { display: none; flex: none; color: var(--primary, #0a66c2); transition: transform .2s ease; }
.hg-part-body { padding-bottom: 10px; }
.hg-part-body p, .hg-part-body li { font-size: 16.5px; line-height: 1.75; color: #334155; }
.hg-part-body p { margin: 0 0 16px; }
.hg-part-body strong { color: #0f172a; font-weight: 700; }
.hg-part-body a { color: var(--primary, #0a66c2); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(10, 102, 194, .35); text-underline-offset: 3px; }
.hg-part-body a:hover { text-decoration-color: currentColor; }
.hg-part-body h4 { margin: 22px 0 8px; font-size: 18px; line-height: 1.35; font-weight: 700; color: var(--text-primary, #1e293b); }

.hg-list { margin: 0 0 18px; padding-left: 22px; }
.hg-list li { margin-bottom: 10px; padding-left: 4px; }
.hg-list li::marker { color: var(--primary, #0a66c2); }
.hg-checks { list-style: none; padding-left: 0; }
.hg-checks li { position: relative; padding-left: 32px; }
.hg-checks li::before { content: ""; position: absolute; left: 0; top: 5px; width: 20px; height: 20px; border-radius: 50%; background: var(--primary, #0a66c2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat; }

/* Numbered steps */
.hg-steps { list-style: none; margin: 4px 0 18px; padding: 0; counter-reset: hgstep; display: grid; gap: 12px; }
.hg-steps li { counter-increment: hgstep; position: relative; padding: 16px 18px 16px 62px; background: #fff; border: 1px solid #dbe4f0; border-radius: 14px; }
.hg-steps li::before { content: counter(hgstep); position: absolute; left: 18px; top: 16px; width: 30px; height: 30px; border-radius: 50%; background: #e0efff; color: var(--primary, #0a66c2); font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.hg-steps li strong { display: block; margin-bottom: 2px; }

/* Comparison table */
.hg-table-wrap { margin: 4px 0 18px; overflow-x: auto; border: 1px solid #dbe4f0; border-radius: 14px; background: #fff; }
.hg-table-wrap:focus-visible { outline: 2px solid var(--primary, #0a66c2); outline-offset: 2px; }
.hg-table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.45; }
.hg-table caption { text-align: left; padding: 14px 16px 4px; font-size: 13px; font-weight: 700; color: var(--text-secondary, #64748b); text-transform: uppercase; letter-spacing: .05em; }
.hg-table th, .hg-table td { padding: 11px 16px; text-align: left; vertical-align: top; border-top: 1px solid #edf2f7; color: #334155; }
.hg-table thead td { border-top: 0; }
.hg-table thead th { border-top: 0; color: #0f172a; font-weight: 700; }
.hg-table thead th:nth-child(2) { color: var(--primary, #0a66c2); }
.hg-table tbody th { color: #0f172a; font-weight: 600; white-space: nowrap; }
.hg-table tbody td:nth-child(2) { background: #f5f9ff; font-weight: 600; color: #0f172a; }
.hg-k { display: none; }

/* Resources */
.hg-res { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 4px; }
.hg-res-col { background: #fff; border: 1px solid #dbe4f0; border-radius: 14px; padding: 16px 18px; }
.hg-part-body .hg-res-col h4 { margin: 0 0 8px; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-secondary, #64748b); }
.hg-res-col ul { list-style: none; margin: 0; padding: 0; }
.hg-part-body .hg-res-col li { font-size: 15px; line-height: 1.45; padding: 5px 0; }
.hg-part-body .hg-res-col a { text-decoration: none; font-weight: 600; }
.hg-part-body .hg-res-col a:hover { text-decoration: underline; }

@media (max-width: 1100px) {
  .hg-wrap { grid-template-columns: 200px minmax(0, 1fr); gap: 36px; }
  .hg-res { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Phones / small tablets: no TOC, each part is a collapsible card */
@media (max-width: 900px) {
  .hm-guide { padding: 64px 16px; }
  .hm-guide .section-header { margin-bottom: 28px; }
  .hm-guide .section-header h2 { font-size: 28px; }
  .hm-guide .section-header p { font-size: 16px; }
  .hg-wrap { display: block; }
  .hg-toc { display: none; }
  .hg-part, .hg-part:first-child { background: #fff; border: 1px solid var(--border, #e2e8f0); border-radius: 14px; padding: 0 16px; margin-bottom: 10px; }
  .hg-part > summary { cursor: pointer; padding: 16px 0; min-height: 44px; }
  .hg-part > summary h3 { margin: 0; font-size: 17px; line-height: 1.4; font-weight: 700; }
  .hg-chev { display: block; }
  .hg-part[open] > summary .hg-chev { transform: rotate(180deg); }
  .hg-part-body { padding-bottom: 8px; }
  .hg-part-body p, .hg-part-body li { font-size: 15.5px; line-height: 1.7; }
  .hg-part-body h4 { font-size: 16.5px; margin-top: 18px; }
  .hg-steps li { padding: 14px 14px 14px 54px; }
  .hg-steps li::before { left: 14px; top: 14px; width: 28px; height: 28px; font-size: 13px; }
  /* Table becomes stacked rows: row label on top, then one line per method */
  .hg-table, .hg-table tbody, .hg-table tr, .hg-table th, .hg-table td { display: block; }
  .hg-table thead { display: none; }
  .hg-table caption { display: block; padding: 12px 14px 6px; font-size: 12px; }
  .hg-table tbody tr { border-top: 1px solid #edf2f7; padding: 10px 14px 8px; }
  .hg-table tbody th { border: 0; padding: 0 0 6px; white-space: normal; font-size: 14.5px; }
  .hg-table tbody td, .hg-table tbody td:nth-child(2) { border: 0; padding: 4px 0; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; font-size: 14px; background: none; font-weight: 400; color: #334155; }
  .hg-table tbody td:nth-child(2) > span:last-child { font-weight: 600; color: #0f172a; }
  .hg-k { display: inline; color: #64748b; font-size: 13px; font-weight: 600; }
  .hg-table tbody td:nth-child(2) .hg-k { color: var(--primary, #0a66c2); }
  .hg-res { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}
