/* home-hub.css - Toolssok home (Smart Tool Hub). Home only. Classes use .hub-*, tokens use --hub-*.
   Palette follows Smart Tool Hub v1.2: navy text, Smart Blue actions, cool-white canvas. No pastel tiles, no characters. */
body.tsk-home {
  --hub-ink: #14263F;
  --hub-ink-2: #52647F;
  --hub-placeholder: #5E6F89;
  --hub-blue: #1E63D8;
  --hub-blue-hover: #184FB0;
  --hub-focus: #2675ED;
  --hub-blue-soft: #E8F0FD;
  --hub-canvas: #F5F8FC;
  --hub-card: #FFFFFF;
  --hub-line: #DAE3F1;
  --hub-line-strong: #B7C6DD;
  --hub-field-border: #7A8FAE;
  --hub-container: 1180px;
  /* recolor the shared header (nav.css) to the home palette; tool pages keep their own accent */
  --tsk-mint: #1E63D8;
  --tsk-mint-08: rgba(30, 99, 216, .08);
  --tsk-mint-12: rgba(30, 99, 216, .12);
  --tsk-mint-35: rgba(30, 99, 216, .35);
  --tsk-ink: #14263F;
  --tsk-line: #DAE3F1;
  --tsk-line-2: #C8D5E9;
  margin: 0;
  background: var(--hub-canvas);
  color: var(--hub-ink);
  font-family: var(--tsk-sans);
  line-height: 1.6;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
body.tsk-home *, body.tsk-home *::before, body.tsk-home *::after { box-sizing: border-box; }
body.tsk-home a { color: inherit; }
.hub-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hub-skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 10px 16px; border-radius: 8px; background: #fff; color: var(--hub-ink); font-weight: 700; text-decoration: none; border: 2px solid var(--hub-focus); }
.hub-skip:focus { left: 12px; }
body.tsk-home :focus-visible { outline: 3px solid var(--hub-focus); outline-offset: 2px; }

/* hero: the single primary task is search */
.hub-hero { background: #fff; border-bottom: 1px solid var(--hub-line); }
.hub-hero-inner { max-width: var(--hub-container); margin: 0 auto; padding: 32px 16px 28px; display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); align-items: center; }
.hub-hero h1 { margin: 0 0 12px; font-size: clamp(28px, 5.2vw, 44px); line-height: 1.25; letter-spacing: -.02em; font-weight: 800; }
.hub-lede { margin: 0 0 22px; font-size: 16px; color: var(--hub-ink-2); max-width: 34em; }

.hub-search { position: relative; display: flex; gap: 8px; max-width: 640px; }
.hub-search-field { flex: 1; min-width: 0; }
.hub-search-ic { position: absolute; left: 16px; top: 28px; transform: translateY(-50%); width: 22px; height: 22px; stroke: var(--hub-ink-2); fill: none; stroke-width: 1.75; stroke-linecap: round; pointer-events: none; }
.hub-search input { width: 100%; height: 56px; padding: 0 14px 0 48px; font: inherit; font-size: 16px; color: var(--hub-ink); background: #fff; border: 1.5px solid var(--hub-field-border); border-radius: 14px; -webkit-appearance: none; appearance: none; }
.hub-search input::placeholder { color: var(--hub-placeholder); opacity: 1; }
.hub-search input:focus { border-color: var(--hub-focus); }
.hub-btn { flex: 0 0 auto; height: 56px; min-width: 84px; padding: 0 20px; border: 0; border-radius: 14px; background: var(--hub-blue); color: #fff; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.hub-btn:hover { background: var(--hub-blue-hover); }

.hub-results, .hub-empty { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; margin: 0; background: #fff; border: 1px solid var(--hub-line); border-radius: 14px; box-shadow: 0 12px 32px rgba(20, 38, 63, .14); }
.hub-results { padding: 6px; list-style: none; max-height: min(60vh, 420px); overflow: auto; }
.hub-results[hidden], .hub-empty[hidden] { display: none; }
.hub-opt { display: flex; flex-direction: column; gap: 2px; min-height: 52px; padding: 9px 12px; border-radius: 10px; cursor: pointer; }
.hub-opt-name { font-size: 16px; font-weight: 700; color: var(--hub-ink); }
.hub-opt-meta { font-size: 14px; color: var(--hub-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-opt:hover, .hub-opt[aria-selected="true"] { background: var(--hub-blue-soft); }
.hub-opt[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--hub-blue); }
.hub-empty { padding: 16px; }
.hub-empty p { margin: 0 0 12px; font-size: 15px; color: var(--hub-ink); }
.hub-empty-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.hub-js-note { margin: 12px 0 0; font-size: 14px; color: var(--hub-ink-2); }

.hub-quick { margin-top: 18px; }
.hub-quick ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.hub-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--hub-line-strong); border-radius: 999px; background: #fff; color: var(--hub-ink); font-size: 15px; font-weight: 600; text-decoration: none; }
.hub-chip:hover { border-color: var(--hub-blue); color: var(--hub-blue); background: var(--hub-blue-soft); }
.hub-chip[data-recent]::before { content: '최근'; margin-right: 6px; font-size: 12px; font-weight: 700; color: var(--hub-blue); }
.hub-clear { margin-top: 8px; min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--hub-ink-2); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }

/* decorative tool-icon cluster, desktop only */
.hub-art { display: none; }
@media (min-width: 900px) {
  .hub-hero-inner { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; padding: 60px 24px 52px; }
  .hub-lede { font-size: 17px; }
  .hub-art { display: grid; grid-template-columns: repeat(2, 96px); gap: 20px; justify-content: center; padding: 36px 36px 54px; border-radius: 28px; background: var(--hub-blue-soft); }
  .hub-art-tile { width: 96px; height: 96px; border-radius: 24px; background: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(20, 38, 63, .10); }
  .hub-art-tile:nth-child(even) { transform: translateY(18px); }
  .hub-art svg { width: 40px; height: 40px; stroke: var(--hub-blue); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
}

/* sections */
.hub-section { max-width: var(--hub-container); margin: 0 auto; padding: 44px 16px 0; scroll-margin-top: 72px; }
.hub-section h2 { margin: 0 0 6px; font-size: 22px; line-height: 1.35; font-weight: 800; letter-spacing: -.01em; }
.hub-sec-sub { margin: 0 0 18px; font-size: 15px; color: var(--hub-ink-2); }
.hub-ic { width: 24px; height: 24px; stroke: var(--hub-blue); fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* categories: medium emphasis, bordered cards with icon */
.hub-cats { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; grid-template-columns: minmax(0, 1fr); }
.hub-cat { display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: 'ic body' 'ic count'; column-gap: 14px; row-gap: 6px; height: 100%; padding: 18px; background: var(--hub-card); border: 1px solid var(--hub-line); border-radius: 16px; color: inherit; text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.hub-cat:hover { border-color: var(--hub-blue); transform: translateY(-2px); }
.hub-cat-ic { grid-area: ic; width: 44px; height: 44px; border-radius: 12px; background: var(--hub-blue-soft); display: grid; place-items: center; }
.hub-cat-body { grid-area: body; }
.hub-cat-name { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.35; }
.hub-cat-desc { margin: 4px 0 0; font-size: 15px; color: var(--hub-ink-2); line-height: 1.55; }
.hub-cat-count { grid-area: count; font-size: 14px; font-weight: 700; color: var(--hub-blue); }
@media (min-width: 640px) { .hub-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .hub-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .hub-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* light list: quieter than categories (no card, no icon) */
.hub-fun { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; grid-template-columns: minmax(0, 1fr); }
.hub-fun a { display: flex; flex-direction: column; gap: 3px; min-height: 76px; padding: 4px 0 4px 16px; border-left: 3px solid var(--hub-line-strong); color: inherit; text-decoration: none; }
.hub-fun a:hover { border-left-color: var(--hub-blue); }
.hub-fun-name { font-size: 17px; font-weight: 700; }
.hub-fun a:hover .hub-fun-name { color: var(--hub-blue); }
.hub-fun-sum { font-size: 15px; color: var(--hub-ink-2); }
.hub-fun-cat { font-size: 13px; color: var(--hub-ink-2); }
@media (min-width: 768px) { .hub-fun { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }

/* trending: rendered only when a verified snapshot exists */
.hub-trend { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; grid-template-columns: minmax(0, 1fr); }
.hub-trend a { display: flex; flex-direction: column; gap: 3px; min-height: 64px; padding: 10px 16px; background: var(--hub-card); border: 1px solid var(--hub-line); border-radius: 12px; color: inherit; text-decoration: none; }
.hub-trend a:hover { border-color: var(--hub-blue); }
.hub-trend-name { font-size: 16px; font-weight: 700; }
.hub-trend-sum { font-size: 14px; color: var(--hub-ink-2); }
.hub-trend-extra { display: none; }
.hub-trend[data-expanded="true"] .hub-trend-extra { display: list-item; }
.hub-more { margin-top: 12px; min-height: 44px; padding: 0 16px; border: 1px solid var(--hub-line-strong); border-radius: 10px; background: #fff; color: var(--hub-ink); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
@media (min-width: 768px) {
  .hub-trend { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .hub-trend-extra { display: list-item; }
  .hub-more { display: none; }
}

/* about: plain text, quietest */
.hub-about p { max-width: 46em; margin: 0 0 12px; font-size: 16px; color: var(--hub-ink-2); }
body.tsk-home .hub-about a { display: inline-flex; align-items: center; min-height: 44px; color: var(--hub-blue); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }

.hub-footer { margin-top: 56px; padding: 28px 16px 40px; border-top: 1px solid var(--hub-line); text-align: center; font-size: 14px; color: var(--hub-ink-2); }
.hub-footer p { margin: 6px 0; }
.hub-footer a { display: inline-block; padding: 6px 8px; color: var(--hub-ink-2); text-decoration: none; }
.hub-footer a:hover { color: var(--hub-blue); text-decoration: underline; }
.hub-footnav { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; margin-bottom: 8px; }

@media (min-width: 768px) {
  .hub-hero-inner, .hub-section { padding-left: 24px; padding-right: 24px; }
  .hub-section { padding-top: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  .hub-cat { transition: none; }
  .hub-cat:hover { transform: none; }
  .hub-art-tile { transform: none !important; }
}

/* Neutralize shared tool-page rules (design-rollout.css via nav.css uses !important on body, main, buttons, inputs, focus, footer).
   Scoped to body.tsk-home so tool pages are untouched. */
body.tsk-home { background: var(--hub-canvas) !important; }
body.tsk-home main { width: auto !important; max-width: none !important; margin: 0 !important; }
body.tsk-home :focus-visible { outline: 3px solid var(--hub-focus) !important; outline-offset: 2px !important; }
body.tsk-home .hub-search input { width: 100%; min-height: 56px; border: 1.5px solid var(--hub-field-border) !important; border-radius: 14px !important; background: #fff !important; color: var(--hub-ink) !important; }
body.tsk-home .hub-search input:focus { border-color: var(--hub-focus) !important; }
body.tsk-home .hub-btn { min-height: 56px; border-radius: 14px !important; }
body.tsk-home .hub-more { border-radius: 10px !important; }
body.tsk-home .hub-clear { border-radius: 4px !important; font-weight: 400; }
body.tsk-home .hub-footer { margin-top: 56px !important; color: var(--hub-ink-2) !important; border-top: 1px solid var(--hub-line); }