/* Страница «Как устроен Портал ВЭД»: те же цвета и шрифты, что у портала (styles.css), крупнее — для показа на экране */
.guide { font-size: 16px; }
.g-top { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 12px 24px; background: var(--bg); border-bottom: 1px solid var(--line); }
.g-brand { font-weight: 700; color: var(--ink); }
.g-brand span { font-weight: 400; color: var(--muted); margin-left: 6px; }
.g-nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--navy-2); border-radius: 12px; }
.g-nav button { all: unset; cursor: pointer; padding: 7px 12px; border-radius: 8px; color: #fff; font-weight: 600; font-size: 0.9rem; }
.g-nav button:hover { background: rgb(255 255 255 / 14%); }
.g-nav button[aria-current="page"] { background: var(--surface); color: var(--ink); }
.g-nav button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.g-pager { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); font-variant-numeric: tabular-nums; }
.g-pager .btn { min-width: 44px; min-height: 40px; }

.g-main { max-width: 1240px; margin: 0 auto; padding: 28px 24px 60px; }
.g-sec h1 { font-family: var(--serif); font-weight: 500; font-size: 2.3rem; margin: 0 0 10px; color: var(--ink); }
.g-sec h2 { font-size: 1.15rem; margin: 28px 0 10px; }
.g-lead { font-size: 1.12rem; line-height: 1.6; max-width: 72ch; color: var(--ink); margin: 0 0 20px; }
.g-hint { color: var(--muted); font-size: 0.92rem; }
.g-list { line-height: 1.6; max-width: 80ch; padding-left: 20px; }
.g-list li { margin: 6px 0; }

.g-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 8px 0 10px; }
.g-facts div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.g-facts b { display: block; font-size: 1.9rem; color: var(--navy); font-variant-numeric: tabular-nums; }
.g-facts span { color: var(--muted); }

/* карточки-кнопки: источники, доски, люди */
.g-card { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 14px 16px; margin-bottom: 10px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: 12px; cursor: pointer; transition: opacity 0.15s ease-out, border-color 0.15s ease-out; }
.g-card:hover { border-color: var(--navy-2); }
.g-card:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.g-card[aria-pressed="true"] { background: #e6ece3; border-color: var(--navy); }
.g-card b { font-size: 1.05rem; color: var(--ink); }
.g-card > span { color: var(--muted); font-size: 0.9rem; }
.g-card em { font-style: normal; color: var(--navy); font-size: 0.85rem; margin-top: 4px; }
.g-items { display: flex; flex-direction: column; gap: 2px; margin: 6px 0 0; font-size: 0.9rem; color: var(--ink); }
.g-items span::before { content: "— "; color: var(--muted); }
.g-dim { opacity: 0.32; }

/* цвет источника: 1С — шалфей, таблицы — песок, портал — тёмно-зелёный */
.g-onec { border-left-color: #8fa596; }
.g-sheets { border-left-color: var(--plan-edge); }
.g-portal { border-left-color: var(--navy); }
.g-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 4px; }
.g-dot.g-onec { background: #8fa596; }
.g-dot.g-sheets { background: var(--plan-edge); }
.g-dot.g-portal { background: var(--navy); }
.g-dots { margin-top: 4px; }
.g-board { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; border-left-width: 1px; }
.g-board .g-dots { margin: 0 0 0 auto; }
.g-tag { font-size: 0.75rem; color: var(--navy); background: #e6ece3; border-radius: 999px; padding: 1px 8px; }

.g-map { display: grid; grid-template-columns: minmax(260px, 1.1fr) minmax(200px, 0.8fr) minmax(280px, 1.2fr); gap: 18px; align-items: start; }
.g-col h2 { margin-top: 0; font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.g-detail { position: sticky; top: 84px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow); line-height: 1.55; }
.g-detail h3 { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; margin: 0 0 6px; }
.g-detail h4 { margin: 14px 0 4px; font-size: 0.85rem; color: var(--muted); }
.g-detail p { margin: 0 0 8px; }
.g-detail ul { margin: 0; padding-left: 18px; }
.g-role { color: var(--muted); }
.g-chip { display: inline-block; margin: 0 6px 6px 0; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-size: 0.88rem; border-left-width: 1px; }
.g-chip.g-onec { background: #e3ebe5; }
.g-chip.g-sheets { background: var(--warn-bg); }
.g-chip.g-portal { background: #dfe8e1; }

.g-people { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
#g-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0 10px; }
.g-tablewrap { overflow-x: auto; }
.g-matrix { border-collapse: collapse; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.g-matrix th, .g-matrix td { padding: 10px 14px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; white-space: normal; max-width: none; }
.g-matrix thead { position: static; }
.g-matrix thead th { background: #f0ece0; font-size: 0.9rem; }
.g-matrix tbody th { font-weight: 600; }
.g-no { color: var(--bad); }

.g-acc details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; padding: 0 18px; }
.g-acc summary { cursor: pointer; padding: 14px 0; font-weight: 600; font-size: 1.05rem; }
.g-acc summary:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.g-acc p { line-height: 1.6; max-width: 80ch; margin: 0 0 12px; }
.g-example { background: var(--warn-bg); border-radius: 8px; padding: 8px 12px; }

.g-time { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.g-tl { background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--navy-2); border-radius: 14px; padding: 16px 18px; line-height: 1.55; }
.g-tl > b { font-size: 1.2rem; }

.g-steps { padding-left: 0; list-style: none; counter-reset: st; max-width: 90ch; }
.g-steps li { counter-increment: st; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; }
.g-steps label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 1.05rem; }
.g-steps label::before { content: counter(st); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--navy-2); color: #fff; font-weight: 700; font-size: 0.9rem; }
.g-steps input { width: 20px; height: 20px; accent-color: var(--signal); order: 3; margin-left: auto; }
.g-steps p { margin: 6px 0 0 38px; line-height: 1.55; }
.g-steps li:has(input:checked) { opacity: 0.55; }
.g-time-tag { color: var(--muted); font-size: 0.85rem; font-weight: 400; }

@media (max-width: 900px) {
  .g-map, .g-people { grid-template-columns: 1fr; }
  .g-detail { position: static; }
  .g-pager { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .g-card { transition: none; } }
.g-card .g-tag { align-self: flex-start; }
.g-brand a { color: inherit; text-decoration: none; }
