@font-face { font-family: "EB Garamond"; src: url("/assets/berlin-fonts/eb-garamond.woff2") format("woff2"); font-display: swap; font-weight: 400 800; }
@font-face { font-family: "DM Sans"; src: url("/assets/berlin-fonts/dm-sans.woff2") format("woff2"); font-display: swap; font-weight: 100 900; }

:root {
  --ink: #232323;
  --blue: #2269bd;
  --line: #e3e3e3;
  --bar: #f1f1f1;
  --edge: clamp(15px, 3vw, 36px);
  --sans: "DM Sans", Arial, sans-serif;
  --serif: "EB Garamond", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: white; font: 16px/1.55 var(--sans); overflow-wrap: break-word; }
a { color: inherit; text-underline-offset: .18em; }
img { display: block; max-width: 100%; height: auto; }
:is(h1, h2, h3, p, figure) { margin: 0; }
:is(h1, h2, h3) { font: 400 25px/1.22 var(--serif); hyphens: auto; }
button, input { font: inherit; }
button { cursor: pointer; }
:is(a, button, input, summary):focus-visible { outline: 2px solid #245c97; outline-offset: 4px; }
.frame { width: min(940px, calc(100% - 2 * var(--edge))); margin-inline: auto; }
.skip { position: fixed; left: 12px; top: 8px; z-index: 5; transform: translateY(-150%); padding: 6px 14px; background: white; }
.skip:focus { transform: none; }

.masthead { background: var(--bar); }
.masthead-inner { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; gap: 20px; min-height: 79px; width: min(1170px, calc(100% - 2 * var(--edge))); margin: auto; }
.masthead nav, .blog-nav, .rubrics, .footer nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22px; }
.masthead nav { justify-content: center; }
.masthead a { font-size: 13px; text-decoration: none; }
.masthead a:hover { color: var(--blue); text-decoration: underline; }
.header-search, .header-rss { display: grid; place-items: center; min-height: 44px; }
.mobile-menu { display: none; }

.hero { min-height: 475px; padding: 98px 20px 40px; display: grid; place-items: start center; text-align: center; position: relative; isolation: isolate; color: white; background: #264e78; }
.hero > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 54%; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(#0d25373a 0%, #0d253752 48%, #0d253714 100%); }
.hero h1 { font: 750 clamp(42px, 5.4vw, 78px)/1.12 var(--sans); letter-spacing: -.018em; }
.hero p { font-size: 18px; }
.home-intro { width: min(974px, calc(100% - 2 * var(--edge))); margin: auto; padding: 52px 0 73px; text-align: center; }
.home-intro > p { margin: 0 auto 43px; max-width: 650px; min-height: 47px; }
.home-intro nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.home-intro nav a { position: relative; isolation: isolate; display: grid; place-items: center; aspect-ratio: 314 / 260; color: #24577f; text-decoration: none; }
.home-intro nav img { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.home-intro nav span { background: white; min-width: 132px; padding: 11px 12px; font: 23px/1.15 var(--serif); }
.home-intro nav a:hover span { text-decoration: underline; }
.rubrics { background: var(--bar); min-height: 164px; justify-content: center; padding: 24px var(--edge); text-align: center; }
.rubrics strong { padding-right: 22px; border-right: 1px solid #858585; font: 24px var(--serif); }
.rubrics a { font-weight: 650; text-decoration: none; }
.rubrics a:hover { text-decoration: underline; }

.home-feed { padding: 89px 0 40px; }
.home-feed .journal-cards > .post-card:nth-child(n + 4) { display: none; }
.blog-nav { min-height: 80px; padding-block: 17px; font-size: 15px; }
.blog-nav h1 { color: var(--blue); font: inherit; }
.blog-nav a { text-decoration: none; }
.blog-nav a:hover { text-decoration: underline; }
.blog-nav a:last-child { margin-left: auto; }
.blog-feed { padding: 20px 0 45px; }
.berlin-journal .journal-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 42px; }
.post-card { min-width: 0; border: 1px solid var(--line); }
.post-card .cover-link { display: block; }
.post-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.blog-feed .post-card img { aspect-ratio: 940 / 411; }
.post-card :is(.card-copy, a > div) { padding: 25px 40px 24px; }
.blog-feed .post-card :is(.card-copy, a > div) { padding: 33px 48px 27px; }
.blog-feed .card-copy { min-height: 298px; display: flex; flex-direction: column; }
.blog-feed .meta { display: grid; gap: 0; }
.blog-feed .meta time::before { content: none; }
.blog-feed .card-foot { margin-top: auto; }
.post-card h2 { margin: 12px 0; font-size: 24px; }
.blog-feed .post-card :is(h2, h3) { font-size: 28px; }
.post-card :is(h2, h3) a, .post-card > a { text-decoration: none; }
.post-card a:hover :is(h2, h3), .post-card :is(h2, h3) a:hover { text-decoration: underline; }
.meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; color: #515151; font-size: 13px; }
.meta time::before { content: " · "; }
.excerpt { margin-bottom: 22px; }
.card-foot { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; padding-top: 13px; border-top: 1px solid var(--line); font-size: 13px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 39px; padding: 6px 18px; background: var(--blue); color: #fff; border: 0; text-decoration: none; cursor: pointer; }
.button:hover { text-decoration: underline; }
.home-feed > .button { margin-top: 26px; }
.pagination { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 22px; align-items: center; }
.pagination :is(a, span) { min-width: 38px; padding: 8px; text-align: center; }
.pagination [aria-current] { color: white; background: var(--blue); }

.reading, .article main > .story { margin-top: 20px; padding: 60px clamp(17px, 7vw, 99px) 59px; border: 1px solid var(--line); }
.article main > .story { width: min(940px, calc(100% - 2 * var(--edge))); margin: 60px auto; }
:is(.reading, .article main > .story) h1 { margin: 31px 0 19px; font-size: 40px; line-height: 1.25; }
.reading :is(.lead, .dek) { margin-bottom: 23px; font-weight: 650; }
:is(.reading, .article main > .story) > figure { margin: 21px 0; }
:is(.reading, .article main > .story) > figure img { width: 100%; max-height: 570px; object-fit: contain; background: #f6f6f6; }
.reading figcaption { margin-top: 7px; font-size: 13px; color: #515151; }
.prose { font-size: 18px; line-height: 1.57; }
.prose :is(p, ul, ol, blockquote, table, figure) { margin: 0 0 17px; }
.prose :is(h2, h3) { margin: 24px 0 9px; }
.prose a { color: #21568d; }
.prose aside { padding: 11px 15px; border-inline-start: 2px solid var(--blue); background: #f6f8fb; }
.prose blockquote { padding: 4px 0 4px 19px; border-inline-start: 2px solid var(--blue); font: italic 24px/1.4 var(--serif); }
.prose :is(aside, blockquote) :last-child { margin-bottom: 0; }
.table-scroll { max-width: 100%; overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; }
.prose :is(th, td) { border: 1px solid var(--line); padding: 7px; vertical-align: top; }
.entry-end { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 14px; display: flex; gap: 10px 16px; flex-wrap: wrap; }
.related { padding: 30px 0 58px; }
.related header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.related header h2 { font: 400 18px/1.5 var(--sans); }
.berlin-journal .related .journal-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.related .card-copy { padding: 15px 20px; }
.related .excerpt, .related .meta { display: none; }
.related h3 { font-size: 22px; }

.footer { color: #fff; background: #666; }
.footer nav { min-height: 75px; padding: 14px var(--edge); background: var(--blue); justify-content: center; font-size: 14px; }
.footer-inner { padding: 205px 0 35px; display: grid; grid-template-columns: 1fr 1fr; gap: 38px 64px; }
.footer h2 { margin-bottom: 12px; }
.footer label { display: block; margin-bottom: 7px; }
.footer input { display: block; width: 100%; max-width: 100%; margin-bottom: 9px; padding: 6px 8px; border: 1px solid #d2d2d2; background: transparent; color: white; }
.footer-low { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; }
.editorial-preferences { padding: 6px 8px; background: white; border: 1px solid #ddd; color: #222; cursor: pointer; }
.editorial-consent { width: min(465px, calc(100% - 30px)); padding: 24px; border: 1px solid #aaa; color: var(--ink); }
.editorial-consent::backdrop { background: #0007; }
.editorial-consent h2 { margin-bottom: 9px; }
.editorial-consent-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.editorial-consent-actions button { min-height: 40px; padding: 7px 13px; background: white; border: 1px solid #555; }
.editorial-consent-actions button:hover { background: #edf5fc; }

.notice { padding-block: 48px 60px; min-height: 50vh; }
.notice h1 { font-size: 38px; margin-bottom: 15px; }
.notice form { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 16px; }
.notice label { flex-basis: 100%; }
.notice input { max-width: 100%; width: min(430px,100%); padding: 5px 8px; }
.notice li { padding-block: 5px; }

@media (max-width: 720px) {
  .masthead-inner { gap: 6px; min-height: 75px; }
  .masthead nav { gap: 0 12px; }
  .masthead nav a { min-height: 34px; display: inline-flex; align-items: center; }
  .hero { min-height: 330px; padding-top: 65px; }
  .home-intro { padding: 33px 0 38px; }
  .home-intro > p { margin-bottom: 25px; min-height: auto; }
  .home-intro nav { gap: 8px; }
  .home-intro nav a { aspect-ratio: .9; }
  .home-intro nav span { min-width: 0; padding: 6px; font-size: 17px; }
  .rubrics { min-height: 0; }
  .rubrics strong { width: 100%; border: 0; padding: 0; }
  .home-feed { padding-top: 39px; }
  .post-card :is(.card-copy, a > div), .blog-feed .post-card :is(.card-copy, a > div) { padding: 17px 19px; }
  .blog-feed .card-copy { min-height: auto; }
  .reading, .article main > .story { padding-block: 29px 36px; }
  :is(.reading, .article main > .story) h1 { margin-block: 15px; font-size: 33px; }
  .prose { font-size: 16px; }
  .related .journal-cards { gap: 13px; }
  .footer-inner { padding-top: 75px; gap: 24px; }
}

@media (max-width: 520px) {
  .masthead-inner { grid-template-columns: 44px 1fr 44px; min-height: 66px; }
  .masthead-inner > nav { display: none; }
  .mobile-menu { display: block; position: relative; text-align: center; }
  .mobile-menu summary { cursor: pointer; min-height: 44px; display: grid; place-items: center; font-size: 15px; }
  .mobile-menu nav { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); width: min(245px, 86vw); display: grid; z-index: 3; padding: 7px 14px; border: 1px solid var(--line); background: white; }
  .mobile-menu nav a { min-height: 44px; justify-content: center; font-size: 14px; }
  .berlin-journal .related .journal-cards, .footer-inner { grid-template-columns: 1fr; }
}
