/* Home do Subverse OS: Início da H5 (variante A) com os ajustes da A1 (Inter, 2 px). O título curto da abertura fica em Inter 700. */
.sh-home { background: var(--surface-raised); }
.sh-wrap { width: 100%; max-width: var(--home-max); margin: 0 auto; padding: 56px 24px 48px; color: var(--text); }
.sh-hero { display: flex; flex-direction: column; align-items: center; text-align: center; }
.sh-eyebrow { color: var(--text-secondary); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.sh-title { margin-top: 8px; color: var(--text-strong); font-size: var(--fs-h1); line-height: var(--lh-h1); font-weight: 600; letter-spacing: -0.02em; }
.sh-intro { margin-top: 6px; color: var(--text-secondary); font-size: var(--fs-body); line-height: var(--lh-body); }

.sh-search { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; max-width: var(--search-w); height: 50px; margin-top: 24px; padding: 0 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-align: left; }
.sh-search:focus-within { border-color: var(--border-strong); box-shadow: 0 0 0 3px var(--hover); }
.sh-search-icon { display: inline-flex; color: var(--text-secondary); }
.sh-search-input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--text); font-size: 15px; outline: none; }
.sh-search-input::placeholder { color: var(--text-tertiary); }
.sh-search-input::-webkit-search-cancel-button { cursor: pointer; }
.sh-search:has(.sh-search-input:focus-visible) { outline: 2px solid var(--text-strong); outline-offset: 2px; }
.sh-search-note { flex: none; color: var(--text-tertiary); font-size: 12px; }
.sh-popup { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: var(--z-popover); max-height: min(420px, 60vh); overflow: auto; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-popover); }
.sh-results[hidden] { display: none; }
.sh-result { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--radius); cursor: pointer; }
.sh-result:hover, .sh-result[aria-selected="true"] { background: var(--selected); }
.sh-result[aria-selected="true"] { box-shadow: inset 2px 0 0 var(--text-strong); }
.sh-result-title { color: var(--text-strong); font-size: 14px; font-weight: 600; line-height: 20px; overflow-wrap: anywhere; }
.sh-result-meta { color: var(--text-secondary); font-size: 12px; line-height: 16px; }
.sh-state { padding: 12px; }
.sh-state-title { color: var(--text-strong); font-size: 14px; font-weight: 600; }
.sh-state-help { margin-top: 4px; color: var(--text-secondary); font-size: 13px; line-height: 19px; }
.sh-state-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 10px; }
.sh-state-btn { min-height: 32px; margin-top: 10px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface-raised); color: var(--text-strong); font-size: 13px; font-weight: 600; }
.sh-state-actions .sh-state-btn { margin-top: 0; }
.sh-state-btn:hover { background: var(--hover); }
.sh-state-link { color: var(--text-strong); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.sh-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 896px; margin: 32px auto 0; }
.sh-shortcut { display: flex; align-items: flex-start; gap: 12px; min-height: 88px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; text-align: left; }
.sh-shortcut:hover { border-color: var(--border-strong); background: var(--surface-raised); }
.sh-shortcut-icon { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius); background: var(--surface-sunken); color: var(--text-strong); }
.sh-shortcut-copy { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.sh-shortcut-copy strong { color: var(--text-strong); font-size: 15px; line-height: 22px; }
.sh-shortcut-copy > span { color: var(--text-secondary); font-size: 13px; line-height: 18px; }
.sh-counts:empty { display: none; }
.sh-shortcut-copy > .sh-counts { margin-top: 4px; color: var(--text-strong); font-size: 12px; font-weight: 600; }
.sh-shortcut-chev { display: inline-flex; flex: none; margin-top: 8px; color: var(--text-secondary); transition: transform 0.15s ease; }
.sh-shortcut[aria-expanded="true"] .sh-shortcut-chev { transform: rotate(180deg); }

.sh-open { width: 100%; max-width: 896px; margin: 12px auto 0; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.sh-open-title { color: var(--text-strong); font-size: 15px; font-weight: 600; }
.sh-open-group { margin-top: 14px; }
.sh-open-group h3 { display: flex; align-items: center; gap: 8px; }
.sh-open-count { color: var(--text-tertiary); font-size: 12px; font-weight: 500; }
.sh-open-group ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 16px; margin-top: 6px; }
.sh-open-group a { display: flex; justify-content: space-between; gap: 12px; padding: 7px 8px; border-radius: var(--radius); color: var(--text); font-size: 14px; line-height: 20px; }
.sh-open-group a:hover { background: var(--hover); }
.sh-open-group a > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.sh-open-meta { flex: none; color: var(--text-tertiary); font-size: 12px; }

.sh-collections { margin-top: 48px; }
.sh-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.sh-section-head h2 { color: var(--text-strong); font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: 600; }
.sh-section-head span { color: var(--text-secondary); font-size: 13px; }
.sh-collection-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 16px; }
.sh-collection { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.sh-collection-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-bottom: 6px; border-radius: var(--radius); background: var(--surface-sunken); color: var(--text-strong); }
.sh-collection h3 { color: var(--text-strong); font-size: 16px; line-height: 22px; font-weight: 600; }
.sh-collection p { color: var(--text-secondary); font-size: 14px; line-height: 20px; }
.sh-collection .sh-subtle { color: var(--text-tertiary); font-size: 13px; }
.sh-collection .sh-meta { color: var(--text-strong); font-size: 12px; font-weight: 600; }
.sh-collection-link { align-self: flex-start; margin-top: auto; padding-top: 10px; color: var(--text-strong); font-size: 14px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 4px; }
.sh-collection-link:hover { text-decoration-color: currentColor; }

.sh-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--border-soft); color: var(--text-tertiary); font-size: 12px; line-height: 18px; }

@container os-body (max-width: 1000px) {
  .sh-collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container os-body (max-width: 640px) {
  .sh-wrap { padding: 20px 16px 24px; }
  .sh-hero { align-items: stretch; text-align: left; }
  .sh-title { font-size: 24px; line-height: 32px; }
  .sh-intro { font-size: 14px; line-height: 21px; }
  .sh-search { margin-top: 16px; padding: 0 14px; }
  .sh-search-note { display: none; }
  .sh-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
  .sh-shortcut { flex-direction: column; gap: 8px; min-height: 0; padding: 14px; }
  .sh-shortcut[data-sh-shortcut="abertos"] { grid-column: 1 / -1; flex-direction: row; align-items: center; }
  .sh-shortcut[data-sh-shortcut="abertos"] .sh-shortcut-chev { margin-top: 0; }
  .sh-shortcut-icon { width: 32px; height: 32px; }
  .sh-open { padding: 14px; }
  .sh-open-group ul { grid-template-columns: minmax(0, 1fr); }
  .sh-collections { margin-top: 28px; }
  .sh-collection-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .sh-collection { padding: 16px; }
  .sh-foot { flex-direction: column; margin-top: 28px; }
}

.sh-title {
  font-family: var(--font-sub-title);
  font-weight: 700;
  letter-spacing: 0;
}
