/* heiberg theme: layout, header, footer, rows, page templates. */
.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--pad); }
@media (max-width: 639px) { .wrap { padding: 0 20px; } }

/* ---- header ---- */
.site-header { padding: 22px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-name { font-weight: 600; letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 14px; }
.nav a { color: var(--ink); }
.nav a:hover { color: var(--accent); }
.nav .book-link { color: var(--accent); font-weight: 500; }
.menu { display: none; }
.menu summary {
  list-style: none; cursor: pointer; font-size: 14px; padding: 6px 0;
}
.menu summary::-webkit-details-marker { display: none; }
.menu-list {
  position: absolute; left: 0; right: 0; top: 100%; background: var(--paper);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: 8px 20px 16px; display: flex; flex-direction: column;
}
.menu-list a { padding: 12px 0; font-size: 18px; border-bottom: 1px solid var(--rule); }
.menu-list a:last-child { border-bottom: 0; }
.site-header { position: relative; }
@media (max-width: 639px) {
  .nav { display: none; }
  .menu { display: block; }
}

/* ---- footer ---- */
.site-footer { margin-top: 96px; padding: 28px 0 40px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--mist); }
.site-footer a { color: var(--ink); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.footer-socials, .footer-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer a:hover { color: var(--accent); }

/* ---- sections with the label column ---- */
main { padding-bottom: 8px; }
.section { display: grid; grid-template-columns: var(--label) minmax(0, 1fr); column-gap: var(--gap); padding: 40px 0; }
.section-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mist); padding-top: 6px; }
.section-body { min-width: 0; max-width: var(--wide); }
@media (max-width: 639px) {
  .section { grid-template-columns: 1fr; padding: 28px 0; }
  .section-label { padding: 0 0 12px; }
}

/* ---- hairline rows ---- */
.rows { border-bottom: 1px solid var(--rule); margin-bottom: 20px; }
.row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  padding: 14px 0; border-top: 1px solid var(--rule); overflow-wrap: anywhere;
}
.row-main { flex: 1; min-width: 0; }
.row-main small { display: block; color: var(--mist); font-size: 14px; }
.row-side { color: var(--mist); font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; }
a.row:hover .row-main { color: var(--accent); }
@media (max-width: 639px) {
  .row { flex-direction: column; gap: 2px; }
  .row-side { text-align: left; }
}

/* ---- homepage ---- */
.hero { padding: 56px 0 8px; }
.hero h1 { max-width: 18em; margin-bottom: 0.4em; }
.sub { color: var(--mist); font-size: 17px; margin: 0 0 0.8em; }
.latest { display: block; margin-bottom: 20px; }
.latest img { display: block; width: 100%; max-width: var(--wide); border-radius: var(--radius); margin-bottom: 14px; }
.latest h3 { margin: 0 0 4px; }
.latest:hover h3 { color: var(--accent); }
.meta { color: var(--mist); font-size: 14px; }
.services ul { list-style: none; padding: 0; margin: 0 0 20px; border-bottom: 1px solid var(--rule); }
.services li {
  position: relative; padding: 14px 0 14px calc(37% + var(--gap)); border-top: 1px solid var(--rule);
  color: var(--mist); overflow-wrap: anywhere;
}
.services li > strong:first-child { position: absolute; left: 0; top: 14px; width: 37%; color: var(--ink); font-weight: 500; }
@media (max-width: 639px) { .services li { padding-left: 0; } .services li > strong:first-child { position: static; display: block; width: auto; } }

/* ---- newsletter ---- */
.subscribe-sub { color: var(--mist); max-width: 46ch; }
.subscribe-form { display: flex; flex-wrap: wrap; gap: 10px; max-width: 460px; }
.subscribe-input {
  flex: 1 1 220px; min-width: 0; font: inherit; padding: 10px 12px; background: #fff;
  border: 1px solid var(--rule); border-radius: 4px; color: var(--ink);
}
.msg { display: none; flex-basis: 100%; margin: 0; font-size: 14px; color: var(--mist); }
.subscribe-form.loading .msg-loading,
.subscribe-form.success .msg-success,
.subscribe-form.error .msg-error { display: block; }
.subscribe-form.error .msg-error { color: var(--accent); }

/* ---- article: same label-column grid as the home page, so everything shares one left edge ---- */
.article { max-width: var(--page); margin: 0 auto; padding: 40px var(--pad) 0; display: grid; grid-template-columns: var(--label) minmax(0, 1fr); column-gap: var(--gap); }
.article > .section-body { max-width: var(--wide); }
.article > .section-label span { display: block; }
.article > .section-label .num { text-transform: none; letter-spacing: 0; font-size: 13px; margin: 2px 0; }
@media (max-width: 639px) {
  .article { grid-template-columns: 1fr; padding: 24px 20px 0; }
  .article > .section-label { padding: 0 0 14px; }
  .article > .section-label span { display: inline; }
  .article > .section-label span + span::before { content: " · "; }
}
.article-title { font-size: clamp(28px, 4.2vw, 44px); margin-bottom: 0.35em; }
.dek { font-size: 19px; line-height: 1.5; color: var(--mist); margin: 0 0 28px; max-width: var(--measure); }
.article-image { margin: 0 0 36px; }
.article-image img { display: block; width: 100%; border-radius: var(--radius); }
.article-image figcaption { color: var(--mist); font-size: 13px; margin-top: 8px; }
.article-body { max-width: var(--measure); }
.article-body > * { margin-top: 0; }
.article-body h2 { margin-top: 1.8em; }
.article-body h3 { margin-top: 1.5em; }
.article-body ul, .article-body ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.article-body li { margin-bottom: 0.35em; }
.article-end { max-width: var(--measure); margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--rule); }
.article-end-text { font-weight: 500; margin-bottom: 10px; }

/* ---- services, product, about, lists, pagination ---- */
.services-page .dek { margin-bottom: 40px; }
.services-body { max-width: none; display: grid; grid-template-columns: 180px minmax(0, 1fr); }
.services-body > * { grid-column: 2; max-width: 60ch; margin: 0; }
.services-body > h2 { grid-column: 1; max-width: none; font-size: 22px; margin: 0; padding: 18px 0 22px; border-top: 1px solid var(--rule); }
.services-body > h2 + p { padding-top: 20px; margin: 0 0 0.5em; border-top: 1px solid var(--rule); max-width: none; padding-right: 0; }
.services-body > h2 + p + p { color: var(--mist); font-size: 14px; padding-bottom: 22px; }
.services-body > h2 + p, .services-body > h2 + p + p { max-width: none; }
.services-body > h2 + p > *, .services-body > h2 + p + p > * { }
@media (max-width: 639px) {
  .services-body { grid-template-columns: 1fr; }
  .services-body > h2, .services-body > * { grid-column: 1; }
  .services-body > h2 { padding-bottom: 6px; }
  .services-body > h2 + p { border-top: 0; padding-top: 0; }
}
.book-block { max-width: var(--measure); margin-top: 48px; padding: 28px 0 0; border-top: 1px solid var(--ink); }
.book-block-text { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.3; margin-bottom: 16px; }
.visit { margin: 0 0 28px; }
.status { color: var(--mist); font-size: 0.4em; letter-spacing: 0; font-weight: 400; vertical-align: middle; margin-left: 0.4em; white-space: nowrap; }
.about-portrait { display: block; width: 100%; height: auto; border-radius: var(--radius); margin-bottom: 36px; }
.pagination { display: flex; justify-content: space-between; gap: 16px; color: var(--mist); font-size: 14px; padding-top: 4px; }
.pagination a:hover { color: var(--accent); }
.section-body h1 { margin-bottom: 0.3em; }

/* ---- share and related ---- */
.share { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: baseline; margin: 40px 0 0; font-size: 14px; color: var(--mist); }
.share-label { text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; }
.share a { color: var(--ink); }
.share a:hover { color: var(--accent); }
.share + .article-end { margin-top: 20px; }
.related { margin-top: 56px; }
.related-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mist); margin: 0 0 12px; }

/* ---- header Book a call: the one filled button in the nav ---- */
.site-header .book-link {
  background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 4px; font-weight: 500; line-height: 1.2;
}
.site-header .nav .book-link:hover, .site-header .menu-list .book-link:hover { color: #fff; filter: brightness(0.92); }
.menu-list .book-link { display: inline-block; align-self: flex-start; margin-top: 14px; font-size: 16px; border-bottom: 0; }

/* tables inside text scroll on their own instead of breaking the page */
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.menu-list { z-index: 50; }

/* ---- cookie banner: injected through Ghost code injection (#hi-consent), restyled here to match ---- */
#hi-consent, #hi-prefs {
  font-family: var(--font); color: var(--ink); background: var(--paper);
  border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  padding: 24px;
}
#hi-consent h4, #hi-prefs h4 {
  font-family: var(--font); font-size: 15px; font-weight: 600; letter-spacing: -0.01em; text-transform: none; color: var(--ink); margin: 0 0 8px;
}
#hi-consent p { font-size: 14px; line-height: 1.5; color: var(--mist); margin: 0 0 16px; }
#hi-consent a { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
#hi-consent .hi-btn, #hi-prefs .hi-btn-save {
  font-family: var(--font); font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none;
  border-radius: 4px; padding: 10px 16px; opacity: 1;
}
#hi-consent .hi-btn-accept, #hi-prefs .hi-btn-save { background: var(--accent); color: #fff; }
#hi-consent .hi-btn-decline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); }
#hi-consent .hi-btn:hover, #hi-prefs .hi-btn-save:hover { opacity: 1; filter: brightness(0.92); }
#hi-consent .hi-btn-manage {
  font-family: var(--font); font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--mist);
}
#hi-prefs .hi-pref-row { border-top-color: var(--rule); font-size: 14px; }
#hi-prefs .hi-pref-label { color: var(--ink); }
#hi-prefs .hi-pref-desc { font-size: 12px; color: var(--mist); }
#hi-prefs .hi-toggle { background: var(--rule); }
#hi-prefs .hi-toggle::after { background: var(--mist); }
#hi-prefs .hi-toggle.on { background: var(--accent); }
#hi-prefs .hi-toggle.on::after { background: #fff; }
