
:root {
  --charcoal: #141414;
  --paper: #1b1b1b;
  --ink: #f1eee7;
  --muted: #a7a29a;
  --red: #751523;
  --red2: #9d1f31;
  --line: #d4cfc6;
  --shadow: #050505;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.035) 0 1px, transparent 1.3px) 0 0/7px 7px,
    radial-gradient(circle at 80% 30%, rgba(117,21,35,.18) 0 1px, transparent 1.5px) 0 0/11px 11px,
    linear-gradient(135deg, #111 0%, var(--charcoal) 55%, #0d0d0d 100%);
  color: var(--ink);
  font-family: "Courier New", ui-monospace, Consolas, monospace;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .26;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.018) 3px 4px),
    repeating-linear-gradient(90deg, transparent 0 17px, rgba(117,21,35,.025) 17px 18px);
  mix-blend-mode: screen;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background:
    radial-gradient(ellipse at 15% 10%, transparent 0 15%, rgba(255,255,255,.05) 15.3%, transparent 15.7%),
    radial-gradient(ellipse at 90% 80%, transparent 0 22%, rgba(117,21,35,.14) 22.3%, transparent 22.8%);
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 64px;
  position: relative;
  z-index: 1;
}

h1, p { margin-top: 0; }

h1 {
  font-family: Arial Black, Impact, sans-serif;
  font-size: clamp(42px, 8vw, 96px);
  line-height: .85;
  letter-spacing: -0.055em;
  margin-bottom: 16px;
  text-transform: uppercase;
}

a { color: inherit; }

.kicker {
  color: #fff;
  background: var(--red);
  display: inline-block;
  border: 2px solid var(--ink);
  padding: 6px 9px;
  font-weight: 800;
  transform: rotate(-1deg);
  box-shadow: 4px 4px 0 var(--shadow);
  margin-bottom: 18px;
}

.dek { color: var(--muted); font-size: 18px; }

.card {
  background: rgba(27,27,27,.96);
  border: 2px solid var(--line);
  box-shadow: 10px 10px 0 var(--red);
}

.login-grid {
  min-height: calc(100vh - 96px);
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: center;
  gap: 48px;
}

.login-card {
  padding: 30px;
  transform: rotate(.35deg);
}

.stamp {
  display: inline-block;
  font-family: Arial Black, Impact, sans-serif;
  font-size: 28px;
  border: 3px solid var(--red2);
  color: var(--red2);
  padding: 4px 10px;
  transform: rotate(-4deg);
  margin-bottom: 26px;
}

label { display: block; margin-bottom: 20px; }
label span { display: block; margin-bottom: 8px; font-weight: 800; }

input {
  width: 100%;
  background: #0e0e0e;
  color: var(--ink);
  border: 2px solid #777;
  padding: 14px 15px;
  font: inherit;
  outline: none;
}
input:focus { border-color: var(--red2); box-shadow: 4px 4px 0 var(--red); }

button, .buttonish {
  appearance: none;
  border: 2px solid var(--ink);
  background: var(--red);
  color: #fff;
  padding: 12px 18px;
  font: 800 14px/1 "Courier New", monospace;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 5px 5px 0 #000;
  text-decoration: none;
}
button:hover, .buttonish:hover { background: var(--red2); transform: translate(-1px,-1px); }

.alert {
  border: 2px solid var(--red2);
  padding: 12px;
  margin-bottom: 18px;
  background: rgba(117,21,35,.23);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  border-bottom: 3px solid var(--line);
  padding-bottom: 24px;
  margin-bottom: 32px;
}
.topbar.compact { align-items: center; }
.topbar.compact h1 { font-size: 48px; }

.identity {
  display: flex;
  gap: 16px;
  align-items: center;
  border: 2px solid #777;
  padding: 8px 10px;
  background: #111;
}
.identity form { margin: 0; }

.link-button {
  box-shadow: none;
  padding: 7px 9px;
  border-width: 1px;
}

.brand {
  font-family: Arial Black, Impact, sans-serif;
  font-size: 32px;
  text-decoration: none;
  letter-spacing: -.04em;
}

.root-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.root-card {
  position: relative;
  min-height: 160px;
  background: var(--paper);
  border: 2px solid var(--line);
  box-shadow: 8px 8px 0 var(--red);
  text-decoration: none;
  padding: 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 16px;
  overflow: hidden;
}
.root-card::before {
  content:"";
  position:absolute;
  inset:-20%;
  background: repeating-radial-gradient(circle at 30% 50%, rgba(255,255,255,.045) 0 1px, transparent 1px 6px);
  transform: rotate(7deg);
  pointer-events:none;
}
.root-card:hover { transform: translate(-2px,-2px) rotate(-.2deg); box-shadow: 12px 12px 0 var(--red2); }

.root-index { color: var(--red2); font-weight: 800; }
.root-name {
  font-family: Arial Black, Impact, sans-serif;
  font-size: clamp(28px, 5vw, 54px);
  letter-spacing: -.04em;
  text-transform: uppercase;
  position: relative;
}
.arrow { font-size: 34px; position: relative; }

.breadcrumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  margin-bottom: 28px;
}
.breadcrumbs a { color: var(--ink); }

.browser-head {
  display: flex;
  justify-content: space-between;
  gap: 26px;
  align-items: end;
  margin-bottom: 26px;
}
.browser-head h1 { font-size: clamp(44px, 7vw, 78px); margin-bottom: 0; }

.search {
  display: flex;
  gap: 8px;
  min-width: min(440px, 100%);
}
.search input { min-width: 0; }

.file-table {
  border: 2px solid var(--line);
  background: rgba(20,20,20,.92);
  box-shadow: 8px 8px 0 var(--red);
}

.file-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 120px;
  gap: 16px;
  align-items: center;
  min-height: 54px;
  padding: 10px 14px;
  border-bottom: 1px solid #555;
}
.file-row:last-child { border-bottom: 0; }
.file-row:not(.file-head):hover { background: rgba(117,21,35,.18); }
.file-head {
  font-weight: 800;
  color: #fff;
  background: var(--red);
  border-bottom: 2px solid var(--line);
}
.kind { color: var(--muted); }
.filename {
  overflow-wrap: anywhere;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.action { text-align: right; font-size: 12px; font-weight: 800; }
.action a { color: #fff; }

.empty, .empty-row { padding: 24px; color: var(--muted); }

.error-card {
  max-width: 720px;
  margin: 15vh auto 0;
  padding: 30px;
}
.error-card h1 { font-size: clamp(42px, 7vw, 72px); }

@media (max-width: 760px) {
  .shell { width: min(100% - 20px, 1180px); padding-top: 18px; }
  .login-grid { grid-template-columns: 1fr; gap: 18px; min-height: auto; }
  .root-grid { grid-template-columns: 1fr; }
  .topbar, .browser-head { flex-direction: column; align-items: stretch; }
  .identity { justify-content: space-between; }
  .search { min-width: 0; }
  .file-row { grid-template-columns: 54px minmax(0,1fr) 88px; gap: 9px; padding: 10px 8px; }
}
