/* Hakkotome manual — the framed look (Ben, 5 Oct 2026). Loaded AFTER frame.css, which supplies the brewery photo, the white frame,
   the top bar, the fonts and the glass look. Pages are built by build_manual.py (English: en/manual/, Japanese: manual/).
   No coloured edge lines anywhere (Ben, 29 Sep 2026): the open area and the section you are reading are shown with a fill, not a bar. */

.manual .frame { inset: 26px; }
.manual .top .links a.on { color: #fff; }

/* Two glass cards side by side: the contents, and the page. Each scrolls on its own. */
.manual .stage { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 22px; padding: 6px 40px 28px; inset: 74px 0 0 0; }
.manual .side, .manual main { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.35) transparent; scroll-behavior: smooth; }
.manual .side { padding: 20px 14px 28px 18px; }
.manual main { padding: 0; background: none; }
.manual .doc { max-width: 880px; margin: 0 auto; padding: 34px 44px 44px; min-height: 100%; }

/* Contents */
.side .search { position: relative; margin: 0 0 16px; }
.side .search input { width: 100%; padding: 10px 34px 10px 14px; font: inherit; font-size: 15px; color: #fff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.28); border-radius: 999px; outline: none; }
.side .search input:focus { border-color: rgba(255,255,255,.7); background: rgba(255,255,255,.12); }
.side .search input::placeholder { color: rgba(255,255,255,.55); }
.side .search svg { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); pointer-events: none; color: rgba(255,255,255,.6); }
.side .label { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #E9E1CC; margin: 0 0 8px 12px; }
.side ol { list-style: none; margin: 0; padding: 0; }
.side summary { list-style: none; display: flex; gap: 10px; padding: 8px 12px; border-radius: 14px; color: rgba(255,255,255,.78); font-size: 15px; cursor: pointer; }
.side summary::-webkit-details-marker { display: none; }
.side summary:hover { background: rgba(255,255,255,.1); color: #fff; }
.side summary .n { width: 22px; flex: none; color: rgba(255,255,255,.5); font-variant-numeric: tabular-nums; }
.side summary .t { flex: 1; }
.side summary .chev { color: rgba(255,255,255,.5); transition: transform .15s; }
.side details[open] > summary .chev { transform: rotate(90deg); }
.side .job.open > details > summary { background: rgba(255,255,255,.16); color: #fff; font-weight: 600; }
.side .job.open > details > summary .n { color: var(--accent-text); }
.side .sections { margin: 4px 0 10px 40px; }
.side .sections a { display: block; padding: 5px 12px; border-radius: 10px; font-size: 14px; line-height: 1.4; color: rgba(255,255,255,.62); text-decoration: none; }
.side .sections a:hover { color: #fff; background: rgba(255,255,255,.08); }
.side .sections a.here { color: #fff; background: rgba(255,255,255,.14); font-weight: 600; }
.side .sitelinks { display: none; }

/* Search results */
.side .results { display: none; }
.side.searching .results { display: block; }
.side.searching ol, .side.searching .label { display: none; }
.results .count { font-size: 13px; color: rgba(255,255,255,.65); margin: 0 0 10px 6px; }
.results .hit { display: block; padding: 10px 14px; margin-bottom: 8px; border-radius: 16px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); text-decoration: none; }
.results .hit:hover { background: rgba(255,255,255,.14); }
.results .hit .t { font-size: 14px; font-weight: 600; color: #fff; }
.results .hit .a { font-size: 12px; color: rgba(255,255,255,.55); margin: 1px 0 4px; }
.results .hit .s { font-size: 13px; color: rgba(255,255,255,.78); line-height: 1.45; }
mark { background: rgba(240,100,58,.45); color: #fff; border-radius: 3px; padding: 0 2px; }

/* The page */
.doc .crumb { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #E9E1CC; }
.doc h1 { font-size: clamp(30px, 3.6vw, 46px); margin: 8px 0 8px; }
html[lang="en"] .doc h1 { font-size: clamp(30px, 3.4vw, 44px); }
.doc section { padding-top: 40px; scroll-margin-top: 14px; }
.doc section:first-of-type { padding-top: 28px; }
.doc h2 { display: flex; gap: 14px; align-items: baseline; font-size: clamp(22px, 2.4vw, 30px); margin: 0 0 14px; text-transform: none; }
html[lang="en"] .doc h2 { text-transform: none; font-size: clamp(22px, 2.3vw, 29px); }
.doc h2 .n { font-family: var(--sans); font-size: 14px; font-weight: 700; letter-spacing: .04em; -webkit-text-fill-color: var(--accent-text); color: var(--accent-text); background: none; }
.doc h3 { font-family: var(--sans); font-size: 18px; font-weight: 600; color: #fff; margin: 28px 0 8px; line-height: 1.35; }
.doc p, .doc li { font-size: 17px; line-height: 1.7; color: rgba(255,255,255,.88); }
html[lang="ja"] .doc p, html[lang="ja"] .doc li { line-height: 1.9; }
.doc p { margin: 12px 0; }
.doc ul, .doc ol { padding-left: 24px; margin: 10px 0 16px; }
.doc li { padding: 3px 0; }
.doc li::marker { color: var(--accent-text); }
.doc strong, .doc b { color: #fff; font-weight: 650; }
.doc a { color: var(--accent-text); text-underline-offset: 3px; }
.doc a.wiki { color: #fff; text-decoration: none; border-bottom: 1px dotted var(--accent-text); }
.doc a.wiki:hover { color: var(--accent-text); }
.doc span.wiki { border-bottom: 1px dotted rgba(255,255,255,.4); }
.doc code { font-size: .92em; background: rgba(255,255,255,.12); border-radius: 6px; padding: 1px 6px; }
.doc table { border-collapse: collapse; margin: 16px 0; font-size: 15px; display: block; overflow-x: auto; }
.doc td, .doc th { border: 1px solid rgba(255,255,255,.22); padding: 7px 12px; text-align: left; vertical-align: top; color: rgba(255,255,255,.88); }
.doc th { background: rgba(255,255,255,.1); color: #fff; }
.doc blockquote { margin: 16px 0; padding: 12px 18px; border-radius: 18px; background: rgba(243,239,230,.1); border: 1px solid rgba(243,239,230,.3); }
.doc blockquote p { margin: 4px 0; font-size: 16px; }
.doc img.pic { display: block; max-width: 100%; margin: 18px 0; border-radius: 14px; box-shadow: 0 20px 50px -20px rgba(0,0,0,.7); background: #fff; cursor: zoom-in; }
.doc img.pic.close { max-width: 420px; }

/* The "not built yet" lines are written in dark red in the source; on glass they need to be light */
.doc strong[style*="d00000"], .doc b[style*="d00000"] { color: #FF8A78 !important; -webkit-text-fill-color: #FF8A78 !important; }
.doc .draft { margin: 0 0 20px; padding: 10px 16px; border-radius: 16px; font-size: 14px; color: #FFC1B6; background: rgba(210,60,40,.2); border: 1px solid rgba(255,138,120,.5); }

.doc .next { margin-top: 56px; padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid rgba(255,255,255,.2); font-size: 15px; }
.doc .next a { font-weight: 600; text-decoration: none; color: #fff; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; padding: 8px 18px; }
.doc .next a:hover { background: rgba(255,255,255,.16); }

/* Phone and tablet: no frame, one page, and the contents lift from the bottom (same idea as the website's phone menu) */
@media (max-width: 900px) {
  .manual .frame { inset: 0; }
  .manual .stage { display: block; padding: 0 14px 96px; inset: 64px 0 0 0; }
  .manual main { height: 100%; }
  .manual .doc { padding: 22px 20px 32px; border-radius: 20px; }
  .doc p, .doc li { font-size: 16px; }
  .doc .next { flex-direction: column; }
  .manual .side { position: fixed; left: 14px; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 8; max-height: calc(100vh - 100px); max-height: calc(100dvh - 100px);
    border-radius: 28px; background: rgba(14,14,13,.97); opacity: 0; visibility: hidden; transform: translateY(20px); transition: opacity .2s, transform .2s, visibility .2s; }
  .manual .side.open { opacity: 1; visibility: visible; transform: none; }
  .side .sitelinks { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
  .side .sitelinks a { border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 600; text-decoration: none; color: #fff; }
}
@media (min-width: 901px) and (max-width: 1100px) { .manual .stage { grid-template-columns: 260px minmax(0, 1fr); padding: 6px 28px 28px; gap: 16px; } .doc { padding: 28px 30px 40px; } }

/* Contents button (phone only) and picture zoom */
.manual .mbtn { display: none; }
@media (max-width: 900px) {
  .manual .mbtn { display: block; width: auto; right: auto; position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 7; background: rgba(14,14,13,.92); color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 12px 26px; font: 600 15px Inter, sans-serif; }
  .manual .mscrim { position: fixed; inset: 0; z-index: 7; background: rgba(0,0,0,.45); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
  .manual .mscrim.open { opacity: 1; visibility: visible; }
}
.manual .lb { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.85); display: none; align-items: center; justify-content: center; cursor: zoom-out; }
.manual .lb.open { display: flex; }
.manual .lb img { max-width: 94vw; max-height: 92vh; border-radius: 10px; }
