html, body, div, span, h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, address, code, del, em, img, ins, small, strong, sub, sup,
dl, dt, dd, ol, ul, li, fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
  margin: 0; padding: 0; border: 0; vertical-align: baseline;
  background-color: transparent; font-weight: normal;
}

em { font-style: italic; }
strong { font-weight: bold; }
p { margin-top: 0.5em; margin-bottom: 1em; }
h1 { font-size: 2em; }
h2 { font-size: 1.7em; }
h3 { font-size: 1.5em; }
h4 { font-size: 1.25em; }
h1 a, h2 a, h3 a, h4 a { text-decoration: none; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #222;
  background: #fff;
  line-height: 1.5;
}

a { color: #246; }
a:hover { color: #000; }

input:focus, textarea:focus { background-color: #fffff0; outline: none; }

/* layout */
#page {
  margin-left: 40px;
  margin-right: 40px;
  min-width: 700px;
  max-width: 1200px;
  position: relative;
}

#page::after {
  content: "";
  display: table;
  clear: both;
}

/* header */
#header {
  padding: 0.5em 0;
  border-top: 5px solid #246;
}

#header::after {
  content: "";
  display: table;
  clear: both;
}

#header ul {
  float: left;
  list-style: none;
  padding: 0;
}

#header li {
  display: inline;
  margin-right: 0.5em;
}

#header a { color: #246; font-size: 0.9em; }
#header a.site-name { font-size: 1.2em; font-weight: bold; color: #246; }
#header a:hover { text-decoration: underline; }

#header-right {
  float: right;
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.85em;
}

#search-form {
  display: inline;
}

#search-form input[type="text"] {
  background: #eee;
  border: 1px solid #ccc;
  padding: 2px 6px;
  font-size: 0.9em;
  width: 140px;
}

#search-form button {
  padding: 2px 10px;
  font-size: 0.85em;
  background: #369;
  color: #fff;
  border: 1px solid #246;
  cursor: pointer;
}

#search-form button:hover { background: #fff; color: #369; }

/* content + sidebar float layout */
#content {
  float: left;
  width: calc(100% - 270px);
  margin-top: 20px;
  min-height: 400px;
}

/* index page: no sidebar, full width */
#content.full-width {
  float: none;
  width: 100%;
  clear: both;
}

#sidebar {
  clear: right;
  float: right;
  width: 250px;
  margin-top: 20px;
}

#sidebar .sidebar-section {
  border: 1px solid #e0e0e0;
  background: #f0f0f0;
  padding: 8px 10px;
  margin-bottom: 10px;
}

/* radar list table */
#content table {
  width: 100%;
  border-collapse: collapse;
}

#content table th { font-weight: bold; }
#content table td, #content table th {
  padding: 4px 6px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

#content table tr:hover td { background: #f8f8f8; }

/* field labels in sidebar */
.fieldname {
  font-size: 90%;
  color: #c0c0c0;
  margin: 0;
}

.fieldvalue {
  margin: 0 0 0.6em;
  font-size: 100%;
}

/* radar header panel */
.radar-panel {
  background: #555;
  color: #eee;
  padding: 0.4em 0.6em;
  margin-bottom: 0.5em;
}

.radar-panel::after {
  content: "";
  display: table;
  clear: both;
}

.radar-panel a { color: #eee; }
.radar-panel .rn { float: left; }
.radar-panel .rs { float: left; margin-left: 2em; }
.radar-panel .rd { float: right; }

/* description */
pre.description {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: "SFMono-Regular", Consolas, "Courier New", monospace;
  font-size: 85%;
  padding: 0.5em 0;
  line-height: 1.6;
}

/* comments */
div.comments { padding-top: 0.5em; }

div.comment {
  margin-top: 1em;
  margin-bottom: 1em;
  background: #ddd;
  border: 1px solid #ddd;
}

div.indent {
  padding-left: 1em;
  border-left: 4px solid #eee;
}

.comment > h3 {
  font-size: 12pt;
  padding: 0.15em 0.5em;
  font-weight: bold;
  background: #eee;
}

.comment > h4 {
  font-size: 10pt;
  padding: 0.15em 0.5em;
  font-weight: bold;
  background: #ddd;
}

.comment > .commentbody {
  padding: 0.5em;
}

.comment > .meta {
  padding: 0 0.5em 0.25em;
  font-size: 10pt;
}

.comment a { color: #448; text-decoration: none; }
.comment a:hover { color: #222; }

/* add comment form */
.add-comment {
  margin-top: 1em;
  padding: 0.8em;
  background: #f4f4f4;
  border: 1px solid #ddd;
}

.add-comment h4 { margin-bottom: 0.5em; }
.add-comment textarea { background: #eee; width: 100%; padding: 4px; font-family: inherit; font-size: 13px; }
.add-comment input[type="text"] { background: #eee; padding: 3px 6px; font-size: 13px; width: 60%; }

/* forms */
.form-section { max-width: 700px; }

.form-row { margin-bottom: 10px; }
.form-row label { display: block; font-size: 13px; color: #555; margin-bottom: 3px; }

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="password"],
.form-row input[type="date"],
.form-row select {
  background: #eee;
  border: 1px solid #ccc;
  padding: 4px 6px;
  font-size: 13px;
  width: 100%;
  font-family: inherit;
}

.form-row textarea {
  background: #eee;
  border: 1px solid #ccc;
  padding: 4px 6px;
  font-size: 13px;
  width: 100%;
  font-family: "SFMono-Regular", Consolas, monospace;
  resize: vertical;
  min-height: 120px;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  background: #fffff0;
}

.form-half { display: flex; gap: 16px; }
.form-half .form-row { flex: 1; }

.checkbox-row { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.checkbox-row input { width: auto; }

/* buttons */
button, .btn, input[type="submit"] {
  background: #369;
  color: #fff;
  border: 1px solid #246;
  padding: 4px 14px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
}

button:hover, .btn:hover { background: #fff; color: #369; }

.btn-small { padding: 2px 8px; font-size: 11px; }
.btn-danger { background: #933; border-color: #600; }
.btn-danger:hover { background: #fff; color: #933; }
.btn-link { background: none; border: none; color: #246; padding: 0; cursor: pointer; text-decoration: underline; font-size: inherit; font-family: inherit; }
.btn-link:hover { color: #000; }

.inline-form { display: inline; }
.inline-form button {
  background: none;
  border: none;
  color: #933;
  cursor: pointer;
  font-size: 12px;
  text-decoration: underline;
  padding: 0;
  font-family: inherit;
}

/* pagination */
.pagination { margin-top: 1em; font-size: 13px; }
.pagination a { margin-right: 0.5em; }

/* auth */
.auth-box { max-width: 380px; }
.auth-alt { margin-top: 1em; font-size: 13px; }
.oidc-divider { margin: 1em 0; border-top: 1px solid #ddd; padding-top: 0.8em; }

/* error / notice */
.error-msg {
  padding: 0.6em 1em;
  border: 2px solid #ff9595;
  border-radius: 0.3em;
  background: #ffd7d7;
  margin-bottom: 1em;
  font-size: 0.95em;
}

.notice-msg {
  padding: 0.6em 1em;
  border: 1px solid #b8daff;
  background: #cce5ff;
  margin-bottom: 1em;
  font-size: 0.95em;
}

/* empty */
.empty { color: #888; font-style: italic; margin-top: 1em; }

/* my radars list */
.my-radar-row { display: flex; align-items: baseline; gap: 0.5em; margin-bottom: 0.4em; }
.my-radar-row .rnum { color: #888; min-width: 2.5em; }
.my-radar-row .unpublished { color: #aaa; font-size: 90%; }

/* footer */
#footer {
  clear: both;
  margin-top: 80px;
  padding: 8px 0 0 10px;
  border-top: 5px solid #202020;
}

#footer ul { list-style: none; padding: 0; }
#footer li { display: inline; margin-right: 1em; font-size: 13px; }

/* compat aliases */
.error-box { padding: 0.6em 1em; border: 2px solid #ff9595; border-radius: 0.3em; background: #ffd7d7; margin-bottom: 1em; font-size: 0.95em; color: #7b2020; }
.narrow-content { max-width: 440px; }
.form-row-half { display: flex; gap: 16px; }
.form-row-half label { flex: 1; }
.radar-list { width: 100%; border-collapse: collapse; }
.radar-list th { font-weight: bold; }
.radar-list td, .radar-list th { padding: 4px 6px; border-bottom: 1px solid #eee; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.8em; }

/* search results */
.search-result { margin-bottom: 1em; border-bottom: 1px solid #eee; padding-bottom: 0.8em; }
.search-result h4 { margin-bottom: 0.2em; }
.search-result .meta { font-size: 12px; color: #888; }
