/* G-System Online. Plain CSS, system fonts, one file. */

:root {
  --bg: #f5f4f0;
  --surface: #ffffff;
  --ink: #1b1d22;
  --muted: #646a73;
  --line: #e2e0da;
  --band: #15171c;
  --band-ink: #f2efe8;
  --band-muted: #9aa0a8;
  --accent: #c8372a;
  --accent-ink: #ffffff;
  --on: #1f7a4d;
  --chip: #eeece6;
  --warn-bg: #fff4e5;
  --warn-line: #f0c27a;
  --ok-bg: #eaf6ef;
  --ok-line: #9fd3b5;
  --err-bg: #fdecea;
  --err-line: #eba59e;
  --radius: 8px;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
}
a { color: inherit; text-decoration-color: rgba(0, 0, 0, .25); text-underline-offset: 2px; }
a:hover { color: var(--accent); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.75rem; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 1em; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Header band */
.band { background: var(--band); color: var(--band-ink); }
.band .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.brand:hover { color: var(--band-ink); }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(224, 64, 47, .7); }
.brand small { color: var(--band-muted); font-weight: 400; }
.nav { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; margin-left: auto; }
.nav a, .nav button.linklike { color: var(--band-ink); text-decoration: none; font-size: .95rem; }
.nav a:hover, .nav button.linklike:hover { color: #fff; text-decoration: underline; }
.nav .me { display: inline-flex; align-items: center; gap: 6px; }
.headsearch { flex: 1 1 220px; max-width: 360px; }
.band .headsearch input { width: 100%; background: #23262d; border: 1px solid #343842; color: var(--band-ink); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: .95rem; }
.band .headsearch input::placeholder { color: var(--band-muted); }
.inline { display: inline; margin: 0; }
button.linklike { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

main { padding: 28px 0 48px; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; padding: 20px 0 40px; }
footer .wrap { display: flex; gap: 8px 18px; flex-wrap: wrap; }

/* Notices */
.notice, .error, .ok { border: 1px solid var(--warn-line); background: var(--warn-bg); border-radius: var(--radius); padding: 10px 14px; margin: 0 0 20px; }
.error { border-color: var(--err-line); background: var(--err-bg); }
.ok { border-color: var(--ok-line); background: var(--ok-bg); }

/* Buttons and forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--surface); color: var(--ink); border: 1px solid #cfccc4; border-radius: 6px;
  padding: 8px 14px; font: inherit; font-size: .95rem; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: #a92c21; color: #fff; }
.btn.dark { background: var(--band); color: var(--band-ink); border-color: var(--band); }
.btn.dark:hover { background: #000; color: #fff; }
.btn.small { padding: 4px 10px; font-size: .85rem; }
.btn.danger { color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
label { display: block; font-weight: 600; margin: 0 0 4px; }
.field { margin: 0 0 16px; }
.hint { color: var(--muted); font-size: .85rem; font-weight: 400; }
input[type=text], input[type=search], input[type=url], textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid #cfccc4; border-radius: 6px; padding: 8px 10px;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type=file] { font: inherit; max-width: 100%; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel + .panel { margin-top: 20px; }
.narrow { max-width: 640px; }

/* Hero */
.hero { display: grid; gap: 20px; grid-template-columns: 1fr; margin-bottom: 32px; }
.hero h1 { font-size: 2rem; }
.bigsearch { display: flex; gap: 8px; }
.bigsearch input { font-size: 1.05rem; padding: 10px 14px; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

/* Section heads */
.sechead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.sechead h2 { margin: 0; }
section + section { margin-top: 36px; }

/* Cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.card:hover { border-color: #c9c5bb; }
.card-title { font-weight: 700; font-size: 1.05rem; text-decoration: none; overflow-wrap: anywhere; }
.dump-name { font-size: .85rem; color: var(--muted); }
.types { font-size: .9rem; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-block; background: var(--chip); color: #3d4149; border-radius: 999px; padding: 1px 9px; font-size: .78rem; text-decoration: none; white-space: nowrap; }
a.chip:hover { background: #e1ded6; color: var(--ink); }
.chip.tag::before { content: "#"; color: var(--muted); }
.chip.hidden { background: var(--err-bg); color: var(--accent); }
.card-foot { margin-top: auto; padding-top: 6px; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); flex-wrap: wrap; }
.by { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); min-width: 0; }
.stats { white-space: nowrap; }
.empty { color: var(--muted); padding: 24px; border: 1px dashed #cfccc4; border-radius: var(--radius); text-align: center; }

/* Avatars */
.avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex: none; background: #d9d6ce; }
.avatar.initial { display: inline-flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 700; color: #fff; background: #5d636d; }
.avatar.lg { width: 84px; height: 84px; font-size: 2rem; }
.avatar.md { width: 40px; height: 40px; font-size: 1rem; }

/* Search page */
.layout { display: grid; gap: 24px; grid-template-columns: 1fr; }
.filters .field { margin-bottom: 12px; }
.pager { display: flex; justify-content: space-between; margin-top: 20px; gap: 8px; }

/* Preset page */
.phead { display: grid; gap: 16px; grid-template-columns: 1fr; margin-bottom: 20px; }
.phead h1 { margin-bottom: 4px; overflow-wrap: anywhere; }
.phead .chips { margin-top: 10px; }
.owner-actions { margin-top: 28px; display: flex; flex-direction: column; gap: 12px; }
form.actions input[type=text] { flex: 1 1 200px; width: auto; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: .9rem; align-items: center; }
.meta a { color: var(--ink); }
.side { display: flex; flex-direction: column; gap: 10px; }
.side .btn { width: 100%; }
.chain { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.chain li { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 6px 8px; font-size: .8rem; min-width: 0; }
.chain li b { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.chain li span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chain li.on { border-color: var(--on); box-shadow: inset 3px 0 0 var(--on); }
.chain li.on b { color: var(--on); }
.chain li.off span { color: #9a9ea6; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 0 0 24px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; }
.fact b { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.blocks { display: grid; gap: 14px; align-items: start; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.block h3 { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px; margin: 0; border-bottom: 1px solid var(--line); background: #faf9f6; }
.block h3 .state { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #9a9ea6; }
.block.on h3 .state { color: var(--on); }
.block.off { opacity: .72; }
.block .type { font-weight: 400; color: var(--muted); font-size: .9rem; }
.params { width: 100%; border-collapse: collapse; font-size: .88rem; }
.params td { padding: 4px 14px; border-top: 1px solid #f0eee9; vertical-align: top; }
.params tr:first-child td { border-top: 0; }
.params td:last-child { text-align: right; font-family: var(--mono); white-space: nowrap; }
.desc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 20px; }
details.report summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
details.report form { margin-top: 10px; }

/* Profile */
.profile { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 28px; }
.profile .who { flex: 1 1 280px; min-width: 0; }
.profile h1 { margin-bottom: 2px; overflow-wrap: anywhere; }
.counts { display: flex; gap: 18px; flex-wrap: wrap; margin: 10px 0; }
.counts a, .counts span { text-decoration: none; color: var(--muted); }
.counts b { color: var(--ink); }
.people { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.people li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; gap: 12px; align-items: center; min-width: 0; }
.people li div { min-width: 0; }

/* Upload checklist */
.checklist { list-style: none; padding: 0; margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 12px; border-top: 1px solid #f0eee9; }
.checklist li:first-child { border-top: 0; }
.checklist label { display: flex; gap: 10px; align-items: baseline; font-weight: 400; margin: 0; flex: 1; min-width: 0; flex-wrap: wrap; }
.checklist .slot { color: var(--muted); font-family: var(--mono); font-size: .85rem; }
.checklist .status { font-size: .85rem; color: var(--accent); flex-basis: 100%; }
.checklist li.skip { background: #fbfaf8; }
.result { list-style: none; padding: 0; margin: 0 0 16px; }
.result li { padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 6px; background: var(--surface); }
.result li.created { border-color: var(--ok-line); background: var(--ok-bg); }

/* Tables (settings, mod) */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: 8px; border-top: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-top: 0; }
.tablewrap { overflow-x: auto; }
.token { display: block; background: var(--band); color: var(--band-ink); padding: 10px 12px; border-radius: 6px; overflow-wrap: anywhere; margin: 8px 0; }
.reports { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.reports li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }

@media (min-width: 760px) {
  .hero { grid-template-columns: 1.2fr 1fr; align-items: end; }
  .layout { grid-template-columns: 240px 1fr; }
  .phead { grid-template-columns: 1fr 240px; align-items: start; }
}

@media (max-width: 520px) {
  h1 { font-size: 1.45rem; }
  .hero h1 { font-size: 1.6rem; }
  .band .wrap { gap: 10px; }
  .nav { margin-left: 0; width: 100%; gap: 4px 14px; }
  .headsearch { max-width: none; order: 3; }
  main { padding-top: 20px; }
  .panel { padding: 16px; }
}

/* Sign-in */
.wide { width: 100%; }
.emailform .btn { margin-top: 4px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.providers { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.chip.ok-chip { background: var(--ok-bg); color: var(--on); }
.wrapcell { overflow-wrap: anywhere; }
.linkrow { margin: 12px 0 4px; }
.emailadd { margin-top: 16px; }
.emailadd .actions input[type=email] { flex: 1 1 200px; width: auto; }
input[type=email] {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid #cfccc4; border-radius: 6px; padding: 8px 10px;
}
.after-btn { margin-top: 12px; }
