/* PHOMI — Paigaldusjuhend (installation manual) page-specific styles.
   Ported from the design mock (Manual/PHOMI Paigaldusjuhend.html + manual.css).
   Depends on the tokens + .wrap / .eyebrow / .crumb rules in styles.css. */

/* ─── Manual hero ─── */
.man-hero{
  background:var(--stone);
  padding:64px 0 48px;
}
.man-hero .eyebrow{ margin-bottom:16px }
.man-hero h1{
  font-family:var(--f-sans); font-weight:500; letter-spacing:-.03em; line-height:1.03;
  font-size:clamp(32px,4.4vw,56px);
}
.man-hero h1 em{ font-family:var(--f-serif); font-style:italic; font-weight:400 }
.man-hero .man-sub{
  margin-top:20px; max-width:62ch; font-size:16px; color:var(--muted);
}
.man-meta-row{
  margin-top:32px; display:flex; gap:32px; flex-wrap:wrap;
  padding-top:24px; border-top:1px solid var(--line);
}
.man-meta-row .item{ font-size:13px; color:var(--muted) }
.man-meta-row .item strong{ display:block; font-size:15px; color:var(--ink); font-weight:500; margin-bottom:2px }
.man-dl{
  display:inline-flex; align-items:center; gap:8px;
  font-family:var(--f-mono); font-size:12px; letter-spacing:.1em; text-transform:uppercase;
  color:var(--ink); border-bottom:1px solid var(--ink); padding-bottom:2px;
}
.man-dl:hover{ color:var(--primary-deep); border-color:var(--primary-deep) }

/* ─── Layout: sticky sidebar + content ─── */
.man-layout{
  display:grid; grid-template-columns:240px 1fr; gap:64px;
  max-width:1480px; margin:0 auto; padding:56px 32px 120px;
  align-items:start;
}
.man-toc{ position:sticky; top:96px; }
.man-toc-label{
  font-family:var(--f-mono); font-size:10.5px; letter-spacing:.16em; text-transform:uppercase;
  color:var(--muted); margin-bottom:16px;
}
.man-toc ol{ list-style:none; display:flex; flex-direction:column; gap:2px }
.man-toc a{
  display:flex; gap:10px; align-items:baseline;
  padding:9px 0; font-size:14px; color:var(--muted);
  border-left:2px solid transparent; padding-left:12px;
  transition:color .2s, border-color .2s;
}
.man-toc a .i{ font-family:var(--f-mono); font-size:11px; color:var(--sand) }
.man-toc a:hover{ color:var(--ink) }
.man-toc a.active{ color:var(--ink); border-left-color:var(--primary); font-weight:500 }
.man-toc a.active .i{ color:var(--primary-deep) }
@media (max-width:980px){
  .man-layout{ grid-template-columns:1fr; padding:40px 20px 80px }
  .man-toc{ position:static; border-bottom:1px solid var(--line); padding-bottom:24px; margin-bottom:8px }
  .man-toc ol{ flex-direction:row; flex-wrap:wrap; gap:8px 20px }
  .man-toc a{ border-left:0; padding-left:0; border-bottom:2px solid transparent }
  .man-toc a.active{ border-bottom-color:var(--primary) }
}

/* ─── Chapters ─── */
.man-chapter{ padding-bottom:72px; border-bottom:1px solid var(--line); margin-bottom:72px }
.man-chapter:last-child{ border-bottom:0; margin-bottom:0; padding-bottom:0 }
.man-chapter .man-num{
  font-family:var(--f-mono); font-size:11px; letter-spacing:.16em; text-transform:uppercase;
  color:var(--muted); margin-bottom:14px;
}
.man-chapter h2{
  font-family:var(--f-sans); font-weight:500; letter-spacing:-.025em; line-height:1.08;
  font-size:clamp(26px,2.6vw,38px); margin-bottom:18px;
}
.man-chapter h2 em{ font-family:var(--f-serif); font-style:italic; font-weight:400 }
.man-chapter > p.man-intro{ font-size:16.5px; color:var(--ink-2); max-width:64ch; margin-bottom:32px }
.man-chapter h3{
  font-size:13px; font-weight:500; letter-spacing:.06em; text-transform:uppercase;
  color:var(--ink); margin:40px 0 18px;
}
.man-chapter h3:first-of-type{ margin-top:0 }
.man-chapter p{ font-size:15.5px; line-height:1.6; color:var(--ink-2); max-width:66ch }
.man-chapter p + p{ margin-top:12px }

/* ─── Step cards (4-up / process cards) ─── */
.man-steps{
  display:grid; grid-template-columns:repeat(4,1fr); gap:0;
  border-top:1px solid var(--line); margin-bottom:8px;
}
.man-steps.cols-2{ grid-template-columns:repeat(2,1fr) }
.man-step{
  padding:24px 22px 26px; border-right:1px solid var(--line); border-bottom:1px solid var(--line);
}
.man-step:last-child{ border-right:0 }
.man-step .n{
  width:32px; height:32px; border-radius:50%; background:var(--ink); color:#fff;
  display:grid; place-items:center; font-family:var(--f-mono); font-size:13px; margin-bottom:16px;
}
.man-step h4{ font-size:16px; font-weight:500; margin-bottom:6px }
.man-step p{ font-size:14px; color:var(--muted); max-width:none }
@media (max-width:760px){
  .man-steps{ grid-template-columns:repeat(2,1fr) }
  .man-steps .man-step:nth-child(2n){ border-right:0 }
}

/* ─── Numbered sequence list (long step-by-step) ─── */
.man-seq{ display:flex; flex-direction:column; }
.man-seq-item{
  display:grid; grid-template-columns:56px 1fr; gap:20px;
  padding:24px 0; border-top:1px solid var(--line);
}
.man-seq-item:last-child{ border-bottom:1px solid var(--line) }
.man-seq-item .n{
  font-family:var(--f-mono); font-size:20px; color:var(--sand); line-height:1.4;
}
.man-seq-item h4{ font-size:16px; font-weight:500; margin-bottom:6px }
.man-seq-item p{ font-size:14.5px; color:var(--muted) }

/* ─── Layer / build-up diagrams ─── */
.man-layers{ display:flex; flex-direction:column-reverse; border:1px solid var(--line); border-radius:4px; overflow:hidden; max-width:560px; margin-bottom:12px }
.man-layer{ display:grid; grid-template-columns:28px 1fr; gap:16px; padding:16px 18px; border-top:1px solid var(--line); background:var(--paper) }
.man-layer:first-child{ border-top:0 }
.man-layer.hi{ background:var(--stone) }
.man-layer .ln{ font-family:var(--f-mono); font-size:12px; color:var(--muted) }
.man-layer .lb strong{ display:block; font-size:14.5px; font-weight:500; margin-bottom:2px }
.man-layer .lb span{ font-size:13px; color:var(--muted) }
.man-layers-cap{ font-family:var(--f-mono); font-size:11px; letter-spacing:.06em; color:var(--muted); margin-bottom:36px }

/* ─── Tables ─── */
.man-table{ width:100%; border-collapse:collapse; margin-bottom:8px }
.man-table th{
  font-family:var(--f-mono); font-size:10.5px; letter-spacing:.12em; text-transform:uppercase;
  color:var(--muted); text-align:left; padding:0 16px 12px 0; border-bottom:1px solid var(--ink);
}
.man-table td{
  font-size:14.5px; color:var(--ink-2); padding:14px 16px 14px 0; border-bottom:1px solid var(--line);
  vertical-align:top; line-height:1.5;
}
.man-table td:first-child, .man-table th:first-child{ font-weight:500; color:var(--ink); white-space:nowrap }
@media (max-width:640px){
  .man-table{ display:block; overflow-x:auto; white-space:nowrap }
}

/* ─── Callouts ─── */
.man-callout{
  border-top:2px solid var(--ink); padding:20px 0 4px; margin:28px 0; max-width:66ch;
}
.man-callout.warn{ border-top-color:var(--primary-deep) }
.man-callout .lab{
  display:flex; align-items:center; gap:8px;
  font-family:var(--f-mono); font-size:11px; letter-spacing:.14em; text-transform:uppercase;
  color:var(--primary-deep); margin-bottom:10px;
}
.man-callout .lab svg{ width:15px; height:15px }
.man-callout p{ font-size:15px; color:var(--ink-2) }

/* ─── Checklist ─── */
.man-check{ display:flex; flex-direction:column; gap:0; border-top:1px solid var(--line) }
.man-check-item{ display:grid; grid-template-columns:22px 1fr; gap:16px; padding:18px 0; border-bottom:1px solid var(--line) }
.man-check-item svg{ width:18px; height:18px; margin-top:2px; color:var(--primary-deep) }
.man-check-item strong{ display:block; font-size:15px; font-weight:500; margin-bottom:4px }
.man-check-item span{ font-size:14px; color:var(--muted) }

/* ─── Simple bullet list ─── */
.man-list{ display:flex; flex-direction:column; gap:14px; margin:20px 0; max-width:66ch }
.man-list li{ display:flex; gap:12px; font-size:15px; color:var(--ink-2); line-height:1.5 }
.man-list li::before{ content:"—"; color:var(--sand); flex-shrink:0 }

/* ─── Tools grid ─── */
.man-tools{ display:grid; grid-template-columns:1fr 1fr; gap:0 40px }
@media (max-width:700px){ .man-tools{ grid-template-columns:1fr } }

/* ─── Theme integration ───
   The mock is a standalone file whose <main> is the grid child; inside the
   theme, header.php already owns <main id="main">, so the guide column is a
   plain div (.man-main) instead. Nothing else differs from manual.css. */
.man-main{ min-width:0 }

/* The mock carried these two as inline style attributes; they live here so
   the templates stay markup-only. */
.man-meta-row .man-dl-slot{ margin-left:auto; align-self:center }
.man-layers--inner{ max-width:400px }
