/* =====================================================================
   自由IT同盟 — Design System
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+New:wght@500;700;900&family=Noto+Sans+JP:wght@400;500;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* --- Neutrals (cool-neutral) --- */
  --ink:        oklch(0.23 0.012 255);
  --ink-2:      oklch(0.42 0.012 255);
  --ink-3:      oklch(0.56 0.012 255);
  --line:       oklch(0.90 0.008 255);
  --line-2:     oklch(0.94 0.006 255);
  --surface:    #ffffff;
  --surface-2:  oklch(0.985 0.004 255);
  --surface-3:  oklch(0.965 0.006 255);
  --bg:         oklch(0.975 0.005 255);

  /* --- Brand / primary --- */
  --brand:      oklch(0.52 0.16 262);
  --brand-ink:  oklch(0.44 0.17 262);
  --brand-soft: oklch(0.95 0.03 262);
  --brand-line: oklch(0.86 0.06 262);

  /* --- Accent (shared by header logo etc; overridden on #lp-root by Tweaks) --- */
  --acc:      oklch(0.52 0.17 264);
  --acc-ink:  oklch(0.44 0.18 264);
  --acc-soft: oklch(0.96 0.035 264);
  --acc-line: oklch(0.86 0.07 264);

  /* --- Category hues (shared L/C, varied H) --- */
  --c-windows:  oklch(0.58 0.14 252);
  --c-m365:     oklch(0.60 0.15 32);
  --c-entra:    oklch(0.55 0.16 292);
  --c-azure:    oklch(0.60 0.13 222);
  --c-server:   oklch(0.58 0.12 168);
  --c-intune:   oklch(0.58 0.16 330);
  --c-ps:       oklch(0.58 0.11 138);
  --c-sec:      oklch(0.62 0.14 62);

  /* --- Semantic callouts --- */
  --warn:       oklch(0.62 0.15 55);
  --warn-soft:  oklch(0.965 0.035 70);
  --warn-line:  oklch(0.86 0.09 65);
  --tip:        oklch(0.56 0.12 160);
  --tip-soft:   oklch(0.965 0.03 165);
  --tip-line:   oklch(0.85 0.07 162);
  --note:       oklch(0.52 0.14 262);
  --note-soft:  oklch(0.965 0.025 262);
  --note-line:  oklch(0.86 0.06 262);
  --danger:     oklch(0.55 0.18 22);
  --danger-soft:oklch(0.965 0.03 25);
  --danger-line:oklch(0.85 0.08 25);

  --maxw: 1200px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px oklch(0.4 0.02 255 / 0.06), 0 1px 3px oklch(0.4 0.02 255 / 0.05);
  --shadow:    0 2px 4px oklch(0.4 0.02 255 / 0.05), 0 6px 16px oklch(0.4 0.02 255 / 0.08);
  --shadow-lg: 0 8px 24px oklch(0.4 0.02 255 / 0.12), 0 2px 6px oklch(0.4 0.02 255 / 0.06);

  --sans: "Noto Sans JP", system-ui, sans-serif;
  --head: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.8;
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 700; line-height: 1.4; margin: 0; letter-spacing: 0.01em; }
button { font-family: inherit; cursor: pointer; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* =====================================================================
   Header
   ===================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: oklch(1 0 0 / 0.85);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: 64px; display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--brand), var(--brand-ink));
  box-shadow: var(--shadow-sm), inset 0 1px 0 oklch(1 0 0 / 0.25);
}
.brand-mark svg { width: 19px; height: 19px; }
.brand-name { font-family: var(--head); font-weight: 900; font-size: 18px; letter-spacing: 0.02em; }
.brand-name small { display: block; font-size: 9.5px; font-weight: 500; letter-spacing: 0.22em; color: var(--ink-3); font-family: var(--mono); margin-top: 1px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-size: 14px; font-weight: 500; color: var(--ink-2);
  padding: 8px 13px; border-radius: 8px; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--surface-3); color: var(--ink); }
.nav a.active { color: var(--brand-ink); background: var(--brand-soft); }

.header-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search-mini {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-3); border: 1px solid var(--line);
  border-radius: 9px; padding: 7px 12px; width: 220px; color: var(--ink-3);
  font-size: 13px; transition: border-color .15s, box-shadow .15s;
}
.search-mini:focus-within { border-color: var(--brand-line); box-shadow: 0 0 0 3px var(--brand-soft); }
.search-mini input { border: 0; background: none; outline: none; font-family: inherit; font-size: 13.5px; color: var(--ink); width: 100%; }
.search-mini svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--ink-3); }
.search-mini kbd { font-family: var(--mono); font-size: 10px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; background: var(--surface); }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 700; font-family: var(--head);
  padding: 9px 16px; border-radius: 9px; border: 1px solid transparent;
  transition: transform .12s, box-shadow .15s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-ink); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-3); }

.menu-btn { display: none; }

/* =====================================================================
   Category chips & badges
   ===================================================================== */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; font-family: var(--head);
  padding: 4px 11px 4px 9px; border-radius: 100px;
  color: var(--cat, var(--brand)); background: color-mix(in oklch, var(--cat, var(--brand)) 11%, white);
  border: 1px solid color-mix(in oklch, var(--cat, var(--brand)) 24%, white);
  white-space: nowrap;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cat, var(--brand)); }

.tag {
  font-size: 12px; color: var(--ink-2); background: var(--surface-3);
  border: 1px solid var(--line); border-radius: 7px; padding: 3px 9px;
  font-family: var(--mono); font-weight: 500; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
a.tag:hover { background: var(--brand-soft); color: var(--brand-ink); border-color: var(--brand-line); }

.meta-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--ink-2); font-weight: 500;
}
.meta-badge svg { width: 15px; height: 15px; color: var(--ink-3); }
.diff { display: inline-flex; gap: 2px; }
.diff i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); display: inline-block; }
.diff i.on { background: var(--brand); }
