/* Stained-glass Oriel — Ember Terrarium help
   Alegreya + Lexend — distinct from home/account */

body.or-oriel *,
body.or-oriel *::before,
body.or-oriel *::after { box-sizing: border-box; }

body.or-oriel {
  --void: #1C110D;
  --soil: #2A1A14;
  --glass: rgba(48, 28, 20, 0.58);
  --mist: #F6EDE4;
  --mute: #C4A992;
  --clay: #E07A5F;
  --moss: #7BAF7B;
  --honey: #F0C27A;
  --line: rgba(255, 214, 170, 0.18);
  --came: rgba(28, 17, 13, 0.72);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  margin: 0;
  min-height: 100vh;
  color: var(--mist);
  font-family: 'Lexend', system-ui, sans-serif;
  background-color: var(--void);
  background-image:
    radial-gradient(ellipse 55% 40% at 15% 0%, rgba(224, 122, 95, 0.2), transparent 55%),
    radial-gradient(ellipse 40% 35% at 90% 10%, rgba(123, 175, 123, 0.14), transparent 50%),
    radial-gradient(ellipse 45% 30% at 50% 100%, rgba(240, 194, 122, 0.08), transparent 55%);
  -webkit-font-smoothing: antialiased;
}

.or-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.or-root > .page-main {
  flex: 1;
  width: 100%;
  max-width: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.or-stage {
  flex: 1;
  width: min(100% - 2rem, 1080px);
  margin: 0 auto;
  padding: 1rem 0 2.2rem;
}

/* —— Mast —— */
.or-lintel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.or-lintel-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--mist);
  text-decoration: none;
  min-width: 0;
}

.or-lintel-mark em {
  flex: 0 0 auto;
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  padding: 0.38rem 0.5rem;
  border-radius: 0.45rem;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(16px);
}

.or-lintel-mark strong {
  font-family: 'Alegreya', Georgia, serif;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.or-lintel-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.28rem;
  padding: 0.28rem;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.or-lintel-nav a {
  color: #EADFD4;
  text-decoration: none;
  padding: 0.42rem 0.78rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

.or-lintel-nav a.is-on,
.or-lintel-nav a:hover {
  background: var(--clay);
  color: var(--void);
}

.or-lintel-bag {
  display: inline-flex !important;
  align-items: center;
  gap: 0.35rem;
}

.or-lintel-bag.has-items {
  background: rgba(224, 122, 95, 0.22);
}

.or-lintel-bag em {
  font-style: normal;
  min-width: 1.15rem;
  text-align: center;
  background: var(--void);
  color: var(--honey);
  border-radius: 999px;
  padding: 0.05rem 0.35rem;
  font-size: 0.7rem;
  font-weight: 800;
}

/* —— Intro + search —— */
.or-intro {
  margin: 0 0 1.5rem;
  padding: clamp(1.25rem, 3vw, 1.7rem);
  border-radius: 1.75rem;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: blur(22px);
}

.or-intro-copy {
  max-width: 36rem;
  margin-bottom: 1.15rem;
}

.or-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--honey);
  font-weight: 700;
}

.or-intro h1 {
  margin: 0 0 0.5rem;
  font-family: 'Alegreya', Georgia, serif;
  font-size: clamp(1.9rem, 4.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.or-lede {
  margin: 0;
  color: var(--mute);
  font-size: 1.02rem;
  line-height: 1.55;
  max-width: 38ch;
}

.or-intro-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.85rem;
  font-size: 0.78rem;
  color: var(--mute);
}

.or-intro-meta span {
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(28, 17, 13, 0.35);
}

.or-loupe {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.or-loupe input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  background: rgba(28, 17, 13, 0.5);
  color: var(--mist);
  border-radius: 999px;
  padding: 0.78rem 1.05rem;
  font: inherit;
  font-size: 0.95rem;
}

.or-loupe input::placeholder { color: rgba(196, 169, 146, 0.55); }

.or-loupe input:focus {
  outline: none;
  border-color: var(--honey);
  box-shadow: 0 0 0 3px rgba(240, 194, 122, 0.16);
}

.or-loupe button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--honey), #d4a84e);
  color: var(--void);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.78rem 1.15rem;
  cursor: pointer;
  transition: filter 0.2s;
}

.or-loupe button:hover { filter: brightness(1.06); }

.or-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.or-chip {
  border: 1px solid var(--line);
  background: rgba(255, 236, 214, 0.05);
  color: var(--mist);
  border-radius: 999px;
  padding: 0.38rem 0.78rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.or-chip:hover {
  background: var(--clay);
  border-color: var(--clay);
  color: var(--void);
}

/* —— Window bay —— */
.or-bay { margin-bottom: 1.5rem; }

.or-frame {
  position: relative;
  padding: 0.65rem;
  border-radius: 1.5rem 1.5rem 0.45rem 0.45rem;
  background: linear-gradient(165deg, #3d251c, #241510);
  border: 1px solid rgba(255, 214, 170, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.or-cames {
  position: absolute;
  inset: 0.65rem;
  pointer-events: none;
  z-index: 2;
  background:
    linear-gradient(var(--came), var(--came)) center / 100% 6px no-repeat,
    linear-gradient(var(--came), var(--came)) center / 6px 100% no-repeat;
  opacity: 0.85;
}

.or-panes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  min-height: 20rem;
}

.or-pane {
  position: relative;
  z-index: 1;
  border: 0;
  cursor: pointer;
  text-align: left;
  padding: 1.15rem 1.1rem;
  color: var(--void);
  overflow: hidden;
  min-height: 9.5rem;
  border-radius: 0.35rem;
  transition: filter 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.2s;
}

.or-pane::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.3), transparent 42%),
    radial-gradient(circle at 78% 82%, rgba(0, 0, 0, 0.16), transparent 48%);
  pointer-events: none;
}

.or-pane-clay { background: linear-gradient(145deg, #f09a82, var(--clay) 45%, #a84a36); }
.or-pane-moss { background: linear-gradient(145deg, #a8d0a6, var(--moss) 48%, #4d7a4d); }
.or-pane-honey { background: linear-gradient(145deg, #f8dca0, var(--honey) 50%, #c4923e); }
.or-pane-mute { background: linear-gradient(145deg, #efe4d6, var(--mute) 52%, #8d7260); }

.or-pane:hover { filter: brightness(1.05); transform: translateY(-1px); }

.or-pane.is-lit {
  box-shadow: inset 0 0 0 2px var(--mist), 0 0 24px rgba(240, 194, 122, 0.28);
  filter: saturate(1.12) brightness(1.06);
  z-index: 3;
}

.or-pane-index {
  display: block;
  position: relative;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  opacity: 0.72;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.or-pane strong {
  display: block;
  position: relative;
  font-family: 'Alegreya', Georgia, serif;
  font-size: clamp(1.45rem, 3vw, 1.75rem);
  line-height: 1;
}

.or-pane em {
  display: block;
  position: relative;
  margin-top: 0.45rem;
  font-style: italic;
  font-size: 0.88rem;
  opacity: 0.82;
  max-width: 14ch;
}

/* —— Sill / FAQ —— */
.or-sill {
  margin-top: 0;
  padding: 1.35rem 1.25rem 1.4rem;
  border-radius: 0.45rem 0.45rem 1.5rem 1.5rem;
  background: var(--glass);
  border: 1px solid var(--line);
  border-top: 0;
  backdrop-filter: blur(18px);
  min-height: 14rem;
}

.or-chapter[hidden] { display: none; }
.or-chapter.is-open { animation: or-rise 0.4s var(--ease); }
.or-chapter.is-empty .or-qa { display: none; }

@keyframes or-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.or-chapter-head { margin-bottom: 1rem; }

.or-chapter-head h2 {
  margin: 0 0 0.3rem;
  font-family: 'Alegreya', Georgia, serif;
  font-size: clamp(1.4rem, 3vw, 1.75rem);
}

.or-chapter-head p { margin: 0; color: var(--mute); font-size: 0.95rem; }

.or-qa { display: grid; gap: 0.5rem; }

.or-item {
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: rgba(28, 17, 13, 0.38);
  overflow: hidden;
  transition: border-color 0.2s;
}

.or-item.is-open { border-color: rgba(224, 122, 95, 0.35); }
.or-item.is-filtered-out { display: none; }

.or-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--mist);
  text-align: left;
  padding: 0.9rem 1.05rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

.or-q i {
  width: 0.65rem;
  height: 0.65rem;
  border-right: 2px solid var(--honey);
  border-bottom: 2px solid var(--honey);
  transform: rotate(45deg);
  flex: none;
  transition: transform 0.25s var(--ease);
  margin-top: -0.2rem;
}

.or-item.is-open .or-q i { transform: rotate(225deg); margin-top: 0.15rem; }

.or-a {
  padding: 0 1.05rem 1.05rem;
  color: var(--mute);
  line-height: 1.55;
  font-size: 0.95rem;
}

.or-a a {
  color: var(--honey);
  font-weight: 600;
  text-decoration: none;
}
.or-a a:hover { color: var(--clay); }

.or-empty {
  color: var(--mute);
  margin: 0.5rem 0 0;
  line-height: 1.5;
}
.or-empty a { color: var(--honey); font-weight: 600; }

/* —— Jumps —— */
.or-jumps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.or-jump {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.95rem 1rem;
  border-radius: 1.15rem;
  background: var(--glass);
  border: 1px solid var(--line);
  color: var(--mist);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}

.or-jump span { font-size: 0.7rem; color: var(--mute); letter-spacing: 0.04em; }
.or-jump strong {
  font-family: 'Alegreya', Georgia, serif;
  font-size: 1.12rem;
  font-weight: 700;
}
.or-jump:hover {
  border-color: rgba(224, 122, 95, 0.45);
  transform: translateY(-2px);
  color: var(--mist);
}

/* —— Desk CTA —— */
.or-desk {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem 1.3rem;
  border-radius: 1.5rem;
  background:
    linear-gradient(135deg, rgba(224, 122, 95, 0.14), rgba(123, 175, 123, 0.08)),
    var(--glass);
  border: 1px solid var(--line);
}

.or-desk h2 {
  margin: 0 0 0.3rem;
  font-family: 'Alegreya', Georgia, serif;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
}

.or-desk p { margin: 0; color: var(--mute); font-size: 0.92rem; }

.or-desk-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.or-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.15rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--clay), #c46248);
  color: var(--void);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  transition: filter 0.2s, transform 0.2s;
}

.or-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  color: var(--void);
}

.or-btn-ghost {
  background: transparent;
  color: var(--mist);
  border: 1px solid var(--line);
}
.or-btn-ghost:hover {
  background: rgba(255, 236, 214, 0.08);
  color: var(--mist);
  transform: none;
  filter: none;
}

.or-foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.7rem;
  width: min(100% - 2rem, 1080px);
  margin: 0 auto 1.3rem;
  padding: 0.95rem 1.15rem;
  border-radius: 1.25rem;
  background: var(--glass);
  border: 1px solid var(--line);
  color: var(--mute);
  font-size: 0.86rem;
}

.or-foot a {
  color: var(--honey);
  text-decoration: none;
  font-weight: 600;
}
.or-foot a:hover { color: var(--clay); }

@media (max-width: 900px) {
  .or-jumps { grid-template-columns: 1fr 1fr; }
  .or-panes { min-height: 17rem; }
}

@media (max-width: 640px) {
  .or-stage { width: min(100% - 1.4rem, 1080px); padding-top: 0.75rem; }

  .or-lintel {
    flex-direction: column;
    align-items: stretch;
  }

  .or-lintel-nav {
    border-radius: 1.15rem;
    justify-content: flex-start;
  }

  .or-intro { padding: 1.15rem; border-radius: 1.4rem; }

  .or-loupe { flex-direction: column; }
  .or-loupe button { width: 100%; }

  .or-panes {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .or-cames { display: none; }

  .or-pane {
    min-height: 6.5rem;
    border-radius: 0.75rem;
  }

  .or-frame {
    border-radius: 1.25rem;
    padding: 0.5rem;
  }

  .or-sill {
    border-radius: 0 0 1.25rem 1.25rem;
    padding: 1.1rem 1rem 1.2rem;
  }

  .or-jumps { grid-template-columns: 1fr; }

  .or-desk {
    flex-direction: column;
    align-items: stretch;
  }

  .or-desk-acts { width: 100%; }
  .or-btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .or-chapter.is-open { animation: none; }
  .or-pane,
  .or-jump,
  .or-btn,
  .or-q i { transition: none; }
}
