/* Shared by index.html, story.html and details.html. Same top-level folder as the pages. */
* { box-sizing: border-box; }
body { margin: 0; font-family: Georgia, "Times New Roman", serif; background: #fff; color: #111; line-height: 1.6; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #1a5fd0; outline-offset: 2px; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  background: #fff; border-bottom: 1px solid #ddd; font-family: Arial, sans-serif;
}
.brand { display: flex; flex-direction: column; min-width: 0; color: #111; text-decoration: none; line-height: 1.25; }
.brand-name { font-family: Georgia, "Times New Roman", serif; font-size: 1.1rem; font-weight: bold; }
.brand-version { font-size: .75rem; color: #555; }
.topnav { display: flex; gap: 8px; flex-shrink: 0; }
.topnav a { padding: 7px 12px; border: 1px solid #111; color: #111; text-decoration: none; font-size: .9rem; white-space: nowrap; }
.topnav a:hover, .topnav a[aria-current="page"] { background: #111; color: #fff; }

h1 { font-size: 2rem; margin: 0 0 4px; }
h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid #111; padding-bottom: 4px; margin: 0 0 12px; }
.scroll { overflow-x: auto; }
.status { font-size: .8rem; color: #777; margin-top: 32px; }
.error { color: #a00; }

@media (max-width: 480px) {
  .topnav a { padding: 6px 9px; font-size: .8rem; }
  .brand-name { font-size: 1rem; }
}

/* Buttons and dialogs (Story Details uploads). */
.btn { font: inherit; font-family: Arial, sans-serif; font-size: .82rem; padding: 5px 10px; border: 1px solid #111; background: #fff; color: #111; cursor: pointer; line-height: 1.3; }
.btn:hover:not(:disabled) { background: #111; color: #fff; }
.btn:disabled { border-color: #bbb; color: #999; cursor: default; }
.btn.primary { background: #111; color: #fff; }
.btn.primary:disabled { background: #bbb; border-color: #bbb; color: #fff; }
