:root {
  color-scheme: light;
  --ink: #20201d;
  --muted: #67635b;
  --paper: #f7f3ea;
  --panel: #fffaf0;
  --line: #d8cfbd;
  --accent: #c54528;
  --accent-2: #0b6b75;
  --green: #2d7656;
  --shadow: 0 18px 50px rgba(48, 42, 32, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(32, 32, 29, 0.045) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(rgba(32, 32, 29, 0.035) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(circle at 82% 8%, rgba(197, 69, 40, 0.16), transparent 34%),
    var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
}

button,
a {
  font: inherit;
}

.site-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 44px clamp(20px, 5vw, 72px) 26px;
  border-bottom: 1px solid var(--line);
}

.kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font: 700 12px/1.1 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(42px, 7vw, 92px);
  line-height: 0.88;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
}

.lede {
  max-width: 610px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.42;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

nav a,
.button,
.copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  padding: 8px 13px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

nav a:hover,
.button:hover,
.copy:hover {
  transform: translateY(-1px);
  box-shadow: 3px 3px 0 var(--ink);
}

.button.primary {
  background: var(--ink);
  color: var(--panel);
}

main {
  padding: 28px clamp(20px, 5vw, 72px) 70px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.status-grid article,
.bridge-card,
.tool-card,
.admin-panel {
  background: rgba(255, 250, 240, 0.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.status-grid article {
  display: grid;
  gap: 9px;
  padding: 18px;
}

.status-grid span,
dt,
.proxy-box span {
  color: var(--muted);
  font: 700 12px/1.1 ui-monospace, "SFMono-Regular", Menlo, monospace;
  text-transform: uppercase;
}

.status-grid strong {
  overflow-wrap: anywhere;
  font-size: 18px;
}

.bridge-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 34px;
}

.bridge-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
}

.bridge-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--accent-2);
}

.bridge-card.google::before {
  background: #d9a21b;
}

.bridge-card.meta::before {
  background: #305cc9;
}

.bridge-card.signal::before {
  background: #2d7656;
}

.bridge-card.slack::before {
  background: #9b2f77;
}

.bridge-card.discord::before {
  background: #5865f2;
}

.bridge-card.googlechat::before {
  background: #1a73e8;
}

.bridge-card.groupme::before {
  background: #00aff0;
}

.bridge-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.monogram {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: 700 22px/1 ui-monospace, "SFMono-Regular", Menlo, monospace;
}

.bridge-head p,
.tool-card p,
.admin-panel p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

dl {
  display: grid;
  gap: 10px;
  margin: 0 0 20px;
}

dl div {
  display: grid;
  gap: 4px;
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
}

code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.92em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tool-section {
  display: grid;
  gap: 16px;
  margin-bottom: 34px;
}

.section-title {
  max-width: 720px;
}

.tool-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.4fr) auto;
  gap: 16px;
  align-items: start;
  padding: 18px;
}

pre {
  width: 100%;
  max-height: 240px;
  margin: 0;
  overflow: auto;
  border: 1px solid var(--line);
  background: #1f211f;
  color: #f5ead8;
  padding: 14px;
}

.admin-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
}

.proxy-box {
  display: grid;
  gap: 8px;
  min-width: min(100%, 320px);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  background: var(--ink);
  color: var(--panel);
  border: 1px solid var(--ink);
  padding: 10px 14px;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .site-header,
  .admin-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-grid,
  .bridge-list {
    grid-template-columns: 1fr;
  }

  .tool-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding-top: 28px;
  }

  h1 {
    font-size: 46px;
  }

  .actions,
  nav {
    flex-direction: column;
    align-items: stretch;
  }
}
