/* ShredMentor Design System -- canonical token and component file */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=IBM+Plex+Mono:wght@300;400;500&family=Open+Sans:wght@400;500;600&display=swap');

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

:root {
  --accent:       #d4500f;
  --accent-light: #e8601a;
  --accent-glow:  rgba(212, 80, 15, 0.22);
  --accent-dim:   rgba(212, 80, 15, 0.10);
  --bg:           #080807;
  --card-bg:      #101010;
  --card-border:  #1e1e1c;
  --input-bg:     #0b0b0a;
  --input-border: #242420;
  --text:         #ece8e1;
  --text-mid:     #7a7570;
  --text-dim:     #46433f;
  --patreon:      #FF424D;
  --patreon-dim:  rgba(255, 66, 77, 0.12);
  --nav-h:        54px;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Open Sans', 'Segoe UI', sans-serif;
  min-height: 100%;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url(data:image/svg+xml,%3Csvg xmlns=http://www.w3.org/2000/svg width=400 height=400%3E%3Cfilter id=g%3E%3CfeTurbulence type=fractalNoise baseFrequency=0.8 numOctaves=4 stitchTiles=stitch/%3E%3C/filter%3E%3Crect width=400 height=400 filter=url(%23g) opacity=0.04/%3E%3C/svg%3E);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--accent-light); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; }

/* Navigation */

.sm-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(8, 8, 7, 0.96);
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 0;
  z-index: 9000;
  backdrop-filter: blur(6px);
}

.sm-nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 24px;
}

.sm-nav-brand .pick {
  width: 16px; height: 20px;
  filter: drop-shadow(0 1px 5px rgba(212, 80, 15, 0.55));
}

.sm-nav-brand .wordmark {
  font-family: 'Bebas Neue', 'Impact', sans-serif;
  font-size: 22px;
  letter-spacing: 0.14em;
  color: var(--text);
  line-height: 1;
}

.sm-nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
}

.sm-nav-links a {
  font-family: 'Open Sans', 'Segoe UI', sans-serif;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mid);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 2px;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}

.sm-nav-links a:hover, .sm-nav-links a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.sm-nav-links a.nav-live::after {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  margin-left: 5px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.sm-nav-divider {
  width: 1px; height: 18px;
  background: var(--card-border);
  margin: 0 6px;
  flex-shrink: 0;
}

.sm-nav-auth {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: 16px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-mid);
}

.sm-nav-auth a {
  color: var(--text-mid);
  font-size: 11px;
  border: 1px solid var(--card-border);
  padding: 4px 10px;
  border-radius: 2px;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.sm-nav-auth a:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  text-decoration: none;
}

/* SM-257 -- mobile hamburger nav.
   Root cause of the banned horizontal scrollbar: .sm-nav-links is `flex:1` with
   `overflow-x:auto` (above) and no wrap -- once the brand+links+auth's combined
   INTRINSIC width exceeds the available bar width, that overflow-x:auto stops
   being invisible and renders as a scrollable strip inside the nav (measured on
   production: brand 156px + links 653px (staff, all 7 links) + auth 209px + 40px
   padding + 24px/16px margins = ~1098px needed; below that width the strip can no
   longer fit and scrolls). No sitewide mobile-breakpoint token exists to reuse
   (grepped static/css/*.css and templates/*.html for @media in base-template-linked
   files; only ad hoc 390-1100px values in individual tool pages, and the ~1100px
   figure widely reused elsewhere is a *content max-width*, not a breakpoint). The
   breakpoint below is therefore set from the nav's own measured worst-case need
   (~1098px, staff view) plus headroom for cross-browser font-metric variance.
   Fix removes the cause instead of masking it: at/under the breakpoint the
   overflowing row is not rendered at all (display:none) -- replaced by a
   fixed-width toggle button, so there is nothing left for overflow-x:auto to act on. */
.sm-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: auto;
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--card-border);
  border-radius: 3px;
  color: var(--text);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.sm-nav-toggle:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

.sm-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  z-index: 10000;
}
.sm-nav-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.sm-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(300px, 84vw);
  background: var(--bg);
  border-left: 1px solid var(--card-border);
  z-index: 10001;
  transform: translateX(100%);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--card-border) transparent;
}
.sm-nav-drawer.is-open {
  transform: translateX(0);
}
.sm-nav-drawer::-webkit-scrollbar { width: 6px; }
.sm-nav-drawer::-webkit-scrollbar-track { background: transparent; }
.sm-nav-drawer::-webkit-scrollbar-thumb { background: var(--card-border); border-radius: 3px; }

.sm-nav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding: 16px 20px;
  border-bottom: 1px solid var(--card-border);
}
.sm-nav-drawer-title {
  font-family: 'Bebas Neue', 'Impact', sans-serif;
  font-size: 18px;
  letter-spacing: 0.1em;
  color: var(--text);
}
.sm-nav-drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: 1px solid var(--card-border);
  border-radius: 3px;
  color: var(--text-mid);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.sm-nav-drawer-close:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

.sm-nav-drawer-links {
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
}
.sm-nav-drawer-links a {
  font-family: 'Open Sans', 'Segoe UI', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mid);
  text-decoration: none;
  padding: 13px 10px;
  border-bottom: 1px solid var(--card-border);
}
.sm-nav-drawer-links a:last-child { border-bottom: none; }
.sm-nav-drawer-links a:hover, .sm-nav-drawer-links a:active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}
.sm-nav-drawer-links a.nav-live::after {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
}
.sm-nav-drawer-admin { color: var(--accent-light) !important; }

.sm-nav-drawer-auth {
  margin-top: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px 24px;
  border-top: 1px solid var(--card-border);
}
.sm-nav-drawer-auth a,
.sm-nav-drawer-logout {
  font-family: 'Open Sans', 'Segoe UI', sans-serif;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--text-mid);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
}
.sm-nav-drawer-auth a:hover,
.sm-nav-drawer-logout:hover { color: var(--accent-light); }
.sm-nav-drawer-logout-form { margin: 0; }

body.sm-nav-locked { overflow: hidden; }

@media (max-width: 1150px) {
  .sm-nav-links, .sm-nav-auth { display: none; }
  .sm-nav-toggle { display: flex; }
}

/* Page content */

.sm-content {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--nav-h) + 30px);
  padding-bottom: 60px;
  min-height: 100vh;
}

/* Cards */

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-top: 2px solid var(--accent);
  border-radius: 3px;
  padding: 24px 22px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.7), 0 1px 0 rgba(255,255,255,0.025) inset, 0 -1px 0 rgba(0,0,0,0.5) inset;
}

/* Typography helpers */

.title { font-family: 'Bebas Neue', 'Impact', sans-serif; letter-spacing: 0.12em; }
.label { font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-dim); font-weight: 500; }
.muted { color: var(--text-mid); }

/* Buttons */

.btn-primary {
  display: inline-block;
  background: var(--accent);
  border: none;
  border-radius: 2px;
  color: #fff;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  letter-spacing: 0.18em;
  padding: 11px 20px 9px;
  box-shadow: 0 4px 18px rgba(212, 80, 15, 0.35);
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  text-decoration: none;
}
.btn-primary:hover {
  background: var(--accent-light);
  box-shadow: 0 6px 24px rgba(212, 80, 15, 0.48);
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff;
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: 2px;
  color: var(--text-mid);
  font-family: 'Open Sans', 'Segoe UI', sans-serif;
  font-size: 11.5px;
  letter-spacing: 0.05em;
  padding: 9px 16px;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s;
  text-decoration: none;
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  text-decoration: none;
}

/* Rise animation */

@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rise { animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* Status badges */

.badge {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 2px;
}
.badge-live { background: rgba(212,80,15,0.15); color: var(--accent-light); border: 1px solid rgba(212,80,15,0.3); }
.badge-soon { background: rgba(255,255,255,0.04); color: var(--text-dim); border: 1px solid var(--card-border); }

/* Django messages */

.messages { list-style: none; margin-bottom: 16px; }
.messages li { padding: 10px 14px; border-radius: 2px; font-size: 12px; margin-bottom: 8px; }
.messages .success { background: rgba(80,180,80,0.1); border: 1px solid rgba(80,180,80,0.25); color: #80d080; }
.messages .error   { background: rgba(212,80,15,0.07); border: 1px solid rgba(212,80,15,0.28); color: #e07040; }
.messages .info    { background: rgba(68,146,214,0.08); border: 1px solid rgba(68,146,214,0.22); color: #5badf5; }

/* SM-534 addendum (Jason, 2026-08-23, verbatim hex -- authorized exception to the
   theme-token gate, same standing as the .apt-wrap precedent): the enclosed-box
   treatment for a downloadable-attachment list, "so it stands out as important."
   ONE shared rule consumed by every attachment-list surface -- never copy these
   four declarations into a page's own <style> block. */
.sm-attachment-box {
  border: 1px solid #e8601a;
  border-radius: 10px;
  padding: 25px;
  background-color: #060403;
}
