/* wanoma.jp — 「配線ラベルと設備台帳」
   命名は rscss：部品は2語（post-card）、要素は1語（.post-card > .thumb）、変形は先頭ハイフン（-wide） */

@font-face {
  font-family: "MPLUS2W";
  src: url("/skin/mplus2-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ebedee;
  --paper: #ffffff;
  --ink: #1f2328;
  --ink-sub: #5c636b;
  --graphite: #2b3036;
  --rule: #cfd3d6;
  --led: #1f9d55;
  --link: #157a42;
  --cut: 12px;
  --head: "MPLUS2W", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --mono: Consolas, Menlo, "Courier New", monospace;
  --chamfer: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, "Meiryo", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--led); outline-offset: 2px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--paper);
  padding: 8px 12px;
}
.skip-link:focus { left: 8px; top: 8px; z-index: 10; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- ヘッダー ---------- */
.site-head {
  background: var(--graphite);
  border-bottom: 2px solid var(--led);
}
.site-head > .inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  flex-wrap: wrap;
}
.site-head > .inner > .plate {
  display: inline-block;
  background: var(--paper);
  color: var(--graphite);
  font-family: var(--head);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.4;
  padding: 8px 18px 8px 16px;
  text-decoration: none;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.site-head > .inner > .catch {
  margin: 0;
  color: #c9ced2;
  font-size: 0.85rem;
}

/* ---------- 共通の枠 ---------- */
.page-main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 16px 56px;
}

/* ---------- TOP ---------- */
.home-intro { margin: 0 0 24px; }
.home-intro > .name {
  margin: 0;
  font-family: var(--head);
  font-size: 1.7rem;
  line-height: 1.35;
}
.home-intro > .sub {
  margin: 2px 0 10px;
  font-family: var(--head);
  font-weight: 700;
  color: var(--ink-sub);
}
.home-intro > .status {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink-sub);
  background: var(--paper);
  padding: 2px 10px;
  border: 1px solid var(--rule);
}

.led {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--led);
  box-shadow: 0 0 0 3px rgba(31, 157, 85, 0.22);
  flex: none;
}

.post-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}

.post-card {
  background: var(--paper);
  clip-path: var(--chamfer);
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  align-items: start;
}
.post-card > .thumb { display: block; }
.post-card > .thumb > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-card > .text { min-width: 0; }
.post-card > .text > .date {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-sub);
}
.post-card > .text > .title {
  margin: 2px 0 6px;
  font-family: var(--head);
  font-size: 1.02rem;
  line-height: 1.5;
}
.post-card > .text > .title > a { color: var(--ink); text-decoration: none; }
.post-card > .text > .title > a:hover { color: var(--link); text-decoration: underline; }
.post-card > .text > .excerpt {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-sub);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card.-wide {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
  gap: 24px;
  padding: 20px;
}
.post-card.-wide > .text > .title { font-size: 1.3rem; }
.post-card.-wide > .text > .excerpt { -webkit-line-clamp: 3; font-size: 0.92rem; }

/* ---------- 記事ページ ---------- */
.post-entry,
.policy-doc,
.post-related,
.missing-page {
  max-width: 700px;
  margin: 0 auto;
}

.crumb-path > ol {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-sub);
}
.crumb-path > ol > li + li::before {
  content: "/";
  margin: 0 8px;
  color: var(--led);
}

.post-entry > .title,
.policy-doc > .title,
.missing-page > .title {
  margin: 0;
  font-family: var(--head);
  font-size: 1.6rem;
  line-height: 1.45;
}
.post-entry > .date {
  margin: 8px 0 24px;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink-sub);
}

.toc-tree {
  background: #f6f7f7;
  border-left: 3px solid var(--graphite);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  padding: 16px 20px;
  margin: 0 0 24px;
}
.toc-tree > .label {
  margin: 0 0 8px;
  font-family: var(--head);
  font-weight: 700;
}
.toc-tree > ul { list-style: none; margin: 0; padding: 0; }
.toc-tree > ul > li {
  display: flex;
  gap: 6px;
  font-size: 0.9rem;
  line-height: 1.75;
}
.toc-tree > ul > li > .branch {
  font-family: var(--mono);
  color: var(--led);
  white-space: pre;
  flex: none;
}
.toc-tree > ul > li.-h3 { font-size: 0.84rem; }
.toc-tree > ul > li.-h3 > a { color: var(--ink-sub); }

.eyecatch {
  margin: 0 auto 32px;
  max-width: 640px;
}
.eyecatch > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.post-body > h2 {
  position: relative;
  margin: 48px 0 16px;
  padding: 0 0 8px 22px;
  border-bottom: 2px solid var(--graphite);
  font-family: var(--head);
  font-size: 1.32rem;
  line-height: 1.5;
}
.post-body > h2::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--led);
  box-shadow: 0 0 0 3px rgba(31, 157, 85, 0.22);
}
.post-body > h3 {
  margin: 32px 0 10px;
  padding-left: 12px;
  border-left: 4px solid;
  border-image: linear-gradient(var(--led) 50%, var(--graphite) 50%) 1;
  font-family: var(--head);
  font-size: 1.08rem;
  line-height: 1.55;
}
.post-body > p { margin: 0 0 1.2em; }
.post-body > h2:first-child { margin-top: 0; }

/* ---------- 記事の表（関連記事・404） ---------- */
.post-related { margin-top: 56px; }
.post-related > .label,
.missing-page > .label {
  margin: 0 0 12px;
  font-family: var(--head);
  font-size: 1.1rem;
}

.post-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  font-size: 0.9rem;
}
.post-table th {
  text-align: left;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.76rem;
  color: #c9ced2;
  background: var(--graphite);
  padding: 4px 12px;
}
.post-table td {
  border-top: 1px solid var(--rule);
  padding: 10px 12px;
  vertical-align: middle;
}
.post-table td.thumb { width: 120px; padding-right: 0; }
.post-table td.thumb > img { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; }
.post-table td.title { line-height: 1.6; }
.post-table td.date {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-sub);
  white-space: nowrap;
}

/* ---------- プライバシーポリシー ---------- */
.policy-doc > .lead { margin: 16px 0 32px; }
.policy-doc > .spec {
  margin-top: 40px;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.82rem;
}
.policy-doc > .spec th,
.policy-doc > .spec td { border: 1px solid var(--rule); padding: 4px 12px; background: var(--paper); }
.policy-doc > .spec th { font-weight: 400; color: var(--ink-sub); background: #f6f7f7; }

/* ---------- 404 ---------- */
.missing-page > .text { margin: 12px 0 28px; }
.missing-page > .checks {
  list-style: none;
  margin: 0 0 32px;
  padding: 12px 16px;
  background: var(--paper);
  clip-path: var(--chamfer);
}
.missing-page > .checks > li {
  position: relative;
  padding-left: 28px;
  margin: 4px 0;
}
.missing-page > .checks > li::before {
  content: "[ ]";
  position: absolute;
  left: 0;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--led);
}
.missing-page > .back { margin: 24px 0 0; }

/* ---------- フッター ---------- */
.site-foot {
  background: var(--graphite);
  color: #d4d8db;
  font-size: 0.85rem;
}
.site-foot > .inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 16px 20px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  gap: 16px 32px;
}
.site-foot > .inner > .name {
  margin: 0;
  font-family: var(--head);
  font-weight: 700;
  color: #fff;
}
.site-foot > .inner > .note { margin: 0; line-height: 1.75; }
.site-foot > .inner > .links { list-style: none; margin: 0; padding: 0; }
.site-foot > .inner > .links a { color: #fff; }
.site-foot > .stamp {
  max-width: 1000px;
  margin: 0 auto;
  padding: 10px 16px 18px;
  border-top: 1px solid #454b52;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: #9aa1a8;
}

/* ---------- 狭い画面 ---------- */
@media (max-width: 720px) {
  .post-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .post-card { grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .post-card > .text > .title { font-size: 0.95rem; }
  .post-card > .text > .excerpt { display: none; }
  .post-card.-wide { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .post-card.-wide > .text > .title { font-size: 1.12rem; }
  .post-card.-wide > .text > .excerpt { display: -webkit-box; }
  .home-intro > .name { font-size: 1.4rem; }
  .post-entry > .title,
  .policy-doc > .title,
  .missing-page > .title { font-size: 1.32rem; }
  .post-body > h2 { font-size: 1.18rem; }
  .post-table td.thumb { width: 84px; }
  .post-table td.thumb > img { width: 72px; }
  .post-table td.date { display: none; }
  .post-table th:last-child { display: none; }
  .site-foot > .inner { grid-template-columns: minmax(0, 1fr); }
}
