/* hereornot.xyz — dark, monospace, restrained */

:root {
  --bg: #0b0b0c;
  --bg-elev: #141416;
  --bg-hover: #1c1c1f;
  --border: #242428;
  --border-bright: #2e2e33;
  --fg: #e6e6e6;
  --fg-dim: #9a9aa0;
  --fg-mute: #5a5a60;
  --accent: #7ea9ff;
  --accent-dim: #3a5a9a;
  --good: #8bc98b;
  --danger: #e26868;
  --warn: #e8c068;
  --mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Cascadia Code', Menlo, Consolas, 'Courier New', monospace;
  --radius: 4px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--mono);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.55;
  min-height: 100vh;
  padding: 1.25rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* layout */

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 1rem 0;
}

.wrap-wide {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1rem 0;
}

header.top {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.85rem;
  margin-bottom: 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

header.top .brand {
  font-size: 1rem;
  color: var(--fg);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: -0.01em;
}

header.top .brand .dot {
  color: var(--accent);
}

header.top nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.85rem;
  flex-wrap: wrap;
}

header.top nav a {
  color: var(--fg-dim);
  text-decoration: none;
}

header.top nav a:hover,
header.top nav a.active {
  color: var(--fg);
}

footer {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 3rem;
  font-size: 0.8rem;
  color: var(--fg-mute);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

footer a {
  color: var(--fg-dim);
  text-decoration: none;
}

footer a:hover {
  color: var(--fg);
}

/* logo block */

.logo-block {
  margin-bottom: 2.25rem;
}

.logo {
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
  color: var(--fg);
}

.logo .dot {
  color: var(--accent);
}

.tagline {
  color: var(--fg-dim);
  font-size: 0.95rem;
}

/* landing hero */

.hero {
  padding: 2.25rem 0 1.25rem;
  text-align: left;
}

.logo-xl {
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--fg);
  line-height: 1;
  margin-bottom: 0.6rem;
}

.logo-xl .dot { color: var(--accent); }

.lead {
  color: var(--fg);
  font-size: 1rem;
  max-width: 58ch;
  margin-bottom: 1.75rem;
}

/* action grid — 1 col mobile, 3 cols desktop for logged-out, 4 for logged-in */

.action-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .action-grid { grid-template-columns: repeat(3, 1fr); }
  #actions-in { grid-template-columns: repeat(4, 1fr); }
}

.action-card {
  display: block;
  border: 1px solid var(--border-bright);
  background: var(--bg-elev);
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  color: var(--fg);
  text-decoration: none;
  transition: border-color 0.12s, transform 0.12s, box-shadow 0.12s;
}

.action-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(126, 169, 255, 0.08);
}

.action-icon {
  color: var(--accent);
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  line-height: 1;
}

.action-title {
  color: var(--fg);
  font-weight: 500;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.action-desc {
  color: var(--fg-dim);
  font-size: 0.82rem;
  line-height: 1.4;
}

/* feature grid */

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

@media (min-width: 700px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

.feature-card {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius);
}

.feature-title {
  color: var(--fg);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.feat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feat-list li {
  padding: 0.35rem 0;
  font-size: 0.9rem;
  color: var(--fg);
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.feat-list li::marker { content: ''; }

.feat-list .ok {
  color: var(--good);
  font-weight: 600;
  flex-shrink: 0;
  width: 1em;
}

.feat-list .meh {
  color: var(--fg-mute);
  flex-shrink: 0;
  width: 1em;
}

/* steps */

.steps {
  padding-left: 1.5rem;
}

.steps li {
  padding: 0.4rem 0;
  color: var(--fg);
  line-height: 1.55;
}

.steps li::marker {
  color: var(--accent);
  font-weight: 500;
}

.steps strong {
  color: var(--fg);
  font-weight: 500;
}

/* small tweaks */

.handle-label {
  color: var(--accent);
}

/* typography */

h1, h2, h3, h4 {
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 0.5em;
  color: var(--fg);
}

h1 { font-size: 1.4rem; }
h2 {
  font-size: 1.05rem;
  margin-top: 2rem;
  color: var(--fg-dim);
  font-weight: 400;
  text-transform: lowercase;
  letter-spacing: 0;
}
h3 { font-size: 1rem; margin-top: 1.25em; }

p {
  margin-bottom: 1em;
  color: var(--fg);
}

p.dim, .dim {
  color: var(--fg-dim);
}

.mute {
  color: var(--fg-mute);
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

a:hover {
  border-bottom-color: var(--accent);
}

strong {
  color: var(--fg);
  font-weight: 600;
}

small {
  font-size: 0.85rem;
  color: var(--fg-dim);
}

code, pre, kbd {
  font-family: var(--mono);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 0.08em 0.4em;
  border-radius: var(--radius);
  font-size: 0.88em;
  color: var(--fg);
}

pre {
  padding: 0.85rem 1rem;
  overflow-x: auto;
  white-space: pre;
  line-height: 1.45;
  margin: 1em 0;
}

pre code {
  background: transparent;
  border: none;
  padding: 0;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

ul, ol {
  padding-left: 1.3rem;
  margin-bottom: 1em;
  color: var(--fg);
}

ul li, ol li {
  margin-bottom: 0.35em;
}

ul li::marker {
  color: var(--fg-mute);
}

ol li::marker {
  color: var(--fg-mute);
}

/* boxes */

.box {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
}

.box.danger { border-color: #402020; }
.box.warn { border-color: #3a3220; }
.box.success { border-color: #2a3a2a; }

.box-title {
  color: var(--fg-dim);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}

/* forms */

form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-size: 0.85rem;
  color: var(--fg-dim);
}

.field .hint {
  font-size: 0.78rem;
  color: var(--fg-mute);
  line-height: 1.5;
}

input[type=text],
input[type=password],
input[type=email],
input[type=number],
input[type=search],
textarea,
select {
  font-family: var(--mono);
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  padding: 0.65rem 0.8rem;
  width: 100%;
  outline: none;
  transition: border-color 0.12s;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
}

input[type=file] {
  font-family: var(--mono);
  color: var(--fg-dim);
  font-size: 0.9rem;
  background: transparent;
  border: none;
  padding: 0;
}

input[type=file]::file-selector-button {
  font-family: var(--mono);
  background: var(--bg-elev);
  color: var(--fg);
  border: 1px solid var(--border-bright);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  cursor: pointer;
  margin-right: 0.6rem;
  font-size: 0.85rem;
}

input[type=file]::file-selector-button:hover {
  background: var(--bg-hover);
  border-color: var(--fg-mute);
}

textarea {
  resize: vertical;
  min-height: 7rem;
  line-height: 1.55;
}

input::placeholder,
textarea::placeholder {
  color: var(--fg-mute);
}

input[type=range] {
  accent-color: var(--accent);
  width: 100%;
}

input[type=checkbox],
input[type=radio] {
  accent-color: var(--accent);
  width: 1rem;
  height: 1rem;
  vertical-align: middle;
}

.check-row {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.9rem;
}

.check-row input {
  margin-top: 0.2rem;
}

/* buttons */

button,
.btn {
  font-family: var(--mono);
  font-size: 0.9rem;
  background: var(--bg-elev);
  color: var(--fg);
  border: 1px solid var(--border-bright);
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: all 0.12s;
}

button:hover:not(:disabled),
.btn:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--fg-mute);
}

button:active:not(:disabled),
.btn:active:not(:disabled) {
  transform: translateY(1px);
}

button:disabled,
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.btn-primary:hover:not(:disabled) {
  background: #fff;
  border-color: #fff;
}

.btn-accent {
  border-color: var(--accent-dim);
  color: var(--accent);
}

.btn-accent:hover:not(:disabled) {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.btn-danger {
  color: var(--danger);
  border-color: #402020;
}

.btn-danger:hover:not(:disabled) {
  background: var(--danger);
  color: var(--bg);
  border-color: var(--danger);
}

.btn-ghost {
  background: transparent;
  color: var(--fg-dim);
}

.btn-ghost:hover:not(:disabled) {
  color: var(--fg);
  background: var(--bg-elev);
}

.btn-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* alerts */

.alert {
  padding: 0.75rem 1rem;
  border-left: 2px solid var(--fg-mute);
  background: var(--bg-elev);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--fg);
}

.alert-danger { border-left-color: var(--danger); }
.alert-warn { border-left-color: var(--warn); }
.alert-info { border-left-color: var(--accent); }
.alert-good { border-left-color: var(--good); }

/* inbox split layout */

.inbox-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 900px) {
  .inbox-layout {
    grid-template-columns: minmax(300px, 360px) 1fr;
  }
  .inbox-sidebar {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
  }
  .inbox-main {
    min-height: 300px;
  }
}

.inbox-placeholder {
  border: 1px dashed var(--border-bright);
  border-radius: var(--radius);
  padding: 3rem 1rem;
  text-align: center;
  color: var(--fg-mute);
  font-size: 0.9rem;
}

/* inbox list */

.msg-list {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--border);
}

.msg-list li {
  border-bottom: 1px solid var(--border);
  padding: 0;
}

.msg-list li::marker { content: ''; }

.msg-item {
  display: block;
  padding: 0.9rem 0.6rem;
  color: var(--fg);
  text-decoration: none;
  border: none;
  transition: background 0.1s;
}

.msg-item:hover {
  background: var(--bg-elev);
  border: none;
}

.msg-item.unread {
  background: rgba(126, 169, 255, 0.04);
}

.msg-item.unread .msg-from {
  color: var(--fg);
  font-weight: 500;
}

.msg-from {
  color: var(--fg-dim);
  margin-right: 0.5rem;
}

.msg-time {
  color: var(--fg-mute);
  font-size: 0.8rem;
  float: right;
}

.msg-preview {
  color: var(--fg-dim);
  font-size: 0.88rem;
  margin-top: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* message view */

.msg-head {
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.8rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.msg-head .row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.msg-head .label {
  color: var(--fg-mute);
  width: 4.5rem;
  flex-shrink: 0;
}

.msg-head .val {
  color: var(--fg);
  min-width: 0;
  word-break: break-all;
}

.msg-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.65;
  padding: 0.5rem 0;
}

.msg-head .val {
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

.inbox-main {
  min-width: 0;
  overflow: hidden;
}

.attachment {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border-bright);
  background: var(--bg-elev);
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius);
  color: var(--fg);
  text-decoration: none;
  font-size: 0.88rem;
  margin: 0.25rem 0.25rem 0.25rem 0;
}

.attachment:hover {
  background: var(--bg-hover);
}

.attachment .size {
  color: var(--fg-mute);
  font-size: 0.8rem;
}

/* image + other attachment previews in opened message */
.att-preview {
  display: inline-block;
  margin: 0.35rem 0.35rem 0.35rem 0;
  max-width: 100%;
  vertical-align: top;
}

.att-image {
  display: block;
  max-width: 320px;
  max-height: 320px;
  width: auto;
  height: auto;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  background: var(--bg-elev);
  object-fit: contain;
}

.att-image.loading {
  min-width: 140px;
  min-height: 80px;
  animation: pulse-bg 1.2s infinite ease-in-out;
}

@keyframes pulse-bg {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.att-caption {
  font-size: 0.8rem;
  color: var(--fg-dim);
  margin-top: 0.25rem;
  overflow-wrap: anywhere;
  max-width: 320px;
}

.att-caption .att-download {
  color: var(--fg);
}

.att-caption .size {
  color: var(--fg-mute);
}

/* user card */

.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.user-card {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  padding: 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--fg);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: border-color 0.12s;
}

.user-card:hover {
  border-color: var(--fg-mute);
}

.user-card .avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border-bright);
  object-fit: cover;
}

.user-card .handle {
  color: var(--fg);
  font-size: 0.95rem;
  font-weight: 500;
}

.user-card .bio {
  color: var(--fg-dim);
  font-size: 0.85rem;
  line-height: 1.45;
  min-height: 2.6em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* profile */

.profile-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
}

.profile-hero .avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border-bright);
  object-fit: cover;
  flex-shrink: 0;
}

.profile-hero .meta {
  flex: 1;
  min-width: 0;
}

.profile-hero .handle {
  color: var(--fg);
  font-size: 1.2rem;
  margin-bottom: 0.15rem;
  word-break: break-all;
  font-weight: 500;
}

.profile-hero .joined {
  color: var(--fg-mute);
  font-size: 0.8rem;
}

/* captcha */

.captcha-wrap {
  border: 1px solid var(--border-bright);
  background: var(--bg);
  padding: 0.5rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.captcha-canvas {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.captcha-refresh {
  font-size: 0.8rem;
  padding: 0.3rem 0.7rem;
}

/* pow progress */

.pow-status {
  font-size: 0.85rem;
  color: var(--fg-dim);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pow-status .spinner {
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1s infinite ease-in-out;
}

.pow-status.done .spinner {
  background: var(--good);
  animation: none;
}

.pow-status.fail .spinner {
  background: var(--danger);
  animation: none;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* recovery phrase */

.mnemonic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  background: var(--bg-elev);
  border: 1px solid var(--border-bright);
  padding: 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin: 1rem 0;
}

@media (min-width: 480px) {
  .mnemonic { grid-template-columns: repeat(4, 1fr); }
}

.mnemonic .word {
  display: flex;
  gap: 0.35rem;
  color: var(--fg);
}

.mnemonic .word .num {
  color: var(--fg-mute);
  font-size: 0.8rem;
  width: 1.2rem;
  text-align: right;
  flex-shrink: 0;
}

/* scrollbar */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--border-bright);
  border-radius: 0;
}
::-webkit-scrollbar-thumb:hover { background: var(--fg-mute); }

/* selection */

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* utilities */

.hidden { display: none !important; }
.flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.w-full { width: 100%; }
.break { word-break: break-all; }

/* mobile */

@media (max-width: 480px) {
  html { font-size: 14px; }
  body { padding: 0.9rem; }
  .logo { font-size: 1.5rem; }
  header.top { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .btn-row { flex-direction: column; }
  .btn-row > * { width: 100%; }
  .profile-hero { flex-direction: column; text-align: center; }
  .msg-time { float: none; display: block; margin-top: 0.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
