/* ============================================================
   ANONSHARE — design system
   Monochrome editorial. Ink on paper, one electric accent.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,300..800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --paper: #f3f2ed;
  --card: #faf9f5;
  --ink: #131312;
  --dim: #7c7a72;
  --faint: #a8a69c;
  --line: #dedcd3;
  --line-strong: #131312;
  --accent: #2500ad;
  --good: #0c7a43;
  --warn: #8a5a00;
  --bad: #b3261e;
  --disp: 'Bricolage Grotesque', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --max: 1200px;
  --pad: clamp(20px, 4vw, 56px);
  --r: 2px;
  --ease: cubic-bezier(.19, 1, .22, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scrollbar-width: thin; scroll-behavior: smooth; }
::selection { background: var(--accent); color: #fff; }

body {
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
}

/* paper grain */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2147483000;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg { vertical-align: middle; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

.hidden { display: none !important; }
.center { text-align: center; }
.dim { color: var(--dim); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.mt { margin-top: 26px; }
.mt-sm { margin-top: 14px; }
.mb-sm { margin-bottom: 14px; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 26px 0; }

h1, h2, h3, h4 {
  font-family: var(--disp);
  font-weight: 640;
  line-height: 1.02;
  letter-spacing: -.02em;
  text-transform: uppercase;
}

/* ---------- header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--pad);
}

.brand {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand .logo {
  width: 30px; height: 30px;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center;
}
.brand .logo svg { width: 15px; height: 15px; }
.brand:hover .logo { background: var(--accent); }

.nav { display: flex; gap: 26px; font-size: 12px; letter-spacing: .08em; }
.nav a { position: relative; text-transform: uppercase; padding: 6px 0; }
.nav a::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--ink);
  transition: width .45s var(--ease);
}
.nav a:hover::after { width: 100%; }

/* ---------- boot loader ---------- */

#boot {
  position: fixed; inset: 0; z-index: 2147483600;
  background: var(--ink); color: var(--paper);
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: var(--pad);
  transition: clip-path 1s var(--ease);
  clip-path: inset(0 0 0 0);
}
#boot.done { clip-path: inset(0 0 100% 0); }
#boot .b-word {
  font-family: var(--disp); font-weight: 750; text-transform: uppercase;
  font-size: clamp(38px, 8vw, 110px); line-height: .9; letter-spacing: -.03em;
}
#boot .b-word i { font-style: normal; color: var(--accent); }
#boot .b-count { font-size: 13px; letter-spacing: .2em; }

/* ---------- hero ---------- */

.hero {
  padding: clamp(30px, 6vw, 80px) 0 clamp(26px, 4vw, 44px);
}
.hero-kicker {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(44px, 9.2vw, 128px);
  font-weight: 750;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero h1 sup { font-size: .32em; color: var(--accent); font-weight: 500; }
.hero p {
  max-width: 560px; margin-top: 22px; color: var(--dim);
}
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.badge {
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid var(--line); padding: 7px 12px;
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--dim); background: var(--card);
}
.badge svg { width: 11px; height: 11px; }
.badge b { color: var(--ink); font-weight: 600; }

/* parenthetical captions, noth.in style */
.paren {
  font-size: 12px; color: var(--faint); letter-spacing: .06em;
}
.paren::before { content: '( '; }
.paren::after { content: ' )'; }

/* ---------- marquee ---------- */

.marquee {
  border-block: 1px solid var(--ink);
  overflow: hidden;
  margin: clamp(30px, 5vw, 60px) calc(var(--pad) * -1) 0;
  padding: 12px 0;
  white-space: nowrap;
}
.marquee-track {
  display: inline-flex; gap: 0;
  animation: marquee 26s linear infinite;
}
.marquee span {
  font-family: var(--disp); font-weight: 700; text-transform: uppercase;
  font-size: clamp(15px, 2.2vw, 26px); letter-spacing: .04em;
  padding-right: 30px;
}
.marquee i { font-style: normal; color: var(--accent); padding-right: 30px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- big outlined word ---------- */

.bigword {
  font-family: var(--disp);
  font-weight: 800;
  font-size: clamp(70px, 17vw, 240px);
  line-height: .85;
  letter-spacing: -.02em;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(19, 19, 18, .22);
  user-select: none;
  margin: clamp(50px, 8vw, 100px) 0 -0.12em;
  transition: -webkit-text-stroke-color .6s ease, color .6s ease;
}
.bigword:hover { color: var(--ink); -webkit-text-stroke-color: transparent; }

/* ---------- card / panel ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(22px, 3.4vw, 40px);
}

/* ---------- dropzone ---------- */

.dropzone {
  border: 1px dashed var(--faint);
  border-radius: var(--r);
  padding: clamp(36px, 6vw, 72px) 24px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: border-color .3s ease, background .3s ease;
}
.dropzone::before {
  content: '( drop it here )';
  position: absolute; top: 10px; left: 12px;
  font-size: 11px; letter-spacing: .08em; color: var(--faint);
  text-transform: lowercase;
}
.dropzone:hover, .dropzone.drag {
  border-color: var(--accent);
  border-style: solid;
  background: #fff;
}
.dropzone.drag { background: #f6f4ff; }
.dropzone h3 { font-size: clamp(20px, 3vw, 30px); margin-top: 12px; }
.dropzone p { color: var(--dim); font-size: 13px; margin-top: 6px; }
.dz-icon {
  width: 46px; height: 46px; margin: 0 auto;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  transition: transform .5s var(--ease), background .3s, color .3s;
}
.dz-icon svg { width: 20px; height: 20px; }
.dropzone input[type="file"] {
  display: none;
}
.dropzone:hover .dz-icon, .dropzone.drag .dz-icon {
  background: var(--accent); border-color: var(--accent); color: #fff;
  transform: translateY(-4px);
}

/* ---------- file row ---------- */

.file-row {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--line); padding: 14px; background: #fff;
  margin-top: 14px;
}
.f-icon {
  width: 44px; height: 44px; flex: 0 0 44px;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
}
.f-icon svg { width: 19px; height: 19px; }
.f-name {
  font-family: var(--disp); font-weight: 640; font-size: 16px;
  word-break: break-all; line-height: 1.25;
}
.f-meta { font-size: 12px; color: var(--dim); margin-top: 2px; }
.f-remove {
  margin-left: auto; font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid var(--line); padding: 8px 12px; flex: 0 0 auto;
}
.f-remove:hover { border-color: var(--bad); color: var(--bad); }

/* ---------- fields ---------- */

.field-label {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--dim); margin: 22px 0 8px;
}
input[type="text"], input[type="password"], input[type="number"], select {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 13px 14px;
  outline: none;
  transition: border-color .25s ease, box-shadow .25s ease;
}
input:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 0, 173, .12);
}
input[type="number"] { font-variant-numeric: tabular-nums; }
::placeholder { color: var(--faint); }

.check {
  display: flex; align-items: flex-start; gap: 10px;
  cursor: pointer; user-select: none;
  margin-top: 18px; font-size: 13px; color: var(--dim);
}
.check input {
  appearance: none; flex: 0 0 17px; height: 17px;
  border: 1px solid var(--line-strong); background: #fff;
  margin-top: 2px; cursor: pointer; position: relative; border-radius: 1px;
}
.check input:checked { background: var(--ink); }
.check input:checked::after {
  content: ''; position: absolute; left: 5.4px; top: 2.4px;
  width: 4px; height: 8px; border: solid var(--paper);
  border-width: 0 2px 2px 0; transform: rotate(42deg);
}

/* strength meter */
.strength {
  height: 3px; background: var(--line); margin-top: 8px; overflow: hidden;
}
#strengthBar, .strength div {
  height: 100%; width: 0; transition: width .4s var(--ease), background .3s;
}
.hint {
  font-size: 12px; color: var(--dim); margin-top: 8px;
}
.hint.center { text-align: center; }

/* ---------- chips ---------- */

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid var(--line-strong);
  padding: 10px 18px; background: transparent;
  transition: background .2s ease, color .2s ease;
}
.chip:hover { background: var(--ink); color: var(--paper); }
.chip.active { background: var(--ink); color: var(--paper); }
.chip.active:hover { background: var(--accent); border-color: var(--accent); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid var(--line-strong);
  background: var(--ink); color: var(--paper);
  padding: 15px 26px;
  border-radius: var(--r);
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s var(--ease);
}
.btn svg { width: 14px; height: 14px; }
.btn:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.small { padding: 9px 14px; font-size: 11px; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.spinner {
  display: inline-block; width: 12px; height: 12px;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: spin .7s linear infinite;
  vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- notices ---------- */

.notice {
  border: 1px solid var(--line); border-left: 3px solid var(--ink);
  background: #fff; padding: 13px 16px; font-size: 13px;
  margin-top: 14px;
}
.notice.good { border-left-color: var(--good); }
.notice.warn { border-left-color: var(--warn); }
.notice.bad { border-left-color: var(--bad); color: var(--bad); }

/* ---------- toasts ---------- */

.toast-wrap {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; z-index: 2147483400;
  align-items: center; width: max-content; max-width: 92vw;
}
.toast {
  background: var(--ink); color: var(--paper);
  font-size: 12px; letter-spacing: .06em;
  padding: 11px 18px; white-space: pre-line;
  animation: toastIn .5s var(--ease);
  border-left: 3px solid var(--accent);
}
.toast.good { border-left-color: var(--good); }
.toast.bad { border-left-color: var(--bad); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }

/* ---------- upload progress ---------- */

.progress-wrap { margin-top: 22px; }
.progress-head {
  display: flex; justify-content: space-between; font-size: 13px;
  color: var(--dim); margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.progress {
  height: 10px; border: 1px solid var(--line-strong); padding: 2px;
}
.progress > * {
  height: 100%; width: 0; background: var(--accent);
  transition: width .3s ease;
}
.progress-note { font-size: 12px; color: var(--faint); margin-top: 8px; font-variant-numeric: tabular-nums; }

/* ---------- PIN result ---------- */

.pin-display {
  font-family: var(--disp);
  font-weight: 750;
  font-size: clamp(48px, 12vw, 120px);
  text-align: center;
  letter-spacing: .14em;
  padding: clamp(18px, 4vw, 34px) 8px;
  border-block: 1px solid var(--ink);
  margin: 22px 0;
  font-variant-numeric: tabular-nums;
  user-select: all;
}
.pin-actions {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
}
.share-link {
  display: flex; gap: 8px; margin-top: 18px; max-width: 640px;
  margin-left: auto; margin-right: auto;
}
.share-link input {
  flex: 1; font-size: 12.5px; letter-spacing: .02em;
}
@media (max-width: 560px) {
  .share-link { flex-direction: column; }
}
.meta-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  margin-top: 22px;
}
.meta-grid .m { background: var(--card); padding: 13px 15px; }
.meta-grid .k {
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint);
}
.meta-grid .v {
  font-size: 13px; margin-top: 4px; word-break: break-all; font-weight: 500;
}

/* ---------- steps & features (home) ---------- */

.steps {
  list-style: none; counter-reset: st;
  border-top: 1px solid var(--line); margin-top: 20px;
}
.steps li {
  counter-increment: st;
  display: flex; gap: 18px; align-items: baseline;
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.steps li::before {
  content: '0' counter(st);
  font-family: var(--disp); font-weight: 700; font-size: clamp(24px, 4vw, 40px);
  color: transparent; -webkit-text-stroke: 1px var(--ink);
  flex: 0 0 auto; line-height: 1;
}
.steps .t { font-family: var(--disp); font-weight: 640; font-size: clamp(17px, 2.4vw, 22px); text-transform: uppercase; letter-spacing: -.01em; }
.steps .d { color: var(--dim); font-size: 13.5px; margin-top: 6px; max-width: 640px; }

.feat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); margin-top: 30px;
}
.feat { background: var(--card); padding: 26px 22px; transition: background .3s ease; }
.feat:hover { background: #fff; }
.feat .fi {
  width: 40px; height: 40px; border: 1px solid var(--line-strong);
  display: grid; place-items: center; margin-bottom: 16px;
  transition: background .3s, color .3s;
}
.feat:hover .fi { background: var(--ink); color: var(--paper); }
.feat .fi svg { width: 17px; height: 17px; }
.feat h4 { font-size: 16px; }
.feat p { color: var(--dim); font-size: 13px; margin-top: 8px; }

/* ---------- docs ---------- */

.doc h2 {
  font-size: clamp(22px, 3.4vw, 34px);
  margin: 44px 0 14px;
}
.doc h2:first-child { margin-top: 8px; }
.doc h3 {
  font-size: 13px; font-family: var(--mono); font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--dim);
  margin: 34px 0 10px;
}
.doc ul, .doc p { color: var(--dim); }
.doc li { margin: 10px 0; }
.doc strong { color: var(--ink); font-weight: 600; }
details {
  border: 1px solid var(--line); background: #fff;
  padding: 13px 16px;
}
details + details { margin-top: 8px; }
summary { cursor: pointer; font-size: 13px; color: var(--ink); list-style: none; display: flex; align-items: center; gap: 8px; }
summary::before { content: '+'; font-family: var(--disp); font-weight: 700; color: var(--accent); }
details[open] summary::before { content: '–'; }
details p { margin-top: 10px; font-size: 13px; }

/* ---------- admin ---------- */

.admin-nav {
  display: flex; gap: 4px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line-strong);
  margin-bottom: 26px;
}
.admin-nav button {
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  padding: 12px 16px; border: 1px solid transparent; border-bottom: 0;
  color: var(--dim); position: relative; top: 1px;
}
.admin-nav button:hover { color: var(--ink); }
.admin-nav button.active {
  border-color: var(--line-strong); background: var(--card); color: var(--ink);
}
.tag {
  font-size: 10px; padding: 2px 7px; margin-left: 6px;
  border: 1px solid currentColor; vertical-align: 2px;
}
.tag.open { color: var(--bad); }
.tag.active { color: var(--good); }
.tag.resolved { color: var(--good); }
.tag.pending { color: var(--warn); }
.tag.burning { color: var(--accent); }
.tag.expired, .tag.deleted, .tag.aborted { color: var(--faint); }
.mono-pin { font-weight: 600; letter-spacing: .1em; }

.section-title {
  font-size: clamp(15px, 2vw, 19px);
  letter-spacing: .02em; color: var(--dim);
  margin-bottom: 18px; display: flex; align-items: center; gap: 12px;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
}
.stat { background: var(--card); padding: 20px; }
.stat .k { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.stat .v {
  font-family: var(--disp); font-weight: 750;
  font-size: clamp(28px, 4vw, 44px); line-height: 1.1; margin: 8px 0 2px;
  font-variant-numeric: tabular-nums;
}
.stat .s { font-size: 11px; color: var(--faint); }

.toolbar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 18px 0;
}
.toolbar input, .toolbar select { width: auto; min-width: 180px; }
.spacer { flex: 1; }

.tbl-scroll { overflow-x: auto; border: 1px solid var(--line); background: var(--card); }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 700px; }
.tbl th {
  text-align: left; font-weight: 600; font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--faint);
  padding: 12px 14px; border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: #fff; }
.tbl code, .pin-code {
  font-weight: 600; letter-spacing: .08em;
}
.tbl .st-badge {
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid var(--line); padding: 2px 7px; white-space: nowrap;
}
.st-active { border-color: var(--good) !important; color: var(--good); }
.st-pending { border-color: var(--warn) !important; color: var(--warn); }
.st-burning { border-color: var(--accent) !important; color: var(--accent); }
.st-deleted, .st-expired, .st-aborted { color: var(--faint); }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.row-actions .mini {
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid var(--line); padding: 4px 8px;
}
.row-actions .mini:hover { border-color: var(--ink); }
.row-actions .mini.danger:hover { border-color: var(--bad); color: var(--bad); }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--ink);
  margin-top: clamp(50px, 8vw, 90px);
  padding: 26px 0 40px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 12px; color: var(--dim);
  font-variant-numeric: tabular-nums;
}
.site-footer a:hover { color: var(--accent); }

/* giant footer word */
.foot-word {
  font-family: var(--disp); font-weight: 800; text-transform: uppercase;
  font-size: clamp(58px, 12.5vw, 190px); line-height: .82;
  letter-spacing: -.02em; color: transparent;
  -webkit-text-stroke: 1.5px rgba(19,19,18,.35);
  margin-top: clamp(40px, 6vw, 70px);
  user-select: none;
}
.foot-word i { font-style: normal; -webkit-text-stroke-color: var(--accent); }

/* ---------------- scroll reveal ---------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
[data-reveal].in { opacity: 1; transform: none; }

/* line mask reveal for hero/pronounced text */
.rline {
  display: block; overflow: hidden;
}
.rline > span {
  display: block; transform: translateY(110%);
  transition: transform 1.1s var(--ease);
  transition-delay: var(--d, 0s);
}
.rline.in > span { transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], .rline > span { transition: none; transform: none; opacity: 1; }
  .marquee-track { animation: none; }
}

/* ---------------- responsive ---------------- */

@media (max-width: 760px) {
  body { font-size: 14px; }
  .nav { gap: 14px; font-size: 11px; }
  .hide-sm { display: none !important; }
  .site-header { flex-wrap: wrap; }
  .pin-actions .btn { width: 100%; }
  .toolbar input, .toolbar select { width: 100%; min-width: 0; }
  .f-remove { margin-left: 0; }
  #boot { padding: 20px; }
}
