* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: white; font: 16px/1.5 "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, select, input { color: inherit; font: inherit; }
button, select { cursor: pointer; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: absolute; z-index: 100; top: 8px; left: 8px; background: white; padding: 12px; }
.resource-main :where(a, button, select, input, summary):focus-visible,
.video-dialog :where(a, button, video):focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.resource-main, .video-dialog { overflow-wrap: break-word; }
.resource-main { width: min(1040px, calc(100% - 64px)); margin: 0 auto; padding: clamp(38px, 6vw, 86px) 0 48px; }
.resource-main :where(h1, h2, h3, p), .video-dialog :where(h2, p) { margin: 0; }
.resource-main a, .video-dialog a { color: var(--ink); text-underline-offset: .18em; }
.page-intro { max-width: 710px; }
.page-intro h1 { margin: 0; font-size: clamp(34px, 5.5vw, 64px); line-height: 1.05; letter-spacing: -.055em; font-weight: 680; }
.page-intro p { max-width: 570px; margin-top: 16px; color: var(--muted); font-size: clamp(15px, 1.65vw, 19px); }
.help-search { position: relative; max-width: 700px; margin-top: 26px; }
.help-search input { width: 100%; height: 50px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--soft); color: var(--ink); color-scheme: light; padding: 0 12px 0 44px; }
.help-search::before {
  content: ""; position: absolute; top: 50%; left: 15px; width: 20px; height: 20px; transform: translateY(-50%); pointer-events: none;
  background: var(--muted);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10' cy='10' r='6.5'/%3E%3Cpath d='m15 15 5.5 5.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.help-search input::placeholder { color: var(--muted); opacity: 1; }
.help-search input::-webkit-search-cancel-button {
  -webkit-appearance: none; appearance: none; width: 26px; height: 26px; margin: 0; cursor: pointer;
  background: var(--ink);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 6 12 12M18 6 6 18'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}
.quick-topics { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 12px; }
.quick-topics a {
  display: inline-flex; align-items: center; min-height: 32px; padding: 5px 12px;
  border-radius: var(--pill); background: var(--soft); color: var(--ink); font-size: 13px; text-decoration: none;
}
.quick-topics a:is(:hover, :active) { background: var(--ink); color: white; }
.guide-toolbar { margin-top: 35px; padding: 14px 0; border-block: 1px solid var(--line); display: flex; gap: clamp(6px, 2vw, 24px); align-items: center; justify-content: space-between; }
.mode-switch { display: inline-flex; flex: none; white-space: nowrap; padding: 4px; gap: 2px; background: var(--soft); border-radius: var(--pill); }
.mode-switch button { min-height: 38px; border: 0; border-radius: var(--pill); padding: 5px 14px; font-size: 14px; background: transparent; color: var(--muted); }
.mode-switch button[aria-pressed="false"]:is(:hover, :active) { background: white; color: var(--ink); }
.mode-switch button[aria-pressed="true"] { background: var(--ink); color: white; font-weight: 600; }
.mode-switch button:focus-visible { outline-offset: 1px; }
.mode-switch button span { font-size: 12px; margin-left: 3px; }
.topic-filter { display: flex; min-width: 0; max-width: 100%; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.joined-select.topic-select { width: 13rem; min-width: 0; max-width: 100%; }
.guide-section { margin-top: 24px; }
.guide-section h2 { font-weight: 650; font-size: clamp(23px, 2.7vw, 32px); line-height: 1.2; letter-spacing: -.038em; margin: 0 0 15px; }
.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.video-link { display: grid; grid-template-columns: 54px minmax(0, 1fr) 30px; align-items: center; height: 100%; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 20px; background: white; text-decoration: none; }
.video-link:hover, .platform:focus-within { border-color: var(--graphite); }
.video-cover { display: block; width: 54px; height: 82px; object-fit: cover; border-radius: 8px; background: var(--soft); }
.item-topic, .platform-type { color: var(--muted); font-size: 12px; line-height: 1.35; }
.video-copy h3 { color: var(--ink); font-size: 16px; font-weight: 640; line-height: 1.28; margin: 3px 0; }
.video-copy p { line-height: 1.35; color: var(--muted); font-size: 13px; }
.play-symbol { display: grid; place-items: center; width: 29px; height: 29px; border-radius: var(--pill); color: var(--ink); background: var(--soft); }
.play-symbol::before { content: ""; width: 0; height: 0; margin-left: 2px; border-left: 8px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.faq-item { border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.faq-item summary { min-height: 52px; display: grid; grid-template-columns: minmax(0, 1fr) 24px; gap: 12px; align-items: center; list-style: none; padding: 13px 4px; font-weight: 600; line-height: 1.4; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; width: 24px; height: 24px; grid-column: 2; color: var(--ink);
  background: linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat,
              linear-gradient(currentColor, currentColor) center / 2px 14px no-repeat;
}
.faq-item summary:hover { text-decoration: underline; text-underline-offset: .16em; }
.faq-item[open] summary::after { background-size: 14px 2px, 0 0; }
.faq-answer { max-width: 820px; padding: 0 4px 18px; color: var(--muted); }
.faq-answer p { white-space: pre-line; }
.related-link { display: inline-block; margin-top: 8px; }
.empty-results { color: var(--ink); background: var(--soft); border-radius: 12px; padding: 24px; }
.empty-results p { margin-block: 6px 16px; }
.soft-button { border: 1px solid var(--line); background: white; color: var(--ink); padding: 9px 16px; min-height: 42px; border-radius: var(--pill); font-size: 14px; }
.soft-button:is(:hover, :active), .close-player:is(:hover, :active) { background: var(--ink); color: white; }
.video-dialog { max-width: min(540px, calc(100% - 24px)); width: 100%; max-height: 92vh; max-height: 92dvh; overflow: auto; padding: 0; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); }
.video-dialog::backdrop { background: rgb(0 0 0 / 62%); }
.player-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; }
.player-heading h2 { font-size: 19px; line-height: 1.3; }
.close-player { display: grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 0; border: 0; border-radius: var(--pill); background: var(--soft); color: var(--ink); }
.close-player svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.video-dialog video { display: block; width: 100%; height: min(51vh, 440px); height: min(51dvh, 440px); background: var(--ink); object-fit: contain; }
.player-meta { padding: 15px 18px 18px; }
.player-meta p { margin-bottom: 12px; color: var(--muted); font-size: 14px; }
.download-intro { display: flex; align-items: center; justify-content: space-between; gap: clamp(20px, 5vw, 80px); }
.download-intro .page-intro { max-width: 670px; }
.download-intro h1 { font-size: clamp(34px, 5vw, 56px); text-wrap: balance; }
.qr-panel { min-width: 146px; padding: 14px 8px; text-align: center; color: var(--ink); background: var(--soft); border-radius: 18px; }
.qr-panel a { display: inline-block; background: white; border-radius: 10px; }
.qr-panel img { display: block; width: 104px; height: 104px; image-rendering: pixelated; }
.qr-panel p { margin-top: 5px; font-size: 13px; line-height: 1.35; }
.platform-section { margin-top: clamp(28px, 5.2vw, 58px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.platform { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 16px; padding: clamp(18px, 2.3vw, 28px); }
.platform h2 { margin: 4px 0 8px; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.12; font-weight: 650; letter-spacing: -.045em; }
.platform p { margin-block: 0 22px; color: var(--muted); font-size: 15px; }
.platform .store-button { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-top: auto; padding: 12px 17px; border-radius: var(--pill); background: var(--ink); color: white; font-size: 14px; font-weight: 600; line-height: 1.35; text-decoration: none; }
.platform .store-button:is(:hover, :active) { background: var(--ink-hover); }
.video-link:hover .play-symbol { background: var(--ink); color: white; }
.store-button span { font-size: 16px; }
.resource-footer { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 28px; padding-top: 19px; margin-top: 30px; border-top: 1px solid var(--line); font-size: 14px; }
.chat-help { --nav-reserve: 0px; }
.chat-help .site-header, .chat-help .resource-footer { display: none; }
.chat-help .resource-main { width: calc(100% - 32px); max-width: 1040px; padding: 20px 0 32px; }
.chat-help .page-intro h1 { font-size: clamp(25px, 5vw, 32px); }
.chat-help .page-intro p { margin-top: 8px; }
@media (max-width: 720px) {
  .resource-main { width: calc(100% - 36px); padding: 36px 0; }
  .guide-toolbar { margin-top: 22px; }
  .video-grid, .platform-section { grid-template-columns: 1fr; }
  .qr-panel { display: none; }
  .platform { padding: 17px 18px; }
  .platform p { margin-bottom: 15px; }
}
@media (max-width: 400px) {
  .resource-main { width: calc(100% - 28px); }
  .video-link { grid-template-columns: 45px minmax(0, 1fr) 24px; gap: 9px; padding: 10px; }
  .video-cover { width: 45px; height: 73px; }
  .play-symbol { width: 24px; height: 24px; }
  .mode-switch button { padding-inline: 8px; font-size: 13px; }
  .mode-switch button span { margin-left: 1px; }
}
@media (max-width: 359px) {
  .topic-filter > span { display: none; }
}
