/* bestofficedesks.com: base styles shared by every page.
   Identity: petrol ink, post-it yellow (highlight only, always with dark text), desk grey, paper white. */

@font-face {
  font-family: "Rethink Sans";
  src: url("../fonts/rethink-sans-var.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("../fonts/nunito-sans-var.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("../fonts/nunito-sans-var-italic.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: italic;
  font-display: swap;
}

:root {
  --petrol: #17414B;
  --petrol-deep: #0F2E36;
  --petrol-mid: #2A5A66;
  --petrol-soft: #E3EDEE;
  --yellow: #F7C948;
  --yellow-deep: #E3B230;
  --yellow-soft: #FCEFC0;
  --desk: #E4E7E2;
  --desk-line: #C6CCC4;
  --paper: #FBFBF8;
  --ink: #13313A;
  --muted: #475B60;
  --alert: #A3361F;
  --ok: #1E6B4A;

  --font-head: "Rethink Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Nunito Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1rem, 4vw, 2rem);
  --space: 1.5rem;
  --focus: var(--petrol);
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 1rem; }

body {
  margin: 0;
  background-color: var(--desk);
  /* faint dot grid, like a desk mat */
  background-image: radial-gradient(rgba(23, 65, 75, .11) 1.1px, transparent 1.3px);
  background-size: 20px 20px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
@media (min-width: 40em) { body { font-size: 1.125rem; } }

main { flex: 1 0 auto; padding-block: 1rem 3.5rem; }
main:focus { outline: none; }

img, svg { max-width: 100%; height: auto; }

::selection { background: var(--yellow); color: var(--petrol-deep); }

/* Headings */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--petrol-deep);
  line-height: 1.15;
  letter-spacing: -0.012em;
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.35rem + 2.7vw, 3.1rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); font-weight: 680; margin-top: 2em; }
h3 { font-size: 1.2rem; font-weight: 650; margin-top: 1.6em; line-height: 1.25; }
p { margin: 0 0 1.1em; }

a { color: var(--petrol); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--petrol-deep); text-decoration-thickness: .14em; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

strong { font-weight: 700; }

/* Layout */
.wrap { width: 100%; max-width: 74rem; margin-inline: auto; padding-inline: var(--gutter); }
.wrap--reading { max-width: 50rem; }
.wrap--article { max-width: 54rem; }

.skip-link {
  position: absolute; left: .75rem; top: -4rem; z-index: 100;
  background: var(--yellow); color: var(--petrol-deep); padding: .6rem 1rem; font-weight: 700; border-radius: 4px;
  text-decoration: none;
}
.skip-link:focus { top: .75rem; }

.visually-hidden, .sr-only {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--desk-line); }
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-block: .75rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--petrol-deep); }
.brand__name { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; }
.brand:hover .brand__name { text-decoration: underline; text-underline-offset: .2em; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: .25rem .5rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.site-nav a {
  display: inline-block; padding: .45rem .8rem; border-radius: 6px; text-decoration: none; color: var(--petrol-deep);
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
}
.site-nav a:hover { background: var(--petrol-soft); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--petrol); }
.site-nav .site-nav__cta { background: var(--yellow); }
.site-nav .site-nav__cta:hover { background: var(--yellow-deep); }

/* Breadcrumbs */
.crumbs { margin: .5rem 0 1.25rem; font-size: .95rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .15rem .5rem; list-style: none; margin: 0; padding: 0; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: .5rem; color: var(--desk-line); }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--ink); }

/* Icons (drawn once in the layout, used with <use>) */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.5rem; height: 1.5rem; flex: none; }

/* Buttons: a small solid edge underneath, like a stationery label */
.button {
  display: inline-block; background: var(--petrol); color: var(--paper); border: 2px solid var(--petrol);
  padding: .7rem 1.25rem; border-radius: 6px; font-family: var(--font-head); font-weight: 650; font-size: 1.05rem;
  line-height: 1.2; text-decoration: none; cursor: pointer;
  box-shadow: 0 3px 0 rgba(15, 46, 54, .5);
  transition: transform .09s ease, box-shadow .09s ease, background-color .09s ease;
}
.button:hover { background: var(--petrol-deep); border-color: var(--petrol-deep); color: var(--paper); transform: translateY(-1px); box-shadow: 0 4px 0 rgba(15, 46, 54, .5); }
.button:active { transform: translateY(3px); box-shadow: 0 0 0 rgba(15, 46, 54, 0); }
.button--yellow { background: var(--yellow); border-color: var(--yellow); color: var(--petrol-deep); }
.button--yellow:hover { background: var(--yellow-deep); border-color: var(--yellow-deep); color: var(--petrol-deep); }
.button--ghost { background: #fff; color: var(--petrol); box-shadow: 0 3px 0 rgba(23, 65, 75, .22); }
.button--ghost:hover { background: var(--petrol-soft); color: var(--petrol-deep); border-color: var(--petrol); box-shadow: 0 4px 0 rgba(23, 65, 75, .22); }
.button--ghost:active { box-shadow: 0 0 0 rgba(23, 65, 75, 0); }
.button--small { padding: .4rem .8rem; font-size: .95rem; }
.button[disabled], .button[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

/* Paper sheets: documents sit on the desk */
.doc, .article {
  background: var(--paper); border: 1px solid var(--desk-line); border-top: 5px solid var(--petrol); border-radius: 2px;
  padding: clamp(1.25rem, 4vw, 3rem);
  box-shadow: 0 1px 0 rgba(23, 65, 75, .06), 0 14px 26px -18px rgba(23, 65, 75, .4);
}
.doc__head { margin-bottom: 1.5rem; }
.doc__head h1 { margin-bottom: .35em; }
.doc__meta { color: var(--muted); font-size: .95rem; margin: 0; }
.doc__lead { font-size: 1.2rem; line-height: 1.55; }
.doc h2:first-of-type { margin-top: 1.75em; }
.doc ul, .doc ol, .prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1.2em; }
.doc li, .prose li { margin-bottom: .45em; padding-left: .2rem; }
.doc li::marker, .prose li::marker { color: var(--petrol-mid); }

/* Post-it notes: yellow carries meaning (summary, checklist), text is always dark */
.postit {
  position: relative; background: var(--yellow); color: var(--petrol-deep);
  padding: 1.05rem 1.35rem 1.2rem; margin: 1.75rem 0; border-radius: 2px;
  box-shadow: 0 12px 14px -12px rgba(15, 46, 54, .55);
  transform: rotate(-.35deg);
}
.postit::after {
  content: ""; position: absolute; right: 0; bottom: 0; width: 1.3rem; height: 1.3rem;
  background: linear-gradient(135deg, transparent 50%, rgba(15, 46, 54, .16) 50%);
}
.postit h2, .postit h3 { font-size: 1.05rem; margin: 0 0 .35rem; font-weight: 700; color: var(--petrol-deep); }
.postit p { margin: 0 0 .5em; }
.postit p:last-child { margin-bottom: 0; }
.postit a { color: var(--petrol-deep); font-weight: 650; }
.postit :focus-visible { outline-color: var(--petrol-deep); }
.postit--list { transform: rotate(.3deg); }
.checks { list-style: none; margin: .4rem 0 0; padding: 0; }
.checks li { position: relative; padding-left: 1.9rem; margin-bottom: .5em; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .32em; width: 1.05rem; height: 1.05rem;
  border: 2px solid var(--petrol-deep); border-radius: 2px; background: rgba(255, 255, 255, .55);
}

/* Notes and examples inside the text */
.note { border-left: 4px solid var(--petrol); background: var(--petrol-soft); padding: .8rem 1.1rem; margin: 1.5rem 0; border-radius: 0 4px 4px 0; }
.note p { margin: 0; }
.note--correction { background: var(--yellow-soft); border-left-color: var(--yellow-deep); }
.sheet-note {
  margin: 1.5rem 0; padding: 1rem 1.25rem 1rem 1.5rem; background: #fff; border: 1px solid var(--desk-line);
  border-left: 5px solid var(--petrol-mid); border-radius: 2px;
}
.sheet-note figcaption { font-family: var(--font-head); font-weight: 650; color: var(--petrol-deep); margin-bottom: .5rem; }
.sheet-note p { margin: 0 0 .55em; }
.sheet-note p:last-child { margin-bottom: 0; }
.sheet-note--script p { font-style: italic; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--desk-line); background: #fff; }
.table-wrap:focus-visible { outline-offset: 0; }
table { border-collapse: collapse; width: 100%; min-width: 32rem; font-size: .97rem; line-height: 1.5; }
caption { caption-side: top; text-align: left; font-family: var(--font-head); font-weight: 650; padding: .75rem 1rem .6rem; color: var(--petrol-deep); }
th, td { text-align: left; vertical-align: top; padding: .65rem 1rem; border-top: 1px solid var(--desk-line); }
thead th { background: var(--petrol); color: var(--paper); border-top: 0; font-family: var(--font-head); font-weight: 600; }
tbody th { font-weight: 700; color: var(--petrol-deep); background: #F3F5F1; }

/* Agenda-style lists: each row is a ruled line, reading time on the right like minutes on an agenda */
.agenda-list { list-style: none; margin: 1.5rem 0; padding: 0; background: var(--paper); border: 1px solid var(--desk-line); }
.agenda-list li { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1.25rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--desk-line); }
.agenda-list li:last-child { border-bottom: 0; }
.agenda-list li[hidden] { display: none; }
.agenda-list__title { grid-column: 1; font-family: var(--font-head); font-weight: 650; font-size: 1.15rem; line-height: 1.3; color: var(--petrol-deep); }
.agenda-list p { grid-column: 1; margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.5; }
.agenda-list__time { grid-column: 2; grid-row: 1; color: var(--muted); font-size: .9rem; white-space: nowrap; align-self: start; padding-top: .2rem; }
@media (max-width: 34em) {
  .agenda-list li { grid-template-columns: 1fr; }
  .agenda-list__time { grid-column: 1; grid-row: auto; padding: 0; }
}

/* Explorer rows carry the icon of their topic */
.agenda-list--explorer li { grid-template-columns: auto 1fr auto; column-gap: 1rem; }
.agenda-list__icon { grid-column: 1; grid-row: 1 / span 2; display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 10px; background: var(--petrol-soft); color: var(--petrol); align-self: start; }
.agenda-list--explorer .agenda-list__title, .agenda-list--explorer p { grid-column: 2; }
.agenda-list--explorer .agenda-list__time { grid-column: 3; }
@media (max-width: 34em) {
  .agenda-list--explorer li { grid-template-columns: auto 1fr; }
  .agenda-list--explorer .agenda-list__time { grid-column: 2; grid-row: auto; }
}

/* Topic page */
.topic-head { margin-bottom: 1.5rem; }
.topic-head__row { display: flex; align-items: center; gap: 1.1rem; margin-bottom: 1.2rem; }
.topic-head__row h1 { margin: 0; }
.topic-head__icon { display: inline-grid; place-items: center; width: 3.8rem; height: 3.8rem; flex: none; border-radius: 14px; background: var(--petrol); color: var(--yellow); box-shadow: 0 4px 0 rgba(15, 46, 54, .35); }
.topic-head__icon .icon { width: 2rem; height: 2rem; }
.topic-head__text { max-width: 44rem; }
.postit--start { max-width: 34rem; }
.topic-switch ul { display: flex; flex-wrap: wrap; gap: .5rem .75rem; list-style: none; margin: 0; padding: 0; }
.topic-switch a { display: inline-block; padding: .4rem .9rem; border: 2px solid var(--petrol); border-radius: 999px; text-decoration: none; font-family: var(--font-head); font-weight: 600; font-size: 1rem; }
.topic-switch a:hover { background: var(--petrol-soft); }

.notfound { padding-block: 2rem; }
.plain-list { padding-left: 1.2rem; }

/* Clipboard: a petrol board with a steel clip. Used on the home page and around the editor. */
.clipboard { position: relative; background: var(--petrol); border-radius: 12px; padding: 1.1rem 1.1rem 1.25rem; box-shadow: 0 22px 30px -20px rgba(15, 46, 54, .65); width: 100%; }
.clipboard__clip {
  position: absolute; z-index: 2; left: 50%; top: -.9rem; width: 7.2rem; height: 2.7rem; transform: translateX(-50%);
  background: linear-gradient(180deg, #D5DBDD 0%, #A9B3B7 55%, #C3CBCD 100%); border-radius: 7px 7px 10px 10px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .8);
}
.clipboard__clip::before { content: ""; position: absolute; left: 50%; top: .55rem; width: 3.3rem; height: .55rem; transform: translateX(-50%); background: #58666B; border-radius: 4px; }
.clipboard__clip::after { content: ""; position: absolute; left: 50%; bottom: .45rem; width: 5.2rem; height: .35rem; transform: translateX(-50%); background: rgba(70, 85, 90, .35); border-radius: 3px; }
.clipboard__sheet { background: var(--paper); border-radius: 3px; padding: 2.4rem 1.4rem 1.4rem; min-height: 100%; }

/* Choice chips: a radio button that looks like a pill (topic filter, document choice) */
.chips { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; min-width: 0; }
.chips legend { font-family: var(--font-head); font-weight: 650; color: var(--petrol-deep); padding: 0; margin-bottom: .5rem; float: left; width: 100%; }
.chip { position: relative; display: inline-block; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span {
  display: inline-block; padding: .4rem .95rem; border: 2px solid var(--petrol); border-radius: 999px;
  font-family: var(--font-head); font-weight: 600; font-size: .98rem; color: var(--petrol); background: #fff;
}
.chip input:checked + span { background: var(--petrol); color: var(--paper); }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
.chip:hover span { background: var(--petrol-soft); }
.chip input:checked + span:hover, .chip:hover input:checked + span { background: var(--petrol-deep); }

/* Footer */
.site-footer { background: var(--petrol); color: var(--paper); padding-block: 2.5rem 1.5rem; margin-top: auto; }
.site-footer a { color: var(--paper); }
.site-footer a:hover { color: var(--yellow); }
.site-footer :focus-visible { outline-color: var(--yellow); }
.site-footer__grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.site-footer h2 { font-size: 1rem; color: var(--yellow); margin: 0 0 .7rem; letter-spacing: 0; font-weight: 650; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .4rem; font-size: 1rem; }
.site-footer__brand { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; margin: 0 0 .5rem; }
.site-footer__about p { max-width: 22rem; margin: 0; font-size: 1rem; line-height: 1.5; }
.site-footer__base { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid rgba(251, 251, 248, .25); font-size: .95rem; }
.site-footer__base p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  body { background: #fff; color: #000; display: block; }
  .site-header, .site-footer, .skip-link, .try-editor, .related, .crumbs, .toc { display: none !important; }
  .doc, .article { box-shadow: none; border: 0; padding: 0; background: #fff; }
  .postit { transform: none; box-shadow: none; border: 1px solid #000; background: #fff; }
  .postit::after { display: none; }
  a { color: #000; }
  .sources a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; word-break: break-all; }
}
