/* ==========================================================================
   Real REMAX Group — Integration Hub brand stylesheet
   --------------------------------------------------------------------------
   Derived from "Real REMAX Group Slide Template.pptx" (theme1.xml) and the
   RRG logo pack. Every value that came out of the deck is marked [DECK].

   Class names are a superset of the existing static/style.css, so this file
   is a drop-in replacement — the Jinja templates need no changes.
   ========================================================================== */

/* Montserrat — self-hosted latin subsets (Google Fonts v31, OFL). */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/montserrat-300-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/montserrat-300-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/montserrat-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/montserrat-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/montserrat-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/montserrat-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/montserrat-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/montserrat-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- 1. Tokens ----------------------------------------------------------- */

:root {
  /* Brand primitives [DECK: clrScheme] */
  --rrg-red:     #FF1200;   /* accent1  — RE/MAX red */
  --rrg-blue:    #0043FF;   /* accent2 + hlink — Real blue */
  --rrg-navy:    #000E34;   /* dk2 / accent3 */
  --rrg-graybar: #232323;   /* accent6-ish; the deck's "gray bar" fill */
  --rrg-black:   #000000;   /* dk1 */
  --rrg-white:   #FFFFFF;   /* lt1 */

  /* Semantic roles.
     The deck assigns hlink = blue, so blue carries interaction and red is
     reserved for brand emphasis. Keeping them separate stops the UI from
     reading as one big warning. */
  --accent:      var(--rrg-blue);
  --accent-ink:  #FFFFFF;
  --brand:       var(--rrg-red);
  --admin:       var(--rrg-navy);

  /* Destructive is deliberately NOT --rrg-red: brand red at #FF1200 is too
     close to a "delete" red to be legible as either. */
  --danger:      #B42318;

  /* Neutrals — warm-neutral, not blue-grey. The deck's non-brand surfaces are
     pure black / #232323 / white, so the greys here stay untinted. */
  --bg:          #F4F4F5;
  --card:        #FFFFFF;
  --surface-2:   #FAFAFA;
  --ink:         #101010;
  --ink-2:       #3A3A3E;
  --muted:       #6B6B70;
  --line:        #E2E2E4;
  --line-strong: #C6C6CA;

  /* The chrome bar. [DECK] every content layout is built on a black or
     #232323 bar, so the app header is black with the reversed lockup. */
  --header-bg:   var(--rrg-black);
  --header-ink:  #FFFFFF;
  --header-mute: rgba(255, 255, 255, 0.62);
  --header-line: rgba(255, 255, 255, 0.14);

  /* Status */
  --ok-bg: #ECFDF3;  --ok-line: #A6F4C5;  --ok-ink: #067647;
  --warn-bg: #FFF6ED; --warn-line: #F9DBAF; --warn-ink: #B54708;
  --err-bg: #FEF3F2;  --err-line: #FECDCA;  --err-ink: #B42318;

  /* Geometry. [DECK] the template is entirely hard-edged — rectangles and
     skewed parallelograms, no rounded corners anywhere. Kept as a token so
     it's a one-line change if that reads too severe on screen. */
  --radius:    0px;
  --radius-sm: 0px;

  /* Type. [DECK] majorFont/minorFont resolve to Montserrat; body copy on the
     slides is Montserrat Light (300).
     Translation note: 300 is too thin below ~24px, so 300 is used only for
     display sizes and 400 carries body text. */
  --font: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  --step--1: 0.8125rem;   /* 13px — meta, pills */
  --step-0:  0.9375rem;   /* 15px — body */
  --step-1:  1.0625rem;   /* 17px — lead */
  --step-2:  1.375rem;    /* 22px — h2 */
  --step-3:  1.875rem;    /* 30px — h1 */
  --step-4:  2.75rem;     /* 44px — display; [DECK] titleStyle sz=4400 */

  --shadow: 0 1px 2px rgba(16, 16, 16, 0.05);
  --shadow-pop: 0 10px 32px rgba(16, 16, 16, 0.16);

  --hero-slash: url("img/rrg-slash.svg");
}

/* Dark theme. The deck's dominant treatment is white-on-black, so dark mode
   is arguably the more on-brand of the two. */
:root[data-theme="dark"] {
  --bg:          #0A0A0B;
  --card:        #161617;
  --surface-2:   #1F1F21;
  --ink:         #FAFAFA;
  --ink-2:       #D4D4D8;
  --muted:       #9C9CA3;
  --line:        #2C2C30;
  --line-strong: #414147;

  --accent:      #4D7BFF;   /* blue lifted for contrast on near-black */
  --brand:       #FF3D2E;
  --admin:       #7A93E8;
  --danger:      #F97066;

  --header-bg:   #000000;
  --header-line: rgba(255, 255, 255, 0.12);

  --ok-bg: #052E1C;  --ok-line: #085D3A;  --ok-ink: #75E0A7;
  --warn-bg: #2B1508; --warn-line: #7A3A0C; --warn-ink: #FDB022;
  --err-bg: #2C0D0A;  --err-line: #7A271A;  --err-ink: #FDA29B;

  --shadow: none;
  --shadow-pop: 0 10px 32px rgba(0, 0, 0, 0.6);
}

/* Accent is blue, settled. The deck sets hlink to #0043FF, so blue carries every
   interactive affordance and red stays reserved for brand emphasis. The mock's
   red-accent override is deliberately not carried over — see mock/README.md if
   you want to revisit the comparison. */

* { box-sizing: border-box; }

/* The UA's [hidden] rule is display:none at zero specificity, so any element
   this sheet gives a display value to would ignore the attribute. */
[hidden] { display: none !important; }

/* --- 2. Base ------------------------------------------------------------- */

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.55;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.014em;   /* Montserrat is wide; pull display sizes in */
  margin: 0 0 0.5em;
}
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }

a { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* Display type — the one place Montserrat Light belongs. [DECK] lnSpc 90% */
.display {
  font-size: var(--step-4);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* Eyebrow label. [DECK] the "01 / Section" numbered kicker. */
.eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.eyebrow-num { color: var(--brand); }

/* The slash motif, as a rule. Used under section titles and as a page edge. */
.brand-rule {
  height: 3px;
  border: 0;
  margin: 0;
  background: linear-gradient(
    to right,
    var(--rrg-red)  0 42%,
    transparent     42% 46%,
    var(--rrg-blue) 46% 100%
  );
}

/* --- 3. Header ----------------------------------------------------------- */

.hub-header {
  display: flex;
  /* nowrap on purpose: flexbox wraps *before* it shrinks, so with wrap enabled
     the userbox drops to a second row the moment the bar is 1px too tight.
     nowrap lets the search field absorb the squeeze instead. Wrap is
     re-enabled at the mobile breakpoint, where a second row is the goal. */
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem 1.15rem;
  padding: 0.85rem 1.75rem;
  background: var(--header-bg);
  color: var(--header-ink);
  border-bottom: 1px solid var(--header-line);
}
/* The red/blue slash, run along the bottom of the black bar. */
.hub-header { position: relative; }
.hub-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 3px;
  /* Two stripes with a hairline gap — the logo's structure, run edge to edge. */
  background: linear-gradient(
    to right,
    var(--rrg-red)  0 49.4%,
    transparent     49.4% 50.6%,
    var(--rrg-blue) 50.6% 100%
  );
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  margin-right: auto;
  flex-shrink: 0;
}
.brand-logos { display: flex; align-items: center; gap: 0.5rem; }
.brand-logo { height: 19px; width: auto; display: block; }
.logo-divider { color: var(--header-mute); font-weight: 300; }
.logo-placeholder {
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border: 1px dashed var(--header-line);
  color: var(--header-mute);
  white-space: nowrap;
}
.hub-title {
  font-weight: 300;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding-left: 0.8rem;
  border-left: 1px solid var(--header-line);
  white-space: nowrap;
}

.hub-nav { display: flex; gap: 1.15rem; flex-wrap: wrap; flex-shrink: 0; }
.hub-nav a {
  color: var(--header-mute);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
  white-space: nowrap;
  padding-block: 0.15rem;
  border-bottom: 2px solid transparent;
}
.hub-nav a:hover { color: #fff; border-bottom-color: var(--rrg-red); }
.hub-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--rrg-red); }

.userbox { display: flex; align-items: center; gap: 0.65rem; flex-wrap: nowrap; flex-shrink: 0; }
/* Real addresses run long (david.miller@therealbrokerage.com is 34 chars), so
   the email truncates rather than pushing the whole userbox onto a second row. */
.user-email {
  color: var(--header-mute);
  font-size: 0.85rem;
  font-weight: 300;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-pill {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.22rem 0.5rem;
  color: #fff;
}
.role-admin  { background: var(--rrg-red); }
.role-viewer { background: rgba(255, 255, 255, 0.18); }

/* Search, in the black bar. Shrinks before anything else does. */
.hub-search { margin: 0; position: relative; flex: 0 1 210px; min-width: 96px; }
.hub-search input {
  width: 100%;
  padding: 0.42rem 0.8rem;
  border: 1px solid var(--header-line);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-size: 0.85rem;
  font-family: inherit;
}
.hub-search input::placeholder { color: rgba(255, 255, 255, 0.45); }
.hub-search input:focus {
  outline: none;
  border-color: var(--rrg-blue);
  background: rgba(255, 255, 255, 0.12);
}

/* Drop the email before the bar is forced to wrap. */
@media (max-width: 1140px) { .user-email { display: none; } }

@media (max-width: 720px) {
  .hub-header { flex-wrap: wrap; }
  .brand-link { margin-right: 0; width: 100%; }
  .hub-nav { width: 100%; order: 3; }
  .hub-search { flex: 1 1 auto; order: 2; }
}

/* --- 4. Layout ----------------------------------------------------------- */

.hub-main { max-width: 980px; margin: 2.5rem auto; padding: 0 1.75rem; }

.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: 2rem;
}
.page-head h1 { margin: 0.2rem 0; }
.crumb { margin: 0; font-size: 0.8rem; color: var(--muted); letter-spacing: 0.02em; }
.crumb a { color: var(--muted); }
.head-actions { display: flex; gap: 0.5rem; align-items: center; }
.welcome-block { margin-bottom: 2.5rem; }
.quick-links { margin-bottom: 2.5rem; }

/* Landing-page video. The 16:9 box is sized by the wrapper, not the iframe, so
   the space is reserved before YouTube's player loads and the sections below
   don't jump down when it arrives. */
/* Symmetric 2.5rem, matching .welcome-block and .quick-links, so the video sits
   in the same vertical rhythm as every other block. .hub-main is normal flow, so
   the top margin collapses with the preceding block's bottom margin rather than
   adding to it -- the gap below the welcome text on home is 2.5rem, not 5. */
.video-section { margin: 2.5rem 0; }
.video-frame {
  margin-top: 1.1rem;
  aspect-ratio: 16 / 9;
  background: var(--rrg-black);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.video-frame video { display: block; width: 100%; height: 100%; background: var(--rrg-black); }

.hub-footer {
  max-width: 980px;
  margin: 4rem auto 2rem;
  padding: 1.25rem 1.75rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}
.hub-footer .footer-mark { height: 14px; vertical-align: -2px; margin-right: 0.5rem; opacity: 0.9; }

/* --- 5. Surfaces --------------------------------------------------------- */

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin-top: 1.25rem;
  box-shadow: var(--shadow);
}
.panel h2 { margin-top: 0; font-size: var(--step-1); }
.panel.empty { text-align: center; padding: 3rem 1.5rem; color: var(--muted); }
.panel-admin { border-left: 3px solid var(--admin); }

.login-card {
  max-width: 440px;
  margin: 4rem auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--rrg-red);
  border-radius: var(--radius);
  padding: 2.25rem;
  box-shadow: var(--shadow);
}
.login-card h1 { margin-top: 0; font-size: 1.5rem; line-height: 1.2; text-wrap: balance; }
.login-mark { height: 26px; width: auto; display: block; margin-bottom: 1.5rem; }

.login-form { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1.25rem; }
.login-form label { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em; }
.login-form input {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink);
  font-size: var(--step-0);
  font-family: inherit;
}

.divider {
  text-align: center;
  margin: 1.75rem 0 1.25rem;
  border-top: 1px solid var(--line);
  position: relative;
}
.divider span {
  position: relative; top: -0.72rem;
  background: var(--card);
  padding: 0 0.8rem;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* --- 6. Buttons ---------------------------------------------------------- */

.btn {
  display: inline-block;
  text-align: center;
  padding: 0.58rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 86%, #000); }

/* Brand-red call to action, for the one primary action per screen. */
.btn-brand { background: var(--rrg-red); color: #fff; }
.btn-brand:hover { background: #DB0F00; }

.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.hub-header .btn-ghost { border-color: var(--header-line); color: #fff; }
.hub-header .btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.1); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 0.35rem 0.65rem; font-size: 0.8rem; }

/* Provider sign-in buttons — the multi-IDP row. Left edge carries the slash
   colours so the two identity providers are visually distinct. */
.btn-provider {
  background: var(--card);
  border-color: var(--line-strong);
  color: var(--ink);
  display: block;
  width: 100%;
  text-align: left;
  margin-bottom: 0.5rem;
  padding-left: 1.1rem;
  border-left-width: 3px;
  font-weight: 500;
}
.btn-provider:hover { border-color: var(--ink); background: var(--surface-2); }
/* Keys match providers.*.json: jumpcloud|mock on the Real side, remax on the
   RE/MAX side. The template can emit data-idp="{{ provider.key }}" as-is. */
.btn-provider[data-idp="real"],
.btn-provider[data-idp="jumpcloud"],
.btn-provider[data-idp="mock"]  { border-left-color: var(--rrg-red); }
.btn-provider[data-idp="remax"] { border-left-color: var(--rrg-blue); }

/* --- 7. Categories + cards ----------------------------------------------- */

.category { margin-bottom: 2.75rem; }
.category-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.55rem;
  margin: 0;
  position: relative;
}
/* Short red tick under each section title — the slash, reduced to a mark. */
.category-title::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: 34px; height: 2px;
  background: var(--rrg-red);
}

/* Hairline grid with no gaps. The borders live on the cards (right + bottom)
   and the container supplies only top + left, so a ragged last row ends in a
   clean step instead of a phantom filled cell. */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0;
  margin-top: 1.1rem;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.card {
  display: flex; flex-direction: column; gap: 0.3rem;
  background: var(--card);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 1.15rem;
  text-decoration: none;
  color: var(--ink);
  position: relative;
  transition: background-color 0.12s;
}
.card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--rrg-blue);
  opacity: 0;
  transition: opacity 0.12s;
}
.card:hover { background: var(--surface-2); }
.card:hover::before { opacity: 1; }
.card-file::before { background: var(--rrg-red); }
.card-title { font-weight: 600; letter-spacing: -0.005em; }
.card-meta, .card-url { font-size: 0.76rem; color: var(--muted); }
.card-desc { font-size: 0.85rem; color: var(--muted); line-height: 1.5; }
.card-url { word-break: break-all; }
.link-card .card-url { color: var(--accent); }

/* --- 8. Prose ------------------------------------------------------------ */

.prose {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 2.25rem;
  line-height: 1.68;
  box-shadow: var(--shadow);
}
.prose h1, .prose h2, .prose h3 { margin-top: 1.6em; }
.prose :first-child { margin-top: 0; }
.prose h2 {
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
}
.prose code {
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  padding: 0.08rem 0.32rem;
  font-size: 0.86em;
}
.prose pre {
  background: var(--rrg-graybar);
  color: #F0F0F0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  border-radius: var(--radius-sm);
}
.prose pre code { background: none; border: none; padding: 0; color: inherit; }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 0.5rem 0.7rem; text-align: left; }
.prose th {
  background: var(--surface-2);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.prose blockquote {
  margin: 1.4em 0;
  padding: 0.2rem 0 0.2rem 1.1rem;
  border-left: 3px solid var(--rrg-red);
  color: var(--ink-2);
}
.prose img { max-width: 100%; height: auto; }
.links { margin-top: 2.5rem; }
.updated { margin-top: 2.5rem; font-size: 0.78rem; }

/* --- 9. Tables ----------------------------------------------------------- */

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.875rem;
}
.admin-table th, .admin-table td {
  text-align: left;
  padding: 0.72rem 0.95rem;
  border-bottom: 1px solid var(--line);
}
.admin-table th {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--muted);
  background: var(--surface-2);
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--surface-2); }
.admin-table code { font-size: 0.8rem; color: var(--muted); font-family: var(--font-mono); }
.row-actions { display: flex; gap: 0.4rem; align-items: center; }
.row-actions form { margin: 0; }

/* --- 10. Forms ----------------------------------------------------------- */

.content-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  max-width: 800px;
  box-shadow: var(--shadow);
}
.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1.2rem; }
.field label { font-weight: 600; font-size: 0.82rem; letter-spacing: 0.01em; }
.field input, .field textarea, .field select,
.content-form input, .content-form textarea {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink);
  font-size: 0.9rem;
  font-family: inherit;
}
.field textarea { resize: vertical; }
.field-row { display: flex; gap: 1rem; }
.field-row .field { flex: 1; }
.field-narrow { max-width: 130px; }
.field-hint { font-size: 0.76rem; color: var(--muted); }
.links-fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.3rem;
}
.links-fieldset legend { font-weight: 600; font-size: 0.82rem; padding: 0 0.4rem; }
.link-row {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1.3fr auto;
  gap: 0.5rem; margin-bottom: 0.5rem; align-items: center;
}
.order-list { list-style: none; margin: 0.6rem 0 0; padding: 0; }
.order-row {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  margin-bottom: 0.4rem;
}
.order-label { flex: 1; font-size: 0.9rem; font-weight: 600; }

.form-actions { margin-top: 0.75rem; display: flex; gap: 0.5rem; }

.upload-form { margin-bottom: 2.5rem; }
.upload-form input[type=file] {
  padding: 0.45rem;
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  width: 100%;
}

/* --- 11. Files ----------------------------------------------------------- */

.file-list {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 1.1rem;
}
.file-row {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--line);
}
.file-row:last-child { border-bottom: none; }
.file-row:hover { background: var(--surface-2); }
.file-main { display: flex; flex-direction: column; gap: 0.15rem; flex: 1; min-width: 0; }
.file-name { font-weight: 600; text-decoration: none; color: var(--ink); }
.file-name:hover { color: var(--accent); }
.file-desc { font-size: 0.85rem; color: var(--muted); }
.file-meta { font-size: 0.8rem; color: var(--muted); white-space: nowrap; }

/* --- 12. Messaging ------------------------------------------------------- */

.flash, .alert {
  padding: 0.7rem 0.95rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  border-left-width: 3px;
  border-left-style: solid;
}
.flash-success { background: var(--ok-bg);   border: 1px solid var(--ok-line);   border-left-color: var(--ok-ink);   color: var(--ok-ink); }
.flash-error   { background: var(--err-bg);  border: 1px solid var(--err-line);  border-left-color: var(--err-ink);  color: var(--err-ink); }
.alert         { background: var(--warn-bg); border: 1px solid var(--warn-line); border-left-color: var(--warn-ink); color: var(--warn-ink); margin: 1.25rem 0; }

.action-pill {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  padding: 0.15rem 0.45rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  white-space: nowrap;
}
.action-file { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-ink); }
.action-auth { background: var(--surface-2); color: var(--muted); }
.action-home { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }

/* --- 13. Search ---------------------------------------------------------- */

.search-panel {
  position: absolute; top: calc(100% + 8px); left: 0;
  width: 360px; max-width: 80vw; max-height: 60vh; overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-top: 2px solid var(--rrg-red);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  padding: 0.25rem;
  z-index: 50;
}
.search-panel .result { border: none; padding: 0.55rem 0.65rem; box-shadow: none; }
.search-panel .result:hover, .search-panel .result.is-active { background: var(--surface-2); border: none; }
.search-panel .result-compact .result-head { gap: 0.45rem; }
.search-empty { padding: 0.75rem 0.65rem; color: var(--muted); font-size: 0.875rem; }

.search-page-form { display: flex; gap: 0.6rem; margin-bottom: 1.75rem; }
.search-page-form input {
  flex: 1;
  padding: 0.62rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink);
  font-size: var(--step-0);
  font-family: inherit;
}
.search-results { border: 1px solid var(--line); }
.result {
  display: block;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 0.95rem 1.15rem;
  text-decoration: none;
  color: var(--ink);
}
.search-results .result:last-child { border-bottom: none; }
.result:hover { background: var(--surface-2); }
.result-head { display: flex; align-items: baseline; gap: 0.65rem; flex-wrap: wrap; }
.result-title { font-weight: 600; }
.result-kind {
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  padding: 0.15rem 0.42rem;
  font-weight: 700;
  color: #fff;
}
.kind-page { background: var(--rrg-blue); }
.kind-file { background: var(--rrg-red); }
.result-cat { font-size: 0.78rem; color: var(--muted); }
.result-snippet { margin: 0.45rem 0 0; font-size: 0.875rem; color: var(--muted); line-height: 1.55; }
.result-snippet mark, .result mark {
  background: color-mix(in srgb, var(--rrg-red) 18%, transparent);
  color: inherit;
  font-weight: 600;
  padding: 0 0.12rem;
}

/* --- 14. Auth error pages ------------------------------------------------ */

.auth-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.75rem 0 0.5rem; }
.auth-actions .btn { flex: 1 1 auto; }
.auth-support { font-size: 0.875rem; margin-top: 1.25rem; }
.auth-reference {
  margin: 0.5rem 0 0;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
  font-size: 0.76rem;
  color: var(--muted);
}
.auth-reference code {
  font-size: 0.76rem;
  font-family: var(--font-mono);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 0.06rem 0.3rem;
  letter-spacing: 0.05em;
}

/* --- 15. Hero (new) ------------------------------------------------------ */
/* Black hero block, lifted straight off the deck's "Cover Black" layout —
   for the signed-in landing page. */

.hub-hero {
  background: var(--rrg-black);
  color: #fff;
  padding: 3rem 2.25rem;
  margin-bottom: 2.75rem;
  position: relative;
  overflow: hidden;
}
/* In dark mode the hero's black is within a point or two of the page ground,
   so it needs a hairline to still read as a block. */
:root[data-theme="dark"] .hub-hero { border: 1px solid var(--line); }
.hub-hero .display { max-width: 22ch; margin: 0.6rem 0 0; }
.hub-hero .eyebrow { color: rgba(255, 255, 255, 0.6); }
/* Brand red is dark enough that it goes muddy on black at label sizes. */
.hub-hero .eyebrow-num { color: #FF4433; }
.hub-hero p { color: rgba(255, 255, 255, 0.72); font-weight: 300; margin-bottom: 0; }
/* The lede is the only hero paragraph that needs a measure — the eyebrow and the
   meta line are short, and `ch` scales with font-size so a shared max-width would
   constrain them differently. `balance` evens the two lines out, which also keeps
   "The Real REMAX Group" from splitting across the break. */
.hub-hero .hero-lede {
  font-size: var(--step-1);
  text-wrap: balance;
}
/* Reserve the slash's column so no length of configured copy can run under it.
   Below 720px the slash is hidden, so the full width is available again. */
@media (min-width: 721px) { .hub-hero { padding-right: 15rem; } }
/* Utility line, not brand copy — sits below the subtitle and stays quiet. */
.hub-hero .hero-meta {
  margin-top: 1.1rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}
/* Admin actions sit on the hero's black, so the ghost button reverses out. */
.hub-hero .head-actions { margin-top: 1.75rem; position: relative; z-index: 1; }
.hub-hero .btn-ghost { border-color: rgba(255, 255, 255, 0.32); color: #fff; }
.hub-hero .btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.1); }
/* Oversized slash, bled off the right edge. [DECK] Cover Black corner block. */
.hub-hero::after {
  content: "";
  position: absolute;
  right: -3rem; top: -20%;
  width: 220px; height: 140%;
  background: var(--hero-slash) center / contain no-repeat;
  opacity: 0.9;
}
@media (max-width: 720px) {
  .hub-hero { padding: 2.25rem 1.5rem; }
  .hub-hero::after { display: none; }
}

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