:root {
  --ink: #1c2421;
  --muted: #5d6b64;
  --line: #e2e7e4;
  --bg: #f6f8f7;
  --card: #ffffff;
  --accent: #2f6f5e;
  --accent-soft: #e6f0ec;
  --new: #b2462f;
  --upd: #9a6a16;
  --ok: #3f7d54;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Roboto", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.wrap.reading {
  max-width: 42rem;
}
header h1 {
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
header p.sub {
  font-family: "Roboto Serif", Georgia, serif;
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 4px;
  max-width: 60ch;
}
.meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 14px;
}
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
  font-size: 13px;
  color: var(--muted);
}
.top-bar a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.top-bar a:hover {
  text-decoration: underline;
}
.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: underline;
}
.legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 22px 0 30px;
  font-size: 12.5px;
  color: var(--muted);
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.dot.new {
  background: var(--new);
}
.dot.upd {
  background: var(--upd);
}
.dot.ok {
  background: var(--ok);
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 16px;
  transition: border-color 0.15s;
}
.card:hover {
  border-color: #c9d3ce;
}
.card .top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.card h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 4px;
}
.card .desc {
  font-family: "Roboto Serif", Georgia, serif;
  color: #3a463f;
  font-size: 15px;
  margin: 6px 0 14px;
  max-width: 62ch;
}
.card .src {
  color: var(--muted);
  font-size: 12.5px;
  margin: 0 0 14px;
}
.badge {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 20px;
  white-space: nowrap;
}
.badge.new {
  background: #f7e7e2;
  color: var(--new);
}
.badge.upd {
  background: #f6ecd6;
  color: var(--upd);
}
.badge.ok {
  background: var(--accent-soft);
  color: var(--accent);
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.dates {
  font-size: 13px;
  color: var(--muted);
}
.dates b {
  color: var(--ink);
  font-weight: 500;
}
a.open {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  padding: 9px 18px;
  border-radius: 8px;
}
a.open:hover {
  background: #275c4e;
}
a.secondary {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  margin-left: 12px;
}
footer {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  max-width: 64ch;
}
footer code {
  background: #eef2f0;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12px;
}
#auth-gate {
  max-width: 420px;
  margin: 80px auto;
  padding: 0 24px;
}
#auth-gate[hidden] {
  display: none !important;
}
.auth-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 26px;
}
.auth-panel h2 {
  margin: 0 0 10px;
  font-size: 22px;
}
.auth-panel .hint {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 18px;
}
.auth-panel label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
}
.auth-panel input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 16px;
  margin-bottom: 14px;
}
.btn-primary {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px 16px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-secondary {
  background: var(--accent-soft);
  color: var(--accent);
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  margin-right: 8px;
}
.auth-actions {
  margin-top: 12px;
}
.status-msg {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 14px;
}
.status-msg.error {
  background: #f7e7e2;
  color: var(--new);
}
.status-msg.success {
  background: var(--accent-soft);
  color: var(--accent);
}
.status-msg.info {
  background: #eef2f0;
  color: var(--muted);
}
article.reading-body {
  font-family: "Roboto Serif", Georgia, serif;
  font-size: 17px;
  line-height: 1.65;
  color: #2a332f;
}
article.reading-body h1,
article.reading-body h2,
article.reading-body h3 {
  font-family: "Roboto", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  line-height: 1.25;
  margin-top: 1.6em;
  margin-bottom: 0.5em;
}
article.reading-body h1 {
  font-size: 1.75rem;
  margin-top: 0;
}
article.reading-body h2 {
  font-size: 1.35rem;
}
article.reading-body h3 {
  font-size: 1.15rem;
}
article.reading-body p {
  margin: 0 0 1em;
}
article.reading-body ul,
article.reading-body ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
}
article.reading-body blockquote {
  margin: 1em 0;
  padding: 0.5em 0 0.5em 1em;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}
article.reading-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 1em 0;
}
article.reading-body th,
article.reading-body td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
}
article.reading-body th {
  background: var(--accent-soft);
  font-family: "Roboto", sans-serif;
}
article.reading-body code {
  font-family: ui-monospace, monospace;
  font-size: 0.9em;
  background: #eef2f0;
  padding: 1px 5px;
  border-radius: 4px;
}
article.reading-body pre {
  background: #1c2421;
  color: #e8eeeb;
  padding: 14px 16px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 14px;
}
article.reading-body pre code {
  background: none;
  padding: 0;
  color: inherit;
}
article.reading-body a {
  color: var(--accent);
}
.doc-actions {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
