/* Office Assistant documents (/office-assistant/ and /office-assistant/guide/).
   Self-contained: these pages don't load the site's style.css or theme.js.
   A plain, printable document in the manner of the capability statement:
   one type scale, hairline rules, numbered sections, and the accent used sparingly. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/poppins-500-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/poppins-600-latin.woff2") format("woff2");
}

:root {
  --paper: #ffffff;
  --ink: #1f2328;
  --ink-soft: #464c53;
  --muted: #6b7178;
  --rule: #e2e5e9;
  --wash: #f4f6f7;
  --accent: #369369;
  --accent-text: #2b7a56;

  /* One content column: every text block, table, card grid and the masthead
     share this width, so the left and right edges line up. */
  --measure: 42rem;
  --gutter: clamp(1rem, 5vw, 3.5rem);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Poppins", var(--sans);
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  /* One scale, about 1.25 apart */
  --step--2: 0.75rem;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-4: clamp(2rem, 1.4rem + 2.6vw, 2.75rem);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111315;
    --ink: #eceef0;
    --ink-soft: #c3c8cd;
    --muted: #8d949c;
    --rule: #2a2e33;
    --wash: #1a1d20;
    --accent: #4ab87e;
    --accent-text: #4ab87e;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.sheet {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3.5rem) var(--gutter) 2.5rem;
}

a {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

strong {
  color: var(--ink);
  font-weight: 600;
}

code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--wash);
  padding: 0.08em 0.32em;
  border-radius: 3px;
  overflow-wrap: anywhere;
}

/* Masthead: the mark and wordmark, and what this document is */

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 7vw, 4.5rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.mark {
  width: 2.25rem;
  height: auto;
  fill: var(--accent);
  flex: none;
}

.kicker {
  margin: 0;
  text-align: right;
  color: var(--muted);
  font-size: var(--step--2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.5;
}

.kicker span {
  display: block;
  letter-spacing: 0;
  text-transform: none;
}

/* Title block */

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
}

h1 {
  font-size: var(--step-4);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 1rem;
  text-wrap: balance;
}

.lead {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 0 2.5rem;
}

/* Contents: one quiet line of numbered links */

.toc {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 0.85rem 0;
  font-size: var(--step--1);
}

.toc ol {
  list-style: none;
  counter-reset: toc;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.4rem;
  margin: 0;
  padding: 0;
}

.toc li {
  counter-increment: toc;
}

.toc li::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--mono);
  font-size: var(--step--2);
  color: var(--accent-text);
  margin-right: 0.45rem;
}

.toc a {
  color: var(--ink-soft);
  text-decoration: none;
}

.toc a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* Sections: a mono number, the heading, then a hairline to the margin */

section {
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  scroll-margin-top: 1.5rem;
}

h2 {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-size: var(--step-2);
  line-height: 1.25;
  margin: 0 0 1.25rem;
}

h2 .num {
  font-family: var(--mono);
  font-size: var(--step--1);
  font-weight: 400;
  color: var(--accent-text);
}

h2::after {
  content: "";
  flex: 1;
  min-width: 1.5rem;
  border-top: 1px solid var(--rule);
  align-self: center;
}

p {
  margin: 0 0 1rem;
}

/* A label over a list, such as "On the roadmap" */
p.label {
  margin: 1.5rem 0 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
  font-size: var(--step--2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

p.label strong {
  font-weight: 500;
  color: var(--muted);
}

/* Lists: small accent triangles, and mono step numbers */

ul,
ol {
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.55rem;
}

ul > li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.6em;
  width: 0.5rem;
  height: 0.45rem;
  background: var(--accent);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

ol {
  counter-reset: step;
}

ol > li {
  counter-increment: step;
}

ol > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.12em;
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--accent-text);
}

/* Tables: ruled rows, the first column as the row's label */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5rem;
  font-size: var(--step--1);
  line-height: 1.5;
}

thead th {
  text-align: left;
  font-family: var(--sans);
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 1rem 0.5rem 0;
  border-bottom: 1px solid var(--ink);
}

tbody th,
tbody td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 1rem 0.75rem 0;
  border-bottom: 1px solid var(--rule);
}

tbody th {
  color: var(--ink);
  font-weight: 600;
  width: 34%;
}

tbody th code {
  white-space: nowrap;
  overflow-wrap: normal;
}

table.cols-3 tbody th {
  width: 26%;
}

table.cols-3 td:nth-child(2) {
  width: 24%;
}

/* Task cards (the guide) */

.tasks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 0.75rem;
}

.task {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 1rem 1.15rem 0.6rem;
  scroll-margin-top: 1.5rem;
}

.task h3 {
  font-size: var(--step-0);
  line-height: 1.35;
  margin: 0 0 0.45rem;
}

.task p {
  font-size: var(--step--1);
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.task p.how {
  color: var(--ink-soft);
}

.how > strong:first-child {
  font-family: var(--mono);
  font-size: var(--step--2);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-right: 0.2rem;
}

.placeholder {
  border: 1px dashed var(--rule);
  border-radius: 4px;
  padding: 0.45rem 0.65rem;
  margin: 0.25rem 0 0.6rem;
  font-size: var(--step--2);
  color: var(--muted);
}

.placeholder strong {
  color: var(--muted);
}

.note {
  border-left: 3px solid var(--accent);
  padding: 0.25rem 0 0.25rem 1rem;
  margin: 0 0 1.25rem;
}

/* Screenshot row: thumbnails that open the full image */

.shots {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.85rem;
}

.shots figure {
  margin: 0;
}

.shots a {
  display: block;
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  line-height: 0;
}

.shots a:hover {
  border-color: var(--accent);
}

.shots img {
  display: block;
  width: 100%;
  height: auto;
}

.shots figcaption {
  margin-top: 0.45rem;
  font-size: var(--step--2);
  line-height: 1.4;
  color: var(--muted);
}

/* Footer: one quiet line, like the capability statement's */

.colophon {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: var(--step--2);
  color: var(--muted);
}

.colophon p {
  margin: 0;
}

.colophon a {
  color: var(--muted);
  text-decoration: none;
}

/* Narrow screens */

@media (max-width: 40rem) {
  .shots {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem 0.6rem;
  }

  .kicker {
    font-size: 0.6875rem;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  table,
  tbody,
  tr,
  tbody th,
  tbody td {
    display: block;
    width: auto !important;
  }

  tbody tr {
    border-top: 1px solid var(--rule);
    padding: 0.7rem 0;
  }

  tbody tr:last-child {
    border-bottom: 1px solid var(--rule);
  }

  tbody th,
  tbody td {
    border: 0;
    padding: 0 0 0.2rem;
  }

  tbody th code {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* Print and PDF: light, A4, no screen-only controls */

@page {
  size: A4;
  /* Wide side margins set the printed measure (158 mm on A4) */
  margin: 16mm 26mm 18mm;

  @bottom-left {
    content: "Tessellant  \00b7  Office Assistant";
    font-family: "Inter", sans-serif;
    font-size: 7.5pt;
    color: #6b7178;
  }

  @bottom-right {
    content: counter(page) " / " counter(pages);
    font-family: "Inter", sans-serif;
    font-size: 7.5pt;
    color: #6b7178;
  }
}

@media print {
  :root {
    --paper: #ffffff;
    --ink: #1f2328;
    --ink-soft: #3d434a;
    --muted: #61676e;
    --rule: #dcdfe3;
    --wash: #f2f4f5;
    --accent: #369369;
    --accent-text: #2b7a56;
    color-scheme: light;
  }

  html {
    font-size: 9pt;
  }

  tbody th,
  tbody td {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }

  body {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .sheet {
    max-width: none;
    padding: 0;
  }

  .masthead {
    margin-bottom: 2.25rem;
  }

  .toc,
  .placeholder {
    display: none;
  }

  section {
    margin-top: 1.5rem;
  }

  h2,
  h3,
  h2 + p,
  p.label {
    break-after: avoid;
  }

  /* Sections built around numbered steps stay on one sheet */
  section:has(> ol) {
    break-inside: avoid;
  }

  table,
  ol,
  p.label + ul,
  h2 + p,
  tr,
  .task,
  .shots figure,
  li {
    break-inside: avoid;
  }

  .tasks {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }

  .shots {
    grid-template-columns: repeat(6, 1fr);
  }

  main a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: var(--muted);
    overflow-wrap: anywhere;
  }

  main a[href^="mailto"],
  main a[href^="#"],
  .toc a,
  .shots a {
    text-decoration: none;
  }

  .colophon {
    flex-wrap: nowrap;
    margin-top: 1rem;
    break-before: avoid;
    break-inside: avoid;
  }
}
