:root {
  --black: #000000;
  --pink: #EB4869;
  --pink-deep: #c9304f;
  --grey: #F5F5F5;
  --white: #ffffff;
  --ink: #111111;
  --ink-soft: #555555;
  --line: #e1e1e1;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--grey);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.12; margin: 0; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--white); color: var(--black); padding: 10px 14px; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 600 15px/1 var(--sans); padding: 15px 22px; border-radius: var(--radius);
  border: 1.5px solid var(--black); background: var(--black); color: var(--white);
  cursor: pointer; text-decoration: none; transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--pink); border-color: var(--pink); color: var(--black); }
.btn.ghost { background: transparent; color: var(--black); }
.btn.ghost:hover { background: var(--black); color: var(--white); border-color: var(--black); }
.btn.small { padding: 10px 14px; font-size: 13px; }
.btn.on-dark { background: transparent; color: var(--white); border-color: rgba(255,255,255,.5); }
.btn.on-dark:hover { background: var(--white); color: var(--black); border-color: var(--white); }

/* Flash messages */
.flash { border-left: 4px solid var(--pink); background: var(--white); padding: 12px 16px; margin: 0 0 16px; font-size: 14.5px; }

/* ------------------------------ Sign in ------------------------------ */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-brand {
  background: var(--black); color: var(--white);
  padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; gap: 56px;
  position: relative; overflow: hidden;
}
.login-brand::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: var(--pink);
}
.login-brand img.logo { height: 36px; width: auto; max-width: none; align-self: flex-start; flex: none; }
.login-brand h1 { font-size: clamp(38px, 5.6vw, 76px); letter-spacing: -0.01em; max-width: 12ch; }
.login-brand p { color: rgba(255,255,255,.78); font-size: 17px; max-width: 42ch; margin: 22px 0 0; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.login-card { width: 100%; max-width: 400px; }
.login-card h2 { font-size: 30px; margin-bottom: 10px; }
.login-card p { color: var(--ink-soft); margin: 0 0 26px; }
.ms-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 14px;
  background: var(--white); color: #5e5e5e; border: 1.5px solid #8c8c8c; border-radius: var(--radius);
  font: 600 15px/1 var(--sans); padding: 16px 18px; cursor: pointer;
}
.ms-btn:hover { border-color: var(--black); color: var(--black); }
.login-card p.fine { font-size: 13px; color: var(--ink-soft); margin-top: 18px; }
.dev-box { margin-top: 30px; padding-top: 20px; border-top: 1px dashed #bbb; font-size: 13px; }
.dev-box input { width: 100%; padding: 10px; margin: 6px 0 10px; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; }

/* ------------------------------ Portal shell ------------------------------ */
.topbar { background: var(--black); color: var(--white); }
.topbar-in {
  max-width: 1180px; margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.topbar img { height: 26px; width: auto; }
.top-right { display: flex; align-items: center; gap: 14px; }
.top-link { color: rgba(255,255,255,.85); text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 4px; }
.top-link:hover { color: var(--pink); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--pink); color: var(--black);
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.top-right form { margin: 0; }
.signout { background: none; border: 0; color: rgba(255,255,255,.85); font: 600 14px var(--sans); cursor: pointer; padding: 8px 4px; }
.signout:hover { color: var(--pink); }

.hero { background: var(--black); color: var(--white); border-top: 1px solid #1f1f1f; }
.hero-in { max-width: 1180px; margin: 0 auto; padding: clamp(36px, 6vw, 84px) 24px clamp(40px, 6vw, 80px); }
.hero h1 { font-size: clamp(40px, 6.4vw, 84px); letter-spacing: -0.015em; }
.hero .sub { color: rgba(255,255,255,.72); font-size: 17px; margin: 18px 0 0; max-width: 52ch; }
.hero .rule { width: 84px; height: 6px; background: var(--pink); margin-top: 32px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 40px 24px 80px; }
.wrap h2.section { font-size: 28px; margin-bottom: 6px; }
.wrap .lede { color: var(--ink-soft); margin: 0 0 26px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 16px; min-height: 236px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px 22px 28px; text-decoration: none; color: inherit;
  transition: border-color .15s, transform .15s;
}
.tile::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: var(--black); border-radius: var(--radius) 0 0 var(--radius);
}
.tile.live::before { background: var(--pink); }
a.tile:hover { border-color: var(--black); transform: translateY(-2px); }
.tile.closed { background: transparent; border-style: dashed; cursor: default; }
.tile .ico { width: 34px; height: 34px; }
.tile h3 { font-size: 26px; }
.tile p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.tile-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 600; }
.status { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--black); }
.live .dot { background: var(--pink); border-color: var(--pink); }
.level { color: var(--ink-soft); font-weight: 500; }
.open { font-weight: 700; display: inline-flex; gap: 8px; align-items: center; }

.empty { background: var(--white); border: 1px solid var(--line); border-left: 5px solid var(--pink); padding: 30px 28px; max-width: 640px; }
.empty h2 { font-size: 30px; margin-bottom: 10px; }
.empty p { margin: 0; color: var(--ink-soft); }

/* ------------------------------ Admin ------------------------------ */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head h1 { font-size: clamp(34px, 5vw, 54px); }
.add-box { background: var(--white); border: 1px solid var(--line); padding: 20px; margin-bottom: 26px; display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.add-box label, .person label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.add-box input, .person select {
  padding: 11px 12px; border: 1px solid #c9c9c9; border-radius: var(--radius); font: 500 15px var(--sans); background: var(--white); min-width: 220px;
}
.person { background: var(--white); border: 1px solid var(--line); margin-bottom: 18px; scroll-margin-top: 20px; }
.person.off { opacity: .7; }
.person-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.person-head .who { display: flex; align-items: center; gap: 14px; }
.person-head .avatar { background: var(--black); color: var(--white); }
.person-head strong { display: block; font-size: 17px; }
.person-head span.mail { color: var(--ink-soft); font-size: 14px; }
.flags { display: flex; gap: 18px; font-size: 14px; font-weight: 600; flex-wrap: wrap; }
.flags label { display: inline-flex; gap: 8px; align-items: center; }
.flags input { width: 18px; height: 18px; accent-color: var(--pink); }
.mods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 20px 22px; }
.mods label.f select { min-width: 0; width: 100%; }
.person-foot { padding: 0 22px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.note { color: var(--ink-soft); font-size: 13.5px; }
.badge { background: var(--pink); color: var(--black); font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; margin-left: 8px; vertical-align: middle; }

table.log { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); font-size: 14px; }
table.log th, table.log td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
table.log th { background: var(--black); color: var(--white); font-weight: 600; }
.scroll-x { overflow-x: auto; }

.message { max-width: 560px; margin: 14vh auto; padding: 0 24px; }
.message h1 { font-size: clamp(36px, 6vw, 56px); margin-bottom: 14px; }
.message p { color: var(--ink-soft); margin: 0 0 26px; }

@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .mods { grid-template-columns: repeat(2, 1fr); }
  .login { grid-template-columns: 1fr; }
  .login-brand { min-height: 46vh; gap: 32px; }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
  .tile { min-height: 0; }
  .top-link.hide-sm { display: none; }
  .mods { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---- Module cards that stand out ---- */
.hero-in { padding-bottom: clamp(96px, 11vw, 140px); }
.wrap.lift { padding-top: 0; }
.wrap.lift .grid { margin-top: calc(-1 * clamp(64px, 8vw, 96px)); position: relative; }
.tile {
  border: 0; border-radius: 10px; min-height: 250px; padding: 28px 26px 24px;
  box-shadow: 0 14px 34px rgba(0,0,0,.14), 0 2px 6px rgba(0,0,0,.08);
}
.tile::before { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 6px; border-radius: 10px 10px 0 0; background: var(--black); }
.tile.live::before { background: var(--pink); }
.icobox { width: 56px; height: 56px; border-radius: 12px; background: var(--grey); color: var(--black); display: grid; place-items: center; }
.tile .ico { width: 30px; height: 30px; }
.tile h3 { font-size: 28px; }
.tile.closed { background: var(--white); border: 0; box-shadow: 0 8px 22px rgba(0,0,0,.09); }
.tile.closed h3, .tile.closed .icobox { opacity: .75; }

.tile.live { background: var(--white); color: var(--black); box-shadow: 0 14px 34px rgba(0,0,0,.14), 0 2px 6px rgba(0,0,0,.08); }
.tile.live p { color: var(--ink-soft); }
.tile.live .icobox { background: var(--black); color: var(--pink); }
.tile.live .level { color: var(--ink-soft); }
.tile.live .open { color: var(--pink); }
a.tile.live:hover { border: 0; transform: translateY(-4px); box-shadow: 0 20px 44px rgba(235,72,105,.30), 0 2px 8px rgba(0,0,0,.15); }

/* ---- Team member screens ---- */
.two { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; align-items: start; }
.panel { background: var(--white); border-radius: 10px; padding: 28px 28px 30px; box-shadow: 0 10px 28px rgba(0,0,0,.09); }
.panel.side { background: var(--black); color: var(--white); position: sticky; top: 20px; }
.step { font-size: 24px; display: flex; align-items: center; gap: 12px; margin: 30px 0 16px; }
.step:first-child { margin-top: 0; }
.step span { width: 32px; height: 32px; border-radius: 50%; background: var(--pink); color: var(--black); display: grid; place-items: center; font: 700 15px var(--sans); flex: none; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.f.full { grid-column: 1 / -1; }
.fields input, .fields select, .fields textarea { padding: 12px; border: 1px solid #c9c9c9; border-radius: var(--radius); font: 500 15px var(--sans); background: var(--white); width: 100%; }
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role input { position: absolute; opacity: 0; }
.role-card { display: block; border: 1.5px solid var(--line); border-radius: 8px; padding: 12px 14px; cursor: pointer; height: 100%; }
.role-card strong { display: block; font-size: 15px; }
.role-card em { font-style: normal; font-size: 13px; color: var(--ink-soft); }
.role input:checked + .role-card { border-color: var(--black); background: var(--black); color: var(--white); box-shadow: inset 5px 0 0 var(--pink); }
.role input:checked + .role-card em { color: rgba(255,255,255,.75); }
.role input:focus-visible + .role-card { outline: 3px solid var(--pink); outline-offset: 2px; }
.access-box { margin-top: 14px; background: var(--grey); border-radius: 8px; padding: 14px 16px; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chips span { background: var(--white); border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; font-size: 13px; font-weight: 600; }
.phone-pick { display: flex; gap: 12px; }
.phone-pick label { flex: 1; }
.phone-pick input { position: absolute; opacity: 0; }
.phone-pick span { display: block; text-align: center; padding: 14px; border: 1.5px solid var(--line); border-radius: 8px; font-weight: 600; cursor: pointer; }
.phone-pick input:checked + span { background: var(--black); color: var(--white); border-color: var(--black); box-shadow: inset 0 -4px 0 var(--pink); }
.btn.big { width: 100%; margin-top: 28px; padding: 18px; font-size: 16px; background: var(--pink); border-color: var(--pink); color: var(--black); }
.btn.big:hover { background: var(--black); border-color: var(--black); color: var(--white); }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { padding: 14px 0 14px 0; border-bottom: 1px solid #262626; display: flex; flex-direction: column; gap: 4px; }
.steps li:last-child { border-bottom: 0; }
.steps li b { font-size: 15px; }
.steps li span { color: rgba(255,255,255,.72); font-size: 14px; }
.steps code { background: #1c1c1c; color: var(--pink); padding: 1px 6px; border-radius: 4px; font-size: 13px; }
.panel.side .btn.ghost { color: var(--white); border-color: rgba(255,255,255,.5); align-self: flex-start; margin-top: 8px; }
.panel.side .btn.ghost:hover { background: var(--white); color: var(--black); }
.panel.side .note { color: rgba(255,255,255,.6); }
.seg { display: inline-flex; border: 1.5px solid var(--black); border-radius: 8px; overflow: hidden; font-weight: 600; font-size: 14px; }
.seg span { padding: 10px 18px; }
.seg .seg-on { background: var(--black); color: var(--white); }
.drop { border: 2px dashed #b9b9b9; border-radius: 10px; padding: 28px; text-align: center; color: var(--ink-soft); font-weight: 500; }
.check { display: flex; gap: 12px; align-items: flex-start; margin-top: 22px; font-size: 14.5px; }
.check input { width: 20px; height: 20px; accent-color: var(--pink); margin-top: 2px; }
@media (max-width: 960px) { .two { grid-template-columns: 1fr; } .panel.side { position: static; } }
@media (max-width: 600px) { .fields, .roles { grid-template-columns: 1fr; } .panel { padding: 22px 18px; } }

/* ---- Login brand row and Portal pill ---- */
.login-brand .brand-row { display: flex; align-items: center; gap: 12px; align-self: flex-start; }
.login-brand img.logo { height: 46px; }
.brand-pill {
  font: 600 .72rem/1 var(--sans); letter-spacing: .03em; text-transform: uppercase; color: var(--pink);
  background: rgba(235,72,105,.15); padding: 5px 10px; border-radius: 10px;
}
.login-brand h1 { max-width: 14ch; }

/* ---- Weather ---- */
.hero-in { position: relative; }
.wx { display: inline-flex; align-items: center; gap: 12px; margin-top: 22px; padding: 10px 16px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; font-size: 15px; }
.wx[hidden] { display: none; }
.wx-ico { font-size: 22px; line-height: 1; }
.wx em { font-style: normal; color: rgba(255,255,255,.6); margin-left: 10px; font-size: 13px; }

/* ---- Footer ---- */
.site-foot { background: var(--black); color: rgba(255,255,255,.75); border-top: 6px solid var(--pink); margin-top: 40px; }
.site-foot-in { max-width: 1180px; margin: 0 auto; padding: 26px 24px; display: flex; align-items: center; gap: 22px; }
.site-foot img { height: 22px; width: auto; flex: none; }
.site-foot p { margin: 0; font-size: 13.5px; line-height: 1.6; max-width: 80ch; }
@media (max-width: 600px) { .site-foot-in { flex-direction: column; align-items: flex-start; } }

/* ---- Welcome and new hire screens ---- */
.codein { font: 700 26px/1 Consolas, monospace; letter-spacing: .18em; text-transform: uppercase; text-align: center; padding: 16px; border: 1.5px solid #c9c9c9; border-radius: var(--radius); width: 100%; }
.codebox { border-left: 6px solid var(--pink); }
.bigcode { font: 700 40px/1.2 Consolas, monospace; letter-spacing: .2em; margin: 10px 0; }
.profile { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; }
.pphoto { width: 160px; height: 160px; object-fit: cover; border-radius: 12px; }
.kv { display: grid; grid-template-columns: 220px 1fr; gap: 8px 16px; margin: 0; flex: 1; min-width: 260px; font-size: 14.5px; }
.kv dt { color: var(--ink-soft); font-weight: 600; }
.kv dd { margin: 0; }
label.drop { display: block; cursor: pointer; }


/* ---- Footer centered ---- */
.site-foot-in { flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; padding: 34px 24px; }
.site-foot p { margin: 0 auto; max-width: 70ch; text-align: center; }
@media (max-width: 600px) { .site-foot-in { align-items: center; } }

/* ---- Offboard ---- */
.foot-btns { display: inline-flex; gap: 10px; flex-wrap: wrap; }
.btn.danger { background: transparent; color: #b3122f; border-color: #b3122f; }
.btn.danger:hover { background: #b3122f; color: var(--white); border-color: #b3122f; }
.badge.off { background: #d9d9d9; color: var(--black); }

/* ---- Portal pill beside the top bar logo ---- */
.brand-link, .brand-link:hover, .brand-link:focus, .brand-link * { text-decoration: none; }
.brand-link { display: inline-flex; align-items: center; gap: 12px; }
/* ---- Footer: two centered lines ---- */
.site-foot p { max-width: none; line-height: 1.7; }

/* ---- Daily quote ---- */
.quote { margin: 22px 0 0; padding: 2px 0 2px 16px; border-left: 3px solid var(--pink); font-family: var(--serif, "Playfair Display", Georgia, serif); font-style: italic; font-weight: 600; font-size: clamp(16px, 1.7vw, 21px); line-height: 1.3; color: var(--pink); max-width: none; }
.quote-tag { display: block; font: 700 11px/1 var(--sans, Montserrat, Arial, sans-serif); font-style: normal; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.6); margin-bottom: 10px; }

/* ---- Compact hero: date and weather on one line above the greeting ---- */
.topline { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 18px; margin: 0 0 14px; }
.topline .sub { margin: 0; font-size: 16px; max-width: none; color: rgba(255,255,255,.72); }
.topline .wx { margin-top: 0; padding: 6px 14px; font-size: 14px; }
.hero h1 { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.1; margin: 0; }
.hero .quote { margin-top: 18px; }
.hero-in { padding-top: clamp(24px, 3.5vw, 44px); padding-bottom: clamp(72px, 8vw, 100px); }
.hero-in { padding-bottom: clamp(100px, 9vw, 124px); }

img.avatar.photo { object-fit: cover; background: var(--black); }

/* ---- People tabs ---- */
.tabs { display: flex; gap: 8px; margin: 26px 0 18px; border-bottom: 2px solid #e3e3e3; }
.tab { padding: 10px 18px; font-weight: 700; font-size: 14.5px; text-decoration: none; color: #555; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tab:hover { color: var(--black); }
.tab.on { color: var(--black); border-bottom-color: var(--pink); }
.tab .count { background: #e9e9e9; color: var(--black); font-size: 12px; padding: 2px 8px; border-radius: 99px; margin-left: 6px; }
.tab.on .count { background: var(--pink); }

/* ---- App links form fields ---- */
.person label.f input[type="text"], .person label.f input[type="url"] { padding: 11px 12px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 14px; background: var(--white); width: 100%; box-sizing: border-box; }
.person label.f input:focus { outline: 2px solid var(--pink); outline-offset: 1px; }

/* ---- Inline welcome profile on People and access ---- */
details.wprofile { margin: 0; padding: 14px 22px; border-top: 1px solid var(--line); }
details.wprofile summary { cursor: pointer; font-weight: 700; font-size: 14px; }
details.wprofile summary .note { font-weight: 500; margin-left: 8px; }
details.wprofile .profile { margin-top: 16px; }

/* ---- Notification bell ---- */
.bell { position: relative; }
.bell-btn { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.28); background: transparent; color: var(--white); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.bell-btn:hover, .bell-btn[aria-expanded="true"] { border-color: var(--pink); color: var(--pink); }
.bell-btn:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.bell-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 99px; background: var(--pink); color: var(--black); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.bell-menu { position: absolute; right: 0; top: 46px; width: min(360px, 88vw); background: var(--white); color: var(--black); border-radius: 10px; box-shadow: 0 14px 40px rgba(0,0,0,.28); border-top: 4px solid var(--pink); z-index: 50; overflow: hidden; }
.bell-menu[hidden] { display: none; }
.bell-head { padding: 14px 18px 10px; font-family: 'Playfair Display', Georgia, serif; font-weight: 800; font-size: 18px; }
.bell-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 18px; border-top: 1px solid #eee; color: var(--black); text-decoration: none; font-size: 14px; line-height: 1.45; font-weight: 600; }
.bell-item:hover, .bell-item:focus-visible { background: #f6f6f6; }
.bell-item .dot { flex: 0 0 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--pink); }
.bell-item.info .dot { background: #bdbdbd; }
.bell-empty { margin: 0; padding: 14px 18px 20px; font-size: 14px; color: #555; }

/* ---- Gear menu and view as ---- */
.gear-menu { width: min(260px, 88vw); }
.bell-item.plain { padding: 13px 18px; }
.bell-item.viewas { border-top: 2px solid #e3e3e3; color: #b3243f; }
.top-right { gap: 12px; }
.viewbar { background: var(--pink); color: var(--black); font-size: 14px; font-weight: 600; }
.viewbar-in { max-width: 1180px; margin: 0 auto; padding: 10px 24px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.viewbar form { margin: 0; }
.viewbar button { background: var(--black); color: var(--white); border: 0; border-radius: 6px; padding: 8px 16px; font: inherit; font-weight: 700; cursor: pointer; }

/* ---- Sign in redesign: calmer brand panel, night ridge scene, mobile stack with footer ---- */
.login-page { min-height: 100vh; display: flex; flex-direction: column; }
.login-page .login { flex: 1; min-height: 100vh; grid-template-columns: 1fr 1fr; }
.login-foot { display: none; }
.login .login-brand { padding: clamp(28px, 4vw, 52px); gap: 40px; isolation: isolate; }
.login .login-brand .scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.login .login-brand img.logo { height: 28px; }
.login .login-brand .brand-copy { position: relative; margin-bottom: clamp(8px, 4vh, 36px); }
.login .login-brand h1 { font-size: clamp(32px, 3.5vw, 52px); line-height: 1.08; max-width: 15ch; }
.login .login-brand p { font-size: 15px; line-height: 1.65; max-width: 40ch; margin: 18px 0 0; color: rgba(255,255,255,.72); }
.login .login-brand::before { content: ""; position: absolute; left: clamp(28px, 4vw, 52px); bottom: 0; width: 56px; height: 8px; background: var(--pink); z-index: 1; }
.login .login-brand::after { display: none; }
.login .login-form { background: var(--grey); }

@media (max-width: 860px) {
  .login-page .login { grid-template-columns: 1fr; min-height: 0; align-content: start; }
  .login .login-brand { min-height: 0; padding: 26px 24px 40px; gap: 28px; }
  .login .login-brand img.logo { height: 24px; }
  .login .login-brand .brand-copy { margin-bottom: 0; }
  .login .login-brand h1 { font-size: clamp(26px, 7.2vw, 34px); max-width: 17ch; }
  .login .login-brand p { font-size: 14px; line-height: 1.6; margin-top: 12px; max-width: 34ch; }
  .login .login-brand::before { display: none; }
  .login .login-brand .scene { height: 100%; }
  .login .login-form { padding: 34px 24px 44px; align-items: flex-start; }
  .login-foot { display: block; }
  .login-foot .site-foot { margin-top: 0; }
}

/* ---- Rearrangeable module tiles ---- */
.arrange-row { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin: 0 0 12px; flex-wrap: wrap; }
.arrange-row .note { margin-right: auto; }
.slot { position: relative; display: flex; }
.slot > .tile { flex: 1; }
.arrange-bar { position: absolute; top: 14px; right: 14px; display: flex; gap: 6px; z-index: 3; }
.arrange-bar[hidden] { display: none; }
.ab { width: 38px; height: 38px; border-radius: 8px; border: 1.5px solid var(--black); background: var(--white); color: var(--black); font-size: 17px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ab:hover, .ab:focus-visible { background: var(--black); color: var(--white); outline: none; }
.ab.grip { cursor: grab; touch-action: none; }
.grid.arranging .tile { outline: 2px dashed var(--pink); outline-offset: -2px; }
.grid.arranging a.tile:hover { transform: none; }
.slot.dragging { opacity: .6; transform: scale(1.02); z-index: 5; }
.sig-link { margin: 22px 0 0; font-size: 14px; }
.sig-link a { color: var(--ink-soft); text-decoration: underline; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Signature page ---- */
.sig-panel { overflow-x: auto; }
.sig-panel #sig-box { min-width: 560px; }
.person label.f input[type="text"], form.panel label.f input[type="text"], form.panel label.f input[type="url"] { padding: 11px 12px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 14px; background: var(--white); width: 100%; box-sizing: border-box; }

.below-grid { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 22px; }
.below-grid .sig-link { margin: 0; }
.below-grid .arrange-row { margin: 0; justify-content: flex-end; }
.below-grid .arrange-row .note { margin-right: 6px; }

/* ---- Account menu, hidden attribute fix, profile and brand pages ---- */
[hidden] { display: none !important; }
.avatar-btn { width: auto; height: auto; border: 0; background: transparent; padding: 0; border-radius: 50%; }
.avatar-btn:hover, .avatar-btn[aria-expanded="true"] { color: inherit; box-shadow: 0 0 0 2px var(--pink); }
.below-grid { justify-content: flex-end; }
.me-head { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.me-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: #e6e6e6; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 28px; }
.me-facts { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.7; }
.me-facts b { color: var(--ink); }
.quick { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-top: 16px; }
.swatch { border-radius: 10px; padding: 52px 16px 14px; font-size: 13px; font-weight: 600; border: 1px solid var(--line); }
.swatch small { display: block; font-weight: 500; opacity: .8; margin-top: 2px; }

/* ---- Top bar circles all the same size ---- */
.top-right .bell-btn, .top-right .avatar, .top-right img.avatar.photo { width: 40px; height: 40px; box-sizing: border-box; }
.top-right .avatar-btn { width: 40px; height: 40px; }
.top-right .avatar-btn .avatar { width: 40px; height: 40px; }
/* ---- Save all changes bar ---- */
.savebar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 16px; background: var(--black); color: var(--white); padding: 12px 14px 12px 20px; border-radius: 12px; box-shadow: 0 10px 34px rgba(0,0,0,.35); border-top: 3px solid var(--pink); font-size: 14px; font-weight: 600; }
.person.dirty { outline: 2px solid var(--pink); outline-offset: 2px; }

/* ---- Version number ---- */
.ver { margin: 8px 0 0; font-size: 11px; letter-spacing: .04em; color: rgba(255,255,255,.5); text-align: center; }
.ver-login { position: fixed; right: 18px; bottom: 12px; margin: 0; color: #8a8a8a; z-index: 5; }
@media (max-width: 860px) { .ver-login { display: none; } }

/* ---- Phone layout (v32): equal circles, panels that stay on screen, weather chip, no rearranging ---- */
.avatar-btn { display: inline-flex; align-items: center; justify-content: center; line-height: 0; align-self: center; }
.avatar-btn .avatar, .avatar-btn img.avatar.photo { display: block; }
@media (max-width: 760px) {
  .top-right { gap: 10px; }
  .top-right .bell-btn, .top-right .avatar, .top-right img.avatar.photo,
  .top-right .avatar-btn, .top-right .avatar-btn .avatar { width: 34px; height: 34px; }
  .top-right .avatar { font-size: 12px; }
  .top-right .bell-btn svg { width: 18px; height: 18px; }
  .bell-badge { top: -6px; right: -6px; }
  /* The panels open across the screen instead of hanging off the button, so nothing is cut off. */
  .bell-menu, .gear-menu { position: fixed; left: 12px; right: 12px; width: auto; max-height: calc(100vh - 96px); overflow-y: auto; }
  /* Date on the left, weather on the right, the same distance from each edge. */
  .topline { justify-content: space-between; }
  .topline .wx { margin-left: auto; }
  /* No rearranging on a phone. */
  .below-grid { display: none; }
}
@media (max-width: 480px) {
  .topline .wx { padding: 5px 12px; font-size: 13px; gap: 8px; }
  .topline .wx em { display: none; }
}
/* Each circle sits in a wrapper that adds no extra space, so all three line up exactly. */
.top-right .bell { display: flex; align-items: center; }
.signout { white-space: nowrap; }
@media (hover: none) {
  .avatar-btn:hover { box-shadow: none; }
  .bell-btn:hover { border-color: rgba(255,255,255,.28); color: var(--white); }
}
@media (max-width: 760px) {
  .signout { font-size: 13px; padding: 8px 0 8px 2px; }
  .topbar-in { gap: 10px; }
  .brand-link { gap: 8px; min-width: 0; }
  .brand-pill { padding: 4px 9px; font-size: 11px; }
}

/* ---- Sign out: text on a computer, a power button circle on a phone ---- */
.so-ico { display: none; }
@media (max-width: 760px) {
  .top-right form { display: flex; }
  .signout { width: 34px; height: 34px; box-sizing: border-box; padding: 0; border: 1px solid rgba(255,255,255,.28); border-radius: 50%;
             display: inline-flex; align-items: center; justify-content: center; color: var(--white); }
  .signout .so-text { display: none; }
  .signout .so-ico { display: block; width: 18px; height: 18px; }
}
@media (max-width: 760px) and (hover: hover) { .signout:hover { border-color: var(--pink); color: var(--pink); } }
/* Initials stay centered in the circle; only a photo is a plain block. */
.avatar-btn span.avatar { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }

/* ---- Home page: tighter space between the last tiles (or Rearrange) and the pink footer line ---- */
.wrap.lift { padding-bottom: 16px; }
.wrap.lift ~ .site-foot { margin-top: 16px; }
.below-grid { margin-top: 18px; }

/* ---- Sign in page: the den video behind the left panel, darkest at the logo and under the words ---- */
.login .login-brand .den-media { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: #000 url("/static/den-poster.jpg") 50% 60% / cover no-repeat; }
.den-video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; display: block; }
.den-shade { position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.92) 0, rgba(0,0,0,.7) 12%, rgba(0,0,0,0) 38%),
    linear-gradient(to top, rgba(0,0,0,.95) 0, rgba(0,0,0,.82) 26%, rgba(0,0,0,0) 62%); }
.login .login-brand h1 { text-wrap: balance; max-width: 14ch; text-shadow: 0 2px 18px rgba(0,0,0,.6); }
.login .login-brand p { text-shadow: 0 1px 12px rgba(0,0,0,.7); }
@media (max-width: 760px) {
  .den-video { object-position: 50% 68%; }
  .login .login-brand { min-height: 400px; }
  .den-shade { background: linear-gradient(to bottom, rgba(0,0,0,.9) 0, rgba(0,0,0,.72) 42%, rgba(0,0,0,.28) 100%); }
}
@media (prefers-reduced-motion: reduce) { .den-video { display: none; } }

/* ---- Daily digest preview ---- */
.digest-controls { display: flex; flex-wrap: wrap; gap: 18px; margin: 22px 0 0; }
.digest-controls label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.digest-controls select { font: inherit; padding: 10px 12px; border: 1px solid #bbb; border-radius: 6px; background: #fff; min-width: 220px; }
.digest-frame { max-width: 680px; background: #ececec; padding: 18px; border-radius: 10px; overflow-x: auto; }
@media (max-width: 760px) { .digest-frame { padding: 8px; } .digest-controls select { min-width: 0; width: 100%; } .digest-controls label { width: 100%; } }

/* ---- Sign in headline: a pink full stop after "Den", echoing the dot in the Wulf logo ---- */
.den-dot { display: inline-block; width: 0.16em; height: 0.16em; min-width: 10px; min-height: 10px;
  border-radius: 50%; background: #EB4869; margin-left: 0.06em; vertical-align: baseline; }

/* ---- "center point" called out in the sign in subtext: bold, italic, same pink as the logo dot ---- */
.den-highlight { font-weight: 700; font-style: italic; color: #EB4869; }

/* ---- Howl line on a person's card and on the new hire page ---- */
.howl-line { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: baseline; margin: 0 0 12px; padding: 10px 14px; background: #fafafa; border-left: 4px solid var(--pink); border-radius: 0 6px 6px 0; font-size: 14px; }
.howl-k { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: #888; }
.howl-bad { color: #8a1c30; font-weight: 600; }

/* ---- The full stop after the name in the home page greeting is the Wulf pink ---- */
.greet-stop { color: var(--pink); }


/* Quick links, just above the footer on the home page */
.quick { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 26px; margin: 30px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.quick-k { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: #888; }
.ql { font-size: 14px; font-weight: 600; color: var(--black); text-decoration: none; padding-bottom: 3px; border-bottom: 2px solid var(--pink); }
.ql:hover, .ql:focus-visible { color: var(--pink-deep); }
.ql-empty { color: #888; font-weight: 500; border-bottom: 2px dotted #bbb; }
