/* The site's shared parts: typeface, colours, the top bar, the footer (notes: site-bar.notes.md). */

/* EB Garamond, Latin cut (notes). */
@font-face { font-family: "EB Garamond"; src: url("/fonts/EBGaramond-latin.woff2") format("woff2"); font-weight: 400 800; font-display: optional; }
:root {
  --ink: #f3ead8; --ink-soft: #d9ccb1; --muted: #b5a68a;
  --night: #1b1712; --panel: #241f19; --line: #5b4a31; --brass: #c9a25a;
  --read: #9d917c;            /* a read title */
  --yes: #9fd38a; --no: #e48b7a; --maybe: #e8c76f;
  /* Google's button colours (notes). */
  --gsi-fill: #131314; --gsi-line: #8e918f; --gsi-ink: #e3e3e3;
  --page: 980px; --measure: 700px;
  --site-font: "EB Garamond", "Georgia", "Times New Roman", serif;
  color-scheme: dark;
}
/* The reader's setting unless the bar's button chose (notes). */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ink: #1d1c1a; --ink-soft: #383632; --muted: #5f5c55;
    --night: #fbfaf7; --panel: #f1efea; --line: #d6d2c8; --brass: #7a5208;
    --read: #6c675c;
    --yes: #2f6b1f; --no: #a33a26; --maybe: #765600;
    --gsi-fill: #fff; --gsi-line: #747775; --gsi-ink: #1f1f1f;
    color-scheme: light;
  }
}
/* Light, chosen with the button. */
:root[data-theme="light"] {
  --ink: #1d1c1a; --ink-soft: #383632; --muted: #5f5c55;
  --night: #fbfaf7; --panel: #f1efea; --line: #d6d2c8; --brass: #7a5208;
  --read: #6c675c;
  --yes: #2f6b1f; --no: #a33a26; --maybe: #765600;
  --gsi-fill: #fff; --gsi-line: #747775; --gsi-ink: #1f1f1f;
  color-scheme: light;
}

.skip { position: absolute; left: -9999px; top: 0; background: var(--brass); color: var(--night); padding: 8px 16px; z-index: 2; font: 19px/1.6 var(--site-font); }
.skip:focus { left: 0; }

/* The top bar. */
.site-bar, .site-bar *, .site-foot, .site-foot * { box-sizing: border-box; }
.site-bar { background: var(--night); border-bottom: 1px solid var(--line); color: var(--ink); font: 19px/1.6 var(--site-font); }
.site-bar-inner { max-width: var(--page); margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 4px 26px; flex-wrap: wrap; }
.site-bar a { text-decoration: none; }
/* The footer's links, before the bar's link state (notes). */
.site-foot a { color: var(--brass); text-underline-offset: 3px; }
.site-home { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 22px; font-weight: 600; line-height: 1.3; margin-right: 8px; }
.site-home img { width: 34px; height: 32px; display: block; }
.site-link { color: var(--ink-soft); font-size: 19px; font-weight: 400; line-height: 1.3; padding: 6px 0 4px; border-bottom: 2px solid transparent; }
.site-bar a:hover { color: var(--brass); }
.site-bar a[aria-current="page"] { color: var(--brass); }
.site-link[aria-current="page"] { border-bottom-color: var(--brass); }
.site-out { margin-left: auto; }
/* The light-or-dark button (notes). */
.site-theme { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 36px; margin: 0 -8px 0 0; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--ink-soft); cursor: pointer; visibility: hidden; }
.site-theme:hover { color: var(--brass); }
.site-theme:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
:root[data-js] .site-theme { visibility: visible; }
.site-theme svg { width: 22px; height: 22px; display: none; }
:root:not([data-theme]) .site-theme .theme-auto,
:root[data-theme="light"] .site-theme .theme-light,
:root[data-theme="dark"] .site-theme .theme-dark { display: block; }
/* "Sign in" and the account's items (notes). */
.site-signin, .site-account { margin-left: auto; }
.site-signin ~ .site-out, .site-account ~ .site-account, .site-account ~ .site-out { margin-left: 0; }
/* margin-left stays auto (notes). */
button.site-signout, :root[data-signed-in] .site-bar-inner::after { background: transparent; border: 0; border-bottom: 2px solid transparent; font-family: inherit; font-size: 19px; font-weight: 400; line-height: 1.3; padding: 6px 0 4px; margin-top: 0; margin-right: 0; margin-bottom: 0; }
button.site-signout { cursor: pointer; color: var(--ink-soft); }
:root[data-signed-in=""] .site-bar-inner::after { content: "Sign out"; order: 1; margin-left: auto; visibility: hidden; }
:root[data-signed-in=""] .site-out { margin-left: 0; }
:root[data-signed-in=""] .site-out, :root[data-signed-in=""] .site-theme { order: 2; }
:root[data-signed-in] .site-signin { display: none; }
/* On a phone (notes). */
@media (max-width: 560px) {
  .site-home { flex-basis: calc(100% - 62px); margin-right: 0; font-size: 20px; order: -2; }
  .site-theme { order: -1; margin-left: auto; }
  .site-bar-inner { gap: 2px clamp(8px, 2.4vw, 22px); padding-bottom: 6px; }
  .site-link, button.site-signout, :root[data-signed-in] .site-bar-inner::after { font-size: clamp(14px, 3.9vw, 18px); }
  :root[data-signed-in=""] .site-theme { order: -1; }
}

/* The footer. */
.site-foot { border-top: 1px solid var(--line); color: var(--muted); font: 16px/1.6 var(--site-font); padding: 28px 16px 44px; text-align: center; }
.site-foot p { margin: 0 auto 6px; max-width: none; color: var(--muted); font: inherit; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; list-style: none; margin: 0 0 10px; padding: 0; max-width: none; }
.foot-links li { margin: 0; }
.site-foot a:hover { color: var(--ink); }
.site-bar a:focus-visible, .site-foot a:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
