/* =====================================================================
   Intuitiv portal — "logged in" chrome
   --------------------------------------------------------------------
   Brand-consistent with the marketing site (same fonts, palette) but
   with a darker working surface, a sidebar nav, and a role badge.
   Loaded on every /portal/* page.
   ===================================================================== */

@import url('/styles/tokens.css?v=20260505d');

/* ---------- Reset + base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: #FAFAF8;
  color: var(--ink);
  font-family: var(--sans-body);
  font-size: 15px;
  line-height: var(--lh-read);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; transition: opacity 0.2s ease; }
a:hover { opacity: 0.75; }

/* =====================================================================
   LOGIN PAGE — full-screen split
   ===================================================================== */
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--paper);
}
.login__art {
  position: relative;
  background: #1C1B19 url('/assets/qualia-d.jpg') center/cover no-repeat;
}
.login__art::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.20) 50%, rgba(0,0,0,0.10) 100%);
}
.login__art-mark {
  position: absolute;
  top: 56px; left: 56px;
  z-index: 2;
}
.login__art-mark img { height: 36px; width: auto; }
.login__art-quote {
  position: absolute;
  bottom: 56px; left: 56px; right: 56px;
  z-index: 2;
  color: rgba(253, 252, 251, 0.92);
}
.login__art-quote p {
  font-family: var(--serif-display);
  font-size: 22px;
  font-style: italic;
  line-height: 1.4;
  max-width: 28ch;
  margin-bottom: 16px;
  text-shadow: 0 2px 18px rgba(0,0,0,0.3);
}
.login__art-quote span {
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--intuitiv-gold-soft);
}

.login__panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 80px;
  max-width: 540px;
  width: 100%;
  margin: 0 auto;
}
.login__eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--intuitiv-gold-deep);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
}
.login__eyebrow::before {
  content: ''; width: 32px; height: 1px;
  background: var(--intuitiv-gold-deep);
}
.login__title {
  font-family: var(--serif-display);
  font-size: 44px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
  color: var(--ink);
}
.login__title em {
  font-style: italic;
  color: var(--intuitiv-gold-deep);
  font-weight: 400;
}
.login__lede {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 42ch;
}

.login__form {
  display: flex; flex-direction: column; gap: 22px;
}
.login__field { display: flex; flex-direction: column; gap: 8px; }
.login__field label {
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}
.login__field select,
.login__field input {
  font-family: inherit;
  font-size: 15px;
  padding: 14px 16px;
  border: 1px solid var(--stone-200);
  background: #FFFFFF;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease;
}
.login__field select:focus,
.login__field input:focus {
  border-color: var(--intuitiv-gold-deep);
}
.login__error {
  background: rgba(139, 58, 58, 0.06);
  color: #8B3A3A;
  padding: 14px 16px;
  font-size: 13px;
  border-left: 3px solid #8B3A3A;
}
.login__signed-out {
  background: rgba(74, 124, 158, 0.06);
  color: var(--intuitiv-slate-deep);
  padding: 14px 16px;
  font-size: 13px;
  border-left: 3px solid var(--intuitiv-slate-deep);
}
.login__submit {
  margin-top: 8px;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 16px 28px;
  background: var(--ink);
  color: #FDFCFB;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 14px;
}
.login__submit:hover {
  background: var(--intuitiv-gold-deep);
  border-color: var(--intuitiv-gold-deep);
  color: var(--ink);
}
.login__hint {
  margin-top: 28px;
  font-size: 12px;
  color: var(--faint);
  border-top: 1px solid var(--stone-200);
  padding-top: 22px;
  line-height: 1.6;
}
.login__hint a { color: var(--intuitiv-slate-deep); text-decoration: underline; text-underline-offset: 3px; }
.login__back {
  margin-top: 18px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
}
.login__back a { color: var(--ink-soft); }

@media (max-width: 880px) {
  .login { grid-template-columns: 1fr; }
  .login__art { display: none; }
  .login__panel { padding: 64px 32px; max-width: 100%; }
  .login__title { font-size: 36px; }
}

/* =====================================================================
   PORTAL CHROME — sidebar nav + main area
   ===================================================================== */
.portal {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}
.portal__sidebar {
  background: #1C1B19;
  color: rgba(253,252,251,0.8);
  display: flex; flex-direction: column;
  padding: 40px 28px 28px;
  border-right: 1px solid rgba(0,0,0,0.2);
}
.portal__brand {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 48px;
  color: #FDFCFB;
}
.portal__brand img { height: 28px; width: auto; }
.portal__role {
  font-size: 9.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--intuitiv-gold-soft);
  background: rgba(201,168,106,0.10);
  border: 1px solid rgba(201,168,106,0.28);
  padding: 4px 10px;
  margin-left: auto;
  font-weight: 600;
}
.portal__nav {
  display: flex; flex-direction: column; gap: 2px;
  flex: 1;
}
.portal__nav-section {
  font-size: 9.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(253,252,251,0.4);
  margin: 22px 14px 8px;
  font-weight: 600;
}
.portal__nav-section:first-child { margin-top: 0; }
.portal__nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  font-size: 13px;
  color: rgba(253,252,251,0.78);
  letter-spacing: 0.02em;
  border-left: 2px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.portal__nav a:hover {
  background: rgba(253,252,251,0.04);
  color: #FDFCFB;
  opacity: 1;
}
.portal__nav a.is-current {
  background: rgba(253,252,251,0.06);
  color: #FDFCFB;
  border-left-color: var(--intuitiv-gold-deep);
}
.portal__nav a span.icon {
  width: 14px; height: 14px;
  background: currentColor;
  mask: var(--icon) center/contain no-repeat;
  -webkit-mask: var(--icon) center/contain no-repeat;
  flex-shrink: 0; opacity: 0.7;
}
.portal__nav a:hover span.icon, .portal__nav a.is-current span.icon { opacity: 1; }

.portal__sidebar-foot {
  border-top: 1px solid rgba(253,252,251,0.08);
  padding-top: 22px;
  margin-top: 22px;
  display: flex; flex-direction: column; gap: 12px;
}
.portal__sidebar-foot a {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(253,252,251,0.5);
}
.portal__sidebar-foot a:hover { color: #FDFCFB; opacity: 1; }
.portal__signout {
  font-weight: 600;
  color: rgba(253,252,251,0.7);
}

.portal__main {
  background: #FAFAF8;
  padding: 56px 64px 80px;
  max-width: 100%;
  overflow-x: hidden;
}
.portal__head {
  margin-bottom: 48px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  border-bottom: 1px solid var(--stone-200);
  padding-bottom: 28px;
}
.portal__head-title {
  display: flex; flex-direction: column; gap: 8px;
}
.portal__head-eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--intuitiv-gold-deep);
  font-weight: 600;
  display: flex; align-items: center; gap: 14px;
}
.portal__head-eyebrow::before {
  content: ''; width: 32px; height: 1px; background: var(--intuitiv-gold-deep);
}
.portal__head h1 {
  font-family: var(--serif-display);
  font-size: 38px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.portal__head h1 em {
  font-style: italic;
  color: var(--intuitiv-gold-deep);
  font-weight: 400;
}
.portal__head-meta {
  font-size: 12px;
  color: var(--faint);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: right;
}
.portal__head-meta strong { color: var(--ink); display: block; margin-top: 4px; }

/* ---------- Tiles ---------- */
.portal__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-bottom: 56px;
}
.tile {
  background: #FFFFFF;
  border: 1px solid var(--stone-200);
  padding: 28px 28px 26px;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  display: flex; flex-direction: column;
  position: relative;
}
.tile:hover {
  border-color: var(--intuitiv-gold-deep);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(28,27,25,0.06);
}
.tile__eyebrow {
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
  margin-bottom: 12px;
}
.tile__title {
  font-family: var(--serif-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.005em;
  margin-bottom: 8px;
  color: var(--ink);
}
.tile__title em { font-style: italic; color: var(--intuitiv-gold-deep); font-weight: 400; }
.tile__copy {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 20px;
  flex: 1;
}
.tile__cta {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--intuitiv-slate-deep);
  display: inline-flex; align-items: center; gap: 8px;
  align-self: flex-start;
}
.tile__cta::after {
  content: '→';
  transition: transform 0.2s ease;
}
.tile:hover .tile__cta::after { transform: translateX(4px); }
.tile__pill {
  position: absolute;
  top: 24px; right: 24px;
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 4px 10px;
  background: rgba(74,124,158,0.10);
  color: var(--intuitiv-slate-deep);
  font-weight: 600;
  border-radius: 0;
}
.tile__pill--green { background: rgba(74,107,74,0.12); color: #4A6B4A; }
.tile__pill--gold  { background: rgba(201,168,106,0.14); color: var(--intuitiv-gold-deeper); }

/* ---------- Section heading ---------- */
.portal__section {
  margin-top: 48px;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--stone-200);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.portal__section h2 {
  font-family: var(--serif-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.portal__section h2 em { font-style: italic; color: var(--intuitiv-gold-deep); font-weight: 400; }
.portal__section-meta {
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- Tables / lists ---------- */
.portal__list {
  background: #FFFFFF;
  border: 1px solid var(--stone-200);
  margin-bottom: 56px;
}
.portal__list-row {
  display: grid;
  grid-template-columns: 32px 1fr auto auto;
  align-items: center;
  gap: 24px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--stone-200);
  font-size: 14px;
  transition: background 0.2s ease;
}
.portal__list-row:last-child { border-bottom: 0; }
.portal__list-row:hover { background: rgba(201,168,106,0.04); }
.portal__list-row__no {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--faint);
  font-weight: 600;
}
.portal__list-row__name {
  display: flex; flex-direction: column; gap: 4px;
}
.portal__list-row__name strong {
  color: var(--ink);
  font-family: var(--serif-display);
  font-size: 17px;
  font-weight: 500;
}
.portal__list-row__name span {
  font-size: 12px;
  color: var(--ink-soft);
}
.portal__list-row__meta {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: right;
}
.portal__list-row__meta strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 2px;
}
.portal__list-row__action {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--intuitiv-slate-deep);
}
.portal__list-row__action:hover { color: var(--intuitiv-gold-deep); opacity: 1; }

/* ---------- Code blocks ---------- */
.portal__code {
  font-family: var(--mono);
  font-size: 12px;
  background: #1C1B19;
  color: rgba(253,252,251,0.82);
  padding: 18px 22px;
  border-left: 3px solid var(--intuitiv-gold-deep);
  margin: 14px 0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

/* ---------- Empty state ---------- */
.portal__empty {
  background: #FFFFFF;
  border: 1px dashed var(--stone-200);
  padding: 48px 32px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
}

@media (max-width: 980px) {
  .portal { grid-template-columns: 1fr; }
  .portal__sidebar { padding: 28px 24px; }
  .portal__nav-section:first-child { margin-top: 16px; }
  .portal__main { padding: 40px 28px 60px; }
  .portal__head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .portal__head-meta { text-align: left; }
  .portal__head h1 { font-size: 30px; }
}

/* Print-friendly portal pages */
@media print {
  .portal__sidebar { display: none; }
  .portal { grid-template-columns: 1fr; }
}
