:root {
  --paper-stock: url('/assets/notebook/materials/paper-stock.webp');
  --graphite-rule: url('/assets/notebook/materials/graphite-rule.svg');
  --torn-sheet: url('/assets/notebook/materials/torn-sheet.svg');
  --paper-shadow: 0 2px 2px #614b3745;
  --binding-gutter: 42px;
}

:root, :root[data-theme=light] {
  --bg: #f6eee3;
  --surface: #fff8ee;
  --soft: #dde3f4;
  --ink: #302e32;
  --muted: #60574f;
  --accent: #40558f;
  --accent-hover: #314577;
  --border: #cabdac;
  --grid: #806d5513;
}

:root[data-theme=dark] {
  --paper-stock: none;
  --paper-shadow: 0 2px 3px #10101680;
}

body {
  margin-left: 0 !important;
  padding-left: var(--binding-gutter);
  border-left: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    var(--paper-stock) !important;
  background-size: 24px 24px, 24px 24px, 420px 420px !important;
  background-position: 8px 0, 8px 0, 0 0 !important;
}

body::before {
  left: 0;
  width: 142px;
  min-height: 0;
  height: 100%;
  background: url('/assets/notebook/materials/binding-paper.webp') -5px -14px / 142px auto repeat-y;
  mask-image: linear-gradient(90deg, #000 25%, transparent 49%);
}

body::after { content: none; }
[data-theme=dark] body::before { opacity: .48; filter: grayscale(.55) brightness(.62); }
html[lang="ar"] body, .article-card[lang="ar"] {
  font-family: 'Noto Sans Arabic', Arial, sans-serif;
}

.nb-header::after, .site-header::after, .nb-section::before,
.library-toolbar::after, .catalogue-header::after {
  background-image: var(--graphite-rule);
  opacity: .83;
}

.nb-header nav a[aria-current]::after, .site-nav a[aria-current]::after {
  inset: -4px -13px;
  border: none;
  border-radius: 0;
  transform: none;
  background: url('/assets/notebook/materials/pencil-ring.svg') center / 100% 100% no-repeat;
}

.nb-script { display: inline-block; padding: 2px .6em 4px; }
.nb-section-head > .nb-script {
  background: url('/assets/notebook/materials/pencil-ring.svg') center / 100% 100% no-repeat;
}

.nb-scene::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 11% 1% -5% 2%;
  background: url('/assets/notebook/materials/graphite-ground.svg') center bottom / 100% 90% no-repeat;
  opacity: .62;
}

.nb-scene .annotation { font-weight: 500; }
.library-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.07fr) minmax(0, .93fr);
  grid-template-rows: auto auto 1fr;
  column-gap: 24px;
  align-items: start;
  padding: 23px 4px 16px;
  min-height: 0;
}
.library-intro .eyebrow {
  font: 650 22px/1.1 NotebookHand, cursive !important;
  letter-spacing: .01em;
  color: var(--accent);
  margin: 9px 0 9px;
}
.library-intro h1 {
  font-family: var(--font);
  font-size: clamp(33px, 4.35vw, 61px);
  text-wrap: initial;
  line-height: 1.055;
  max-width: 16ch;
  padding-block-end: 6px;
  background: var(--graphite-rule) left bottom / 77% 7px no-repeat;
}
.library-intro p:not(.eyebrow) {
  margin: 13px 0 0;
  max-width: 50ch;
  font-size: clamp(14px, 1.35vw, 17px);
}
.nb-library-art {
  position: relative;
  width: 100%;
  height: auto;
  top: auto;
  right: auto;
  margin: 0;
  grid-column: 2;
  grid-row: 1 / 4;
  align-self: center;
}
.nb-library-art img { width: 100%; max-height: 240px; height: auto; object-fit: contain; }

.nb-topic-strip {
  margin: 0 0 20px;
  padding: 9px 5px 14px;
  gap: 0;
  background-image: var(--graphite-rule);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.nb-topic-strip a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  flex: 1 0 auto;
  position: relative;
  isolation: isolate;
  padding: 5px clamp(9px, 1.12vw, 18px);
  border: 0;
  transform: none;
}
.nb-topic-strip a + a::before {
  content: '';
  position: absolute;
  width: 1px;
  height: 19px;
  top: 11px;
  left: 0;
  background: var(--border);
  transform: rotate(.7deg);
}
.nb-topic-strip a span { margin: 0; color: var(--muted); font: 500 11px/1 var(--font); }
.nb-topic-strip a[aria-current] { color: var(--accent); background: transparent; font-size: 20px; }
.nb-topic-strip a[aria-current]::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 3px 4px;
  background: var(--soft) var(--paper-stock) center / 250px;
  background-blend-mode: multiply;
  mask: url('/assets/notebook/materials/ink-wash.svg') center / 100% 100%;
  transform: rotate(-.8deg);
}
.nb-topic-strip a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 5px; }

.nb-catalogue {
  grid-template-columns: minmax(190px, 220px) minmax(0, 1fr);
  gap: clamp(18px, 2.2vw, 32px);
}
.nb-catalogue > section { min-width: 0; }
.library-toolbar.nb-catalogue-controls {
  grid-template-columns: minmax(130px, 1.55fr) minmax(120px, 1.15fr) minmax(108px, .8fr) minmax(120px, 1fr);
  gap: 9px;
  margin: 0 0 9px;
  padding: 0;
}
.library-toolbar.nb-catalogue-controls::after { content: none; }
.nb-catalogue-controls .control { min-width: 0; }
.nb-catalogue-controls .control input, .nb-catalogue-controls .control select {
  min-height: 42px;
  border-radius: 5px 7px 4px 6px;
  border-color: #9b8f80;
  background-color: var(--surface);
  font-size: 13px;
}
.nb-catalogue-controls .search-control { grid-column: auto; }
.nb-catalogue-controls .search-control input { padding-inline-end: 35px; }
.nb-catalogue .search-status { margin-block: 4px 12px; font-size: 13px; }
.nb-catalogue .topic-sidebar { padding: 24px 17px 20px; top: auto; }
.topic-sidebar h2 {
  width: max-content;
  max-width: 100%;
  padding-bottom: 7px;
  margin-bottom: 10px;
  background: var(--graphite-rule) bottom / 100% 7px no-repeat;
}
.topic-sidebar a { margin-inline-start: 0; }
.topic-sidebar a span { font-variant-numeric: tabular-nums; }
.topic-sidebar .sidebar-path { margin-top: 9px; }

.article-card, .nb-catalogue .featured, .topic-sidebar, .nb-project, .nb-note, .nb-experience {
  content-visibility: visible;
  filter: drop-shadow(var(--paper-shadow));
  isolation: isolate;
}
.article-card::before, .topic-sidebar::before, .nb-project::before,
.service-card::before, .nb-experience::before, .nb-note::before, .contact-link-card::before,
.nb-catalogue .featured::before {
  background:
    linear-gradient(132deg, #fffcf4a8, #fffbf27d 65%, #ead9c02b),
    var(--paper-stock) center / 420px;
  background-color: var(--surface);
  clip-path: none;
  filter: none;
  mask: var(--torn-sheet) center / 100% 100%;
}
[data-theme=dark] :is(.article-card,.topic-sidebar,.nb-project,.service-card,.nb-experience,.nb-note,.contact-link-card,.nb-catalogue .featured)::before {
  background: var(--surface);
}
.article-card:nth-child(2n), .nb-project:nth-child(2n), .nb-note:nth-child(2n) {
  --torn-sheet: url('/assets/notebook/materials/torn-sheet-alt.svg');
}
.nb-catalogue .topic-sidebar::before { inset-inline-start: 6px; z-index: -2; }
.nb-catalogue .topic-sidebar nav::before {
  content: '';
  position: absolute;
  inset: 8px auto 7px -1px;
  z-index: -1;
  width: 42px;
  background: url('/assets/notebook/materials/binding-paper.webp') -3px 0 / 42px auto repeat-y;
  mask-image: linear-gradient(90deg, #000 27%, transparent 58%);
  pointer-events: none;
}
[data-theme=dark] .nb-catalogue .topic-sidebar nav::before { opacity: .38; filter: grayscale(.6) brightness(.6); }

.nb-catalogue .featured {
  position: relative;
  margin: 9px 0 24px;
  padding: 12px 12px 13px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  overflow: visible;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
}
.nb-catalogue .featured::before { content: ''; position: absolute; pointer-events: none; }
.nb-catalogue .featured::before { inset: 0; z-index: -1; }
.nb-catalogue .featured-copy { padding: clamp(12px, 1.65vw, 25px); }
.nb-catalogue .featured h2 { font-size: clamp(21px, 2.2vw, 29px); margin-block: 5px 8px; }
.nb-catalogue .featured p { font-size: 14px; }
.nb-catalogue .featured .read-link, .nb-catalogue .featured .article-meta { margin-top: 10px; }
.nb-catalogue .featured-visual { align-self: center; background: none; }
.nb-catalogue .featured-visual img { height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.nb-catalogue .catalogue-header { margin-bottom: 14px; padding: 0 0 13px; }
.nb-catalogue .catalogue-header h2 { font-size: 23px; }
.nb-catalogue .article-grid { gap: 18px; }
.nb-catalogue .article-card { margin: 0; padding: 11px 12px 14px; }
.nb-catalogue .card-image { margin-bottom: 9px; }
.nb-catalogue .article-card h3 { font-size: clamp(16px, 1.4vw, 20px); margin: 4px 0 7px; line-height: 1.28; text-wrap: initial; }
.nb-catalogue .card-description { font-size: 13px; line-height: 1.48; -webkit-line-clamp: 2; }
.nb-catalogue .card-meta { margin-block-start: 10px; }
.nb-catalogue .card-meta::after { content: '→'; margin-inline-start: auto; font: 22px/1 NotebookHand, cursive; color: var(--accent); }
.nb-catalogue .topic-label { font-size: 11px; }

@media (prefers-reduced-motion: no-preference) {
  .nb-catalogue .article-card { transition: transform .18s ease; }
  .nb-catalogue .article-card:hover .card-image img { transform: none; }
}
@media (min-width: 1200px) {
  [data-library] > .wrap { width: min(1320px, calc(100% - 76px)); }
  .nb-library-art img { max-height: 211px; }
}
@media (max-width: 1023px) {
  .library-toolbar.nb-catalogue-controls { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nb-catalogue-controls .search-control { grid-column: 1 / -1; }
  .nb-catalogue { grid-template-columns: minmax(155px, 180px) minmax(0, 1fr); }
}
@media (max-width: 767px) {
  :root { --binding-gutter: 22px; }
  body::before {
    width: 83px;
    background-size: 83px auto;
    background-position: -4px -8px;
    mask-image: linear-gradient(90deg, #000 23%, transparent 45%);
  }
  .library-intro { grid-template-columns: minmax(0, 1fr) minmax(95px, .46fr); gap: 0 10px; padding: 17px 0 11px; }
  .library-intro .eyebrow { font-size: 18px !important; }
  .library-intro h1 { font-size: clamp(29px, 6.4vw, 37px); }
  .library-intro p:not(.eyebrow) { grid-column: 1/-1; font-size: 14px; margin-top: 9px; }
  .nb-library-art { grid-row: 1 / 3; }
  .nb-library-art img { transform: scale(1.04); }
  .nb-topic-strip { margin-bottom: 13px; }
  .library-toolbar.nb-catalogue-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nb-catalogue-controls .sort-control { grid-column: 1/-1; }
  .nb-catalogue .featured { grid-template-columns: 1fr; padding: 11px; }
  .nb-catalogue .featured h2 { font-size: 24px; }
  .nb-catalogue .article-card h3 { font-size: 20px; }
  .nb-catalogue .article-card { padding: 12px; }
}
@media print {
  body { padding-left: 0; background: white !important; }
  body::before, .nb-topic-strip, .nb-library-art { display: none; }
}

/* Typography and layout for the notebook's different page types. */
:root {
  --display-font: Georgia, 'Times New Roman', serif;
  --hand-font: NotebookHand, cursive;
  --graphite-ink: #332f30;
  --soft-rule: color-mix(in srgb, var(--border) 50%, transparent);
  --paper-shadow: 0 2px 2px #614b3742;
}
:root[data-theme="dark"] { --graphite-ink: #f2ecdf; --paper-shadow: 0 2px 3px #10101680; }

.nb-home h2, .library-intro h1, .cnt-listing-hero h1 {
  font-family: var(--display-font);
  color: var(--graphite-ink);
  font-weight: 700;
  letter-spacing: -.041em;
}
.nb-home h2 { font-size: clamp(32px, 3.6vw, 48px); }
.nb-eyebrow, .library-intro .eyebrow {
  font: 650 10px/1.4 var(--font) !important;
  letter-spacing: .15em;
  color: var(--accent);
}
.library-intro .eyebrow { letter-spacing: .13em; }
.nb-section { padding-block: clamp(34px, 5vw, 64px); }
.nb-section-head > .nb-script {
  font: 600 23px/1.1 var(--hand-font);
  padding: 5px 3px 8px;
  background: var(--graphite-rule) 0 100% / 100% 7px no-repeat;
}
.nb-section-head { margin-bottom: 24px; }
.nb-section-head > p:not(.nb-script) { margin-top: 12px; }
.nb-header { gap: 20px; }
.nb-brand::after { border-width: 1px; }

/* Keep every hero object composable. Ground the illustration where objects touch the paper. */
.nb-scene::before {
  inset: 86% 3% 0 14%;
  background: url('/assets/notebook/materials/graphite-contact.webp') center / 100% 100% no-repeat;
  opacity: .54;
}
.nb-scene .book { top: 53%; left: 18%; width: 79%; }
.nb-scene .sheet { top: 3%; left: 4%; width: 48%; transform: rotate(-8deg); }
.nb-scene .screen { top: 34%; left: 29%; width: 64%; transform: rotate(4deg); }
.nb-scene .pencil { top: 87%; left: 6%; width: 74%; transform: rotate(-6deg); }
.nb-scene .idea { top: 73%; left: 20%; width: 20%; transform: rotate(-10deg); }
.nb-scene .cube { top: 66%; left: 5%; width: 12%; }
.nb-scene .arrow { top: 23%; left: 48%; width: 22%; transform: rotate(8deg); }
.nb-scene .annotation { font: 500 clamp(17px, 2vw, 25px)/1 var(--hand-font); color: var(--muted); }
.nb-scene .annotation-start { top: 5%; left: 51%; transform: rotate(-9deg); }
.nb-scene .annotation-end { top: 28%; left: 79%; transform: rotate(-5deg); }
.nb-scene img { filter: drop-shadow(1px 3px 3px #55432c2b); }

/* Mounted case studies. The original project images retain their own design. */
.nb-projects { gap: 20px; }
.nb-project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  align-items: start;
  padding: 13px;
  gap: 17px;
}
.nb-project-visual {
  height: auto;
  min-height: 174px;
  aspect-ratio: .94;
  border-radius: 2px;
}
.nb-project-visual img { height: 100%; }
.nb-project.mobicity .nb-project-visual {
  background: color-mix(in srgb, var(--soft) 72%, var(--surface));
}
.nb-project.mobicity .nb-project-visual img {
  object-fit: contain;
  padding: 7px;
}
.nb-project.hangouts .nb-project-visual { background: var(--soft); }
.nb-project.hangouts .nb-project-visual img { width: auto; height: 91%; max-width: 92%; }
.nb-project-copy { padding: 5px 5px 3px 0; }
.nb-project h3 { font: 700 clamp(23px, 2.45vw, 32px)/1.08 var(--display-font); letter-spacing: -.04em; }
.nb-project-copy > p:not(.nb-label) { font-size: 13px; line-height: 1.53; margin-top: 9px; }
.nb-project .nb-label { font-size: 10px; line-height: 1.45; margin-bottom: 8px !important; }
.nb-project .nb-text-link, .nb-project details { margin-top: 9px; }
.nb-project summary { font-size: 12px; }
.nb-project .case-principles { margin-bottom: 7px; }

.nb-who .home-commercial { display: grid; grid-template-columns: 170px 1fr; gap: 22px; align-items: start; }
.nb-who .home-commercial h2 { font-size: clamp(26px, 3vw, 34px); }
.nb-who .home-commercial dl { margin: 0; gap: 13px; }
.nb-who .home-commercial dl > div { border-inline-start: 1px solid var(--soft-rule); padding-inline-start: 13px; }

.nb-home #services {
  display: grid;
  grid-template-columns: minmax(210px, .72fr) minmax(0, 1.7fr);
  align-items: start;
  gap: 0 clamp(24px, 4vw, 63px);
}
.nb-home #services > .nb-anchor { position: absolute; }
.nb-home #services > .nb-text-link { grid-column: 2; justify-self: start; }
.nb-home .services-grid { gap: 0 23px; align-items: start; }
.nb-home .service-card {
  padding: 15px 0 13px;
  gap: 13px;
  background: none;
  border-bottom: 1px solid var(--soft-rule);
}
.nb-home .service-card::before, .contact-link-card::before, .nb-experience::before { content: none; }
.nb-home .service-card-wide { grid-column: auto; }
.nb-home .service-icon { flex-basis: 27px; padding-top: 3px; }
.nb-home .service-icon img { width: 24px; }
.nb-home .service-content h3 { font: 700 22px/1.18 var(--display-font); letter-spacing: -.025em; }
.nb-home .service-content > p { margin-top: 6px; font-size: 13px; line-height: 1.53; }
.nb-home .service-content details { margin-top: 1px; }
.nb-home .service-content summary { font-size: 12px; padding-block: 5px; }
.nb-home .service-meta { margin-top: 3px; }

.nb-ways .home-commercial { grid-template-columns: minmax(210px, .72fr) minmax(0, 1.7fr); gap: 0 clamp(24px, 4vw, 63px); }
.nb-ways .home-commercial dl { grid-template-columns: 1fr; gap: 0; }
.nb-ways .home-commercial dl > div {
  display: grid;
  grid-template-columns: minmax(154px, .64fr) minmax(0, 1fr);
  gap: 20px;
  border-top: 0;
  border-bottom: 1px solid var(--soft-rule);
  padding: 12px 0;
}
.nb-ways dt { font: 700 20px/1.3 var(--display-font); }
.nb-ways dd { margin: 0; line-height: 1.6; }

.nb-process .process-phases { gap: 20px; margin-top: 24px; }
.phase-card { padding: 13px 8px; }
.phase-card .phase-icon { width: 31px; height: 31px; }
.phase-card h3 { font: 700 23px/1.2 var(--display-font); margin-top: 9px; }
.phase-card ul { margin: 0; }
.phase-card:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 13px;
  right: 5px;
  width: 45px;
  height: 29px;
  background: url('/assets/notebook/elements/arrow-pencil-right.svg') center / contain no-repeat;
  opacity: .63;
  transform: rotate(-19deg);
}

.nb-experience { padding: 0 0 0 15px; transform: none; filter: none; }
.nb-experience h3 { margin: 0 0 12px -15px; }
.nb-experience .exp-header {
  position: relative;
  flex-direction: row;
  align-items: start;
  gap: 8px 14px;
  padding: 12px 0 12px 15px;
  border-left: 1px solid var(--border);
  border-bottom: 0;
}
.nb-experience .exp-header:last-child { border-left: 1px solid var(--border); }
.nb-experience .exp-header::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 18px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--accent);
  box-sizing: border-box;
}
.nb-experience .exp-header:first-of-type::before { background: var(--accent); }

.nb-notes { gap: 18px; }
.nb-note { padding: 10px 11px 12px; }
.nb-note img { border-radius: 2px; margin-bottom: 10px; }
.nb-note .nb-label { font-size: 11px; color: var(--accent); margin-bottom: 5px !important; }
.nb-note h3 { font: 600 18px/1.31 var(--font); }
.nb-note .nb-note-meta { margin-top: 10px !important; }
.nb-contact .contact-links { gap: 0; }
.nb-contact .contact-link-card {
  padding: 11px 0;
  border-bottom: 1px solid var(--soft-rule);
  border-radius: 0;
}

/* Writing index. Keep search and the first articles close to the heading. */
.library-intro {
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  padding: 12px 4px 6px;
}
.library-intro h1 {
  font-size: clamp(32px, 4.35vw, 58px);
  max-width: 22ch;
  background-size: 68% 7px;
}
.library-intro p:not(.eyebrow) { margin-top: 8px; line-height: 1.5; }
.nb-library-art img { max-height: 178px; }
.nb-topic-strip { padding-block: 5px 11px; margin-bottom: 13px; }
.nb-topic-strip a { min-height: 39px; }
.nb-topic-strip a[aria-current]::after {
  inset: 3px 9px;
  background-blend-mode: normal;
  background-image: linear-gradient(95deg, #c0c9e4cc, #d8def1d9);
}
[data-theme="dark"] .nb-topic-strip a[aria-current]::after { background: var(--soft); }
.nb-topic-strip a[aria-current] {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.library-toolbar.nb-catalogue-controls { margin-bottom: 3px; }
.nb-catalogue .search-status { margin-bottom: 8px; min-height: 20px; }
.nb-catalogue .featured {
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.33fr);
  margin-bottom: 12px;
  padding: 10px 12px;
}
.nb-catalogue .featured-visual img { max-height: 222px; object-fit: contain; }
.nb-catalogue .featured-copy { padding: 9px clamp(12px, 2vw, 27px); }
.nb-catalogue .featured h2 { line-height: 1.15; letter-spacing: -.032em; text-wrap: initial; }
.nb-catalogue .featured .eyebrow { margin-bottom: 2px; }
.nb-catalogue .catalogue-header { margin-bottom: 9px; padding-bottom: 7px; }
.nb-catalogue .article-card { padding: 9px 11px 12px; }
.nb-catalogue .card-image { margin-bottom: 7px; }
.nb-catalogue .card-image img { aspect-ratio: 2.05; }
.nb-catalogue .card-copy { padding: 0 2px; }
.nb-catalogue .article-card h3 { margin-block: 3px 5px; }
.nb-catalogue .topic-sidebar a { min-height: 33px; }
.nb-catalogue-controls .search-control input { padding-inline-start: 33px; }
.nb-catalogue-controls .search-control::before {
  content: '';
  position: absolute;
  left: 9px;
  bottom: 11px;
  width: 19px;
  height: 19px;
  background: url('/assets/used-icons/search-normal.svg') center / contain no-repeat;
  pointer-events: none;
}
[data-theme="dark"] .nb-catalogue-controls .search-control::before { filter: invert(.83); }

/* The work listing uses the same mounted paper as the homepage case studies. */
.cnt-listing-hero h1 { font-size: clamp(40px, 5vw, 63px); }
.cnt-listing-hero p, .cnt-card p { color: var(--muted); }
body:has(.cnt-listing-hero) .cnt-nav {
  background: var(--bg) var(--paper-stock) center / 420px;
  border-bottom: 0;
}
body:has(.cnt-listing-hero) .cnt-nav::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 7px;
  background: var(--graphite-rule) center / 100% 100% no-repeat;
  pointer-events: none;
}
.cnt-wrap:has(> .cnt-listing-hero) .cnt-grid { grid-template-columns: repeat(2,minmax(0, 1fr)); gap: 22px; }
.cnt-card.nb-work-paper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  padding: 11px;
  border: 0;
  border-radius: 0;
  background: none;
  position: relative;
  isolation: isolate;
  overflow: visible;
  filter: drop-shadow(var(--paper-shadow));
}
.nb-work-paper::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(#fffaf0b0,#fffaf070), var(--paper-stock) center / 420px;
  background-color: var(--surface);
  mask: var(--torn-sheet) center / 100% 100%;
}
[data-theme="dark"] .nb-work-paper::before { background: var(--surface); }
.nb-work-paper .cnt-card-cover { padding: 8px; height: auto; min-height: 156px; background: var(--soft) !important; border-radius: 2px; align-self: stretch; }
.nb-work-paper .cnt-card-cover img { width: 100%; height: 100%; max-height: 270px; object-fit: contain; }
.nb-work-paper .cnt-card-cover-badge {
  display: inline-block;
  padding: 0;
  margin-bottom: 5px;
  border: 0;
  background: none;
  color: var(--muted);
}
.nb-work-paper .cnt-card-body { padding: 6px 12px; }
.nb-work-paper h3 { font: 700 clamp(18px, 2vw, 28px)/1.16 var(--display-font); }
.nb-work-paper:hover { box-shadow: none; }

.service-hero figure {
  padding: 8px;
  border-radius: 0;
  box-shadow: 1px 3px 6px #604b3924;
  transform: rotate(-1deg);
}
.service-hero img { border-radius: 2px; }
.service-scope, .service-reading, .service-question {
  border-top: 0;
  background: var(--graphite-rule) top / 100% 9px no-repeat;
}

@media (max-width: 950px) {
  .nb-project { grid-template-columns: 1fr; }
  .nb-project-visual { aspect-ratio: 16 / 9; min-height: 0; }
  .nb-project-copy { padding: 0 4px 6px; }
  .nb-home #services, .nb-ways .home-commercial { grid-template-columns: minmax(160px,.7fr) minmax(0,1.5fr); }
}
@media (max-width: 767px) {
  .nb-section-head { margin-bottom: 16px; }
  .nb-header { gap: 11px; }
  .nb-hero { gap: 26px; }
  .nb-hero h1 > span { font-size: clamp(30px, 9vw, 44px); }
  .nb-project { grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); gap: 11px; padding: 10px; }
  .nb-project-visual { min-height: 119px; aspect-ratio: 1.02; }
  .nb-project-copy > p:not(.nb-label) { font-size: 12px; }
  .nb-project .nb-text-link { font-size: 12px; }
  .nb-who .home-commercial, .nb-home #services { display: block; }
  .nb-who .home-commercial dl { margin-top: 17px; }
  .nb-home .services-grid { gap: 0; }
  .nb-ways .home-commercial h2 { margin-bottom: 12px; }
  .nb-ways .home-commercial dl > div { grid-template-columns: 1fr; gap: 4px; }
  .nb-experience .exp-header { flex-wrap: wrap; gap: 4px; }
  .nb-process .process-phases { gap: 8px 18px; }
  .phase-card:nth-child(even)::after { content: none; }
  .nb-note a { display: grid; grid-template-columns: minmax(90px, .65fr) minmax(0, 1fr); column-gap: 11px; }
  .nb-note img { grid-row: 1 / 4; margin: 0; }
  .nb-note h3 { font-size: 16px; }
  .library-intro { grid-template-columns: minmax(0, 1fr) minmax(88px, .48fr); padding-block: 10px 7px; }
  .library-intro .eyebrow { font: 600 9px/1.35 var(--font) !important; letter-spacing: .09em; }
  .library-intro h1 { font-size: clamp(29px, 7.5vw, 42px); }
  .nb-catalogue .featured { grid-template-columns: 1fr; }
  .nb-catalogue .featured-visual img { max-height: none; }
  .nb-catalogue .featured-copy { padding: 11px 4px 6px; }
  .nb-catalogue .featured h2 { font-size: 22px; }
  .nb-catalogue .article-grid { gap: 13px; }
  .nb-catalogue .article-card {
    display: grid;
    grid-template-columns: minmax(91px, .64fr) minmax(0, 1fr);
    gap: 10px;
    padding: 9px;
    align-items: start;
  }
  .nb-catalogue .card-image { margin: 0; }
  .nb-catalogue .card-image img { aspect-ratio: 4 / 3; }
  .nb-catalogue .article-card h3 { font-size: 15px; }
  .nb-catalogue .card-description { font-size: 12px; }
  .nb-catalogue .card-meta { font-size: 10px; gap: 8px; margin-top: 5px; }
  .cnt-wrap:has(> .cnt-listing-hero) .cnt-grid { grid-template-columns: 1fr; }
  .cnt-card.nb-work-paper {
    grid-template-columns: minmax(80px, .7fr) minmax(0, 1.3fr);
    grid-template-rows: auto auto 1fr auto auto;
    align-items: start;
    gap: 6px 10px;
  }
  .nb-work-paper .cnt-card-cover { grid-row: 1 / 4; align-self: start; min-height: 85px; aspect-ratio: .8; }
  .nb-work-paper .cnt-card-body { display: contents; }
  .nb-work-paper .cnt-card-cover-badge, .nb-work-paper .cnt-card-meta { margin: 0; }
  .nb-work-paper .cnt-card-body p, .nb-work-paper .cnt-card-cta { grid-column: 1 / -1; padding-inline: 3px; }
  .nb-work-paper .cnt-card-body p { font-size: 12px; margin: 4px 0 0; }
  body:has(.cnt-listing-hero) .cnt-listing-hero { padding-block: 30px 22px; }
}

.service-sketch {
  position: relative;
  aspect-ratio: 1.85;
  max-width: 290px;
  margin: 28px auto 0 0;
  isolation: isolate;
}
.service-sketch::before {
  content: '';
  position: absolute;
  inset: auto 0 8% 0;
  height: 11%;
  background: url('/assets/notebook/materials/graphite-contact.webp') center / 100% 100% no-repeat;
  opacity: .26;
}
.service-sketch img {
  position: absolute;
  height: auto;
  filter: drop-shadow(1px 3px 3px #55432c2b);
}
.service-sketch .cube-ivory { width: 33%; left: 8%; bottom: 9%; }
.service-sketch .cube-periwinkle { width: 34%; left: 36%; bottom: 10%; }
.service-sketch .cube-indigo { width: 33%; left: 63%; bottom: 9%; }
.service-sketch .cursor-ivory { width: 27%; left: 44%; bottom: 43%; transform: rotate(9deg); }
.nb-project.mobicity .nb-project-visual img {
  width: 94%;
  height: auto;
  max-height: 96%;
  padding: 0;
  transform: rotate(-5deg);
  border-radius: 4px;
  filter: drop-shadow(1px 4px 4px #55432c32);
}
.nb-work-paper .cnt-card-cover img { filter: drop-shadow(1px 3px 4px #55432c2b); }
.nb-scene::before {
  inset: 92% 4% 1% 25%;
  transform: rotate(8deg);
  opacity: .34;
}
@media (max-width: 767px) {
  .service-sketch { max-width: 170px; margin-block-start: 14px; }
}
