:root {
  color-scheme: light;
  --paper: #f5f3ed;
  --ink: #252e29;
  --line: #d9ded5;
  --green: #264e3b;
  --muted: #626e66;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font:
    15px/1.6 system-ui,
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 100dvh;
}
aside {
  padding: 36px 24px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  background: #e9ede5;
}
.wordmark {
  font-size: 29px;
  font-weight: 750;
  letter-spacing: -1.5px;
}
.wordmark span {
  font-size: 12px;
  letter-spacing: 1px;
  margin-left: 8px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 650;
  color: var(--muted);
  margin: 40px 0 14px;
}
nav {
  display: grid;
  gap: 6px;
}
button {
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--line);
  padding: 10px 15px;
  background: white;
  color: var(--ink);
  border-radius: 5px;
}
nav button {
  text-align: left;
  background: none;
  border-color: transparent;
}
nav button[aria-current="page"] {
  background: var(--green);
  color: white;
}
button:hover {
  border-color: var(--green);
}
button:focus-visible,
input:focus-visible {
  outline: 3px solid #719980;
  outline-offset: 3px;
}
footer {
  margin-top: auto;
  padding-top: 50px;
  display: grid;
  gap: 8px;
}
small {
  font-size: 11px;
  color: var(--muted);
}
main {
  padding: 36px 5vw;
  min-width: 0;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
  margin-bottom: 32px;
}
header .eyebrow {
  margin-top: 0;
}
h1 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 40px;
  line-height: 1.2;
  margin: 12px 0;
}
.badge {
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 5px 12px;
}
input {
  font: inherit;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  color: var(--ink);
  min-width: 0;
}
#login {
  max-width: 480px;
}
#login form {
  display: grid;
  gap: 20px;
  margin: 25px 0;
}
label {
  display: grid;
  gap: 8px;
  font-size: 13px;
}
#login button {
  background: var(--green);
  color: white;
}
#search {
  display: flex;
  gap: 10px;
}
#search input {
  flex: 1;
}
#count {
  color: var(--muted);
  font-size: 12px;
}
.split {
  display: grid;
  grid-template-columns: minmax(200px, 35%) 1fr;
  gap: 32px;
}
#list button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 16px 8px;
  overflow-wrap: anywhere;
}
#list button:hover {
  background: #e9ede5;
}
article {
  padding-left: 28px;
  border-left: 1px solid var(--line);
  min-width: 0;
}
article h2 {
  font:
    28px/1.3 Georgia,
    serif;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 13px/1.7 system-ui;
}
a {
  color: var(--green);
}
#message {
  color: #8b3426;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
[hidden] {
  display: none !important;
}
@media (max-width: 850px) {
  body {
    grid-template-columns: 1fr;
  }
  aside {
    padding: 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  aside .eyebrow,
  footer small {
    display: none;
  }
  nav {
    display: flex;
    overflow: auto;
    margin-top: 16px;
  }
  nav button {
    white-space: nowrap;
  }
  footer {
    padding: 10px 0 0;
    display: flex;
    justify-content: space-between;
  }
  main {
    padding: 24px;
  }
  .split {
    grid-template-columns: 1fr;
  }
  article {
    border-left: 0;
    padding-left: 0;
  }
  h1 {
    font-size: 32px;
  }
}
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 16px 0;
}
.editor {
  display: grid;
  gap: 16px;
  margin: 24px 0;
}
.editor textarea,
select {
  font: inherit;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  color: var(--ink);
}
fieldset {
  border: 1px solid var(--line);
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 12px 0;
  padding: 16px;
}
legend {
  font-size: 12px;
}
input[type="checkbox"] {
  justify-self: start;
  width: 20px;
  height: 20px;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
details {
  margin: 10px 0;
  padding: 8px;
  border-left: 2px solid var(--line);
}
summary {
  cursor: pointer;
  font-weight: 600;
}
section section {
  margin: 24px 0;
}
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #719980;
  outline-offset: 3px;
}

.problems p {
  color: #8b3426;
  font-size: 13px;
  margin: 4px 0;
}
.problems:empty {
  display: none;
}

.google {
  display: inline-block;
  background: var(--green);
  color: white;
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 5px;
  margin: 8px 0 16px;
}
.google:hover {
  background: #1c3b2c;
}
.secret {
  font:
    13px/1.6 ui-monospace,
    monospace;
  background: #fff;
  border: 1px solid var(--line);
  padding: 12px;
  overflow-wrap: anywhere;
  user-select: all;
}

button.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
  border-radius: 0;
}
button.link:hover {
  color: var(--green);
}

/* Signed out: one centred card, no workspace chrome to leak module names. */
body.signed-out {
  grid-template-columns: 1fr;
}
body.signed-out aside,
body.signed-out main > header {
  display: none;
}
body.signed-out main {
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 40px 24px;
}
#login {
  width: 100%;
  max-width: 400px;
}
#login .wordmark {
  margin-bottom: 40px;
}
#login .tagline {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 34px;
  line-height: 1.2;
  margin: 0 0 28px;
}
body:not(.signed-out) #login .wordmark,
body:not(.signed-out) #login .tagline {
  display: none;
}
body.signed-out #message {
  max-width: 400px;
  width: 100%;
  margin-top: 20px;
}

h4 {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 18px 0 6px;
}
.pending {
  font-style: italic;
}

body.oauth-consent { display: block; }
.oauth-consent main { max-width: 760px; margin: 8vh auto; }
.oauth-consent form { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0; }
