/* ------------------------------------------------------------------
   Diogo Silva — site.css
   One stylesheet for the whole house. Edit tokens below to retune.
------------------------------------------------------------------ */

/* ---------- Self-hosted Typography ---------- */

@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/assets/fonts/instrument-sans-regular.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/assets/fonts/instrument-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 200 500;
  font-display: swap;
  src: url('/assets/fonts/newsreader-regular.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 200 500;
  font-display: swap;
  src: url('/assets/fonts/newsreader-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 200 400;
  font-display: swap;
  src: url('/assets/fonts/newsreader-italic.woff2') format('woff2');
}

:root {
  /* Paper & ink */
  --paper:      #FBFAF7;
  --ink:        #191814;
  --ink-soft:   #56534C;
  --ink-faint:  #746E63;
  --rule:       rgba(25, 24, 20, 0.14);
  --bronze:     #8A6A3C;

  /* Type */
  --serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans:  "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  /* Measure & rhythm */
  --measure: 33rem;
  --page:    68rem;
  --gutter:  1.5rem;
  --step:    1.75rem;
}

/* ---------- Reset-ish ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 350;
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main { flex: 1 0 auto; }
main:focus { outline: none; }

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-weight: 300;
  margin: 0;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

strong, b {
  font-weight: 500;
}

em strong, strong em,
em b, b em {
  font-weight: 400;
}

p { margin: 0 0 1.1em; }

.prose p,
.prose blockquote,
.prose li,
.entry__dek,
.standfirst,
.hero__welcome p,
.room__note {
  text-wrap: pretty;
}

:focus-visible {
  outline: 1px solid var(--bronze);
  outline-offset: 4px;
}

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

/* ---------- Utility type: the small voice of the house ---------- */

.label {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1.4;
}

/* ---------- Shell ---------- */

.shell {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.measure { max-width: var(--measure); }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem; top: 1rem;
  position: fixed;
  z-index: 50;
  background: var(--paper);
  color: var(--ink);
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--rule);
}

/* ---------- Masthead ---------- */

.masthead {
  padding-top: 2.25rem;
  padding-bottom: 1.1rem;
}

.masthead__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.masthead__inner > .nav { margin-inline-start: auto; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 1.65vw, 1.35rem);
}

.nav a {
  position: relative;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0.65rem 0;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

.nav a:hover { color: var(--ink); border-bottom-color: var(--bronze); }

.nav a:is([aria-current="page"], [aria-current="location"]) { color: var(--ink); }
.nav a:is([aria-current="page"], [aria-current="location"])::before {
  content: "";
  position: absolute;
  inset-inline-start: -0.625rem;
  inset-block-start: 50%;
  width: 4px;
  height: 4px;
  transform: translateY(-50%);
  background: var(--bronze);
  pointer-events: none;
}

@media (forced-colors: active) {
  .nav a:is([aria-current="page"], [aria-current="location"])::before {
    background: CanvasText;
  }
}

.site-languages {
  display: flex;
  align-items: center;
  padding-inline-start: 0.65rem;
  border-inline-start: 1px solid var(--rule);
  font: 400 0.75rem/1 var(--sans);
  letter-spacing: 0.1em;
}

.site-languages :is(a, span) {
  display: inline-grid;
  place-items: center;
  min-height: 44px;
  min-width: 36px;
  color: var(--ink-faint);
  text-underline-offset: 0.4em;
}

.site-languages a:hover,
.site-languages [aria-current] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--bronze);
  text-decoration-thickness: 1px;
}

/* On phones, the wordmark already links to Home. Hide the duplicate Home
   destination and distribute the five section links with comfortable touch targets. */
@media (max-width: 46rem) {
  .masthead { padding-top: 1.5rem; }
  .masthead__inner {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .masthead__inner > .nav { grid-column: 1 / -1; grid-row: 2; margin: 0; }
  .site-languages { grid-column: 2; grid-row: 1; border: 0; padding: 0; }
  .site-languages :is(a, span) { min-width: 44px; }

  .wordmark {
    width: 100%;
    font-size: 1.25rem;
  }

  .nav a:is([href="/"], [href="/pt/"]) { display: none; }

  .nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, auto));
    justify-content: space-between;
    gap: 0.25rem;
  }

  .nav a {
    min-height: 2.75rem;
    min-inline-size: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
  }

  .nav a:is([aria-current="page"], [aria-current="location"])::before {
    inset-inline-start: 50%;
    inset-block-start: auto;
    inset-block-end: 0.35rem;
    width: 3px;
    height: 3px;
    transform: translateX(-50%);
  }
}

/* Keep the five section links comfortable on very narrow phones. */
@media (max-width: 24rem) {
  .nav {
    grid-template-columns: repeat(5, minmax(0, auto));
    justify-content: space-between;
    column-gap: 0.25rem;
  }
}

/* ---------- Prose links ---------- */

.prose a, .link {
  color: var(--ink);
  border-bottom: 1px solid var(--bronze);
  padding-bottom: 1px;
  transition: color 160ms ease;
}
.prose a:hover, .link:hover { color: var(--bronze); }

/* ---------- Home ---------- */

.hero {
  padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(2rem, 4vw, 3rem);
}

.hero__grid {
  display: grid;
  row-gap: 1.25rem;
  column-gap: clamp(2rem, 5vw, 4.5rem);
}

.hero__name {
  font-size: clamp(3.25rem, 6.5vw, 5rem);
  line-height: 0.94;
  font-weight: 250;
}

.hero__name em {
  font-style: italic;
  font-weight: 250;
}

.hero__welcome {
  max-width: 36rem;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
}

.hero__welcome p:last-child { margin-bottom: 0; }

.hero__greeting {
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  line-height: 1.3;
  margin-bottom: 0.75em;
  color: var(--ink);
}

/* Keep the mobile reading order and a smaller, centred portrait. */
.portrait {
  margin: 0;
  width: min(100%, 12rem);
  justify-self: center;
}

.portrait picture { display: block; }
.portrait img { width: 100%; }

@media (min-width: 46rem) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) 12rem;
    align-items: start;
  }
  .hero__name    { grid-column: 1; grid-row: 1; }
  .hero__welcome { grid-column: 1; grid-row: 2; }
  .portrait {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: end;
    width: 100%;
  }
}

@media (min-width: 62rem) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) 16rem; }
}

/* ---------- Index of rooms (home) ---------- */

.rooms {
  border-top: 1px solid var(--rule);
  padding-bottom: clamp(3rem, 8vw, 6rem);
}

.room {
  display: grid;
  gap: 0.35rem 2rem;
  padding: 1.9rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}

@media (min-width: 46rem) {
  .room { grid-template-columns: 12rem 1fr auto; }
}

.room__name {
  font-size: 1.5rem;
  line-height: 1.2;
  transition: color 160ms ease;
}

.room__note {
  color: var(--ink-soft);
  font-size: 1rem;
  margin: 0;
  max-width: 30rem;
}

.room__mark {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  transition: color 160ms ease;
}

.room:hover .room__name { color: var(--bronze); }
.room:hover .room__mark { color: var(--bronze); }

/* ---------- At Home (home) ---------- */

/* The people who live here, between the welcome and the rooms.
   On wider screens the title sits in the same column as the room names. */
.at-home {
  border-top: 1px solid var(--rule);
  padding-top: clamp(2rem, 5vw, 3rem);
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

@media (min-width: 46rem) {
  .at-home {
    display: grid;
    grid-template-columns: 12rem minmax(0, 1fr);
    column-gap: 2rem;
    align-items: baseline;
  }
}

.at-home__title {
  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: 250;
  margin-bottom: 1.25rem;
}

.at-home__text {
  max-width: 36rem;
  font-size: 1.0625rem;
  line-height: 1.65;
}

.at-home__text p { text-wrap: pretty; }
.at-home__text p:last-child { margin-bottom: 0; }

/* ---------- Page heads ---------- */

.pagehead {
  /* Keep an explicit horizontal gutter so later spacing changes cannot
     accidentally place headings against the edge of a phone screen. */
  padding-inline: var(--gutter);
  padding-top: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: clamp(1.75rem, 4vw, 3rem);
}

.pagehead__title {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  line-height: 1.05;
  font-weight: 250;
  margin-bottom: 1.25rem;
}

.pagehead__intro {
  color: var(--ink-soft);
  font-size: 1.125rem;
}

.pagehead__intro p:last-child { margin-bottom: 0; }

/* ---------- Notes ---------- */

.notes-section {
  font-size: 1.0625rem;
  font-weight: 400;
  font-family: var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 0.5rem;
}

.notes-section__note {
  color: var(--ink-soft);
  font-size: 0.9375rem;
  max-width: 34rem;
  margin: 0 0 1.5rem;
}

.entries {
  border-top: 1px solid var(--rule);
  margin-bottom: clamp(3rem, 7vw, 4.5rem);
}

.entry {
  display: grid;
  gap: 0.3rem 2.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 46rem) {
  .entry { grid-template-columns: 8rem 1fr; }
}

.entry__date {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 0.55rem;
}

.entry__title {
  font-size: 1.5rem;
  line-height: 1.25;
  margin-bottom: 0.35rem;
  transition: color 160ms ease;
}

.entry:hover .entry__title { color: var(--bronze); }

/* Editorial section headings keep their colour on hover. */
.work-page .entry:hover .entry__title,
.project-detail .entry:hover .entry__title { color: inherit; }

.entry__dek {
  color: var(--ink-soft);
  font-size: 1rem;
  margin: 0;
  max-width: 34rem;
}

/* Project descriptions use the same editorial rhythm as Work. */
.entry__label { margin-bottom: 0.35rem; color: var(--bronze); }
.project-page .entry__dek + .entry__dek,
.project-page .entry__details + .entry__dek { margin-top: 1em; }
.project-page .entry__details {
  max-width: 34rem;
  margin: 1em 0 0;
  padding-left: 1.25em;
  color: var(--ink-soft);
  font-size: 1rem;
  text-wrap: pretty;
}
.project-page .entry__details li + li { margin-top: 0.6em; }
.project-page .entry .standfirst { margin-top: 1rem; }

.entry__next { margin: 1rem 0 0; font-size: 1rem; }
.entry__next a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.entry[id] { scroll-margin-top: 1.5rem; }

.project-faq { margin-bottom: 3rem; }
.project-faq h2 { margin-top: 0; }
.project-faq details { border-bottom: 1px solid var(--rule); padding: 0.85rem 0; }
.project-faq summary { cursor: pointer; color: var(--ink); min-height: 2.75rem; }
.project-faq details p { margin: 0.6rem 0 0; color: var(--ink-soft); }

/* Article */

.article { padding-bottom: clamp(2.5rem, 6vw, 4rem); }

.article__head {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 3vw, 2.25rem);
  max-width: var(--measure);
}

.article__date { display: block; margin: 0 0 1.1rem; }

.article__title {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.08;
  font-weight: 250;
}

.standfirst {
  max-width: var(--measure);
  margin: 1.25rem 0 0;
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* Ink device at the head of a note: a printer's ornament, not an illustration. */
.device {
  max-width: 26rem;
  margin: 0 0 clamp(2rem, 5vw, 2.75rem);
}

.device img { width: 100%; }

/* Editorial figure within longform essays */
.article__figure {
  margin: clamp(2rem, 5vw, 3rem) 0;
}

.article__figure picture { display: block; }
.article__figure img { width: 100%; height: auto; display: block; }
.article__figure figcaption { margin-top: 0.65rem; }

.entry__lang {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.prose {
  max-width: var(--measure);
  font-size: 1.125rem;
  line-height: 1.72;
}

.prose > p:first-of-type { margin-top: 0; }

.prose h2 {
  font-size: 1.375rem;
  margin: 2.25rem 0 0.75rem;
}

.prose blockquote {
  margin: 2rem 0;
  padding-left: 1.25rem;
  border-left: 1px solid var(--bronze);
  font-style: italic;
  color: var(--ink-soft);
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
  width: 4rem;
}

.prose ul, .prose ol { padding-left: 1.2rem; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.4em; }

.article__foot {
  max-width: var(--measure);
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
}

.article__foot a { border-bottom: 1px solid var(--rule); }
.article__foot a:hover { border-bottom-color: var(--bronze); color: var(--ink); }

/* ---------- Newsletter ---------- */

.signup {
  max-width: var(--measure);
  margin: 0 0 clamp(3rem, 7vw, 5rem);
  padding: 1.75rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

/* Na home, o newsletter fica entre duas seccoes de largura total
   (From Notes, colofao). Ficar preso a --measure faz o bloco parecer
   deslocado para a esquerda em ecras largos. Esta variante estende as
   regras a largura toda do shell e mantem so a linha de email + botao
   num comprimento legivel. */
.signup--wide {
  max-width: none;
}

.signup--wide .signup__row {
  max-width: 26rem;
}

.signup__line {
  font-size: 1.0625rem;
  color: var(--ink);
  margin-bottom: 1.1rem;
}

.signup__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: stretch;
}

.signup input[type="email"] {
  flex: 1 1 14rem;
  min-width: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 0.5rem 0;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
  border-radius: 0;
}

.signup input[type="email"]::placeholder { color: var(--ink-faint); }
.signup input[type="email"]:focus {
  border-bottom-color: var(--bronze);
}

.signup button {
  background: none;
  border: 1px solid var(--rule);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.7rem 1.15rem;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease;
}

.signup button:hover { border-color: var(--bronze); color: var(--bronze); }

.signup__fine {
  margin: 0.9rem 0 0;
  font-family: var(--sans);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

/* ---------- Contact ---------- */

.contact { padding-bottom: clamp(3rem, 7vw, 5rem); }

.contact__mail {
  font-size: clamp(1.25rem, 6vw, 2.25rem);
  line-height: 1.25;
  font-weight: 250;
  display: inline-block;
  border-bottom: 1px solid var(--bronze);
  padding-bottom: 0.15rem;
  margin-bottom: 1.1rem;
  transition: color 160ms ease;
  word-break: break-word;
}
.contact__mail:hover { color: var(--bronze); }

.contact__location {
  margin: 0 0 clamp(2rem, 5vw, 3rem);
}

.channels {
  border-top: 1px solid var(--rule);
  max-width: 34rem;
}

.channel {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 1.0625rem;
  transition: color 160ms ease;
}

.channel span:last-child {
  font-family: var(--sans);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.channel:hover { color: var(--bronze); }

.channel--bronze:hover { color: inherit; }

.channel--bronze {
  flex-wrap: wrap;
  row-gap: 0.3rem;
}

.channel--bronze > span:first-child {
  white-space: nowrap;
}

.channel__links {
  color: var(--ink-faint);
}

.channel__links a {
  color: var(--ink-faint);
  transition: color 160ms ease;
}

.channel__links a:hover { color: var(--bronze); }

/* ---------- From Notes (home preview) ---------- */

.notes-preview {
  border-top: 1px solid var(--rule);
  /* Match the rest of the shell on mobile as well as on desktop. */
  padding-inline: var(--gutter);
  padding-top: clamp(2rem, 5vw, 3rem);
}

.notes-preview__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.notes-preview__title {
  font-size: 1.5rem;
  font-weight: 250;
}

/* ---------- Colophon ---------- */

.colophon {
  padding: 2rem 0 3rem;
  margin-top: auto;
}

.colophon__inner {
  border-top: 1px solid var(--rule);
  padding-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: space-between;
}

.colophon a { border-bottom: 1px solid var(--rule); }
.colophon a:hover { border-bottom-color: var(--bronze); color: var(--ink); }

/* ---------- Editorial hierarchy & interactions ---------- */

.entry--featured { padding-block: clamp(2rem, 5vw, 3rem); }
.entry--featured .entry__title { font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.12; margin-bottom: 0.6rem; }
.entry--featured .entry__dek { font-size: 1.125rem; }
.entries--conversations .entry__title { font-size: 1.375rem; }

.entry__action {
  display: inline-block;
  margin-top: 0.8rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--bronze);
  transition: color 160ms ease;
}

.entry:hover .entry__action {
  color: var(--ink);
}

.colophon .label { text-transform: none; letter-spacing: 0.03em; line-height: 1.6; }
.article__foot a { display: inline-block; padding-block: 0.65rem; }
.channel { min-height: 3rem; }

@media (max-width: 46rem) {
  .hero { padding-top: 2rem; }
  .hero__welcome { font-size: 1.0625rem; }
  .entry__date { padding-top: 0; }
  .entry { gap: 0.7rem; }
  .entry__lang { display: inline; margin-left: 0.75rem; }
  .notes-preview__head { flex-wrap: wrap; }
}

/* ---------- Project index and fictional VitaChart demonstration ---------- */

.project-index {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  font-family: var(--sans);
  font-size: 0.8125rem;
}
.project-index a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.entry > div { min-width: 0; }

.project-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
  margin: 0 0 clamp(2rem, 4vw, 2.75rem);
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.project-specs > div {
  min-width: 0;
}
.project-specs dt {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bronze);
  margin: 0 0 0.35rem;
}
.project-specs dd {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.35;
  color: var(--ink);
}
.project-specs__sub {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--ink-faint);
}
@media (min-width: 48rem) {
  .project-specs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
  }
  .project-specs > div + div {
    border-left: 1px solid var(--rule);
    padding-left: 1.25rem;
  }
  .project-specs > div:not(:last-child) {
    padding-right: 1.25rem;
  }
}

.project-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: clamp(2.75rem, 7vw, 5rem);
}
.project-card {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 0.65rem;
  padding-block: clamp(1.25rem, 3.5vw, 2rem);
  border-top: 1px solid var(--rule);
  scroll-margin-top: 1.5rem;
}
.project-card--featured {
  display: grid;
  gap: 1.5rem 2.5rem;
}
.project-card__copy { min-width: 0; }
.project-card h2, .project-visual h2 {
  font-size: clamp(1.65rem, 4vw, 2.1rem);
  line-height: 1.15;
}
.project-card--featured h2 {
  font-size: clamp(2rem, 4.5vw, 2.8rem);
}
.project-card p, .project-visual__copy p, .project-steps dd { color: var(--ink-soft); }
.project-card p { margin: 0; }
.project-card .project-card__label { color: #795b32; }
.project-card__copy h2 { margin-block: 0.65rem; }
.project-card .project-card__actions { margin-top: auto; }
.project-card__copy .project-card__actions { margin-top: 0.85rem; }
.project-card__actions, .project-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1.25rem;
  font-family: var(--sans);
  font-size: 0.875rem;
}
.project-card__actions a, .project-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  user-select: none;
  transition: color 160ms cubic-bezier(0.22, 1, 0.36, 1), transform 160ms cubic-bezier(0.22, 1, 0.36, 1);
}
.project-card__actions a:active, .project-actions a:active { transform: scale(0.97); }
.project-release { margin: 0.85rem 0 0; }
.project-detail .project-actions { margin: 0.85rem 0 0; }

.project-steps { margin: 0; }
.project-steps > div {
  padding-block: 0.75rem;
  border-top: 1px solid var(--rule);
}
.project-steps dt { font-weight: 500; }
.project-steps dd { margin: 0; font-size: 1rem; }

.project-detail { max-width: 52rem; }
.project-detail .entry {
  grid-template-columns: minmax(0, 1fr);
}
.project-detail .entry__title { font-size: clamp(1.5rem, 3vw, 1.85rem); }
.project-detail .entry__dek, .project-detail .entry__details {
  max-width: 37rem;
  font-size: 1.0625rem;
}
.project-detail time, .project-specs { font-variant-numeric: tabular-nums; }

.project-visual {
  display: grid;
  align-items: center;
  gap: clamp(1.25rem, 4vw, 3rem);
  margin: 0 0 clamp(2rem, 5vw, 3.5rem);
}
.project-visual__portrait { margin: 0; max-width: 22rem; }
.project-visual__portrait img, .project-gallery img, .project-example img {
  width: 100%;
  height: auto;
  border-radius: 0.25rem;
}
.project-visual__copy { scroll-margin-top: 1.5rem; }
.project-visual__copy h2 { margin-bottom: 0.65rem; }
.project-visual__copy p:last-child { margin-bottom: 0; }
.project-gallery, .project-example { margin: 1.25rem 0 0; }
.project-example { max-width: 37rem; }
.project-gallery__images {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.375rem, 2vw, 0.875rem);
}
.project-visual figcaption, .project-gallery figcaption, .project-example figcaption {
  margin-top: 0.65rem;
  color: var(--ink-soft);
  font: 0.875rem/1.45 var(--sans);
}

@media (min-width: 42rem) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-card--featured { grid-column: 1 / -1; }
  .project-visual { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
}

@media (min-width: 54rem) {
  .project-card--featured { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
}

.demo-page__head { max-width: 45rem; padding-top: clamp(1.5rem, 3vw, 2rem); padding-bottom: 1.5rem; }
.demo-page__links { margin: 1.25rem 0 0; }
.demo-section { border-top: 1px solid var(--rule); padding-block: clamp(2rem, 4vw, 3rem); scroll-margin-top: 1.5rem; }
.demo-section__head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 0.75rem 2rem; margin-bottom: 1rem; }
.demo-section h2 { font-size: clamp(1.6rem, 3vw, 2rem); line-height: 1.2; }
.demo-section__head .label { margin-bottom: 0.5rem; }
.demo-introduction { max-width: 42rem; color: var(--ink-soft); font-size: 1.0625rem; }
.demo-status { margin: 0; font-family: var(--sans); font-size: 0.8125rem; color: var(--bronze); }
.demo-toolbar { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; margin-block: 1.5rem; }
.demo-cycle-picker:not([hidden]), .demo-style-picker:not([hidden]) { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.demo-cycle-picker button, .demo-style-picker button, .demo-day-controls button {
  background: transparent; border: 1px solid var(--rule); color: var(--ink);
  font: 0.875rem var(--sans); min-height: 2.75rem; padding: 0.6rem 1rem; cursor: pointer;
}
.demo-cycle-picker [aria-pressed="true"], .demo-style-picker [aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.demo-cycle-summary { display: flex; flex-wrap: wrap; gap: 1.25rem 3rem; margin: 0 0 1rem; }
.demo-cycle-summary dt, .demo-fields dt { font: 0.8125rem var(--sans); color: var(--ink-soft); }
.demo-cycle-summary dd { margin: 0.4rem 0 0; font-size: 1.125rem; }
.demo-help, .demo-note { max-width: 46rem; color: var(--ink-soft); font-size: 0.9375rem; }
.demo-days { scroll-margin-top: 1.5rem; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.4rem; margin-block: 1.25rem; max-width: 60rem; }
.demo-day {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.4rem;
  min-width: 0; min-height: 8rem; padding: 0.65rem 0.2rem; border: 1px solid var(--rule);
  border-radius: 0; background: transparent; color: var(--ink); font: 0.9375rem var(--sans); cursor: pointer;
}
.demo-day:hover { border-color: var(--bronze); }
.demo-day:disabled { cursor: default; }
.demo-day[aria-pressed="true"] { border-color: var(--bronze); box-shadow: inset 0 0 0 1px var(--bronze); background: rgba(138, 106, 60, 0.07); }
.demo-day-number small { display: block; color: var(--ink-soft); font-size: 0.6875rem; margin-top: 0.1rem; }
.demo-code, .demo-temperature { font-size: 0.75rem; color: var(--ink-soft); }
.demo-temperature { font-size: 0.6875rem; }
.demo-stamp { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.8rem; border-radius: 0.4rem; font: 0.8125rem var(--sans); }
.demo-stamp--red { background: #B94F47; color: white; }
.demo-stamp--green { background: #567D61; color: white; }
.demo-stamp--white { background: #fff; border: 1px solid #8D7864; color: var(--ink); }
.demo-stamp--unknown { border: 1px dashed #8D7864; }
.demo-legend { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; max-width: 60rem; margin: 1rem 0 1.5rem; color: var(--ink-soft); font: 0.8125rem var(--sans); }
.demo-legend > span { display: flex; align-items: center; gap: 0.45rem; }
.demo-legend .demo-stamp { width: 0.9rem; height: 1rem; border-radius: 0.2rem; }
.demo-highlights:not([hidden]) { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-bottom: 1.5rem; font-size: 0.9375rem; }
.demo-highlights button { background: transparent; border: 0; border-bottom: 1px solid var(--bronze); color: var(--ink); font: inherit; padding: 0.5rem 0; cursor: pointer; min-height: 2.75rem; }
.demo-observations { scroll-margin-top: 1.5rem; max-width: 60rem; background: rgba(138, 106, 60, 0.035); padding: 1.5rem; margin-block: 1.5rem; }
.demo-page h2:focus, .demo-observations h3:focus { outline: none; }
.demo-record-back { margin: 1.25rem 0 0; font-size: 0.9375rem; }
.demo-record-back a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.demo-record-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.demo-record-heading .label { margin-bottom: 0.5rem; }
.demo-observations h3 { font-size: 1.5rem; line-height: 1.2; }
.demo-day-controls:not([hidden]) { display: flex; gap: 0.5rem; }
.demo-day-controls button:disabled { opacity: 0.4; cursor: default; }
.demo-observations [role="status"] { font-size: 1rem; color: var(--ink-soft); }
.demo-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 1.5rem; margin: 0; }
.demo-fields > div { border-top: 1px solid var(--rule); padding-top: 0.75rem; }
.demo-fields dd { margin: 0.4rem 0 0; font-size: 1.0625rem; }
.demo-report-links { margin-top: 1rem; }
.demo-report-preview { margin: 1.5rem 0 0; }
.demo-report-preview img, .demo-report-continuation img { width: 100%; border: 1px solid var(--rule); background: white; }
.demo-report-preview figcaption { margin-top: 0.75rem; font: 0.8125rem/1.6 var(--sans); color: var(--ink-soft); }
.demo-report-continuation { margin-top: 1.5rem; }
.demo-report-continuation summary { cursor: pointer; min-height: 2.75rem; padding-block: 0.5rem; }
.demo-about h2 { margin-bottom: 1.25rem; }
@media (max-width: 46rem) {
  .demo-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .demo-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-observations { padding: 1.1rem; }
}
@media (max-width: 24rem) {
  .demo-days { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .demo-fields { grid-template-columns: 1fr; }
}

/* ---------- Interactive Live Showcase & Mobile Mockup ---------- */

.demo-version-chip-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
}

.demo-version-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font: 500 0.8125rem var(--sans);
  background: #EFE8DF;
  color: #2C2520;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(44, 37, 32, 0.12);
  white-space: nowrap;
}

.demo-version-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #5B8266;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(91, 130, 102, 0.2);
}

.demo-showcase-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.75rem);
  align-items: start;
  margin-top: 2rem;
}

.demo-mockup-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.phone-mockup {
  width: 360px;
  max-width: 100%;
  height: 720px;
  border-radius: 40px;
  background: #FAF7F2;
  border: 8px solid #231F1C;
  box-shadow: 0 20px 48px -12px rgba(44, 37, 32, 0.24), 0 0 0 1px rgba(44, 37, 32, 0.1);
  position: relative;
  overflow: hidden;
  margin: 0 auto;
}

.phone-mockup::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 4px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 2px;
  z-index: 10;
  pointer-events: none;
}

.phone-mockup iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 32px;
  background: #FAF7F2;
  display: block;
}

.demo-controls-card {
  background: #F8F5F0;
  border: 1px solid rgba(234, 226, 216, 0.85);
  border-radius: 24px;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  box-shadow: 0 4px 20px rgba(44, 37, 32, 0.03);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.demo-controls-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

.demo-lang-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.demo-controls-heading {
  font: 500 0.75rem var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin: 0;
}

.demo-lang-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.demo-lang-btn {
  background: white;
  border: 1px solid var(--rule);
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
  font: 500 0.8125rem var(--sans);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 2.1rem;
}

.demo-lang-btn:hover {
  border-color: var(--ink);
}

.demo-lang-btn[aria-pressed="true"] {
  background: #2C2520;
  border-color: #2C2520;
  color: #FAF7F2;
}

.demo-tours-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.demo-tours-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.demo-tours-sub {
  font: 0.75rem var(--sans);
  color: var(--ink-soft);
}

.demo-tours-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.demo-tour-item {
  background: white;
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 4.75rem;
}

.demo-tour-item:hover {
  border-color: #B86B52;
  box-shadow: 0 4px 14px rgba(44, 37, 32, 0.06);
  transform: translateY(-1px);
}

.demo-tour-item[aria-pressed="true"] {
  border-color: #B86B52;
  background: #FDF8F5;
  box-shadow: inset 0 0 0 1.5px #B86B52;
}

.demo-tour-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.demo-tour-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: rgba(184, 107, 82, 0.12);
  color: #B86B52;
  font: 500 0.75rem var(--sans);
  flex-shrink: 0;
}

.demo-tour-title {
  font: 500 0.8125rem var(--sans);
  color: #2C2520;
  flex-grow: 1;
}

.demo-tour-badge {
  font: 500 0.625rem var(--sans);
  padding: 0.12rem 0.4rem;
  border-radius: 5px;
  background: #F4EFE8;
  color: #6E5D4F;
  white-space: nowrap;
}

.demo-tour-desc {
  font: 0.75rem/1.35 var(--sans);
  color: var(--ink-soft);
  margin: 0;
}

.demo-controls-footer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.demo-cta-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  background: #B86B52;
  color: #FAF7F2;
  padding: 0.85rem 1.25rem;
  border-radius: 14px;
  text-decoration: none;
  text-align: center;
  transition: background 0.15s ease, transform 0.1s ease;
  min-height: 3.25rem;
}

.demo-cta-btn:hover {
  background: #9F5943;
  color: #FFFFFF;
}

.demo-cta-label {
  font: 500 0.9375rem var(--sans);
}

.demo-cta-sub {
  font: 0.6875rem var(--sans);
  opacity: 0.85;
}

.demo-privacy-notice {
  font: 0.6875rem/1.4 var(--sans);
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Visual Gallery of Real Screens ---------- */

.gallery-section {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule);
}

.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.gallery-nav-btns {
  display: flex;
  gap: 0.5rem;
}

.gallery-nav-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--ink);
  transition: all 0.15s ease;
}

.gallery-nav-btn:hover {
  border-color: var(--ink);
  background: var(--paper-warm);
}

.gallery-carousel {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 1.25rem;
  -webkit-overflow-scrolling: touch;
}

.gallery-card {
  flex: 0 0 230px;
  scroll-snap-align: start;
  background: white;
  border: 1px solid var(--rule);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(44, 37, 32, 0.05);
  display: flex;
  flex-direction: column;
}

.gallery-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1080 / 2400;
  display: block;
  background: #FAF7F2;
  border-bottom: 1px solid var(--rule);
}

.gallery-card-body {
  padding: 0.95rem 0.95rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex-grow: 1;
}

.gallery-card-title {
  font: 500 0.875rem var(--sans);
  color: #2C2520;
  margin: 0;
}

.gallery-card-caption {
  font: 0.75rem/1.45 var(--sans);
  color: var(--ink-soft);
  margin: 0;
}

.demo-static-fallback {
  margin-top: 3rem;
  padding: 1.5rem;
  background: #FDFBF8;
  border: 1px dashed var(--rule);
  border-radius: 16px;
}

.demo-static-fallback summary {
  cursor: pointer;
  font: 500 0.875rem var(--sans);
  color: #6E5D4F;
  padding: 0.5rem 0;
}

@media (max-width: 960px) {
  .demo-showcase-grid {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .demo-controls-card {
    width: 100%;
    max-width: 540px;
  }
}

@media (max-width: 600px) {
  .demo-tours-list {
    grid-template-columns: 1fr;
  }
  .phone-mockup {
    width: 100%;
    height: 620px;
    border-width: 6px;
    border-radius: 32px;
  }
  .phone-mockup iframe {
    border-radius: 26px;
  }
  .gallery-card {
    flex: 0 0 220px;
  }
}

/* ---------- Print ---------- */

@media print {
  body {
    background: #fff;
    color: #000;
    min-height: 0;
  }

  .skip,
  .masthead,
  .signup,
  .article__foot,
  .notes-preview,
  .project-index,
  .demo-toolbar,
  .demo-cycle-picker:not([hidden]),
  .demo-style-picker:not([hidden]),
  .demo-highlights:not([hidden]),
  .demo-day-controls:not([hidden]),
  .demo-help {
    display: none;
  }

  .article__head {
    padding-top: 0;
  }

  h1, h2, h3 {
    break-after: avoid;
    page-break-after: avoid;
  }

  blockquote, figure, .entry, .room {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .colophon {
    padding-bottom: 0;
  }
}


/* Editorial archive and home */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}
.hero__actions a:first-child { font-weight: 600; }

.home-initiatives { padding-block: clamp(2rem, 5vw, 3.5rem); }
.home-initiatives__grid,
.notes-start ul {
  display: grid;
  gap: 0 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}
.home-initiatives__grid > div,
.notes-start li {
  border-top: 1px solid var(--rule);
  padding-block: 0.85rem;
}
.home-initiatives h3 { font-size: 1.35rem; }
.home-initiatives p { margin-block: 0.4rem 0; }
.home-signup { margin-bottom: 2rem; }

.notes-start ul,
.related-reading ul { list-style: none; padding: 0; }
.notes-start .label { display: block; margin-bottom: 0.25rem; }
.notes-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
  padding-block: 1.25rem;
  border-block: 1px solid var(--rule);
}
.notes-filters label,
.note-share { font: 400 0.875rem/1.4 var(--sans); }
.notes-filters label:last-of-type,
.notes-results { grid-column: 1 / -1; }
.notes-filters :is(input, select),
.note-share input {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 0.25rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}
.notes-results { margin: 0; }
.entry__meta .entry__lang { display: block; margin: 0.25rem 0 0; }
.related-reading {
  max-width: var(--measure);
  margin-block: 2rem 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}
.related-reading h2 { font-size: 1.5rem; }
.related-reading li + li { margin-top: 0.5rem; }
.note-share button {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-decoration: underline;
  text-decoration-color: var(--bronze);
  text-underline-offset: 0.25em;
  cursor: pointer;
}
.note-share [role="status"] { margin-inline-start: 0.65rem; }

@media (max-width: 46rem) {
  .project-index {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1rem;
  }
  .project-index li { border-bottom: 1px solid var(--rule); }
}
@media (min-width: 48rem) {
  .work-page .project-specs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .notes-filters { grid-template-columns: 1fr 1fr 2fr; }
  .notes-filters label:last-of-type { grid-column: auto; }
}

:is(.notes-filters, [data-note-group], #notes-archive .entry, .note-share, .note-share input)[hidden] { display: none; }


/* Caderno */
@media (min-width: 46.001rem) {
  .site-languages { min-inline-size: calc(144px + 0.65rem + 1px); justify-content: flex-end; }
}

.current-status {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin-bottom: 2rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.current-status time, .log-meta time, .recent-log time { font-variant-numeric: tabular-nums; }

.recent-log {
  margin-bottom: clamp(2.75rem, 6vw, 4.5rem);
}

.project-detail .recent-log, .project-page .recent-log { margin-block: 2rem; }
.recent-log__list { list-style: none; padding: 0; margin: 0; }
.recent-log__list li {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  align-items: baseline;
  gap: 0.6rem;
  padding-block: 0.55rem;
  border-bottom: 1px solid var(--rule);
  max-width: var(--measure);
}
.recent-log__list a { justify-self: start; }

.log-archive { padding-bottom: 4rem; }
.log-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
  font: 0.85rem/1.35 var(--sans);
}
.log-filters__field { display: grid; gap: 0.3rem; }
.log-filters :is(select, button) {
  background: var(--paper);
  color: var(--ink);
  min-height: 2.75rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--ink-faint);
  border-radius: 0;
  font: inherit;
}
.log-filters button { cursor: pointer; }
.log-filters a { align-self: center; }

.log-entry {
  padding-block: 1.5rem;
  border-top: 1px solid var(--rule);
  max-width: var(--measure);
}
.log-entry--detail { border: 0; }
.log-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  margin-bottom: 0.6rem;
}
.log-title { margin-bottom: 0.9rem; }
.log-image { margin: 1.25rem 0; }
.log-image img { max-block-size: 44rem; object-fit: contain; }
.log-entry__actions, .log-pages { display: flex; gap: 1rem; }
.log-entry__actions, .article-reply { font-size: 0.9rem; }
.log-permalink { padding-top: clamp(2.5rem, 6vw, 4rem); }

/* Correspondência e compositor */
.editor-form, .editor-form label { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: .55rem; }
.editor-form { max-width: 45rem; margin-block: 1rem 1.8rem; }
.editor-form [hidden] { display: none; }
.editor-form :is(input, textarea, select, button), .composer button, .newsletter-language select {
  min-height: 44px; padding: .55rem .7rem; border: 1px solid var(--ink-faint);
  background: var(--paper); color: var(--ink); border-radius: 0; font: .9rem/1.4 var(--sans);
  max-width: 100%; box-sizing: border-box;
}
.editor-form textarea { resize: vertical; }
.editor-form button, .composer button { justify-self: start; cursor: pointer; }
.editor-form p { margin: .15rem 0; }
.letter-section { max-width: var(--measure); margin-block: 1.8rem; }
.letter-section summary { cursor: pointer; min-height: 44px; padding-block: .5rem; }
.published-letter { border-bottom: 1px solid var(--rule); padding-block: .65rem; white-space: pre-line; }
.newsletter-lenses { border: 0; padding: 0; margin-block: .65rem; }
.newsletter-lenses label { display: inline-flex; align-items: center; min-height: 44px; gap: .3rem; margin-inline-end: .75rem; }
.newsletter-language { display: inline-flex; align-items: center; gap: .5rem; margin: 0 .55rem .55rem 0; }
.signup button { min-height: 44px; }
.composer { padding-block: 2rem 4rem; }
.composer-nav, .composer-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.composer-nav a { display: inline-flex; min-height: 44px; align-items: center; margin-inline-end: .65rem; }
.composer section { margin-block: 1.55rem; }
.composer-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: .55rem; }
.composer-photo { display: flex; align-items: flex-end; gap: .55rem; flex-wrap: wrap; padding-block: .35rem; }
.composer-photo label { flex: 1 1 13rem; }
.editor-list { list-style: none; padding: 0; max-width: 45rem; }
.editor-list li { padding-block: .7rem; border-bottom: 1px solid var(--rule); }
.editor-list button { margin: .2rem .25rem .2rem 0; }
.editor-list .link { margin-inline-end: .6rem; }
.card-output { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 1.5rem; align-items: start; }
.card-output > section { min-width: 0; }
.card-output canvas { width: 100%; height: auto; display: block; margin-block: .65rem; border: 1px solid var(--rule); }

.now-history { max-width: var(--measure); margin-top: 2rem; }
.now-history summary { min-height: 44px; padding-block: .5rem; cursor: pointer; border-bottom: 1px solid var(--rule); }

.now-history .log-pages { margin-top: .85rem; }
