:root {
  color-scheme: light dark;
  --surface-page:#f5f5f7;
  --surface-raised:rgba(255,255,255,.78);
  --surface-solid:#ffffff;
  --surface-soft:rgba(255,255,255,.58);
  --text-primary:#1d1d1f;
  --text-secondary:#6e6e73;
  --text-tertiary:#86868b;
  --accent:#0071e3;
  --accent-hover:#0077ed;
  --success:#248a3d;
  --warning:#9a6700;
  --border:rgba(0,0,0,.09);
  --border-strong:rgba(0,0,0,.15);
  --shadow-card:0 1px 2px rgba(0,0,0,.03),0 8px 30px rgba(0,0,0,.035);
  --shadow-float:0 24px 80px rgba(0,0,0,.18);
  --radius-s:12px;
  --radius-m:18px;
  --radius-l:28px;
  --page-width:1180px;
  --motion-fast:160ms;
  --motion-layout:240ms;
}

* { box-sizing:border-box; }
[hidden] { display:none!important; }
html { scroll-behavior:smooth; }
body {
  min-width:320px;
  min-height:100vh;
  margin:0;
  overflow-x:hidden;
  color:var(--text-primary);
  background:radial-gradient(circle at 76% 2%,rgba(0,113,227,.095),transparent 31rem),var(--surface-page);
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","PingFang SC","Helvetica Neue",Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
button,input { font:inherit; }
button { color:inherit; }
a { color:inherit; }
::selection { color:#fff; background:var(--accent); }
:focus-visible { outline:3px solid rgba(0,113,227,.38); outline-offset:3px; }

.nav-shell {
  position:sticky;
  top:0;
  z-index:10;
  width:100%;
  min-height:56px;
  padding:0 max(20px,calc((100vw - var(--page-width))/2));
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--border);
  background:rgba(245,245,247,.74);
  -webkit-backdrop-filter:saturate(180%) blur(20px);
  backdrop-filter:saturate(180%) blur(20px);
}
.brand { display:inline-flex; align-items:center; gap:9px; color:var(--text-primary); text-decoration:none; font-size:13px; font-weight:700; letter-spacing:.04em; }
.brand>span { width:8px; height:8px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 4px rgba(0,113,227,.1); }
.nav-links { display:flex; align-items:center; gap:28px; }
.nav-links a { min-height:44px; display:inline-flex; align-items:center; color:var(--text-secondary); font-size:13px; text-decoration:none; transition:color var(--motion-fast) ease; }
.nav-links a:hover { color:var(--text-primary); }

.hero {
  width:min(var(--page-width),calc(100% - 40px));
  margin:0 auto;
  padding:112px 0 96px;
}
.eyebrow,.section-kicker { margin:0 0 24px; color:var(--accent); font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:11px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; }
.hero h1 { max-width:940px; margin:0; font-size:clamp(52px,7.4vw,96px); font-weight:680; line-height:.96; letter-spacing:-.055em; }
.hero h1 span { color:var(--accent); }
.hero-copy { max-width:640px; margin:36px 0 32px; color:var(--text-secondary); font-size:clamp(17px,1.8vw,21px); line-height:1.65; letter-spacing:-.01em; }
.hero-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.hero-actions a { min-height:48px; padding:0 20px; display:inline-flex; align-items:center; justify-content:center; gap:18px; border-radius:999px; font-size:14px; font-weight:600; text-decoration:none; transition:transform var(--motion-fast) ease,background var(--motion-fast) ease; }
.hero-actions a:active { transform:scale(.98); }
.primary-action { color:#fff; background:var(--accent); box-shadow:0 6px 18px rgba(0,113,227,.18); }
.primary-action:hover { background:var(--accent-hover); }
.secondary-action { color:var(--text-primary); background:var(--surface-soft); box-shadow:inset 0 0 0 1px var(--border); }
.secondary-action:hover { background:var(--surface-raised); }
.hero-meta { margin-top:72px; display:flex; align-items:center; gap:0; color:var(--text-tertiary); font-size:12px; }
.hero-meta span { min-width:150px; padding:4px 24px; display:flex; align-items:baseline; gap:8px; border-left:1px solid var(--border); }
.hero-meta span:first-child { padding-left:0; border-left:0; }
.hero-meta strong { color:var(--text-primary); font-size:26px; font-weight:630; letter-spacing:-.04em; font-variant-numeric:tabular-nums; }

.catalog { width:min(var(--page-width),calc(100% - 40px)); margin:0 auto; padding:74px 0 120px; scroll-margin-top:64px; border-top:1px solid var(--border); }
.section-head { margin-bottom:28px; display:flex; align-items:end; justify-content:space-between; gap:28px; }
.section-kicker { margin-bottom:9px; }
.section-head h2 { margin:0; font-size:clamp(36px,4.5vw,56px); font-weight:660; letter-spacing:-.045em; }
.section-head>p { max-width:260px; margin:0 0 5px; color:var(--text-secondary); font-size:14px; line-height:1.55; text-align:right; }
.catalog-controls { position:sticky; top:68px; z-index:5; margin:0 -12px 18px; padding:12px; display:flex; align-items:center; gap:12px; border:1px solid var(--border); border-radius:22px; background:rgba(245,245,247,.78); box-shadow:0 8px 32px rgba(0,0,0,.035); -webkit-backdrop-filter:saturate(180%) blur(20px); backdrop-filter:saturate(180%) blur(20px); }
.search-shell { min-width:292px; min-height:48px; padding:0 8px 0 15px; display:flex; align-items:center; gap:10px; border:1px solid var(--border); border-radius:14px; background:var(--surface-raised); box-shadow:0 1px 2px rgba(0,0,0,.025); transition:border-color var(--motion-fast) ease,box-shadow var(--motion-fast) ease; }
.search-shell:focus-within { border-color:rgba(0,113,227,.45); box-shadow:0 0 0 4px rgba(0,113,227,.1); }
.search-icon { color:var(--text-tertiary); font-size:20px; line-height:1; transform:translateY(-1px); }
.search-shell input { width:100%; min-width:0; border:0; outline:0; color:var(--text-primary); background:transparent; }
.search-shell input::placeholder { color:var(--text-tertiary); }
.search-clear { flex:0 0 36px; width:36px; height:36px; border:0; border-radius:50%; color:var(--text-secondary); background:rgba(118,118,128,.12); font-size:18px; line-height:1; cursor:pointer; }
.filters { min-width:0; display:flex; align-items:center; gap:6px; overflow-x:auto; scrollbar-width:none; }
.filters::-webkit-scrollbar { display:none; }
.filters button { flex:0 0 auto; min-height:44px; padding:0 15px; border:0; border-radius:12px; color:var(--text-secondary); background:transparent; font-size:13px; cursor:pointer; transition:color var(--motion-fast) ease,background var(--motion-fast) ease,transform var(--motion-fast) ease; }
.filters button:hover { color:var(--text-primary); background:var(--surface-soft); }
.filters button:active { transform:scale(.97); }
.filters button.active { color:var(--text-primary); background:var(--surface-solid); box-shadow:0 1px 5px rgba(0,0,0,.08); }
.result-line { margin:0 0 18px; color:var(--text-tertiary); font-size:12px; }

.skill-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.skill-card { min-height:360px; padding:24px; display:flex; flex-direction:column; border:1px solid var(--border); border-radius:var(--radius-m); color:var(--text-primary); background:var(--surface-raised); box-shadow:var(--shadow-card); text-align:left; cursor:pointer; -webkit-appearance:none; appearance:none; transition:transform var(--motion-layout) cubic-bezier(.2,.8,.2,1),border-color var(--motion-fast) ease,box-shadow var(--motion-layout) ease,background var(--motion-fast) ease; }
.skill-card:hover { transform:translateY(-3px); border-color:var(--border-strong); background:var(--surface-solid); box-shadow:0 16px 44px rgba(0,0,0,.08); }
.skill-card:active { transform:scale(.992); }
.card-topline,.card-footer { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.skill-number { color:var(--accent); font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:12px; font-variant-numeric:tabular-nums; }
.category { color:var(--text-tertiary); font-size:12px; }
.card-copy { display:block; margin:52px 0 0; }
.card-copy strong { display:block; margin:0 0 13px; font-size:27px; font-weight:640; line-height:1.12; letter-spacing:-.035em; }
.card-copy>span { display:block; color:var(--text-secondary); font-size:14px; line-height:1.65; }
.tags { margin-top:20px; display:flex; flex-wrap:wrap; gap:6px; }
.tags>span { padding:5px 9px; border-radius:999px; color:var(--text-secondary); background:rgba(118,118,128,.09); font-size:11px; }
.card-footer { margin-top:auto; padding-top:22px; }
.availability { display:inline-flex; align-items:center; gap:7px; color:var(--text-tertiary); font-size:11px; }
.availability i { width:7px; height:7px; border-radius:50%; background:var(--text-tertiary); }
.availability.available { color:var(--success); }
.availability.available i { background:var(--success); box-shadow:0 0 0 4px rgba(36,138,61,.1); }
.card-arrow { width:38px; height:38px; display:grid; place-items:center; border-radius:50%; color:var(--accent); background:rgba(0,113,227,.08); font-size:17px; transition:transform var(--motion-fast) ease,background var(--motion-fast) ease; }
.skill-card:hover .card-arrow { transform:translateX(2px); background:rgba(0,113,227,.13); }
.empty { min-height:300px; padding:64px 20px; display:flex; flex-direction:column; align-items:center; justify-content:center; color:var(--text-secondary); text-align:center; }
.empty strong { color:var(--text-primary); font-size:21px; }
.empty span { margin-top:8px; font-size:14px; }
.empty button { min-height:44px; margin-top:22px; padding:0 18px; border:0; border-radius:999px; color:#fff; background:var(--accent); cursor:pointer; }

.safety { width:min(var(--page-width),calc(100% - 40px)); margin:0 auto 100px; padding:68px; display:grid; grid-template-columns:minmax(0,1.15fr) minmax(360px,.85fr); gap:72px; border-radius:32px; color:#f5f5f7; background:#1d1d1f; box-shadow:0 24px 80px rgba(0,0,0,.12); scroll-margin-top:76px; }
.safety .section-kicker { color:#2997ff; }
.safety h2 { max-width:680px; margin:0; font-size:clamp(40px,5.4vw,70px); font-weight:650; line-height:1; letter-spacing:-.055em; }
.safety>div>p:not(.section-kicker) { max-width:640px; margin:28px 0 0; color:#a1a1a6; font-size:16px; line-height:1.75; }
.safety-grid { display:grid; align-content:center; }
.safety-grid>span { min-height:112px; padding:18px 0; display:grid; grid-template-columns:40px 1fr; grid-template-rows:auto auto; column-gap:12px; border-top:1px solid rgba(255,255,255,.14); }
.safety-grid i { grid-row:1/3; color:#2997ff; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:11px; font-style:normal; }
.safety-grid b { align-self:end; font-size:15px; font-weight:600; }
.safety-grid small { margin-top:6px; color:#a1a1a6; font-size:12px; line-height:1.5; }
footer { width:min(var(--page-width),calc(100% - 40px)); min-height:88px; margin:0 auto; display:flex; align-items:center; justify-content:space-between; border-top:1px solid var(--border); color:var(--text-tertiary); font-size:12px; }

.modal-backdrop { position:fixed; inset:0; z-index:30; padding:12px; display:flex; justify-content:flex-end; background:rgba(0,0,0,.34); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px); animation:fade-in var(--motion-fast) ease both; }
.modal { width:min(610px,100%); height:calc(100svh - 24px); padding:34px 38px 28px; overflow:auto; overscroll-behavior:contain; border:1px solid rgba(255,255,255,.45); border-radius:var(--radius-l); background:rgba(250,250,252,.94); box-shadow:var(--shadow-float); -webkit-backdrop-filter:saturate(180%) blur(28px); backdrop-filter:saturate(180%) blur(28px); animation:sheet-in var(--motion-layout) cubic-bezier(.22,.8,.24,1) both; }
.modal-topbar { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.modal-close { flex:0 0 44px; width:44px; height:44px; border:0; border-radius:50%; color:var(--text-secondary); background:rgba(118,118,128,.12); font-size:24px; line-height:1; cursor:pointer; transition:background var(--motion-fast) ease,transform var(--motion-fast) ease; }
.modal-close:hover { color:var(--text-primary); background:rgba(118,118,128,.18); }
.modal-close:active { transform:scale(.94); }
.modal>.section-kicker { margin-top:50px; }
.modal h2 { margin:0; font-size:clamp(42px,6vw,66px); font-weight:670; line-height:.98; letter-spacing:-.055em; }
.modal-lead { margin:24px 0 38px; color:var(--text-secondary); font-size:17px; line-height:1.7; }
.detail-block { padding:22px 0; border-top:1px solid var(--border); }
.detail-block>span { color:var(--accent); font-size:12px; font-weight:650; }
.detail-block p { margin:10px 0 0; font-size:15px; line-height:1.7; }
.release-note { margin:18px 0 0; padding:15px 16px; border:1px solid rgba(154,103,0,.24); border-radius:var(--radius-s); color:var(--warning); background:rgba(255,214,10,.1); font-size:13px; line-height:1.6; }
.modal-actions { position:sticky; bottom:-28px; margin:28px -38px -28px; padding:18px 38px 28px; display:flex; gap:10px; background:linear-gradient(180deg,rgba(250,250,252,0),rgba(250,250,252,.98) 22%); }
.modal-actions a,.modal-actions button { min-height:50px; flex:1; padding:0 18px; display:flex; align-items:center; justify-content:center; gap:20px; border:0; border-radius:14px; text-align:center; text-decoration:none; font-size:14px; font-weight:600; cursor:pointer; transition:transform var(--motion-fast) ease,background var(--motion-fast) ease; }
.modal-actions a:active,.modal-actions button:active { transform:scale(.98); }
.download { color:#fff; background:var(--accent); }
.download:hover { background:var(--accent-hover); }
.modal-actions button { color:var(--text-primary); background:rgba(118,118,128,.12); }
.modal-actions button:hover { background:rgba(118,118,128,.18); }
.modal-actions button.copied { color:var(--success); background:rgba(36,138,61,.1); }

@keyframes fade-in { from { opacity:0; } }
@keyframes sheet-in { from { opacity:0; transform:translateX(24px) scale(.985); } }

@media (max-width:1040px) {
  .skill-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .catalog-controls { align-items:stretch; flex-direction:column; }
  .search-shell { width:100%; }
  .safety { grid-template-columns:1fr; gap:42px; }
}

@media (max-width:700px) {
  .nav-links a:first-child { display:none; }
  .hero { padding:80px 0 72px; }
  .hero h1 { font-size:clamp(46px,13vw,68px); }
  .hero-copy { margin-top:28px; }
  .hero-meta { margin-top:52px; }
  .hero-meta span { min-width:0; padding:4px 14px; }
  .catalog { padding:56px 0 88px; }
  .section-head { align-items:start; flex-direction:column; gap:12px; }
  .section-head>p { max-width:none; text-align:left; }
  .skill-grid { grid-template-columns:1fr; }
  .skill-card { min-height:330px; }
  .safety { padding:44px 28px; border-radius:24px; }
  .modal-backdrop { padding:0; align-items:flex-end; }
  .modal { width:100%; height:min(92svh,820px); padding:24px 22px 20px; border-width:1px 0 0; border-radius:28px 28px 0 0; animation-name:sheet-up; }
  .modal>.section-kicker { margin-top:36px; }
  .modal-actions { bottom:-20px; margin:24px -22px -20px; padding:16px 22px 20px; flex-direction:column; }
}

@media (max-width:480px) {
  .nav-shell { padding-inline:16px; }
  .hero,.catalog,.safety,footer { width:min(100% - 28px,var(--page-width)); }
  .hero h1 { font-size:45px; }
  .hero-actions { align-items:stretch; flex-direction:column; }
  .hero-actions a { width:100%; }
  .hero-meta { align-items:stretch; justify-content:space-between; }
  .hero-meta span { padding:2px 10px; flex-direction:column; gap:2px; }
  .hero-meta strong { font-size:23px; }
  .catalog-controls { top:64px; margin-inline:-6px; padding:8px; border-radius:18px; }
  .filters button { padding-inline:13px; }
  .skill-card { padding:22px; }
  .card-copy { margin-top:42px; }
  .safety { margin-bottom:72px; }
  footer { min-height:76px; }
}

@keyframes sheet-up { from { opacity:0; transform:translateY(28px); } }

@media (prefers-color-scheme:dark) {
  :root {
    --surface-page:#000;
    --surface-raised:rgba(28,28,30,.8);
    --surface-solid:#1c1c1e;
    --surface-soft:rgba(44,44,46,.72);
    --text-primary:#f5f5f7;
    --text-secondary:#a1a1a6;
    --text-tertiary:#8e8e93;
    --accent:#2997ff;
    --accent-hover:#40a9ff;
    --success:#30d158;
    --warning:#ffd60a;
    --border:rgba(255,255,255,.12);
    --border-strong:rgba(255,255,255,.2);
    --shadow-card:0 1px 2px rgba(0,0,0,.2),0 10px 30px rgba(0,0,0,.15);
  }
  body { background:radial-gradient(circle at 76% 2%,rgba(41,151,255,.14),transparent 31rem),var(--surface-page); }
  .nav-shell,.catalog-controls { background:rgba(0,0,0,.72); }
  .search-clear,.modal-close,.modal-actions button { background:rgba(118,118,128,.24); }
  .primary-action { color:#fff; }
  .skill-card:hover { box-shadow:0 18px 50px rgba(0,0,0,.38); }
  .safety { border:1px solid var(--border); background:#101012; }
  .modal { border-color:rgba(255,255,255,.12); background:rgba(28,28,30,.94); }
  .modal-actions { background:linear-gradient(180deg,rgba(28,28,30,0),rgba(28,28,30,.98) 22%); }
}

@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { scroll-behavior:auto!important; animation-duration:.01ms!important; animation-iteration-count:1!important; transition-duration:.01ms!important; }
}

@media (prefers-contrast:more) {
  :root { --border:rgba(0,0,0,.24); --border-strong:rgba(0,0,0,.38); }
  .skill-card,.catalog-controls,.search-shell { border-width:2px; }
}
