:root {
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #08131f;
  background: #f5f8fa;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #08131f;
  --ink-2: #0d2030;
  --cyan: #67e8f9;
  --cyan-2: #22d3ee;
  --orange: #f59e0b;
  --muted: #607484;
  --line: rgba(148, 163, 184, 0.24);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: #f5f8fa; }

.public-header {
  height: 60px;
  flex: 0 0 60px;
  background: rgba(8, 19, 31, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(16px, calc((100% - 1100px) / 2 + 16px));
}
.public-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.public-brand img { display: block; height: 50px; width: auto; max-width: min(42vw, 160px); object-fit: contain; background: #071525; border-radius: 3px; }
.assistant-mark {
  border-left: 1px solid rgba(255, 255, 255, 0.24);
  padding-left: 10px;
  color: #b8c7d4;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.home-link { color: #b8c7d4; text-decoration: none; font-size: 14px; transition: color 0.2s; }
.home-link:hover { color: var(--cyan); }

.public-shell { width: min(1040px, calc(100% - 32px)); margin: 0 auto; }
.public-intro { padding: 40px 0 32px; background: var(--ink); color: #ffffff; border-bottom: 1px solid var(--line); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--cyan); font-size: 11px; font-weight: 800; margin: 0 0 10px; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.public-intro h1 { font-size: 30px; line-height: 1.25; margin: 0 0 8px; color: #ffffff; }
.public-intro .intro-copy { margin: 0; color: #c6d3dd; font-size: 14px; line-height: 1.7; }

main { flex: 1; }
.public-content { flex: 1; }
.public-library,
.public-submit { padding: 26px 0 32px; border-top: 1px solid #dce6eb; }
.public-library { border-top: 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 16px; }
.section-heading h2 { font-size: 21px; margin: 0 0 5px; color: var(--ink); }
.section-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }

.search-row { display: grid; grid-template-columns: minmax(0, 1fr) 190px auto; gap: 9px; }
.search-row input,
.search-row select,
.submit-form input,
.submit-form select,
.submit-form textarea {
  width: 100%;
  font: inherit;
  color: var(--ink-2);
  background: #ffffff;
  border: 1px solid #d3dfe5;
  border-radius: 6px;
  padding: 11px 12px;
  outline: none;
}
.search-row input:focus,
.search-row select:focus,
.submit-form input:focus,
.submit-form select:focus,
.submit-form textarea:focus {
  border-color: #0e7490;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
}
button { font: inherit; cursor: pointer; }
.search-row button,
.submit-footer button,
.more-button {
  border: 0;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 750;
  padding: 11px 17px;
  transition: background 0.2s, transform 0.2s;
}
.search-row button,
.more-button { background: var(--cyan-2); color: #06202c; }
.submit-footer button { background: var(--orange); color: #ffffff; }
.search-row button:hover,
.more-button:hover { background: var(--cyan); }
.submit-footer button:hover { background: #d97706; }
.search-row button:focus-visible,
.submit-footer button:focus-visible,
.more-button:focus-visible,
.home-link:focus-visible,
.public-footer a:focus-visible { outline: 2px solid var(--cyan-2); outline-offset: 3px; }

.status { min-height: 20px; color: var(--muted); font-size: 13px; margin: 10px 0; }
.public-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.public-entry {
  background: #ffffff;
  border: 1px solid #dce6eb;
  border-radius: 8px;
  padding: 16px 17px;
  box-shadow: 0 2px 10px rgba(8, 19, 31, 0.045);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.public-entry:hover { border-color: #9bdde5; box-shadow: 0 8px 22px rgba(8, 19, 31, 0.09); transform: translateY(-2px); }
.public-entry h3 { font-size: 16px; line-height: 1.45; margin: 0 0 8px; color: var(--ink-2); }
.entry-meta { font-size: 11px; color: #0e7490; margin-bottom: 9px; }
.entry-copy { white-space: pre-wrap; overflow-wrap: anywhere; color: #405767; font-size: 13px; line-height: 1.75; margin: 0; }
.more-button { display: block; margin: 16px auto 0; }

.submit-form { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 13px; }
.submit-form label { display: grid; gap: 6px; color: var(--ink-2); font-size: 13px; font-weight: 700; }
.submit-form label:nth-of-type(4) { grid-column: 1 / -1; }
.submit-form textarea { resize: vertical; min-height: 150px; line-height: 1.7; }
.submit-footer { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.submit-footer .status { margin: 0; }
.trap { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.public-footer {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 20px 16px 24px;
  background: var(--ink);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9cafbf;
  font-size: 12px;
}
.public-footer a { color: var(--cyan); text-decoration: none; font-weight: 700; }
.public-footer a:hover { color: #ffffff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

@media (max-width: 680px) {
  .public-header { padding: 0 16px; }
  .public-brand { gap: 8px; }
  .public-brand img { height: 42px; max-width: min(40vw, 126px); }
  .assistant-mark { padding-left: 8px; font-size: 11px; }
  .home-link { font-size: 13px; }
  .public-intro { padding: 32px 0 26px; }
  .public-intro h1 { font-size: 26px; }
  .search-row { grid-template-columns: 1fr 1fr; }
  .search-row input,
  .search-row button { grid-column: 1 / -1; }
  .public-results { grid-template-columns: 1fr; }
  .submit-form { grid-template-columns: 1fr; }
  .submit-form label:nth-of-type(4),
  .submit-footer { grid-column: auto; }
  .submit-footer { align-items: flex-start; flex-direction: column; }
  .submit-footer button { width: 100%; }
  .section-heading { align-items: flex-start; flex-direction: column; }
}
