/* Landing page. Layout: a left-aligned statement and search beside a "sheet of
   paper" drop target, then the whole catalogue as a dense file-index. */

/* ------------------------------------------------------------ hero */
.h-hero { padding: 56px 0 34px; }
.h-hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 56px; align-items: center; }
.h-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); line-height: 1.06; letter-spacing: -.035em; font-weight: 800; margin: 0 0 18px; max-width: 15em; }
.h-hero .lead { font-size: 1.14rem; max-width: 34em; margin: 0 0 26px; }
.h-search { display: flex; align-items: center; gap: 12px; background: var(--bg-card); border: 1.5px solid var(--text); border-radius: 12px; padding-block: 0; padding-inline: 16px 14px; height: 58px; max-width: 620px; box-shadow: 4px 4px 0 var(--primary-soft); transition: box-shadow .15s; }
.h-search:focus-within { box-shadow: 4px 4px 0 var(--accent); }
.h-search svg { width: 21px; height: 21px; flex: none; color: var(--muted); }
.h-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1.04rem; color: var(--text); height: 100%; }
.h-search input::placeholder { color: var(--muted); }
.h-search input::-webkit-search-cancel-button { cursor: pointer; }
.h-search kbd { font-size: .78rem; color: var(--muted); border: 1px solid var(--border); border-radius: 5px; padding: 2px 7px; background: var(--bg); }
.h-hint { display: inline-block; margin: 10px 0 0; font-size: .9rem; font-weight: 600; }
.h-popular { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; margin: 18px 0 0; font-size: .95rem; max-width: 620px; }
.h-popular span { font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.h-popular a { color: var(--text); font-weight: 600; text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 4px; text-decoration-thickness: 2px; }
.h-popular a:hover { text-decoration-color: var(--accent-edge); }

/* drop target drawn as a sheet of paper with a folded corner */
.h-drop { position: relative; background: var(--bg-card); border: 1.5px solid var(--border); border-radius: 6px 0 6px 6px; padding: 34px 26px 26px; min-height: 340px; display: flex; flex-direction: column; justify-content: center; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; clip-path: polygon(0 0, calc(100% - 38px) 0, 100% 38px, 100% 100%, 0 100%); }
.h-drop::after { content: ""; position: absolute; top: -1.5px; right: -1.5px; width: 38px; height: 38px; background: linear-gradient(225deg, transparent 50%, var(--bg-soft) 50%); border-left: 1.5px solid var(--border); border-bottom: 1.5px solid var(--border); border-radius: 0 0 0 6px; }
.h-drop.drag { border-color: var(--primary); transform: translateY(-3px); }
.h-drop-idle { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; cursor: pointer; }
.h-drop-icon { display: inline-flex; width: 46px; height: 46px; border-radius: 10px; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 8px; }
.h-drop-idle strong { font-size: 1.35rem; letter-spacing: -.02em; }
.h-drop-idle > span { color: var(--muted); }
.h-drop-idle .btn { margin-top: 12px; }
.h-types { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 0; }
.h-types code { font-size: .76rem; color: var(--muted); border: 1px solid var(--border); border-radius: 5px; padding: 2px 7px; }
.h-drop-result h2 { font-size: 1.05rem; margin: 0 0 2px; overflow-wrap: anywhere; }
.h-drop-result .small { margin: 0 0 12px; }
.h-drop-result ul { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 250px; overflow: auto; }
.h-drop-result li a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text); font-weight: 600; }
.h-drop-result li a:hover { background: var(--primary-soft); text-decoration: none; }
.h-drop-result li a::after { content: "→"; color: var(--muted); }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); text-decoration: underline; cursor: pointer; }

/* ------------------------------------------------------------ toolbar */
.h-toolbar { position: sticky; top: 64px; z-index: 40; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.h-toolbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 54px; }
.h-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 8px 0; }
.h-tabs::-webkit-scrollbar { display: none; }
.h-tabs button { font: inherit; font-weight: 600; font-size: .95rem; white-space: nowrap; padding: 7px 13px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.h-tabs button span { font-family: var(--mono); font-size: .74rem; margin-inline-start: 4px; opacity: .75; }
.h-tabs button:hover { color: var(--text); background: var(--bg-soft); }
.h-tabs button[aria-selected="true"] { background: var(--band); color: #fff; }
.h-count { margin: 0; font-size: .88rem; color: var(--muted); white-space: nowrap; }

/* ------------------------------------------------------------ directory */
.h-recent { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 18px 0 0; font-size: .95rem; }
.h-recent > span { font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.h-recent div { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.h-recent a { color: var(--text); font-weight: 600; background: var(--bg-card); border: 1px solid var(--border); border-radius: 7px; padding: 4px 10px; }
.h-recent a:hover { border-color: var(--primary); text-decoration: none; }
.h-cat { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; padding: 40px 0; border-bottom: 1px solid var(--border); scroll-margin-top: 130px; }
.h-cat:last-child { border-bottom: 0; }
.h-cat-head { position: sticky; top: 140px; align-self: start; }
.h-cat-head h2 { font-size: 1.5rem; margin: 0 0 8px; }
.h-cat-head p { color: var(--muted); margin: 0 0 12px; font-size: .95rem; }
.h-cat-head a { font-weight: 600; font-size: .92rem; }
.h-groups { column-count: 2; column-gap: 34px; }
.h-group { break-inside: avoid; margin: 0 0 26px; }
.h-group h3 { font-family: var(--mono); font-weight: 500; font-size: .76rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; padding: 0 10px 8px; border-bottom: 1px solid var(--border); }
.h-group ul { list-style: none; margin: 0; padding: 0; }
.h-tool { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 9px; color: var(--text); }
.h-tool:hover { background: var(--bg-card); box-shadow: 0 0 0 1px var(--border); text-decoration: none; }
.h-tool:hover b { color: var(--primary); }
.h-ico { display: inline-flex; width: 34px; height: 34px; flex: none; align-items: center; justify-content: center; border-radius: 8px; background: var(--primary-soft); color: var(--primary); }
.h-ico svg { width: 18px; height: 18px; }
.h-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.h-txt b { font-weight: 650; }
.h-txt span { color: var(--muted); font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-tag { flex: none; font-size: .72rem; color: var(--muted); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; background: var(--bg); }
.h-tool mark { background: var(--accent); color: var(--accent-ink); border-radius: 2px; }
.h-empty { padding: 50px 0; text-align: center; color: var(--muted); }
.h-empty strong { color: var(--text); font-size: 1.15rem; }

/* ------------------------------------------------------------ band */
.h-band { background: var(--band); color: var(--band-text); padding: 64px 0; margin: 48px 0 0; }
.h-band .eyebrow { color: var(--accent); }
.h-band h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: -.03em; margin: 0 0 14px; color: #fff; }
.h-band-lead { color: var(--band-muted); font-size: 1.08rem; max-width: 46em; margin: 0 0 34px; }
.h-steps { list-style: none; counter-reset: s; margin: 0 0 30px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid rgba(255, 255, 255, .18); }
.h-steps li { counter-increment: s; padding-block: 22px 6px; padding-inline: 0 26px; display: flex; flex-direction: column; gap: 6px; }
.h-steps li + li { padding-inline-start: 26px; border-inline-start: 1px solid rgba(255, 255, 255, .18); }
.h-steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--mono); font-size: .8rem; color: var(--accent); letter-spacing: .06em; }
.h-steps strong { font-size: 1.12rem; color: #fff; }
.h-steps span { color: var(--band-muted); }
.h-proof { margin: 0; padding: 16px 20px; border-radius: 10px; background: var(--band-soft); color: var(--band-text); max-width: 46em; }
.h-proof strong { color: var(--accent); }

/* ------------------------------------------------------------ lower sections */
.h-compare, .h-guides, .h-faq { margin: 56px 0 0; }
.h-compare h2, .h-faq h2 { font-size: 1.6rem; }
.h-compare table { width: 100%; border-collapse: collapse; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; min-width: 560px; }
.h-compare th, .h-compare td { text-align: start; padding: 13px 18px; border-bottom: 1px solid var(--border); vertical-align: top; }
.h-compare tr:last-child th, .h-compare tr:last-child td { border-bottom: 0; }
.h-compare thead th { font-family: var(--mono); font-weight: 500; font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--bg-soft); }
.h-compare tbody th { font-weight: 600; width: 26%; }
.h-compare td:nth-child(2) { color: var(--muted); }
.h-compare td:last-child { font-weight: 650; box-shadow: inset 3px 0 0 var(--accent); }
.h-compare thead th:last-child { color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.h-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.h-section-head h2 { font-size: 1.6rem; margin: 0; }
.h-section-head a { font-weight: 600; }
.h-faq { max-width: 820px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 980px) {
  .h-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .h-drop { min-height: 0; padding: 26px 22px 22px; }
  .h-cat { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 30px 0; }
  .h-cat-head { position: static; }
  .h-cat-head p { margin-bottom: 6px; }
}
@media (max-width: 720px) {
  .h-hero { padding: 34px 0 26px; }
  .h-groups { column-count: 1; }
  .h-search { height: 54px; }
  .h-search kbd, .h-count { display: none; }
  .h-steps { grid-template-columns: 1fr; }
  .h-steps li + li { padding-inline-start: 0; border-inline-start: 0; border-top: 1px solid rgba(255, 255, 255, .18); }
  .h-steps li { padding: 18px 0 14px; }
  .h-band { padding: 46px 0; }
  .h-toolbar { top: 64px; }
}
