/* UselessTools shared visual system; tool-specific styles stay inside tools/<slug>/. */
:root {
  color-scheme: dark;
  --bg: #090e1b;
  --surface: #10182a;
  --surface-2: #151f32;
  --surface-hover: #1a263b;
  --border: rgba(173, 191, 223, .13);
  --border-strong: rgba(173, 191, 223, .24);
  --text: #f1f5fb;
  --muted: #9daac0;
  --subtle: #6c7d98;
  --accent: #a5b4fc;
  --accent-2: #6ee7d6;
  --accent-bg: rgba(165, 180, 252, .12);
  --shadow: 0 22px 60px rgba(0, 0, 0, .2);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f8fc;
  --surface: #fff;
  --surface-2: #edf2fa;
  --surface-hover: #e9eef8;
  --border: rgba(31, 50, 87, .12);
  --border-strong: rgba(31, 50, 87, .22);
  --text: #142239;
  --muted: #53647b;
  --subtle: #7b899b;
  --accent: #595ac9;
  --accent-2: #0d8b7e;
  --accent-bg: rgba(89, 90, 201, .08);
  --shadow: 0 22px 60px rgba(32, 54, 100, .09);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.65; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
::selection { background: rgba(165,180,252,.32); }
[hidden] { display: none !important; }
.wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.page-shell { overflow: clip; min-height: 100vh; }
.site-header { min-height: 88px; display: flex; align-items: center; gap: 36px; position: relative; z-index: 2; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 800; letter-spacing: -.065em; white-space: nowrap; }
.brand img { border-radius: 12px; }
.brand-accent { color: var(--accent); }
.top-nav { display: flex; gap: 32px; margin-left: auto; align-items: center; font-size: 13px; font-weight: 650; color: var(--muted); }
.top-nav a:hover, .top-nav .nav-current { color: var(--text); }
.nav-external span { font-size: 15px; }
.theme-toggle { background: var(--surface); border: 1px solid var(--border); width: 40px; height: 40px; border-radius: 12px; color: var(--text); display: grid; place-items: center; font-size: 21px; }
.theme-toggle:hover { border-color: var(--border-strong); }
.hero { display: grid; grid-template-columns: 1.12fr .88fr; align-items: center; gap: 40px; padding-block: 90px 110px; }
.eyebrow, .section-kicker { color: var(--accent); font-weight: 800; letter-spacing: .14em; font-size: 11px; }
.eyebrow { display: flex; align-items: center; gap: 10px; }
.pulse-dot { background: var(--accent-2); border-radius: 50%; height: 7px; width: 7px; box-shadow: 0 0 0 5px rgba(110,231,214,.1); }
.hero h1 { font-size: clamp(42px, 5.3vw, 70px); line-height: 1.17; letter-spacing: -.065em; margin: 26px 0 22px; font-weight: 850; }
.gradient-text { background: linear-gradient(95deg, var(--accent), var(--accent-2)); background-clip: text; -webkit-background-clip: text; color: transparent; }
.hero-description { color: var(--muted); max-width: 475px; margin: 0; line-height: 1.9; font-size: 15px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 30px; }
.hero-chips span { border: 1px solid var(--border); color: var(--muted); border-radius: 999px; padding: 4px 13px; font-size: 12px; }
.hero-art { min-height: 310px; display: grid; place-items: center; position: relative; }
.art-glow { width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(112,102,224,.24), transparent 70%); position: absolute; filter: blur(12px); }
.art-window { background: linear-gradient(160deg, var(--surface-2), var(--surface)); box-shadow: var(--shadow); border: 1px solid var(--border-strong); border-radius: 20px; width: min(100%, 392px); min-height: 260px; position: relative; transform: rotate(-3deg); padding: 0 25px 24px; }
.art-window-top { display: flex; align-items: center; gap: 5px; height: 52px; border-bottom: 1px solid var(--border); }
.art-window-top i { width: 7px; height: 7px; border-radius: 50%; background: var(--subtle); opacity: .8; }
.art-window-top span { color: var(--subtle); font: 10px ui-monospace, monospace; margin-left: auto; }
.art-lines { display: grid; gap: 9px; padding-block: 24px 20px; }
.art-lines b { background: var(--border-strong); border-radius: 9px; height: 7px; width: 76%; }
.art-lines b:nth-child(2) { width: 55%; opacity: .7; }
.art-lines b:nth-child(3) { width: 64%; opacity: .45; }
.art-squares { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.art-squares span { height: 64px; display: grid; place-items: center; font-size: 25px; font-weight: 800; color: var(--accent); border: 1px solid var(--border); background: var(--accent-bg); border-radius: 13px; }
.art-squares span:nth-child(2) { color: var(--accent-2); }
.art-squares span:nth-child(3) { color: #f5be81; }
.art-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 19px; font: 11px ui-monospace, monospace; color: var(--subtle); }
.art-footer strong { color: var(--accent); font-weight: 600; }
.tools-section { padding-block: 10px 105px; }
.section-heading h2, .about-panel h2 { margin: 9px 0 8px; font-size: clamp(28px, 3.6vw, 38px); letter-spacing: -.045em; line-height: 1.3; }
.section-heading p { color: var(--muted); margin: 0; font-size: 14px; }
.count-badge { display: inline-flex; vertical-align: middle; font-size: 14px; letter-spacing: 0; color: var(--accent); border: 1px solid var(--border-strong); background: var(--accent-bg); border-radius: 10px; padding: 2px 10px; margin-left: 5px; }
.tools-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 36px; }
.search-box { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; height: 48px; padding: 0 14px; flex: 1 1 330px; max-width: 470px; }
.search-box:focus-within { border-color: var(--accent); }
.search-box svg { width: 19px; height: 19px; flex: 0 0 auto; color: var(--subtle); }
.search-box input { background: transparent; border: 0; outline: none; color: var(--text); width: 100%; min-width: 0; font-size: 13px; }
.search-box input::placeholder { color: var(--subtle); }
.search-box kbd { color: var(--subtle); border: 1px solid var(--border); border-radius: 5px; font: 11px ui-monospace, monospace; padding: 0 6px; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-chip { background: transparent; border: 1px solid transparent; padding: 7px 13px; border-radius: 10px; color: var(--muted); font-size: 12px; font-weight: 650; }
.filter-chip:hover { color: var(--text); background: var(--surface); }
.filter-chip[aria-pressed="true"] { color: var(--accent); background: var(--accent-bg); border-color: var(--border); }
.result-status { font-size: 12px; color: var(--subtle); margin: 19px 0 14px; min-height: 20px; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.tool-card { display: flex; flex-direction: column; gap: 0; position: relative; min-height: 228px; padding: 25px; border: 1px solid var(--border); border-radius: 19px; background: var(--surface); transition: transform .2s, background .2s, border-color .2s, box-shadow .2s; }
.tool-card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-hover); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-icon { display: grid; place-items: center; background: var(--accent-bg); border-radius: 13px; width: 53px; height: 53px; font-size: 25px; }
.card-category { font-size: 11px; color: var(--subtle); font-weight: 650; }
.tool-card h3 { font-size: 18px; font-weight: 750; margin: 19px 0 6px; letter-spacing: -.02em; }
.tool-card p { color: var(--muted); font-size: 12px; line-height: 1.85; margin: 0; }
.card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 23px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.card-tags span { font-size: 11px; color: var(--subtle); }
.card-tags span + span::before { content: "·"; margin-right: 7px; }
.card-arrow { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; background: var(--surface-2); color: var(--accent); font-size: 18px; }
.empty-state { text-align: center; padding: 68px 20px; border: 1px dashed var(--border-strong); border-radius: 18px; }
.empty-icon { font-size: 44px; color: var(--accent); }
.empty-state h3 { font-size: 19px; margin: 9px 0 4px; }
.empty-state p { color: var(--muted); font-size: 13px; }
.button { border: 1px solid transparent; border-radius: 11px; padding: 10px 19px; font-size: 13px; font-weight: 750; }
.button-primary { color: #0b1425; background: #a5b4fc; }
.button-primary:hover:not(:disabled) { background: #c5ceff; }
.button-secondary { border-color: var(--border-strong); color: var(--text); background: var(--surface); }
.button-secondary:hover:not(:disabled) { background: var(--surface-hover); }
.no-script { color: var(--muted); }
.about-section { padding-bottom: 90px; }
.about-panel { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: 37px 42px; border: 1px solid var(--border); background: linear-gradient(115deg, var(--surface), var(--surface-2)); border-radius: 22px; }
.about-panel h2 { font-size: 25px; }
.about-panel p { max-width: 620px; margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.95; }
.text-link { color: var(--accent); font-weight: 700; font-size: 13px; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 30px 0 36px; border-top: 1px solid var(--border); color: var(--subtle); font-size: 12px; }
@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; padding-block: 64px 72px; }
  .hero-art { min-height: 250px; }
  .art-window { max-width: 350px; }
  .tool-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tools-section { padding-bottom: 75px; }
}
@media (max-width: 580px) {
  .wrap { width: min(100% - 32px, 1120px); }
  .site-header { min-height: 76px; gap: 13px; }
  .brand { font-size: 17px; gap: 8px; }
  .brand img { width: 33px; height: 33px; }
  .top-nav { gap: 15px; font-size: 12px; }
  .top-nav a:nth-child(2), .nav-external { display: none; }
  .theme-toggle { width: 36px; height: 36px; border-radius: 10px; }
  .hero { gap: 18px; padding-top: 43px; padding-bottom: 52px; }
  .hero h1 { font-size: clamp(35px, 9vw, 50px); }
  .hero-description { font-size: 13px; }
  .hero-art { min-height: 220px; }
  .art-window { width: min(90%, 310px); transform: rotate(-2deg); }
  .art-squares span { height: 50px; font-size: 20px; }
  .tools-toolbar { gap: 13px; margin-top: 26px; }
  .search-box { flex-basis: 100%; max-width: none; }
  .tool-grid { grid-template-columns: 1fr; gap: 12px; }
  .tool-card { min-height: 200px; }
  .about-panel { flex-direction: column; align-items: flex-start; padding: 25px; gap: 24px; }
  .about-panel h2 { font-size: 23px; }
  .about-section { padding-bottom: 55px; }
  .site-footer { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
