:root {
  --bg: #ececec;
  --ink: #1a1a1a;
  --muted: #666;
  --line: #d4d4d4;
  --panel: #fff;
  --header: #111;
  --silver: #e8e8e8;
  --red: #8a0000;
  --red-2: #5c0000;
  --blue: #3399ff;
  --radius: 8px;
  --font: "Segoe UI", Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: #fff;
  padding: 8px 12px;
  z-index: 20;
}
.skip:focus { left: 8px; }

.wrap {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

.top {
  background: var(--header);
  color: #fff;
  border-bottom: 1px solid #000;
}

.top-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 56px;
}

.brand img {
  height: 28px;
  width: auto;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,.15));
}

.search {
  justify-self: start;
}
.search input {
  width: 220px;
  max-width: 100%;
  background: #2a2a2a;
  border: 1px solid #000;
  color: #ddd;
  border-radius: 6px;
  padding: 8px 12px;
  outline: none;
}
.search input:focus {
  background: #fff;
  color: #111;
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
}
.nav a { color: #ccc; }
.nav a:hover { color: #fff; text-decoration: none; }

.account { position: relative; }
.account summary {
  list-style: none;
  cursor: pointer;
  color: #fff;
  font-weight: 700;
  padding: 8px 10px;
}
.account summary::-webkit-details-marker { display: none; }
.account-menu {
  position: absolute;
  right: 0;
  top: 100%;
  background: #000;
  min-width: 180px;
  padding: 6px 0;
  z-index: 10;
  border-radius: 0 0 6px 6px;
}
.account-menu a {
  display: block;
  color: #bbb;
  padding: 8px 14px;
}
.account-menu a:hover {
  background: #222;
  color: #fff;
  text-decoration: none;
}

main.wrap { padding: 24px 0 48px; }

.flash {
  padding: 12px 14px;
  border-radius: var(--radius);
  margin: 0 0 18px;
  font-weight: 600;
}
.flash-ok { background: #e7f7ea; color: #146c2e; }
.flash-err { background: #fde8e8; color: #8a0000; }
.flash-warn { background: #fff4d6; color: #6a4b00; }

.hero {
  display: grid;
  grid-template-columns: 1.3fr .9fr;
  gap: 28px;
  align-items: start;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 8px 24px rgba(0,0,0,.06);
}

.hero-copy h1 {
  font-size: clamp(28px, 5vw, 48px);
  margin: 8px 0 10px;
  letter-spacing: .02em;
}
.kicker {
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.lede { font-size: 16px; color: #333; max-width: 42ch; }
.points { margin: 18px 0 0; padding: 0; list-style: none; color: #333; }
.points li { padding: 6px 0 6px 18px; position: relative; }
.points li::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--red);
  border-radius: 50%;
  position: absolute;
  left: 0; top: 12px;
}

label { display: block; font-size: 13px; font-weight: 700; margin: 12px 0 4px; }
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="search"],
input[type="file"],
textarea,
select {
  width: 100%;
  border: 1px solid #bbb;
  border-radius: 4px;
  padding: 9px 10px;
  font: inherit;
  background: #fff;
}
textarea { resize: vertical; min-height: 110px; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #77bbff;
  box-shadow: 0 0 5px rgba(81, 203, 238, .8);
}

.btn {
  display: inline-block;
  border: 1px solid #333;
  border-radius: 5px;
  padding: 8px 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  background: linear-gradient(#8c0000, #5c0000);
  color: #fff;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; color: #fff; }
.btn-ghost {
  background: linear-gradient(#f0f0f0, #c2c2c2);
  color: #111;
  border-color: #999;
}
.btn-row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; margin-top: 12px; }
.check input { width: auto; margin-top: 4px; }
.hint { color: var(--muted); font-size: 13px; }

.desk {
  display: grid;
  grid-template-columns: 1.4fr .9fr;
  gap: 16px;
}
.composer textarea { min-height: 140px; font-size: 18px; background: #f4f4f4; }
.char-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
.char-count { color: var(--muted); font-weight: 700; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th, .table td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}
.table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }

.history h2, .composer h1, .panel h1, .panel h2 { margin: 0 0 12px; }
.msg {
  border-bottom: 1px solid #e5e5e5;
  padding: 10px 0;
}
.msg p { margin: 0 0 4px; }
.msg time { color: var(--muted); font-size: 12px; }

.profile-head {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}
.avatar {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  background: #222;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 32px;
  font-weight: 700;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.legal h1 { font-size: 28px; }
.legal h2 { margin-top: 22px; font-size: 18px; }
.legal p, .legal li { color: #333; }

.help-shot {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 10px 0 16px;
}

.foot {
  padding: 24px 0 40px;
  color: #444;
  font-size: 13px;
  text-align: center;
}
.foot a { color: #111; }
.foot a:hover { color: #666; text-decoration: none; }
.copy { display: block; margin-top: 8px; color: #777; }

.banner-warn {
  background: #fff4d6;
  border: 1px solid #e6cf7a;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 14px;
}

@media (max-width: 800px) {
  .top-inner {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }
  .hero, .desk, .grid-2, .profile-head {
    grid-template-columns: 1fr;
  }
  .search { display: none; }
  .nav { justify-content: flex-end; }
}
