/* Plain book layout for the global temperature tutorial and the other
   application pages that opt in with body.book.
   Loaded after apps/style.css and scoped to body.book, so the other app
   pages keep their own look. No cards, no tints; the site's teal is kept
   for the titles only, solid rather than as a gradient. */

body.book {
  background: #ffffff;
  color: #1a1a1a;
}

body.book .example-detail {
  font-size: 1.02rem;
}

/* title block */
body.book .page-hero {
  background: none;
  border: none;
  border-bottom: 2px solid #0ea5a8;
  border-radius: 0;
  padding: 0 0 1.2rem 0;
  margin-bottom: 2rem;
}

body.book .page-hero .tile-eyebrow {
  color: #0ea5a8;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body.book .page-hero h1 {
  color: #0ea5a8;
  background: none;
  -webkit-text-fill-color: #0ea5a8;
  font-size: 2.2rem;
  font-weight: 800;
}

body.book .page-hero .lead-light {
  color: #333;
  font-size: 1.1rem;
}

/* sections: plain text with a numbered-chapter feel, no boxes */
body.book .example-card,
body.book .example-card[class*="accent-"] {
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin: 0 0 2.2rem 0;
}

body.book .example-card:hover {
  box-shadow: none;
}

body.book .example-card h2,
body.book .example-card[class*="accent-"] h2 {
  color: #0b7f82;
  font-size: 1.4rem;
  font-weight: 700;
  border-bottom: none;
  padding-bottom: 0;
  margin: 0 0 0.7rem 0;
}

body.book .example-card h3 {
  color: #1e293b;
  font-size: 1.08rem;
  font-weight: 600;
  margin: 1.4rem 0 0.4rem 0;
}

body.book .example-card p,
body.book .example-card ul,
body.book .example-card ol {
  color: #1a1a1a;
  line-height: 1.65;
}

body.book .example-card strong {
  color: #1a1a1a;
}

/* tables: three rules, as in print */
body.book .example-table {
  font-size: 0.97rem;
  border-top: 1.5px solid #1a1a1a;
  border-bottom: 1.5px solid #1a1a1a;
}

body.book .example-table thead {
  background: none;
  border-bottom: 1px solid #1a1a1a;
}

body.book .example-table th,
body.book .example-table td {
  border: none;
  padding: 0.4rem 0.8rem 0.4rem 0;
  vertical-align: top;
}

body.book .example-table tbody tr:hover {
  background: none;
}

/* code and output: monospace on light grey, a thin rule at the left */
body.book pre,
body.book pre.output {
  background: #f5f5f5;
  border: none;
  border-left: 2px solid #999;
  border-radius: 0;
}

body.book pre code {
  color: #1a1a1a;
}

body.book pre.output code {
  color: #444;
}

body.book code {
  background: none;
  color: #1a1a1a;
  padding: 0;
  border-radius: 0;
}

body.book .math-block {
  background: none;
  border: none;
  text-align: center;
}

body.book .back-link a {
  color: #555;
}

/* the site-wide light-page rules add a shadow under the title, a glow and
   drop shadow on code blocks, and a box around every code element */
body.book .page-hero {
  box-shadow: none;
  backdrop-filter: none;
}

body.book pre,
body.book pre.output {
  box-shadow: none;
  background-image: none;
}

body.book code,
body.book pre code {
  border: none;
}

body.book .code-cmt {
  color: #777;
}

body.book pre .copy-btn {
  border: 1px solid #ccc;
  background: #fff;
  color: #555;
}

/* ---- colour, in the site's palette: teal, with amber as a second accent.
   Still no cards or shadows; the colour sits in the headings, the rules,
   the code and the table headers. */

body.book .example-card h2::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 3px;
  margin-top: 0.4rem;
  background: #f59e0b;
}

body.book .example-card h3 {
  color: #0b7f82;
}

body.book .example-card li::marker {
  color: #0ea5a8;
}

body.book .example-card strong {
  color: #0f3d4a;
}

/* tables: teal rules and a lightly tinted header row */
body.book .example-table {
  border-top: 2px solid #0ea5a8;
  border-bottom: 2px solid #0ea5a8;
}

body.book .example-table thead {
  background: rgba(14,165,168,0.08);
  border-bottom: 1px solid #0ea5a8;
}

body.book .example-table th {
  color: #0b7f82;
  padding-left: 0.5rem;
}

body.book .example-table td {
  padding-left: 0.5rem;
}

body.book .example-table tbody tr + tr td {
  border-top: 1px solid #e5eef0;
}

/* inline code in the site's teal */
body.book code {
  color: #0d7f7a;
}

/* code: the site's own dark code panel; output: light, with a teal rule */
body.book pre {
  background: #0A2A36;
  border: none;
  border-radius: 0.5rem;
}

body.book pre code {
  color: #e5e7eb;
}

body.book pre .code-cmt {
  color: #8fb3bd;
}

body.book pre.output {
  background: #f3fafa;
  border: none;
  border-left: 3px solid #0ea5a8;
  border-radius: 0 0.4rem 0.4rem 0;
}

body.book pre.output code {
  color: #1f3b44;
}

body.book pre .copy-btn {
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: #d6e4e8;
}

body.book pre.output .copy-btn {
  border: 1px solid #c9dfe2;
  background: #ffffff;
  color: #4b6670;
}

body.book .math-block {
  color: #0f3d4a;
  overflow-x: auto;
}

/* only the code panel is coloured; output and table headers stay plain */
body.book pre.output {
  background: #f7f7f7;
  border-left: 2px solid #c8c8c8;
  border-radius: 0;
}

body.book pre.output code {
  color: #333;
}

body.book pre.output .copy-btn {
  border: 1px solid #d0d0d0;
  color: #666;
}

body.book .example-table thead {
  background: none;
}

/* list of the eight parts, above the title */
body.book .parts ol {
  list-style: none;
  margin: 0 0 1.6rem 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.4rem;
  font-size: 0.9rem;
}

body.book .parts li {
  color: #94a3b8;
}

body.book .parts li a {
  color: #0b7f82;
  text-decoration: none;
}

body.book .parts li a:hover {
  text-decoration: underline;
}

body.book .parts li.current {
  color: #0f3d4a;
  font-weight: 700;
}

body.book .parts .part-no {
  display: inline-block;
  min-width: 1.3rem;
  height: 1.3rem;
  line-height: 1.3rem;
  text-align: center;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid currentColor;
  margin-right: 0.15rem;
}

body.book .parts li.current .part-no {
  background: #0ea5a8;
  border-color: #0ea5a8;
  color: #ffffff;
}

/* link to the next part, at the bottom */
body.book .next-part {
  margin: 2.5rem 0 1rem 0;
  padding-top: 1rem;
  border-top: 2px solid #0ea5a8;
  font-size: 1.05rem;
  font-weight: 600;
  color: #0f3d4a;
}

body.book .next-part a {
  color: #0b7f82;
  text-decoration: none;
}

body.book .next-part .later {
  color: #94a3b8;
  font-weight: 400;
}

body.book .next-part p {
  margin: 0;
}

body.book .next-part .next-note {
  margin-top: 0.4rem;
  font-size: 0.98rem;
  font-weight: 400;
  color: #1a1a1a;
}

body.book .example-table .later {
  color: #94a3b8;
}

/* a worked computation, closed until clicked */
body.book details.working {
  margin: 0.6rem 0 1rem 0;
}

body.book details.working summary {
  cursor: pointer;
  color: #0b7f82;
  font-weight: 600;
}

body.book details.working[open] summary {
  margin-bottom: 0.5rem;
}
