:root {
  color-scheme: light;
  --paper: #f8f7f2;
  --text: #203027;
  --quiet: #526258;
  --line: #d9dfd6;
  --green: #234f3a;
  --wash: #e8efe6;
  --rust: #8a3b25;
  font: 16px/1.5 system-ui, sans-serif;
  background: var(--paper);
  color: var(--text);
  accent-color: var(--green);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--green); text-underline-offset: .18em; }
:focus-visible { outline: 2px solid #9b5033; outline-offset: 3px; }
::selection { color: var(--text); background: #d6e6cb; }
.masthead, main {
  width: min(100%, 44rem);
  padding-inline: clamp(1rem, 4vw, 2.75rem);
  margin-inline: auto;
}
.masthead {
  padding-block: 1.25rem;
  display: flex;
  align-items: center;
  gap: .65rem;
  color: var(--green);
  font-weight: 750;
  letter-spacing: -.02em;
}
main { padding-bottom: 2.5rem; }
.browsing .masthead, .browsing main { width: min(100%, 104rem); }
.browsing main {
  display: grid;
  grid-template-columns: minmax(17rem, .43fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1rem, 2.5vw, 2.5rem);
}
h1, h2, p { margin: 0; }
h1 {
  font: 500 clamp(2.6rem, 6vw, 4.4rem)/1 Georgia, serif;
  letter-spacing: -.035em;
  margin: .85rem 0 1.35rem;
  text-wrap: balance;
}
.browsing h1 { font-size: clamp(2.35rem, 4vw, 3.95rem); }
.chat {
  max-width: 33rem;
  padding: .95rem 1.1rem;
  border-radius: 13px 13px 13px 3px;
  background: var(--wash);
}
.speaker { font-size: .875rem; color: var(--green); font-weight: 750; margin-bottom: .2rem; }
.actions { display: grid; gap: .65rem; margin-top: 1rem; justify-items: start; }
.browse-options { display: flex; align-items: center; gap: .4rem .85rem; flex-wrap: wrap; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.primary, .secondary, select, input {
  min-height: 44px;
  border-radius: 8px;
  padding: .56rem .8rem;
}
.primary { color: #fff; background: var(--green); border: 1px solid var(--green); font-weight: 700; }
.primary:hover { background: #173c2b; }
.secondary, select { color: var(--green); background: transparent; border: 1px solid #9daea1; font-weight: 620; }
select { max-width: 100%; }
.secondary:hover, select:hover { background: var(--wash); }
button:disabled { opacity: .62; cursor: default; }
.text-button, summary {
  color: var(--green);
  font-size: .875rem;
  cursor: pointer;
}
.text-button {
  min-height: 40px;
  padding: .35rem 0;
  border: 0;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: .2em;
}
details { margin-top: .65rem; }
summary { width: fit-content; min-height: 40px; padding-block: .55rem; }
#url-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; }
input { width: 100%; color: var(--text); background: #fff; border: 1px solid #9daea1; }
input::placeholder { color: var(--quiet); }
.status { font-size: .875rem; color: var(--green); margin-top: .5rem; }
.status:empty { margin: 0; }
.status[data-error="true"] { color: var(--rust); }
.request { border-top: 1px solid var(--line); padding-top: 1.15rem; margin-top: 1.25rem; }
.request-heading { display: flex; justify-content: space-between; gap: .6rem; align-items: baseline; margin-bottom: .35rem; }
h2 { font-size: 1.1rem; letter-spacing: -.02em; }
#count, #empty, .draft-note { color: var(--quiet); font-size: .875rem; }
.draft-note { margin-top: .9rem; font-size: .8rem; }
#items { padding: 0; margin: 0; list-style: none; }
#items li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .65rem;
  padding-block: .4rem;
  border-bottom: 1px solid var(--line);
}
#items a { overflow-wrap: anywhere; }
#items small { display: block; color: var(--quiet); font-size: .8rem; }
.store { background: #fff; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.browser-toolbar {
  display: flex;
  align-items: center;
  gap: .25rem;
  padding: .4rem .55rem;
  background: var(--wash);
  border-bottom: 1px solid var(--line);
}
.icon-button { border: 0; background: transparent; color: var(--text); display: grid; place-items: center; min-width: 36px; min-height: 40px; border-radius: 7px; }
.icon-button:hover:not(:disabled) { background: #dce6d9; }
.store-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; color: var(--quiet); }
.save { font-size: .875rem; flex: none; }
.browser-display { aspect-ratio: 980/720; display: grid; align-items: center; }
.store-message { color: var(--quiet); padding: 1rem; text-align: center; }
#screen { width: 100%; height: auto; display: block; touch-action: none; }
.browser-footer { padding: .55rem .75rem; border-top: 1px solid var(--line); font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 750px) {
  .masthead { padding-block: .9rem; }
  .browsing main { grid-template-columns: 1fr; }
  .browsing .store { order: 0; }
}
