/* Help center, contact, API docs and translation pages. Builds on site.css. */

/* Help center */
.help-search { max-width: 560px; margin-top: 28px; }
.input--lg { height: 48px; font-size: 16px; border-radius: var(--r); }
.help-search .input-group .input { padding-left: 40px; }
.help-search .input-group > .icon { left: 14px; }
.help-search__status { min-height: 20px; margin-top: 8px; }
/* Help center: topic menu + one panel at a time */
.help-body { padding-top: 40px; }
.help-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
.help-nav { position: sticky; top: calc(var(--header-h) + 24px); min-width: 0; }
.help-layout > * { min-width: 0; }
.help-nav__label { margin: 0 0 10px 10px; color: var(--faint); font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.help-nav ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.help-nav__link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--ink-2); font-size: 14.5px; font-weight: 500; }
.help-nav__link:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.help-nav__icon { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.help-nav__text { flex: 1; min-width: 0; }
.help-nav__count { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font: 500 12px var(--mono); text-align: center; }
.help-nav__link.is-active { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm); }
.help-nav__link.is-active .help-nav__icon { border-color: transparent; background: var(--accent-soft); color: var(--accent-text); }
.help-nav__link.is-active .help-nav__count { background: var(--ink); color: var(--bg); }
.help-nav__link.is-dimmed { opacity: .45; }
.help-nav__contact { margin-top: 24px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.help-nav__contact strong { display: block; font-size: 14.5px; font-weight: 600; }
.help-nav__contact p { margin: 4px 0 12px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }

.help-panels { display: grid; gap: 16px; min-width: 0; }
.help-panel { overflow: hidden; scroll-margin-top: calc(var(--header-h) + 16px); }
.help-panel__head { display: flex; align-items: flex-start; gap: 16px; padding: 24px 24px 20px; border-bottom: 1px solid var(--line); }
.help-panel__icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); }
.help-panel__head > div { flex: 1; min-width: 0; }
.help-panel__title { font-size: 22px; letter-spacing: -0.025em; outline: none; }
.help-panel__title:focus, .help-panel__title:focus-visible { box-shadow: none; }
.is-searching .help-panel__count { display: none; }
.help-panel__summary { margin-top: 4px; color: var(--muted); font-size: 15px; }
.help-panel__count { flex: none; margin-top: 4px; }

.help-qa details { border-bottom: 1px solid var(--line); }
.help-qa details:last-child { border-bottom: 0; }
.help-qa summary { display: flex; align-items: center; gap: 16px; padding: 16px 24px; cursor: pointer; list-style: none; font-size: 16px; font-weight: 500; color: var(--ink); transition: background .12s; }
.help-qa summary::-webkit-details-marker { display: none; }
.help-qa summary:hover { background: var(--surface-2); }
.help-qa__q { flex: 1; }
.help-qa__toggle { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; border: 1px solid var(--line); color: var(--muted); transition: transform .2s, background .12s; }
.help-qa details[open] .help-qa__toggle { transform: rotate(180deg); background: var(--surface-2); color: var(--ink); }
.help-qa details[open] summary { padding-bottom: 8px; }
.help-qa__a { padding: 0 68px 20px 24px; color: var(--ink-2); font-size: 15.5px; line-height: 1.65; }
.help-qa__a p + p { margin-top: 10px; }
.help-qa__a a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent-text) 35%, transparent); text-underline-offset: 3px; }

.help-empty { border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }

@media (max-width: 860px) {
  .help-layout { grid-template-columns: 1fr; gap: 20px; }
  .help-nav { position: sticky; top: var(--header-h); z-index: 10; margin: 0 -16px; padding: 10px 16px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .help-nav__label, .help-nav__contact { display: none; }
  .help-nav ul { position: relative; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .help-nav ul::-webkit-scrollbar { display: none; }
  .help-nav__link { white-space: nowrap; padding: 6px 10px 6px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 14px; }
  .help-nav__icon { width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--surface-2); }
  .help-panel__head { padding: 20px 18px 16px; }
  .help-panel__count { display: none; }
  .help-qa summary { padding: 14px 18px; font-size: 15.5px; }
  .help-qa__a { padding: 0 18px 18px; }
}

/* Contact */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.contact-card { padding: 28px; }
.contact-card .alert { margin-bottom: 20px; }
.contact-submit { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.contact-submit .hint { max-width: 380px; font-size: 12.5px; }
.contact-submit .hint a { color: var(--muted); text-decoration: underline; }
.field-error { color: var(--danger); font-size: 13px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-sent { padding: 24px 4px; }
.contact-sent__icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px; border-radius: var(--r); background: var(--positive-soft); color: var(--positive); }
.contact-sent h2 { font-size: 22px; }
.contact-sent p { margin-top: 10px; max-width: 520px; }
.contact-aside { display: grid; gap: 24px; }
.contact-aside__block h2 { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.contact-aside__block p, .contact-aside__block ul { margin-top: 6px; color: var(--muted); font-size: 14px; }
.contact-aside__block ul { padding: 0; list-style: none; display: grid; gap: 4px; }
.contact-aside__company { padding-top: 20px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }
@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .contact-card { padding: 20px; } .contact-submit { flex-direction: column-reverse; align-items: stretch; } }

/* API docs */
.docs-intro { color: var(--muted); }
.endpoint { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font: 14px var(--mono); }
.method { display: inline-block; min-width: 46px; padding: 2px 6px; border-radius: 5px; font: 600 12px var(--mono); text-align: center; }
.method--get { background: var(--accent-soft); color: var(--accent-text); }
.method--post { background: var(--positive-soft); color: var(--positive); }
.prose .param-table td:first-child { white-space: nowrap; }
.prose .param-table code { font-size: 13px; }
.req { margin-left: 6px; color: var(--danger); font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.opt { margin-left: 6px; color: var(--faint); font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.example { margin-top: 20px; border: 1px solid #26262b; border-radius: var(--r); background: #141417; overflow: hidden; }
.example__tabs { display: flex; align-items: center; gap: 2px; padding: 6px 6px 0; border-bottom: 1px solid #26262b; overflow-x: auto; }
.example__tabs button { height: 34px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; background: none; color: #9b9ba4; font: 500 13px var(--sans); cursor: pointer; white-space: nowrap; }
.example__tabs button:hover { color: #e7e7ea; }
.example__tabs button[aria-selected="true"] { color: #fff; border-bottom-color: #fff; }
.example__tabs .copy-btn { margin-left: auto; height: 28px; color: #a1a1aa; }
.example__tabs .copy-btn:hover { background: #26262b; color: #fff; }
.example pre { border-radius: 0; }
.prose .example pre { margin: 0; }
.response-label { margin-top: 20px; color: var(--muted); font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .04em; }
.prose .response-label + pre { margin-top: 8px; }
.prose pre { font-size: 13px; }

/* Translate */
.translate-layout { display: grid; gap: 16px; max-width: 980px; }
.translate-layout form { display: grid; gap: 16px; }
.translate-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.translate-step { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.translate-step span { color: var(--faint); font: 500 12px var(--mono); }
.translate-step h3 { margin-top: 8px; font-size: 15px; }
.translate-step p { margin-top: 4px; color: var(--muted); font-size: 14px; }
@media (max-width: 760px) { .translate-steps { grid-template-columns: 1fr; } }

.translate-toolbar { position: sticky; top: calc(var(--header-h) + 8px); z-index: 10; padding: 16px 20px; box-shadow: var(--shadow); }
.translate-toolbar__progress { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14.5px; }
.translate-bar { height: 6px; margin: 12px 0 14px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.translate-bar span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--ink); transition: width .2s; }
.translate-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.translate-filters .input-group { flex: 1; min-width: 200px; }
.translate-filters .input { height: 36px; font-size: 14px; }
.segmented .filter-chip.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.translate-sections { overflow: hidden; }
.section-card + .section-card { border-top: 1px solid var(--line); }
.section-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 14px 20px; border: 0; background: none; font-weight: 500; font-size: 15px; text-align: left; cursor: pointer; }
.section-header:hover { background: var(--surface-2); }
.section-header__name { display: flex; align-items: center; gap: 8px; }
.section-toggle-icon { color: var(--muted); transition: transform .15s; }
.section-card.open .section-toggle-icon { transform: rotate(90deg); }
.section-progress { color: var(--muted); font-size: 13px; }
.section-body { display: none; }
.section-card.open .section-body { display: block; }
.translate-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; padding: 12px 20px; border-top: 1px solid var(--line); }
.translate-row .source-text { padding-top: 9px; color: var(--ink-2); font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.translate-row .translate-input { min-height: 40px; padding: 8px 12px; font-size: 14px; resize: none; overflow: hidden; }
.translate-row.filled .source-text { color: var(--muted); }
@media (max-width: 640px) { .translate-row { grid-template-columns: 1fr; gap: 6px; padding: 12px 16px; } .translate-row .source-text { padding-top: 0; } }
.auto-translate-notice { margin: 0; }

.sticky-actions { position: sticky; bottom: 12px; z-index: 10; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px 10px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: var(--shadow-lg); }
.sticky-actions__status { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.autosave-indicator { color: var(--faint); font-size: 13px; }
.autosave-indicator.saved { color: var(--positive); }
.sticky-actions__buttons { display: flex; flex-wrap: wrap; gap: 6px; }
