:root {
  font-family: Inter, system-ui, sans-serif;
  color: #202d43;
  background: #f3f5f9;
  --accent: #208f99;
  --accent-dark: #126470;
  --tint: #e8f7f6;
  --line: #e3e8f1;
  --muted: #65748a;
}

body { background: #f3f5f9; }
button { border-radius: 9px; }
.primary { background: var(--accent); border-color: var(--accent); }
.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

/* Documents' compact app shell, adapted to Contacts. */
body:has(#entry:not([hidden])) > .top { display: none; }
body:has(#workspace:not([hidden])) > .top {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 205px;
  right: 0;
  height: 65px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.top .brand { display: none; }
.top-context { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 14px; }
.top-context strong { color: #202d43; font-weight: 650; }
.top-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.top-actions a { display: flex !important; align-items: center; gap: 9px; color: #202d43; font-size: 14px; }
.top-actions a:hover { text-decoration: none; color: var(--accent-dark); }
.account-avatar { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: #e6f2f2; color: var(--accent-dark); font-weight: 750; }
.top-actions button { border: 0; padding: 8px; color: var(--muted); }
.top-actions button:hover { color: var(--accent-dark); background: var(--tint); }
.top-actions svg, .rail svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

main { max-width: none; margin: 0; padding: 0; }
#workspace > .shell { display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: 0; min-height: 100dvh; }
#workspace .rail { position: sticky; top: 0; width: 205px; height: 100dvh; overflow-y: auto; padding: 22px 14px 16px; border-right: 1px solid var(--line); background: #fff; gap: 4px; }
.rail-brand { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 7px; margin-bottom: 25px; color: #202d43; }
.rail-brand img { width: 36px; height: 36px; flex: none; }
.rail-brand span { display: grid; gap: 2px; font-size: 18px; font-weight: 700; line-height: 1.1; }
.rail-brand small { font-size: 11px; font-weight: 550; letter-spacing: .09em; color: var(--muted); }
.rail-label { padding: 9px 10px 6px; color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; }
#workspace .rail > button { display: flex; align-items: center; justify-content: flex-start; gap: 10px; min-height: 43px; padding: 9px 10px; border-radius: 9px; color: var(--muted); font-size: 14px; font-weight: 550; }
#workspace .rail > button:hover { background: #f0f3f9; }
#workspace .rail > button[aria-current=true] { background: var(--tint); color: var(--accent-dark); }
#workspace .rail > button span { margin-left: auto; border-radius: 5px; background: #eef1f7; padding: 1px 5px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.rail-bottom { display: grid; gap: 2px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.rail-bottom a, .rail-bottom button { display: flex; align-items: center; gap: 10px; min-height: 40px; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 500; text-align: left; }
.rail-bottom a:hover, .rail-bottom button:hover { background: #f0f3f9; color: #202d43; text-decoration: none; }
#workspace .content { min-width: 0; padding: 95px 30px 34px; max-width: 1860px; width: 100%; }
.heading { margin-bottom: 24px; }
.heading .eyebrow { display: none; }
.heading h1 { margin: 0; color: #202d43; font-size: clamp(1.5rem, 2.1vw, 2rem); line-height: 1.3; letter-spacing: -.035em; }
.heading p:last-child { margin: 5px 0 0; font-size: 14px; }
.heading .primary { min-height: 42px; padding: 10px 14px; white-space: nowrap; font-size: 14px; }
.overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.overview-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.overview-card span { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.overview-card svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.overview-card strong { display: block; margin: 8px 0 3px; font-size: 27px; line-height: 1.3; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.overview-card small { font-size: 12px; }
.social-panel { grid-column: auto; grid-row: auto; margin: 0 0 24px; padding: 20px; border-radius: 16px; }
.social-head h2 { font-size: 16px; }
.social-head p { line-height: 1.5; }
.social-head button { flex: none; }
.social-panel + .toolbar { grid-column: auto; }
.toolbar { gap: 16px; margin: 0 0 16px; }
.search { width: 100%; max-width: 620px; height: 44px; border-radius: 9px; }
.search svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.count { font-size: 13px; }
.list { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.item-card { min-height: 91px; border-radius: 15px; box-shadow: none; }
.item-card:hover { box-shadow: 0 4px 18px #223b7c09; }
.item-mark { background: var(--tint); }
.empty { border-color: var(--line); border-style: solid; border-radius: 16px; }
.companion { margin-top: 25px; }
.entry { min-height: 100dvh; max-width: 450px; display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 0; margin: auto; padding: 30px 20px; text-align: center; }
.entry > div:first-child { padding: 32px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: 0 16px 54px #2030470d; }
.entry-logo { width: 68px; height: 68px; margin-bottom: 22px; }
.entry h1 { margin: 11px 0; font-size: clamp(28px, 6vw, 36px); letter-spacing: -.035em; }
.entry p { margin-left: auto; margin-right: auto; }
.entry .primary { width: 100%; margin-top: 18px; }
.hero-art { display: none; }

@media (max-width: 850px) {
  body:has(#workspace:not([hidden])) > .top { left: 0; height: 58px; padding: 0 18px; }
  .top-context { display: none; }
  .top .brand { display: flex; margin-right: auto; font-size: 16px; }
  .top .brand img { width: 30px; height: 30px; }
  .top-actions a span:last-child { display: none; }
  #app-menu-toggle { display: grid; place-items: center; width: 38px; height: 38px; margin-right: 2px; }
  #workspace > .shell { display: block; }
  #workspace .rail { display: none; }
  #workspace .content { padding: 84px 22px 30px; }
  #app-navigation .rail { display: flex; width: 100%; height: auto; padding: 0; background: transparent; border: 0; }
  #app-navigation .rail-brand { margin-bottom: 12px; }
  #app-navigation .rail > button { display: flex; align-items: center; justify-content: flex-start; gap: 10px; min-height: 44px; padding: 9px 10px; color: var(--muted); font-size: 14px; }
  #app-navigation .rail > button[aria-current=true] { background: var(--tint); color: var(--accent-dark); font-weight: 700; }
  #app-navigation .rail > button span { margin-left: auto; color: var(--muted); font-size: 12px; }
  #app-navigation .rail-bottom { margin-top: 16px; }
}
@media (max-width: 650px) {
  #workspace .content { padding: 82px 17px 24px; }
  .top { padding: 0 14px !important; }
  .top-actions { gap: 3px; }
  .heading { align-items: flex-start; }
  .heading h1 { font-size: 25px; }
  .heading .primary { padding: 8px 10px; font-size: 13px; }
  .overview { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .overview-card { padding: 12px; }
  .overview-card span { gap: 5px; font-size: 12px; line-height: 1.25; }
  .overview-card svg { display: none; }
  .overview-card strong { font-size: 23px; }
  .overview-card small { display: none; }
  .social-panel { margin-bottom: 20px; }
  .entry > div:first-child { padding: 26px 22px; }
}
