:root {
  --yellow: #e3b21b;
  --yellow-deep: #9a7100;
  --yellow-soft: #fff9e8;
  --yellow-hover: #fffaf0;
  --paper: #ffffff;
  --ink: #211d15;
  --muted: #625b4e;
  --line: #ece5cf;
  --content-width: 1040px;
  --sidebar-width: 265px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-size: 19px;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select,
code,
pre {
  font-family: "EB Garamond", Garamond, Georgia, serif;
}

a {
  color: var(--yellow-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.13em;
}

a:hover {
  color: #6f4f00;
}

/* Google-Sites-inspired side directory: flat, quiet, and always visible. */
.site-header {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  width: var(--sidebar-width);
  height: 100vh;
  background: #fff;
  border-top: 4px solid var(--yellow);
  border-right: 1px solid var(--line);
}

.site-header,
.site-header a,
.site-header button,
.site-header input {
  font-family: "Noto Sans", Arial, sans-serif;
  font-weight: 300;
}

.topdir {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 27px 24px 25px;
  color: var(--ink);
  font-size: 1.23rem;
  font-weight: 300;
  line-height: 1.1;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.site-brand:hover {
  color: var(--ink);
}

.site-logo,
.site-logo-placeholder {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}

.site-logo {
  display: block;
  object-fit: contain;
}

.site-logo-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #cfbd7b;
  border-radius: 3px;
  color: #9b8751;
  background: #fffef9;
  font-size: 0.69rem;
  font-weight: 300;
  letter-spacing: 0.02em;
}

.site-brand-text {
  min-width: 0;
}

.site-nav {
  padding: 17px 0 28px;
}

.menu {
  display: block;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu li {
  margin: 0;
  padding: 0;
}

.menu a {
  display: block;
  margin: 0;
  padding: 11px 24px 11px 27px;
  border-left: 3px solid transparent;
  color: #443d32;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.25;
  text-decoration: none;
}

.menu a:hover {
  background: #fffdf7;
  color: var(--ink);
}

.menu a.active {
  border-left-color: var(--yellow);
  background: var(--yellow-soft);
  color: var(--ink);
}

.site-shell {
  width: min(calc(100% - var(--sidebar-width) - 80px), var(--content-width));
  margin-left: calc(var(--sidebar-width) + 54px);
  margin-right: auto;
}

.page-main {
  min-height: calc(100vh - 74px);
  padding: 64px 0 94px;
}

.page-heading {
  margin: 0 0 30px;
  padding: 0;
  border: 0;
}

.page-heading h1 {
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--ink);
  font-family: "EB Garamond", Garamond, Georgia, serif;
  font-weight: 600;
  line-height: 1.17;
}

h1 {
  margin: 0.9em 0 0.45em;
  font-size: clamp(2.2rem, 4vw, 2.75rem);
}

h2 {
  margin: 1.5em 0 0.45em;
  font-size: 1.7rem;
}

h3 {
  margin: 1.35em 0 0.4em;
  font-size: 1.32rem;
}

p {
  margin: 0 0 1em;
}

.page-content {
  max-width: 900px;
}

.page-content > :first-child {
  margin-top: 0;
}

.page-content ul,
.page-content ol {
  padding-left: 1.35em;
}

.page-content li {
  margin: 0.25em 0;
}

/* Simple transparent outline links, inspired by Google Sites buttons. */
.directory-list {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px 18px;
  margin-top: 30px;
}

.directory-item {
  margin: 0;
  padding: 0;
}

.directory-link {
  display: inline-block;
  min-width: 172px;
  max-width: min(620px, 100%);
  padding: 8px 28px 9px;
  border: 1px solid var(--yellow);
  border-radius: 4px;
  background: transparent;
  color: var(--yellow-deep);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.directory-link:hover,
.directory-link:focus-visible {
  background: var(--yellow-hover);
  border-color: #c99a0d;
  color: #765500;
  text-decoration: none;
}

.directory-link:focus-visible {
  outline: 2px solid #e4be4c;
  outline-offset: 2px;
}

blockquote {
  margin: 1.5em 0;
  padding: 0.65em 1.2em;
  background: var(--yellow-soft);
  border-left: 3px solid var(--yellow);
}

hr {
  margin: 2.2em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

img,
iframe,
video {
  max-width: 100%;
}

img {
  height: auto;
}

pre {
  overflow-x: auto;
  padding: 1em;
  background: #fffdf6;
  border: 1px solid var(--line);
}

code {
  background: var(--yellow-soft);
  padding: 0.05em 0.2em;
}

pre code {
  background: transparent;
  padding: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
}

th,
td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  background: var(--yellow-soft);
}

/* On smaller screens the side directory becomes a simple top block so content stays usable. */
@media (max-width: 820px) {
  .site-header {
    position: static;
    width: 100%;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .topdir {
    height: auto;
  }

  .site-brand {
    padding: 15px 18px 14px;
  }

  .site-logo,
  .site-logo-placeholder {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .site-nav {
    padding: 5px 12px 11px;
    overflow-x: auto;
  }

  .menu {
    display: flex;
    width: max-content;
  }

  .menu a {
    padding: 10px 12px;
    border-left: 0;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
  }

  .menu a.active {
    border-bottom-color: var(--yellow);
    background: transparent;
  }

  .site-shell {
    width: min(calc(100% - 32px), var(--content-width));
    margin: 0 auto;
  }


  .page-main {
    padding-top: 42px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 18px;
  }

  .page-main {
    padding-bottom: 68px;
  }

  .directory-list {
    display: block;
  }

  .directory-item + .directory-item {
    margin-top: 12px;
  }

  .directory-link {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}
