/* LocalSend.dev era-frame — document-flow boxed shell (2000s chrome, brand colors kept) */
:root {
  --brand: #20b2aa;
  --brand-dark: #178f88;
  --brand-light: #5eead4;
  --ink: #e7eeed;
  --muted: #9aafab;
  --void: #0a0e0d;
  --panel: #121817;
  --panel-2: #0f1413;
  --rail: #0c1110;
  --bevel-hi: #3a4a47;
  --bevel-lo: #050707;
  --font-ui: Tahoma, "MS Sans Serif", Verdana, Geneva, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.canvas-tone {
  margin: 0 !important;
  font-family: var(--font-ui) !important;
  color: var(--ink);
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 4px),
    radial-gradient(ellipse at 50% 0%, rgba(32,178,170,0.10), transparent 55%),
    var(--void) !important;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 4px),
    radial-gradient(ellipse at 50% 0%, rgba(32,178,170,0.10), transparent 55%) !important;
  background-color: var(--void) !important;
  min-height: 100vh;
}

/* Page gutters outside the boxed app canvas */
.outer-gutter {
  padding: 18px 12px 28px;
  max-width: 1180px;
  margin: 0 auto;
}

.app-frame {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  background: var(--panel);
  border: 2px solid var(--bevel-lo);
  outline: 1px solid var(--bevel-hi);
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,0.08),
    inset -1px -1px 0 rgba(0,0,0,0.55),
    0 10px 0 rgba(0,0,0,0.35),
    0 18px 40px rgba(0,0,0,0.45);
}

html[dir="rtl"] .app-frame {
  grid-template-columns: minmax(0, 1fr) 210px;
}

/* Sidebar rail — scrolls with document, not viewport-fixed */
.rail-pane {
  background:
    linear-gradient(180deg, #101816 0%, var(--rail) 40%, #090c0b 100%);
  border-right: 2px groove var(--bevel-lo);
  padding: 12px 10px 18px;
  min-height: 100%;
}

html[dir="rtl"] .rail-pane {
  border-right: 0;
  border-left: 2px groove var(--bevel-lo);
  order: 2;
}

.rail-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  padding: 10px 6px 14px;
  margin-bottom: 10px;
  border: 2px outset var(--bevel-hi);
  background: linear-gradient(180deg, #1a2422, #0e1413);
}

.rail-brand img {
  width: 56px;
  height: 56px;
  image-rendering: auto;
}

.rail-brand strong {
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--brand-light);
  text-shadow: 0 1px 0 #000;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rail-nav a {
  display: block;
  padding: 8px 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  border: 2px outset var(--bevel-hi);
  background: linear-gradient(180deg, #18201e, #101614);
}

.rail-nav a:hover,
.rail-nav a.is-current {
  border-style: inset;
  color: #06201e;
  background: linear-gradient(180deg, var(--brand-light), var(--brand));
}

.rail-cta {
  margin-top: 14px;
  display: block;
  text-align: center;
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  color: #06201e;
  border: 2px outset #7ef0e0;
  background: linear-gradient(180deg, #7ef0e0, var(--brand-dark));
}

.rail-cta:active { border-style: inset; }

.locale-picker {
  position: relative;
  margin-top: 12px;
}

.locale-picker button {
  width: 100%;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  padding: 7px 8px;
  cursor: pointer;
  color: var(--ink);
  border: 2px outset var(--bevel-hi);
  background: linear-gradient(180deg, #1c2624, #101614);
}

.locale-picker ul {
  list-style: none;
  margin: 4px 0 0;
  padding: 4px;
  display: none;
  border: 2px inset var(--bevel-lo);
  background: #0b100f;
}

.locale-picker.open ul { display: block; }

.locale-picker a {
  display: block;
  padding: 6px 8px;
  font-size: 11px;
  color: var(--ink);
  text-decoration: none;
}

.locale-picker a:hover,
.locale-picker a.is-current {
  background: rgba(32,178,170,0.2);
  color: var(--brand-light);
}

.stage-column {
  min-width: 0;
  background: var(--panel-2);
  border-left: 1px solid rgba(255,255,255,0.04);
}

html[dir="rtl"] .stage-column {
  border-left: 0;
  border-right: 1px solid rgba(255,255,255,0.04);
  order: 1;
}

/* Main head banner — logo + software name */
.mast-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 2px groove var(--bevel-lo);
  background:
    linear-gradient(180deg, #2a9f98 0%, var(--brand) 45%, var(--brand-dark) 100%);
  color: #041413;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), inset 0 -1px 0 rgba(0,0,0,0.25);
}

.mast-banner img {
  width: 40px;
  height: 40px;
  border: 2px inset rgba(0,0,0,0.35);
  background: #0a0e0d;
}

.mast-banner .mast-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mast-banner .mast-copy strong {
  font-size: 18px;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 0 rgba(255,255,255,0.25);
}

.mast-banner .mast-copy span {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.85;
}

.crumb-strip {
  padding: 6px 14px;
  font-size: 11px;
  color: var(--muted);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: #0d1211;
}

.crumb-strip a { color: var(--brand-light); }

.stage-body {
  padding: 16px 16px 28px;
}

.stage-foot {
  border-top: 2px groove var(--bevel-lo);
  padding: 14px 16px 18px;
  background: #0b100f;
  font-size: 11px;
  color: var(--muted);
}

.stage-foot a { color: var(--brand-light); }

/* Soften modern utility cards into beveled panels */
.stage-body .rounded-2xl,
.stage-body .rounded-3xl,
.stage-body .rounded-xl {
  border-radius: 4px !important;
  border: 2px outset var(--bevel-hi) !important;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.05) !important;
}

.stage-body a.bg-brand,
.stage-body a.rounded-xl.bg-brand,
.stage-body .inline-flex.rounded-xl.bg-brand {
  border: 2px outset #7ef0e0 !important;
  border-radius: 3px !important;
  background-image: linear-gradient(180deg, #7ef0e0, var(--brand-dark)) !important;
  color: #06201e !important;
  box-shadow: none !important;
}

.stage-body h1,
.stage-body h2,
.stage-body h3 {
  font-family: var(--font-ui);
  letter-spacing: 0.01em;
}

/* Hero stat tiles: labels reserve 2 lines so values share one baseline */
.stat-rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
@media (min-width: 640px) {
  .stat-rail { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.stat-cell {
  display: flex;
  flex-direction: column;
  min-height: 4.75rem;
}
.stat-cell dt {
  min-height: 2.5rem;
  line-height: 1.25;
  display: flex;
  align-items: flex-start;
}
.stat-cell dd {
  margin: 0;
  margin-top: auto;
  line-height: 1.1;
}

.skip-jump {
  position: absolute;
  left: -999px;
}
.skip-jump:focus {
  left: 12px;
  top: 12px;
  z-index: 80;
  background: #121817;
  color: var(--ink);
  padding: 8px 12px;
  border: 2px outset var(--bevel-hi);
}

/* Hide legacy fixed chrome if any remnant remains */
header.fixed,
a.fixed.bottom-6 { display: none !important; }

@media (max-width: 900px) {
  .app-frame {
    grid-template-columns: 1fr;
  }
  html[dir="rtl"] .app-frame {
    grid-template-columns: 1fr;
  }
  .rail-pane {
    border-right: 0;
    border-bottom: 2px groove var(--bevel-lo);
  }
  html[dir="rtl"] .rail-pane {
    border-left: 0;
    order: 0;
  }
  .rail-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
}

/* Smooth FAQ accordion (height-driven; works where grid-rows transition does not) */
.ask-panel {
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    height 0.36s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.28s ease;
}
.ask-block.is-expanded .ask-panel {
  opacity: 1;
}
.ask-panel-inner {
  padding-top: 0;
}
.ask-mark {
  display: inline-flex;
  width: 1.15em;
  align-items: center;
  justify-content: center;
  transition: color 0.25s ease;
}
@media (prefers-reduced-motion: reduce) {
  .ask-panel {
    transition: none !important;
  }
}

