/* Layout for guide, hub and tool pages (templates/guide.html, learn.html, tool.html). Loaded only there. */
.ux-guide { --ux-w: 1120px; --ux-gut: max(16px, 4vw); }
.ux-guide > .crumbs, .ux-guide > .guide-head, .ux-body, .ux-hubbody, .ux-guide > .faq, .ux-guide > .seo-chat-bottom { max-width: var(--ux-w); margin-left: auto; margin-right: auto; padding-left: var(--ux-gut); padding-right: var(--ux-gut); }
.ux-guide > .seo-chat-bottom { padding: 16px 20px; width: calc(100% - 2 * var(--ux-gut)); }
.ux-guide .crumbs { padding-top: 14px; }
.ux-guide .crumbs a { display: inline-block; padding: 8px 0; }
.ux-guide h1 { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.08; letter-spacing: -1px; margin: 6px 0 12px; overflow-wrap: anywhere; }
.ux-guide .lede { font-size: 18px; line-height: 1.55; }

/* hero: title and facts on the left, the chat card on the right (desktop) */
.ux-hero { display: grid; gap: 20px 48px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.ux-hero .seo-start { margin: 0; max-width: none; }
.ux-glance-h { margin: 22px 0 8px; font: 700 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ux-glance { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 0; margin: 0; }
.ux-glance > div { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.ux-glance dt { font-size: 12px; color: var(--muted); line-height: 1.3; }
.ux-glance dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
@media (min-width: 960px) {
  .ux-hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 20px 56px; padding-top: 8px; padding-bottom: 12px; }
  .ux-hero-copy { grid-area: copy; } .ux-hero-glance { grid-area: glance; align-self: start; } .ux-hero-chat { grid-area: chat; position: sticky; top: 84px; }
  .ux-hero { grid-template-areas: "copy chat" "glance chat"; }
  .ux-hero-glance .ux-glance-h { margin-top: 0; }
  .ux-guide .seo-start .seo-start-card { min-height: 400px; }
}
@media (max-width: 640px) { .ux-glance dd { font-size: 14px; } }

/* send button: a pill with its label on desktop, a round icon on phones */
.seo-start .start-form .send, .ux-tool .start-form .send { width: auto; min-width: 48px; height: auto; border-radius: 999px; padding: 0 18px; gap: 8px; white-space: nowrap; }
@media (max-width: 480px) { .seo-start .start-form .send, .ux-tool .start-form .send { width: 48px; padding: 0; } }

/* body: jump links beside the text (desktop) or above it as a scroll row (phone) */
.ux-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 56px; padding-top: 4px; }
.ux-toc { margin: 12px 0 0; }
.ux-toc-h { margin: 0 0 6px; font: 700 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ux-toc ol { list-style: none; margin: 0; padding: 2px 0 8px; display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.ux-toc a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); text-decoration: none; font-size: 14px; white-space: nowrap; scroll-snap-align: start; }
.ux-toc a:hover { border-color: var(--saffron); }
.ux-guide a:focus-visible, .ux-guide summary:focus-visible, .ux-guide input:focus-visible, .ux-guide .table-scroll:focus-visible { outline: 3px solid #4a4690; outline-offset: 2px; }
@media (min-width: 960px) {
  .ux-body { grid-template-columns: 230px minmax(0, 68ch); justify-content: start; }
  .ux-toc { position: sticky; top: 84px; align-self: start; margin-top: 24px; max-height: calc(100vh - 110px); overflow-y: auto; }
  .ux-toc ol { display: block; overflow: visible; padding: 0; border-left: 2px solid var(--line); }
  .ux-toc li { margin: 0; }
  .ux-toc a { display: flex; min-height: 36px; padding: 6px 12px; border: 0; border-radius: 0; background: none; white-space: normal; font-size: 14px; line-height: 1.3; color: #4a4740; }
  .ux-toc a:hover { color: var(--saffron-text); background: none; text-decoration: underline; }
}

/* reading column */
.ux-copy { max-width: 68ch; padding: 8px 0 8px; }
.ux-copy section { padding-top: 6px; scroll-margin-top: 80px; }
.ux-copy section + section { margin-top: 12px; border-top: 1px solid var(--line); }
.ux-copy h2 { font-size: 26px; margin: 22px 0 10px; letter-spacing: -.3px; }
.ux-copy p { font-size: 17px; line-height: 1.7; }
.ux-copy .sub { font-size: 14px; }
.ux-more { margin: 14px 0 6px; border-top: 1px solid var(--line); }
.ux-more > div { grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); }
@media (max-width: 640px) {
  .ux-copy h2 { font-size: 22px; }
  .ux-copy p { font-size: 16.5px; line-height: 1.65; }
  .ux-more > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
.ux-copy .table-scroll { border: 1px solid var(--line); border-radius: 10px; background: var(--card); margin: 10px 0 18px; }
.ux-copy .tool-table { margin: 0; min-width: 26rem; }
.ux-copy .tool-table th { font-size: 13px; color: var(--muted); background: #f0e8d6; position: sticky; top: 0; }
.ux-copy .tool-table th, .ux-copy .tool-table td { padding: 9px 10px; }
.ux-copy .tool-table tr:nth-child(even) td { background: rgba(240, 232, 214, .35); }
@media (max-width: 640px) { .ux-copy .tool-table { min-width: 0; font-size: 14px; } .ux-copy .tool-table th, .ux-copy .tool-table td { padding: 8px 6px; } }

/* FAQ accordion with a visible plus/minus */
.ux-guide > .faq { padding-top: 40px; padding-bottom: 8px; }
.ux-guide .faq h2 { font-size: 26px; margin: 0 0 12px; }
.ux-guide .faq details { max-width: 68ch; border: 1px solid var(--line); border-radius: 12px; background: var(--card); margin: 0 0 8px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.ux-guide .faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 12px 0; font-size: 17px; font-weight: 600; line-height: 1.35; }
.ux-guide .faq summary::-webkit-details-marker { display: none; }
.ux-guide .faq summary::after { content: "+"; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #efe5cf; font-size: 20px; line-height: 1; color: var(--saffron-text); }
.ux-guide .faq details[open] summary::after { content: "\2212"; }
.ux-guide .faq details p { margin: 0 0 14px; font-size: 16.5px; line-height: 1.65; }

/* related links as cards */
.ux-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 8px 0 14px; }
.ux-cards a { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 48px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-decoration: none; font-weight: 600; font-size: 15px; line-height: 1.3; }
.ux-cards a::after { content: "\2192"; color: var(--saffron-text); }
.ux-cards a:hover { border-color: var(--saffron); }
@media (min-width: 640px) { .ux-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .ux-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ux-more-links .seo-moments a { font-size: 14px; }
.ux-guide .tool-links a:focus-visible, .ux-tile a:focus-visible { outline: 3px solid #4a4690; outline-offset: 2px; }

/* hub */
.ux-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.ux-jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); text-decoration: none; font-weight: 600; font-size: 15px; }
.ux-jump a:hover { border-color: var(--saffron); }
.ux-hubbody { padding-top: 12px; padding-bottom: 16px; }
.ux-filter { position: sticky; top: 64px; z-index: 5; margin: 8px 0 4px; padding: 10px 0; background: var(--paper); }
.ux-filter[hidden], .ux-group[hidden], .ux-tile[hidden], .ux-none[hidden] { display: none; }
.ux-filter label { display: block; margin: 0 0 4px; font: 700 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ux-filter input { width: 100%; max-width: 480px; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font: inherit; font-size: 16px; }
.ux-none { margin: 6px 0 0; }
.ux-group { padding-top: 10px; scroll-margin-top: 130px; }
.ux-group h2 { font-size: 26px; margin: 18px 0 12px; }
.ux-tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.ux-tile a { display: flex; gap: 12px; align-items: flex-start; height: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-decoration: none; color: var(--ink); }
.ux-tile a:hover { border-color: var(--saffron); }
.ux-num { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--indigo); color: #fff; font-size: 14px; font-weight: 700; }
.ux-tile-body { display: block; min-width: 0; }
.ux-tile-name { display: block; font-weight: 700; font-size: 16px; line-height: 1.3; }
.ux-tile-line { display: block; margin-top: 2px; font-size: 14px; line-height: 1.4; color: #4a4740; }
@media (min-width: 640px) { .ux-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .ux-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* tool pages: close the gap under the hero, keep the text column readable */
.ux-tool .hero { padding-bottom: 24px; }
.ux-tool .seo-start .seo-start-card { min-height: 340px; }
.ux-tool .tool-copy { max-width: 68ch; }
.ux-tool .faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--card); margin: 0 0 8px; padding: 0 16px; max-width: 68ch; }
.ux-tool .faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 12px 0; font-weight: 600; }
.ux-tool .faq summary::-webkit-details-marker { display: none; }
.ux-tool .faq summary::after { content: "+"; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #efe5cf; font-size: 20px; color: var(--saffron-text); }
.ux-tool .faq details[open] summary::after { content: "\2212"; }
.ux-tool .tool-links a { font-size: 15px; }
@media (min-width: 960px) { .ux-tool .tool-copy { padding-left: 5vw; } }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.ux-glance dd, .ux-more dd { text-align: left; }
.ux-more > div { padding: 10px 0; }
.ux-jump { margin-top: 4px; }
.ux-filter { top: 84px; }
@media (max-width: 639px) { #grp-1 .ux-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } #grp-1 .ux-tile a { padding: 10px; gap: 8px; } #grp-1 .ux-num { width: 28px; height: 28px; font-size: 12px; } }
.ux-tool .tool-copy section:first-child h2 { margin-top: 4px; }
.ux-tool .hero { padding-top: 8px; }
