/* ============================================================
   iOi · Monday.com Guide — tutorial stylesheet
   NEUTRAL / PLAIN. Optimised for legibility and focus on
   content. Brand styling to be added later.
   ============================================================ */

:root {
  --bg:        #ffffff;
  --surface:   #ffffff;
  --ink:       #1a1a1a;
  --ink-soft:  #3d3d3d;
  --muted:     #767676;
  --line:      #dcdcdc;
  --line-soft: #ececec;
  --link:      #1a5fb4;
  --radius:    6px;
  --maxw:      760px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 24px;
}
.topbar__title { font-weight: 600; font-size: .95rem; color: var(--ink-soft); }

/* ---------- hero ---------- */
.hero { max-width: var(--maxw); margin: 0 auto; padding: 48px 24px 8px; }
.hero h1 { font-size: 2.1rem; margin: 0 0 14px; font-weight: 700; }
.hero p.lede { font-size: 1.12rem; color: var(--ink-soft); margin: 0; max-width: 60ch; }
.eyebrow {
  display: block; font-size: .78rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 12px;
}

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

/* table of contents */
.toc {
  background: #fafafa; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 24px; margin: 32px 0 44px;
}
.toc h2 {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); margin: 0 0 12px; font-weight: 700;
}
.toc ol { margin: 0; padding-left: 1.3em; columns: 2; column-gap: 32px; }
.toc li { margin: 6px 0; }
.toc a { color: var(--link); text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* sections */
section { margin: 0 0 48px; scroll-margin-top: 72px; }
section > h2 {
  font-size: 1.5rem; margin: 0 0 10px; font-weight: 700;
  padding-bottom: 8px; border-bottom: 1px solid var(--line-soft);
}
section > h2 .num { color: var(--muted); font-weight: 700; margin-right: 6px; }
section h3 { font-size: 1.12rem; margin: 26px 0 6px; font-weight: 600; }
p { color: var(--ink-soft); }
ul { color: var(--ink-soft); padding-left: 1.3em; }
ul li { margin: 6px 0; }
a { color: var(--link); }
section strong { color: var(--ink); font-weight: 600; }

/* callout */
.callout {
  border: 1px solid var(--line); border-left: 4px solid var(--muted);
  background: #fafafa; border-radius: var(--radius);
  padding: 14px 18px; margin: 18px 0; color: var(--ink-soft); font-size: .97rem;
}
.callout strong { color: var(--ink); }

/* feature cards / workspace list */
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); margin: 18px 0; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px;
}
.card h4 { margin: 0 0 4px; font-size: .98rem; font-weight: 600; }
.card p { margin: 0; font-size: .9rem; }
.card .tag {
  display: inline-block; font-size: .72rem; font-weight: 600;
  color: var(--muted); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1px 8px; margin-bottom: 8px;
}

/* steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 18px 0; }
.steps li {
  position: relative; padding: 2px 0 16px 40px; margin: 0 0 0 12px;
  border-left: 1px solid var(--line);
}
.steps li:last-child { border-left-color: transparent; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: -14px; top: 0;
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff; border: 1px solid var(--line); color: var(--ink-soft);
  font-weight: 600; font-size: .85rem; display: grid; place-items: center;
}
.steps li strong { color: var(--ink); }

/* ---------- figure / screenshot placeholder ---------- */
figure.shot { margin: 22px 0; }
figure.shot .frame {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--surface);
}
figure.shot img { display: block; width: 100%; height: auto; }
figure.shot.is-missing .frame::before {
  content: "Screenshot: " attr(data-label);
  display: flex; align-items: center; justify-content: center;
  min-height: 200px; padding: 28px;
  color: var(--muted); font-size: .92rem; font-weight: 600; text-align: center;
  background: #f4f4f4;
}
figure.shot.is-missing .frame::after {
  content: "awaiting " attr(data-file);
  position: absolute; bottom: 10px; left: 0; right: 0; text-align: center;
  font-size: .74rem; color: var(--muted); font-family: ui-monospace, Menlo, monospace;
}
figure.shot.is-missing img { display: none; }
figcaption { margin-top: 8px; font-size: .85rem; color: var(--muted); text-align: center; }

/* ---------- board mockup ---------- */
.board {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--surface); margin: 20px 0; font-size: .92rem;
}
.board__group { font-weight: 600; padding: 10px 16px; background: #f0f0f0; color: var(--ink); border-bottom: 1px solid var(--line); }
.board table { width: 100%; border-collapse: collapse; }
.board th {
  text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); font-weight: 600; padding: 8px 16px;
  border-bottom: 1px solid var(--line); background: #fafafa;
}
.board td { padding: 10px 16px; border-bottom: 1px solid var(--line-soft); color: var(--ink-soft); }
.board tr:last-child td { border-bottom: none; }
.pill {
  display: inline-block; font-weight: 600; font-size: .78rem;
  padding: 2px 10px; border-radius: var(--radius);
  border: 1px solid var(--line); color: var(--ink-soft); background: #f4f4f4;
}
.owner {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: #e8e8e8; color: var(--ink-soft); font-size: .72rem; font-weight: 600;
}
.anno { font-size: .84rem; color: var(--muted); margin-top: 8px; }
.anno code {
  font-family: ui-monospace, Menlo, monospace; background: #f0f0f0;
  padding: 1px 6px; border-radius: 4px; color: var(--ink);
}

/* footer */
.foot {
  border-top: 1px solid var(--line); padding: 24px; text-align: center;
  color: var(--muted); font-size: .85rem;
}

@media (max-width: 600px) {
  .toc ol { columns: 1; }
}

/* ---------- print / PDF ---------- */
@media print {
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  html { scroll-padding-top: 0; }
  body { font-size: 11pt; }
  .topbar { position: static; }
  .hero { padding-top: 12px; }
  .wrap { padding-bottom: 0; }
  a { color: var(--ink); }
  section { margin-bottom: 28px; }
  section > h2 { break-after: avoid; }
  h3 { break-after: avoid; }
  figure.shot, .board, .card, .callout, .steps li { break-inside: avoid; }
  .toc { break-inside: avoid; }
  @page { margin: 16mm 14mm; }
}

/* ---------- landing page (root) ---------- */
.guide-grid {
  display: grid; gap: 16px; margin: 8px 0 0;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.guide-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; transition: border-color .15s, background .15s;
}
.guide-card:hover { border-color: var(--muted); background: #fafafa; }
.guide-icon { width: 44px; height: 44px; object-fit: contain; display: block; margin: 0 0 14px; }
.guide-card h3 { margin: 0 0 6px; font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.guide-card p { margin: 0 0 12px; font-size: .94rem; color: var(--ink-soft); }
.guide-card .go { font-size: .85rem; font-weight: 600; color: var(--link); }
.guide-card .go::after { content: " →"; }

/* divider for internal / work-in-progress section */
.divider {
  display: flex; align-items: center; gap: 16px; margin: 48px 0 22px;
  color: var(--muted); font-size: .76rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.guide-card--internal { border-style: dashed; }
.guide-card--internal .icon-dots {
  display: block; width: 44px; height: 44px; margin: 0 0 14px;
  border: 1px dashed var(--muted); border-radius: var(--radius);
  position: relative;
}
.guide-card--internal .icon-dots::before {
  content: "···"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 1.4rem; color: var(--muted); letter-spacing: 2px; line-height: 1;
}
