/* Tool-Lifes — refined visual layer (loaded after style.css).
 * Calm editorial atlas: display serif + clean sans, cool slate, high-clarity type. */

:root {
  --accent: #0e7490;
  --accent2: #155e75;
  --bg: #e8edf3;
  --surface: #ffffff;
  --ink: #07111f;
  --ink2: #1e293b;
  --muted: #475569;
  --line: #c5ceda;
  --track: #dce3ec;
  --radius: 12px;
  --shadow: 0 1px 0 rgba(10, 22, 40, .05), 0 14px 36px -22px rgba(10, 22, 40, .22);
  --shadow-soft: 0 1px 0 rgba(10, 22, 40, .04);
  --maxw: 1100px;
  --header-bg: rgba(255, 255, 255, .86);
  --font-sans: "Outfit", "Apple SD Gothic Neo", "Noto Sans KR", "Hiragino Sans",
    "Yu Gothic", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-display: "Source Serif 4", "Iowan Old Style", "Apple SD Gothic Neo", "Noto Serif KR",
    "Hiragino Mincho ProN", "Songti SC", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #22d3ee;
    --accent2: #0891b2;
    --bg: #0b1220;
    --surface: #121a28;
    --ink: #e8eef6;
    --ink2: #c5d0de;
    --muted: #94a3b8;
    --line: #2a3648;
    --track: #1a2434;
    --header-bg: rgba(11, 18, 32, .9);
    --shadow: 0 1px 0 rgba(0, 0, 0, .35), 0 18px 40px -20px rgba(0, 0, 0, .55);
    --shadow-soft: 0 1px 0 rgba(0, 0, 0, .25);
  }
}

body {
  background:
    radial-gradient(1200px 480px at 12% -8%, rgba(14, 116, 144, .08), transparent 55%),
    radial-gradient(900px 420px at 92% 8%, rgba(15, 23, 42, .045), transparent 50%),
    var(--bg);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.72;
  color: var(--ink);
  font-feature-settings: "ss01" on, "kern" on;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--ink);
}
h2 { font-size: clamp(1.4rem, 2.4vw, 1.78rem); }
h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--ink);
}
p { color: var(--ink2); }
.sub, .hint, .stat-note, .tl-detail { color: var(--muted); }
.section-intro p { color: var(--ink2); font-size: 1.06rem; max-width: 42em; }

.site-header {
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(1.2) blur(14px);
  border-bottom-color: color-mix(in srgb, var(--line) 80%, transparent);
}
.site-header .wrap { height: 56px; }
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.14rem;
  letter-spacing: -.03em;
  color: var(--ink);
}
.lang-select {
  border-radius: 999px;
  padding: 6px 30px 6px 14px;
  font-size: .84rem;
  font-weight: 600;
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}

.hero {
  color: #f8fafc;
  background:
    radial-gradient(ellipse 70% 80% at 88% 0%, rgba(14, 116, 144, .32), transparent 58%),
    radial-gradient(ellipse 50% 60% at 0% 100%, rgba(21, 94, 117, .22), transparent 55%),
    linear-gradient(165deg, #050d18 0%, #0a1628 48%, #123044 100%) !important;
  padding: 56px 0 48px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 75%);
  pointer-events: none; opacity: .6;
  inset: 0 !important;
  height: auto !important;
  background: none !important;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) !important;
  background-size: 48px 48px !important;
}
.hero .kicker {
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
  color: #b8c9da;
  font-size: .74rem;
  font-weight: 650;
  letter-spacing: .16em;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.15rem);
  font-weight: 600;
  letter-spacing: -.035em;
  max-width: 14em;
  color: #fff;
}
.hero .lede {
  color: #d5e0ec !important;
  font-size: 1.1rem;
  max-width: 36em;
  font-family: var(--font-sans);
  font-weight: 450;
  line-height: 1.7;
}
.hero .crumbs a { color: #c5d4e4; }
.hero .crumbs span { color: #8fa3b8; }

.card {
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  border-color: var(--line);
  background: var(--surface);
}
a.card { color: var(--ink); }
a.card .sub { color: var(--muted); }
a.card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: var(--shadow);
}

/* ---------- hub ---------- */
.hub-page main { padding-top: 40px; }
.hub-hero {
  text-align: left;
  padding: clamp(64px, 12vh, 104px) 0 clamp(52px, 8vh, 72px) !important;
  min-height: min(72vh, 620px);
  display: flex;
  align-items: flex-end;
}
.hub-hero .wrap { width: 100%; padding-bottom: 8px; }
.hub-brand {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -.03em;
  color: #fff;
  margin: 0 0 22px;
}
.hub-brand .dot { color: #5eead4; }
.hub-hero h1 {
  font-size: clamp(2.35rem, 6.2vw, 4rem) !important;
  max-width: 11em;
  margin: 0 0 18px !important;
  font-weight: 600;
  letter-spacing: -.04em;
  color: #fff !important;
}
.hub-hero .lede {
  font-size: clamp(1.08rem, 1.7vw, 1.22rem);
  max-width: 32em;
  color: #d7e3ef !important;
  margin: 0 0 28px !important;
  font-weight: 450;
}
.hub-hero::after {
  width: min(58vmin, 520px);
  height: min(58vmin, 520px);
  right: -8%;
  top: 8%;
  opacity: 1;
  background: radial-gradient(circle at 40% 40%, rgba(94, 234, 212, .26), rgba(14, 116, 144, .14) 42%, transparent 68%);
  filter: blur(2px);
}
.hub-stats {
  display: flex !important;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  padding: 1.1rem 0 1.35rem;
  border-bottom: 1px solid color-mix(in srgb, #fff 12%, transparent);
  margin: 0;
}
.hub-band {
  background: #0a1628;
  color: #d7e3ef;
  border-bottom: 1px solid color-mix(in srgb, #fff 10%, transparent);
}
.hub-band .hub-stats { border-bottom: 0; }
.hub-stat {
  display: flex; flex-direction: column; gap: 2px; min-width: 4.5rem;
}
.hub-stat b {
  font-size: 1.45rem; font-weight: 750; letter-spacing: -.03em; color: #fff;
  font-variant-numeric: tabular-nums;
}
.hub-stat span {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #8fa3b8;
}

.hub-group h2 {
  font-size: .8rem !important;
  font-family: var(--font-sans) !important;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink2);
  margin: 0 0 1rem;
  padding-bottom: .65rem;
  border-bottom: 1px solid var(--line);
}

.hub-grid {
  gap: 0 !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
a.app-tile,
.app-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px 22px 26px 26px;
  background: var(--surface);
  border: 0 !important;
  border-right: 1px solid var(--line) !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  border-top: 0 !important;
  box-shadow: none !important;
  color: var(--ink);
  text-decoration: none;
  transition: background .2s ease;
}
a.app-tile:hover,
.app-tile:hover {
  text-decoration: none;
  background: #f4f7fa;
  transform: none !important;
  box-shadow: none !important;
}
.app-tile-accent {
  position: absolute;
  left: 0;
  top: 22px;
  bottom: 22px;
  width: 3px;
  border-radius: 2px;
  background: var(--card-accent, var(--accent));
  opacity: 1;
}
.app-tile .icons {
  font-size: 1.15rem;
  letter-spacing: .2em;
  line-height: 1;
  opacity: .85;
  filter: none;
}
.app-tile h3 {
  margin: 2px 0 0;
  font-size: 1.22rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.025em;
  color: var(--ink);
}
.app-tile .sub {
  color: var(--ink2);
  font-size: .94rem;
  margin: 0;
  line-height: 1.55;
  flex: 1;
}
.app-tile .go {
  color: var(--ink);
  font-weight: 700;
  font-size: .88rem;
  letter-spacing: -.01em;
  margin-top: 6px;
}
.app-tile:hover .go { color: var(--accent); }

.hub-featured { margin: 0 0 2.8rem !important; }
.hub-featured > h2 {
  font-size: .8rem !important;
  font-family: var(--font-sans) !important;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink2);
  margin: 0 0 1rem !important;
}
.hub-featured-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.hub-featured-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  transition: border-color .18s ease, transform .18s ease;
}
.hub-featured-card:hover {
  text-decoration: none;
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  transform: translateY(-1px);
}
.hub-featured-card strong {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--ink);
}
.hub-featured-card span {
  color: var(--ink2);
  font-size: .9rem;
  line-height: 1.45;
}

.hub-hero .hub-search,
.hub-page .hub-search {
  display: flex;
  gap: 0 !important;
  margin: 0 !important;
  max-width: 440px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(8px);
}
.hub-hero .hub-search input,
.hub-page .hub-hero .hub-search input {
  flex: 1;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 14px 18px !important;
  background: transparent !important;
  color: #fff !important;
  font-size: 1rem !important;
}
.hub-hero .hub-search input::placeholder { color: #b0c2d4; }
.hub-hero .hub-search button,
.hub-page .hub-hero .hub-search button {
  border: 0;
  border-radius: 0 !important;
  padding: 14px 20px !important;
  font-weight: 700;
  background: #5eead4 !important;
  color: #07111f !important;
}
.hub-hero .hub-search button:hover { background: #99f6e4 !important; }

.search-page .hub-search {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  gap: 0;
}
.search-page .hub-search input {
  border: 0;
  color: var(--ink);
  background: transparent;
}
.search-page .hub-search button {
  background: var(--accent);
  color: #fff;
  border-radius: 0;
}

.pill {
  border-color: var(--line);
  color: var(--ink2);
  font-weight: 600;
}
.pill:hover, .pill.active {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  color: var(--ink);
}

.tl-search-btn:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.tl-palette-item:hover,
.tl-palette-item.is-active { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.tl-palette-app { color: var(--accent2); }
.tl-read-progress i {
  background: linear-gradient(90deg, #0e7490, #155e75);
}

.site-footer { background: #050d18; }
.site-footer, .site-footer a { color: #c5d4e4; }
.site-footer a:hover { color: #fff; }

/* ---------- visual discovery ---------- */
.app-tile-thumb,
.hub-featured-thumb {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block;
  border-radius: 0; background: #0a1628; margin: 0 0 4px;
}
a.app-tile .app-tile-thumb { margin: -28px -22px 8px -26px; width: calc(100% + 48px); max-width: none; }
.hub-featured-card {
  display: flex; flex-direction: column; gap: 8px; overflow: hidden;
}
.hub-featured-thumb { margin: -14px -16px 4px; width: calc(100% + 32px); border-radius: 0; }

.hub-tools { margin: 0 0 1.2rem; }
.hub-tools input[data-hub-q] {
  width: min(100%, 28rem); font: inherit; padding: .7rem 1rem;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.hub-tools input[data-hub-q]:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

.tl-picks { margin: 0 0 2.4rem; }
.tl-picks-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin: 0 0 1rem; flex-wrap: wrap;
}
.tl-picks-head h2 {
  font-size: .8rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink2); margin: 0;
}
.tl-picks-all { font-size: .9rem; font-weight: 650; color: var(--accent); text-decoration: none; }
.tl-picks-all:hover { text-decoration: underline; }
.tl-picks-row {
  display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
a.tl-pick {
  display: flex; flex-direction: column; gap: 6px; padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  text-decoration: none; color: inherit; transition: border-color .15s ease, transform .2s ease;
}
a.tl-pick:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-2px); text-decoration: none; }
.tl-pick-app {
  font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent2);
}
.tl-pick strong { font-size: 1.02rem; }
.tl-pick-desc { font-size: .88rem; color: var(--muted); line-height: 1.4; }

.tl-collection { margin: 0 0 2.6rem; }
.tl-collection h2 { margin: 0 0 .4rem; }
.tl-collection .sub { color: var(--muted); margin: 0 0 1rem; }

.hub-continue, .hub-saved { margin: 0 0 2rem; }
.hub-continue h2, .hub-saved h2 {
  font-size: .8rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink2); margin: 0 0 .85rem;
}
.tl-rail-row {
  display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
a.tl-rail-card {
  display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); text-decoration: none; color: inherit;
}
a.tl-rail-card:hover { border-color: var(--accent); text-decoration: none; }
a.tl-rail-card strong { display: block; font-size: .95rem; }
a.tl-rail-card span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.tl-cite, .tl-series {
  margin: 1.6rem 0; padding: 1.1rem 1.2rem; border: 1px solid var(--line);
  border-radius: 14px; background: var(--surface);
}
.tl-cite h2, .tl-series { font-size: 1rem; }
.tl-cite-text { font-size: .88rem; color: var(--ink2); overflow-wrap: anywhere; }
.tl-cite-btn {
  margin-top: .6rem; font: inherit; font-size: .85rem; font-weight: 650;
  border: 1px solid var(--line); background: transparent; border-radius: 999px;
  padding: .45rem 1rem; cursor: pointer; color: var(--ink);
}
.tl-cite-btn:hover { border-color: var(--accent); color: var(--accent); }
.tl-series {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0; border: 0; background: transparent;
}
a.tl-series-slot {
  display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); text-decoration: none; color: inherit;
}
a.tl-series-slot:hover { border-color: var(--accent); text-decoration: none; }
.tl-series-lbl { display: block; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.tl-series-slot.is-empty { visibility: hidden; }

.tl-share-fab { gap: 6px; }
.tl-share-btn {
  min-width: 44px; min-height: 44px; padding: 10px 12px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.tl-share-inline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 1.5rem 0; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.tl-share-inline-lbl {
  font-size: .78rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.tl-share-inline-btn {
  font: inherit; font-size: .88rem; font-weight: 650; cursor: pointer;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink);
}
.tl-share-inline-btn:hover { border-color: var(--accent); color: var(--accent); }
.tl-save-btn.is-on { border-color: var(--accent); color: var(--accent); }

.tl-install {
  position: fixed; left: 16px; bottom: 16px; z-index: 45;
  max-width: min(360px, calc(100% - 32px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 14px 16px; display: flex; gap: 12px; align-items: center;
}
.tl-install p { margin: 0; font-size: .9rem; color: var(--ink2); flex: 1; }
.tl-install button {
  font: inherit; font-size: .82rem; font-weight: 650; border-radius: 999px;
  border: 1px solid var(--line); background: var(--accent); color: #fff;
  padding: .45rem .9rem; cursor: pointer;
}
.tl-install button.tl-install-dismiss {
  background: transparent; color: var(--muted); border: 0; padding: .35rem;
}

@media (prefers-reduced-motion: reduce) {
  .app-tile,
  .hub-featured-card,
  a.card,
  a.tl-pick { transition: none; }
}
