@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/inter-700.woff2") format("woff2");
}

[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  background: #f8fafc;
  color: #183042;
  font: 18px/1.6 Inter, sans-serif;
}

body.home {
  background:
    linear-gradient(#140e0a59, #140e0a40),
    url("/pictures/arrival.jpg") center / cover no-repeat fixed;
  color: #fff;
}

body.page {
  background:
    linear-gradient(#140e0acc, #140e0acc),
    url("/pictures/arrival.jpg") center / cover no-repeat fixed;
  color: #fff;
}
body.skin-coffee {
  --journal-ink: #2a1812;
  --journal-accent: #6b3a2a;
  --journal-gold: #e1b84c;
  --journal-paper: #f6efe8;
}

a { color: inherit; }
body.home a { color: #fff; }

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
}
.skip:focus {
  left: 16px;
  background: #fff;
  color: #183042;
  padding: 8px 12px;
  z-index: 5;
}

header, main, footer {
  width: 100%;
  box-sizing: border-box;
}

header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 22px 28px 8px;
}

header strong {
  font-size: 29px;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
}

header nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px 16px;
  font-size: 18px;
  min-width: 0;
}

header nav a {
  color: inherit;
  text-decoration: underline;
  padding: 8px 0;
  white-space: nowrap;
}

header > a.rail {
  justify-self: start;
  text-decoration: underline;
  font-size: 18px;
}

.mission-entry {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.site-subtitle {
  margin: 0;
  font-size: 21px;
  line-height: 1.45;
  flex: 0 1 auto;
}

header > .site-subtitle { grid-column: 1 / -1; }

.factory-start {
  flex: none;
  cursor: pointer;
  background: #f5cc37;
  color: #172a35;
  border: 2px solid #ffe783;
  border-radius: 999px;
  padding: 12px 24px;
  font: 700 20px/1.2 system-ui, sans-serif;
  box-shadow: 0 3px 16px #0005;
  animation: entry-pulse 1.7s ease-in-out 3;
}
.factory-start:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}
@keyframes entry-pulse {
  50% { box-shadow: 0 0 0 8px #f5cc3740, 0 3px 16px #0005; }
}
@media (prefers-reduced-motion: reduce) {
  .factory-start { animation: none; }
}

main { flex: 1; padding: 0 24px 32px; }

body.home .factory-entry {
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 20px;
}
body.home .factory-entry:focus {
  outline: 3px solid #f5cc37;
  outline-offset: 5px;
}
body.home .factory-entry > h1 {
  margin: 0 0 20px;
  padding: 0;
  background: transparent;
  color: #fff;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 700;
}
body.home .factory-content-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
body.home .factory-content-column {
  background: var(--journal-paper, #f6efe8);
  border-top: 5px solid var(--journal-gold, #e1b84c);
  border-radius: 14px;
  padding: 18px;
  min-width: 0;
  box-shadow: 0 10px 24px #2a181033;
}
body.home .factory-content-column > h2 {
  margin: 0 0 14px;
  font-family: Inter, sans-serif;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
  color: #3e2a1c;
}
.journal-publication-date {
  font-size: 14px;
  color: #5c4e42;
  background: #fff;
  padding: 5px 10px;
  border-radius: 6px;
  width: fit-content;
}
.factory-content-card .journal-publication-date {
  font-size: 12px;
  margin: 0 0 10px;
}
.factory-content-card img {
  width: 100%;
  height: 165px;
  object-fit: cover;
  border-radius: 9px;
  display: block;
}
.factory-content-card p {
  margin: 12px 0;
  font-size: 15px;
  line-height: 1.6;
  color: #3e2a1c;
}
.factory-content-card .kicker {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #5a3824;
}
body.home .factory-content-column a {
  color: #5a3824;
  font-weight: 700;
}
.factory-archive-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 14px;
}
.card-title { font-weight: 700; }

.journal-return { padding: 12px 24px 0; }
.journal-return a { text-decoration: underline; }

.factory-page-document {
  background: var(--journal-paper, #f6efe8);
  color: var(--journal-ink, #2a1812);
  border: 1px solid #ffffff80;
  border-top: 5px solid var(--journal-gold, #e1b84c);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 8px 24px #0002;
  margin: 16px auto 40px;
  max-width: 760px;
}
.archive-title { color: #fff; margin: 8px 24px 0; }
.factory-page-document :is(h1, h2, h3, p, li) { color: var(--journal-ink, #2a1812); }
.factory-page-document a { color: var(--journal-accent, #6b3a2a); }
.factory-page-document h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.factory-page-document h2 {
  margin: 1.3em 0 0.4em;
  font-size: 30px;
  line-height: 1.25;
}
.factory-page-document .journal-publication-date {
  background: transparent;
  color: #183042;
  padding: 0;
  font-size: 18px;
  margin: 0 0 16px;
}
.factory-page-document figure {
  width: fit-content;
  max-width: 100%;
  margin: 8px auto 24px;
}
.factory-page-document figure img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 540px;
  object-fit: contain;
  display: block;
}
.factory-page-document figcaption {
  font-size: 13px;
  color: #183042;
  margin-top: 6px;
}
.factory-page-document p,
.factory-page-document li {
  font-size: 18px;
  line-height: 1.6;
}
.factory-page-document a { color: #5a3824; }
.catalog-product { margin: 0 0 16px; }
.catalog-product strong { display: block; }
.catalog-product p { margin: 0; }
.kicker {
  font-weight: 700;
  margin-bottom: 0;
}

.archive-title {
  display: inline-block;
  margin: 8px 0 12px;
  font-size: 32px;
  line-height: 1.2;
  color: #183042;
  background: #fff;
  padding: 12px 16px;
  border-radius: 12px;
}
.archive-intro { margin: 0 0 12px; }
.factory-content-archive {
  list-style: none;
  margin: 0;
  padding: 0;
}
.factory-content-archive li { margin: 16px 0; }
.factory-content-archive li > a {
  color: #5a3824;
  font-size: 21px;
  font-weight: 700;
}

.aps-product-credit {
  margin: 0;
  padding: 8px 24px 0;
  font-size: 14px;
}

.aps-final-footer {
  box-sizing: border-box;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin-top: auto;
  padding: 12px 24px;
  font-size: 14px;
  flex-shrink: 0;
}
.aps-footer-row {
  display: flex;
  align-items: baseline;
  gap: 3px;
  flex: 0 1 auto;
  padding: 0;
}
.aps-final-footer .aps-footer-row > a,
.aps-final-footer .aps-journal-trigger {
  font: inherit;
  color: inherit;
  text-decoration: underline;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  white-space: nowrap;
}
.aps-journal-picker { display: inline-flex; }
.aps-journal-options {
  position: fixed;
  z-index: 1000;
  box-sizing: border-box;
  max-height: min(240px, 60vh);
  overflow: auto;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 8px;
  border: 1px solid currentColor;
  border-radius: 4px;
  background: #183042;
  color: #fff;
  box-shadow: 0 3px 12px #0003;
}
.aps-journal-options ul { list-style: none; padding: 0; margin: 0; }
.aps-journal-options a {
  display: block;
  padding: 10px 12px;
  color: inherit;
  text-decoration: underline;
}
.aps-footer-copyright {
  font: inherit;
  white-space: nowrap;
  margin-left: auto;
}
.aps-final-footer a:focus-visible,
.aps-final-footer button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

body.page .aps-final-footer {
  background: #fffffff2;
  color: #183042;
  border-top: 1px solid #aebdb5;
  padding-top: 20px;
  padding-bottom: 20px;
}
body.page .aps-final-footer a,
body.page .aps-journal-trigger { color: #5a3824; }

@media (max-width: 1100px) {
  .aps-final-footer {
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    font-size: 13px;
  }
  .aps-footer-row {
    flex-wrap: wrap;
    white-space: normal;
    gap: 3px;
    line-height: 1.6;
  }
  .aps-footer-copyright {
    white-space: normal;
    font-size: 12px;
    text-align: right;
  }
  .aps-final-footer .aps-journal-trigger { white-space: normal; }
}

.brew-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 8px;
  font-size: 16px;
}
.brew-table th,
.brew-table td {
  border-bottom: 1px solid #fff4;
  padding: 14px 12px;
  text-align: left;
  vertical-align: top;
}
.brew-table img {
  display: block;
  width: 160px;
  height: 90px;
  object-fit: cover;
  margin: 0 0 8px;
}
.brew-table th span { display: block; font-size: 18px; }
.guide-date { margin-top: 0; }

@media (max-width: 900px) {
  header { display: block; }
  header strong {
    white-space: normal;
    overflow-wrap: break-word;
  }
  header nav {
    justify-content: flex-start;
    margin-top: 8px;
  }
  header > a.rail { display: inline-block; margin-top: 8px; }
  .site-subtitle { margin-top: 12px; }
}

@media (max-width: 700px) {
  body.home .factory-content-row { grid-template-columns: 1fr; }
  body.home .factory-entry { padding: 24px 14px; }
  body.home .factory-entry > h1 { font-size: 25px; }
  .factory-content-card img { height: 180px; }
  .factory-page-document { padding: 20px 16px; }
}
