/* portfolio.css
   Custom stylesheet for DITA-OT HTML5 output (Getting Started with Your Managed Mac).
   Loads after commonltr.css. Selectors pair an element with a class so they
   outrank the single-class rules in commonltr.css regardless of load order.
   To change the look, edit the variables in :root. The accent color matches the
   default Material theme used by the portfolio site. */

:root {
  --bg: #ffffff;
  --surface: #f6f7fb;
  --text: #1f2430;
  --muted: #566070;
  --border: #dfe3ec;
  --accent: #3f51b5;
  --accent-soft: #e8eaf6;
  --on-accent: #ffffff;
  --tip: #1b7f4b;
  --tip-bg: #e9f6ef;
  --info: #3f51b5;
  --info-bg: #eef0fb;
  --warn: #c2410c;
  --warn-bg: #fff3e8;
  --radius: 10px;
}

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

body {
  margin: 0 auto;
  max-width: 46rem;
  padding: 2.5rem 1.25rem 4rem;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--accent); text-underline-offset: 0.15em; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

h1.topictitle1 {
  margin: 0 0 0.6rem;
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

p.shortdesc {
  margin: 0 0 1.75rem;
  font-size: 1.1rem;
  color: var(--muted);
}

section.section { margin: 1.5rem 0; }

h2.sectiontitle {
  margin: 2rem 0 0.5rem;
  font-size: 1.25rem;
  line-height: 1.3;
}

p.p { margin: 0.75rem 0; }

ul.ul, ol.ol { padding-left: 1.4rem; }
li.li { margin: 0.3rem 0; }

code.codeph {
  padding: 0.1em 0.4em;
  border-radius: 5px;
  background: var(--accent-soft);
  font: 0.9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

span.uicontrol { font-weight: 600; }

/* ---------- Generated labels for unlabeled task sections ---------- */
section.prereq::before,
section.result::before,
section.remedy::before {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
}
section.prereq::before { content: "Before you begin"; }
section.result::before { content: "Result"; }
section.remedy::before { content: "Try this"; }

section.prereq,
section.result {
  padding: 0.9rem 1.1rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--accent-soft);
}
section.prereq p.p,
section.result p.p { margin: 0; }

/* ---------- Steps ---------- */
ol.steps {
  margin: 1.25rem 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

ol.steps > li.step {
  position: relative;
  margin: 0.75rem 0;
  padding: 0.9rem 1rem 0.9rem 3.5rem;
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

ol.steps > li.step::before {
  content: counter(step);
  position: absolute;
  top: 0.85rem;
  left: 1rem;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
}

span.cmd { display: block; font-weight: 600; }

div.itemgroup.info {
  margin-top: 0.4rem;
  font-size: 0.95rem;
  color: var(--muted);
}

ol.substeps {
  margin: 0.75rem 0 0;
  padding-left: 1.4rem;
  list-style: lower-alpha;
}

ol.substeps > li.substep { margin: 0.4rem 0; }
ol.substeps > li.substep > span.cmd { display: inline; font-weight: 400; }
ol.substeps > li.substep > div.itemgroup.info { margin-top: 0.15rem; }

/* ---------- Notes ---------- */
div.note {
  margin: 1.25rem 0;
  padding: 0.8rem 1rem;
  border-left: 4px solid var(--info);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--info-bg);
}
div.note span.note__title {
  display: block;
  margin-bottom: 0.1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
div.note div.note__body { display: block; }
div.note_tip { border-left-color: var(--tip); background: var(--tip-bg); }
div.note_warning,
div.note_important,
div.note_caution { border-left-color: var(--warn); background: var(--warn-bg); }

/* ---------- Examples ---------- */
section.example {
  margin: 1.5rem 0;
  padding: 0.2rem 1.1rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
section.example h2.sectiontitle { font-size: 1.05rem; margin-top: 0.9rem; }

/* ---------- Troubleshooting cards ---------- */
div.troubleSolution {
  margin: 1.5rem 0;
  padding: 1.25rem 1.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
div.troubleSolution section.cause { margin: 0 0 1rem; }
div.troubleSolution section.cause h2.sectiontitle { margin: 0 0 0.35rem; font-size: 1.2rem; }
div.troubleSolution section.cause p.p { margin: 0; color: var(--muted); }
div.troubleSolution section.remedy { margin: 0; }
div.troubleSolution section.remedy > section { margin: 0; }
div.troubleSolution ol.steps { margin-top: 0.5rem; }

/* ---------- Table of contents page (index.html) ---------- */
ul.map {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
}

ul.map > li.topichead {
  padding: 1rem 1.25rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
}

ul.map li.topichead > ul {
  margin: 0.6rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

ul.map li.topicref > a {
  display: block;
  padding: 0.5rem 0.7rem;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
}
ul.map li.topicref > a::after { content: "\2192"; float: right; color: var(--muted); }
ul.map li.topicref > a:hover { background: var(--accent-soft); color: var(--accent); }

/* ---------- Small screens and print ---------- */
@media (max-width: 480px) {
  body { padding: 1.5rem 1rem 3rem; font-size: 16px; }
  h1.topictitle1 { font-size: 1.65rem; }
  ol.steps > li.step { padding-left: 3.1rem; }
  ol.steps > li.step::before { left: 0.8rem; }
}

@media print {
  body { max-width: none; padding: 0; font-size: 11pt; color: #000; background: #fff; }
  ol.steps > li.step, div.troubleSolution { break-inside: avoid; }
}
