/* NK Tools directory. Tokens from the Claude Design canvas "NK Tools directory". */
:root {
  --bg: #FFFFFF; --tint: #F5F7FB; --subtle: #F5F6F8; --chip: #F1F3F6;
  --ink: #0B0D12; --ink-2: #3B4252; --muted: #555E6E; --line: #E2E5EA; --line-2: #C9CFD8;
  --accent: #1E4FD6; --accent-hover: #163DAA; --accent-soft: #EDF2FF; --navy: #0F1B3D; --navy-sub: #C7D2F0;
  --radius: 16px; --display: 'Space Grotesk', Inter, system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); margin: 0; }
img { max-width: 100%; }
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* header */
.top { border-bottom: 1px solid var(--line); background: var(--bg); }
.top-row { display: flex; align-items: center; gap: 32px; padding-block: 14px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); font: 700 19px/1 var(--display); }
.logo:hover { color: var(--ink); text-decoration: none; }
.mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #fff; font: 700 14px/1 var(--display); letter-spacing: .5px; }
.menu { display: none; }
.menu summary::-webkit-details-marker { display: none; }
.nav { display: flex; gap: 24px; font-size: 15px; font-weight: 500; }
.nav a { color: var(--ink-2); }
.nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.search-mini { margin-left: auto; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--subtle); min-width: 240px; color: var(--muted); }
.search-mini input { border: 0; background: transparent; font: 400 14px Inter, sans-serif; color: var(--ink); outline: none; width: 100%; }

/* hero + search */
.hero { background: var(--tint); border-bottom: 1px solid var(--line); }
.hero-in { padding-block: 72px 64px; display: flex; flex-direction: column; gap: 24px; }
.hero h1 { max-width: 760px; font-size: clamp(34px, 5vw, 52px); line-height: 1.08; letter-spacing: -1px; }
.lede { margin: 0; max-width: 660px; font-size: 18px; line-height: 1.6; color: var(--ink-2); }
.lede-sm { margin: 8px 0 0; color: var(--muted); font-size: 16px; }
.search-big { display: flex; gap: 10px; max-width: 720px; flex-wrap: wrap; }
.search-field { flex: 1 1 320px; display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; color: var(--muted); box-shadow: 0 1px 2px rgba(11,13,18,.04); }
.search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-field input { border: 0; outline: none; font: 400 17px Inter, sans-serif; width: 100%; color: var(--ink); background: transparent; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 24px; border: 1px solid var(--accent); border-radius: 12px; background: var(--accent); color: #fff; font: 600 16px Inter, sans-serif; cursor: pointer; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; text-decoration: none; }
.search-big .btn { min-height: 56px; padding: 0 28px; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--subtle); color: var(--ink); border-color: var(--line-2); }
.stats { display: flex; gap: 28px; flex-wrap: wrap; color: var(--ink-2); font-size: 15px; }
.stats strong { color: var(--ink); font-weight: 600; }

/* sections */
.stack { padding-block: 56px 24px; display: flex; flex-direction: column; gap: 64px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.sec-head h2 { font-size: 28px; font-weight: 600; line-height: 1.2; }
.sec-head a { font-weight: 500; font-size: 15px; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.cat { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: #fff; }
.cat:hover { border-color: var(--accent); color: var(--ink); text-decoration: none; }
.cat-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); flex: none; }
.cat-text { display: flex; flex-direction: column; gap: 3px; }
.cat-name { font-weight: 600; }
.sub { color: var(--muted); font-size: 13px; }
.cat .sub { font-size: 14px; }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { display: flex; flex-direction: column; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: var(--line-2); box-shadow: 0 6px 20px rgba(11,13,18,.06); color: var(--ink); text-decoration: none; }
.card[hidden] { display: none; }
.card-head { display: flex; gap: 14px; align-items: center; }
.card-title { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.name { font-weight: 600; font-size: 17px; line-height: 1.3; }
.ic { width: 56px; height: 56px; border-radius: 14px; flex: none; object-fit: cover; }
.ic-fallback { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font: 700 22px/1 var(--display); border-radius: 14px; flex: none; }
.desc { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--chip); color: var(--ink-2); font: 500 12px/1 Inter, sans-serif; }

/* platform band */
.platforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.plat { display: flex; align-items: center; gap: 20px; padding: 28px; border-radius: 18px; }
.plat:hover { text-decoration: none; }
.plat > span { display: flex; flex-direction: column; gap: 6px; }
.plat-name { font: 600 24px/1.2 var(--display); }
.plat.dark { background: var(--navy); color: #fff; }
.plat.dark .plat-sub { color: var(--navy-sub); }
.plat.dark:hover { color: #fff; background: #13235A; }
.plat.light { background: var(--accent-soft); color: var(--ink); }
.plat.light svg { color: var(--accent); }
.plat.light .plat-sub { color: var(--ink-2); }
.plat.light:hover { color: var(--ink); background: #E2EAFF; }

/* list pages */
.page-head { padding-top: 28px; display: flex; flex-direction: column; gap: 18px; }
.crumbs { font-size: 14px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs [aria-current] { color: var(--ink); }
.title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.title-row h1 { font-size: clamp(30px, 4vw, 40px); line-height: 1.1; letter-spacing: -.5px; }
.sort { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.sort select { height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; font: 500 14px Inter, sans-serif; color: var(--ink); background: #fff; }
.browse { padding-block: 28px 64px; display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.side { flex: 1 1 220px; max-width: 260px; display: flex; flex-direction: column; gap: 22px; }
.side-group { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.side-title { font-weight: 600; font-size: 13px; color: var(--muted); padding: 0 12px 8px; }
.side a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 9px; color: var(--ink-2); font-size: 15px; }
.side a:hover { background: var(--subtle); color: var(--ink); text-decoration: none; }
.side a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-hover); font-weight: 600; }
.side label { display: flex; gap: 10px; align-items: center; padding: 6px 12px; font-size: 15px; cursor: pointer; }
.side input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
.results { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-2); font: 500 14px Inter, sans-serif; cursor: pointer; }
.chip:hover { border-color: var(--line-2); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.count { margin: 0; font-size: 15px; color: var(--ink-2); }
.count strong { color: var(--ink); }
.empty { padding: 48px 24px; border: 1px dashed var(--line-2); border-radius: var(--radius); text-align: center; display: flex; flex-direction: column; gap: 8px; color: var(--muted); }
.empty[hidden] { display: none; }
.empty-title { font: 600 20px var(--display); color: var(--ink); }

/* listing page */
.app-hero { padding-block: 28px 40px; display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; }
.ic-big { width: 112px; height: 112px; border-radius: 26px; flex: none; object-fit: cover; box-shadow: 0 1px 3px rgba(11,13,18,.12); }
.ic-big.ic-fallback { font-size: 44px; }
.app-hero-text { flex: 1 1 480px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.app-hero-text h1 { font-size: clamp(32px, 4.5vw, 44px); line-height: 1.1; letter-spacing: -.5px; }
.headline { margin: 0; font: 500 20px/1.4 var(--display); color: var(--ink-2); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.shots { background: var(--tint); border-block: 1px solid var(--line); }
.shots-row { padding-block: 32px; display: flex; gap: 18px; overflow-x: auto; }
.shots-row img { height: 440px; width: auto; max-width: none; border-radius: 18px; border: 1px solid var(--line); flex: none; background: #fff; }
.app-body { padding-block: 48px; display: flex; gap: 48px; flex-wrap: wrap; align-items: flex-start; }
.about { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.about h2, .details h2 { font-size: 26px; font-weight: 600; }
.about h3 { font-size: 18px; margin-top: 12px; }
.about p { margin: 0; font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.about .muted { font-size: 14px; color: var(--muted); }
.links { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.details { flex: 1 1 300px; max-width: 400px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); }
.details h2 { font-size: 18px; margin-bottom: 8px; }
.fact { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.fact > span:first-child { color: var(--muted); flex: none; }
.fact > span:last-child { text-align: right; overflow-wrap: anywhere; }
.related { padding-bottom: 64px; }
.notfound { padding-block: 72px; display: flex; flex-direction: column; gap: 20px; }
.notfound h1 { font-size: 40px; }

/* footer */
.foot { margin-top: 56px; border-top: 1px solid var(--line); background: var(--subtle); }
.foot-row { padding-block: 40px; display: flex; gap: 40px; flex-wrap: wrap; justify-content: space-between; }
.foot-about { max-width: 380px; display: flex; flex-direction: column; gap: 10px; }
.foot-name { font: 700 18px/1 var(--display); }
.foot-about p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.foot-nav { display: flex; gap: 48px; flex-wrap: wrap; font-size: 14px; }
.foot-nav div { display: flex; flex-direction: column; gap: 10px; }
.foot-nav span { font-weight: 600; }
.foot-copy { padding-bottom: 32px; color: var(--muted); font-size: 13px; }

/* phones and small tablets */
@media (max-width: 860px) {
  .top-row { gap: 12px; flex-wrap: wrap; }
  .nav-desk { display: none; }
  .menu { display: block; order: 2; margin-left: auto; position: relative; }
  .menu summary { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; list-style: none; color: var(--ink); }
  .menu .nav { display: none; }
  .menu[open] .nav { display: flex; flex-direction: column; gap: 4px; position: absolute; right: 0; top: 52px; z-index: 5; min-width: 200px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(11,13,18,.12); }
  .menu[open] .nav a { padding: 10px 12px; border-radius: 8px; }
  .search-mini { order: 3; flex: 1 1 100%; margin-left: 0; min-width: 0; }
  .hero-in { padding-block: 40px 36px; }
  .stack { padding-block: 36px 8px; gap: 44px; }
  .side { max-width: none; flex-basis: 100%; }
  .side-group:first-child { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .side-group:first-child .side-title { display: none; }
  .side-group:first-child a { flex: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; }
  .side fieldset.side-group { flex-direction: row; flex-wrap: wrap; }
  .shots-row img { height: 340px; }
  .details { max-width: none; }
}
@media (max-width: 420px) {
  .wrap { padding-inline: 16px; }
  .search-big .btn { flex: 1 1 100%; }
  .grid, .grid-3 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
