/* homebrewserver.club
   Rebuilt from the site's 2019 theme: grey banner, blue Orkney site name,
   red links, Times body, grey boxes with a 1/1/4/4 offset border.
   Changed: works on phones, keyboard-friendly guides menu, readable contrast. */

@font-face {
  font-family: "OrkneyRegular";
  src: url("/assets/fonts/orkney-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "OrkneyRegular";
  src: url("/assets/fonts/orkney-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --page: #f6f6f6;
  --box: #eaeaea;
  --blue: #0074d9;
  --red: #ff4136;
  --link: #d62b1f; /* the old #FF4136, darkened only enough to pass 4.5:1 on grey */
  --text: #333;
  --head: #000;
  --rule: rgba(0, 116, 217, 0.5);
  --border: #555; /* the old boxes took their border from the #333 text colour */
  --orkney: "OrkneyRegular", "Avenir Next", "Century Gothic", "Segoe UI", sans-serif;
  --times: "Times New Roman", Times, "Liberation Serif", serif;
}

html { font-size: 22px; }
@media (max-width: 1100px) { html { font-size: 19px; } }
@media (max-width: 720px)  { html { font-size: 17px; } }

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--blue);
  font-family: var(--times);
  line-height: 1.6;
  letter-spacing: 0.05em;
}

a { color: var(--link); }
a:hover { color: var(--text); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 0.5em; }
.skip:focus { left: 0.5em; z-index: 10; }

/* ---------- header ---------- */

#banner {
  background: var(--box);
  text-align: center;
  padding: 1.6em 16px 1em;
}

#sitename {
  display: inline-block;
  color: var(--blue);
  text-decoration: none;
  font-family: var(--orkney);
  font-weight: 700;
  font-size: min(3rem, 8.4vw);
  line-height: 1.2;
  white-space: nowrap;
}

#menu {
  padding: 0.4em 0 0.6em;
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: lowercase;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 0.9em;
}
@media (max-width: 720px) { #menu { font-size: 1.15rem; } }

#menu a, .dropdown button { color: var(--red); } /* large bold text: the old red passes 3:1 */
#menu a:hover, .dropdown button:hover { color: var(--text); }
#menu a[aria-current="page"] { text-decoration-thickness: 3px; }

.dropdown { position: relative; display: inline-block; }

.dropdown button {
  font: inherit;
  letter-spacing: inherit;
  text-transform: lowercase;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}
.arrow { font-size: 0.75em; }

.guides-index {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 5;
  min-width: 13em;
  margin: 0;
  padding: 0.6em 1.2em 0.6em 1.6em;
  background: var(--box);
  border: solid var(--border);
  border-width: 1px 1px 4px 4px;
  text-align: left;
  font-size: 0.75em;
  font-weight: 400;
  white-space: nowrap;
}
.guides-index li { margin: 0.2em 0; }
@media (max-width: 720px) { .guides-index { left: auto; right: 0; } }
.dropdown:hover .guides-index,
.dropdown:focus-within .guides-index,
.dropdown.open .guides-index { display: block; }

/* ---------- content column ---------- */

#index {
  max-width: 65%;
  margin: 0 auto;
  padding: 3.5em 0 1em;
  color: var(--text);
}
@media (max-width: 1100px) { #index { max-width: 85%; } }
@media (max-width: 720px)  { #index { max-width: none; padding: 1.8em 16px 1em; } }

h1, h2, h3 {
  font-family: var(--orkney);
  color: var(--head);
  letter-spacing: 0.02em;
  line-height: 1.3;
}
h2 { font-size: 1.5rem; margin: 1.8em 0 0.5em; }
h3 { font-size: 1.15rem; margin: 1.4em 0 0.4em; text-decoration: underline; text-decoration-color: var(--rule); }

.entry-title {
  margin: 0 0 0.4em;
  font-size: 1.6rem;
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1.5;
}
.entry-title span {
  border-bottom: 2px solid var(--rule);
  padding-top: 0.2em;
}
@media (max-width: 720px) { .entry-title { font-size: 1.3rem; } }

.published, .tested { font-size: 0.8rem; color: #555; margin: 0.3em 0; }
.tested { font-style: italic; }

#content p { margin: 0 0 1em; }
.lede { font-size: 1.08rem; }

/* ---------- boxes: cards, toc, notes ---------- */

.hentry, .toc, .note, .warn, .signup {
  background: var(--box);
  border: solid var(--border);
  border-width: 1px 1px 4px 4px;
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 1.2em 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 1.4em 2%;
}
.post-item { flex: 0 1 31%; display: flex; }
@media (max-width: 1100px) { .post-item { flex-basis: 48%; } }
@media (max-width: 720px)  { .post-item { flex-basis: 100%; } }

.hentry { padding: 1.2em 1.3em; line-height: 1.35; width: 100%; }
.index-entry-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.5em;
  overflow-wrap: break-word;
}
.index-entry-title a { color: var(--head); text-decoration-color: var(--rule); }
.summary p { font-size: 0.85rem; margin: 0 0 0.6em !important; }
.more { font-size: 0.8rem; margin: 0 !important; }

.home-section h2 a { color: var(--head); text-decoration-color: var(--rule); }

.toc {
  float: right;
  width: 35%;
  margin: 0.4em 0 1.6em 1.6em;
  padding: 1.2em 1.4em;
  font-family: var(--orkney);
  font-size: 0.7rem;
  line-height: 1.7;
}
.toc .toctitle { font-size: 0.95rem; color: var(--head); margin: 0 0 0.6em !important; }
.toc ul { margin: 0; padding-left: 1.1em; }
@media (max-width: 900px) { .toc { float: none; width: auto; margin: 1em 0 1.4em; } }

.note, .warn { padding: 0.9em 1.2em; margin: 1.2em 0; }
.warn { border-color: var(--red); }
.note > :last-child, .warn > :last-child { margin-bottom: 0 !important; }

/* ---------- article body ---------- */

.entry-content { padding-bottom: 1em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin: 0 0 1em; }
.entry-content li { margin: 0.25em 0; }
.steps li { margin: 0.5em 0; }

pre, code { font-family: ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace; letter-spacing: 0; }
code { font-size: 0.8em; background: var(--box); padding: 0.1em 0.3em; }
pre {
  background: var(--box);
  padding: 0.7em 0.9em;
  overflow-x: auto;
  line-height: 1.35;
  margin: 0 0 1.2em;
}
pre code { padding: 0; font-size: 0.75rem; background: none; }

blockquote { font-style: italic; margin: 1em 1.5em; }

.table-wrap { overflow-x: auto; margin: 0 0 1.2em; }
table { border-collapse: collapse; width: 100%; font-size: 0.85rem; letter-spacing: 0.02em; }
th, td { border: 1px solid #ccc; padding: 0.4em 0.6em; text-align: left; vertical-align: top; }
th { background: var(--box); font-family: var(--orkney); color: var(--head); }

img { max-width: 100%; height: auto; }
img.img-center { display: block; margin: 1em auto 1.4em; }

details { margin: 0.5em 0; padding: 0.5em 0.9em; background: var(--box); }
summary { cursor: pointer; font-weight: 700; color: var(--head); }
details p { margin: 0.6em 0 0.2em !important; }

.sources { font-size: 0.8rem; overflow-wrap: anywhere; }

/* ---------- footer ---------- */

#footer {
  clear: both;
  max-width: 65%;
  margin: 1em auto 0;
  padding: 1.4em 0 2em;
  border-top: 2px solid var(--rule);
  font-size: 0.85rem;
  color: var(--text);
}
@media (max-width: 1100px) { #footer { max-width: 85%; } }
@media (max-width: 720px)  { #footer { max-width: none; margin: 1em 16px 0; } }

.signup { padding: 1em 1.2em; margin-bottom: 1.2em; }
.signup label { display: block; font-family: var(--orkney); color: var(--head); margin-bottom: 0.5em; }
.signup-row { display: flex; gap: 0.5em; flex-wrap: wrap; }
.signup input {
  flex: 1 1 14em;
  min-width: 0;
  font: inherit;
  padding: 0.4em 0.6em;
  border: 1px solid #999;
  background: #fff;
}
.signup button {
  font: inherit;
  font-family: var(--orkney);
  font-weight: 700;
  text-transform: lowercase;
  padding: 0.4em 1em;
  border: solid var(--blue);
  border-width: 1px 1px 4px 4px;
  background: #fff;
  color: var(--blue);
  cursor: pointer;
}
.signup-status { margin: 0.5em 0 0 !important; font-size: 0.8rem; }
.signup-status:empty { display: none; }
.foot-links, .foot-note { margin: 0.4em 0; }
.foot-note { color: #555; font-size: 0.75rem; }
.hp { position: absolute; left: -9999px; }
.flash { display: none; margin: 0.5em 0 0 !important; font-size: 0.8rem; }
.flash:target { display: block; }
