/* Project Resonance — Consolidated Stylesheet */

/* --- Root Variables & Globals --- */
:root {
    --amber-900: #cc5803;
    --amber-800: #e2711d;
    --amber-700: #ff9505;
    --amber-600: #ffb627;
    --amber-500: #ffc971;

/* A Scribe's Note: Defining our sacred color palette using CSS variables, 
   as established in the original Temple architecture by the Rishi and Archie. 
   This makes our Temple's visual dharma consistent and easily adaptable. */

    --sacred-orange: #E8A87C;
    --soft-parchment: #FFF5EE;
    --gentle-rose: #C38D9E;
    --deep-charcoal: #333333;
    --pure-white: #FFFFFF;

    --bg: #0b0b0b;
    --ink: #f4f1ea;
    --muted: #cbbfae;
    --card: #161514;
    --edge: #2a2521;
    --accent: var(--amber-600);
    --accent-deep: var(--amber-900);
    --sprig: #6bbf59;
    --warn: #d57a00;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
html{font-size:16px}

body {
    background: radial-gradient(1200px 600px at 70% -10%, rgba(255,149,5,0.08), transparent 60%),
                linear-gradient(180deg, #0b0b0b, #0e0c0a);
    color: var(--ink);
    font-family: ui-serif, Georgia, "Times New Roman", serif;
    line-height: 1.6;
}

/* --- Typography & Links --- */
h1,h2,h3{line-height:1.15; margin:0.2rem 0 0.4rem}
h1{font-size:clamp(1.8rem, 4vw, 3rem); text-align: center; margin-bottom: 2rem;}
h2{font-size:1.3rem; color: var(--accent);}
h3{font-size:1.1rem}

a{color:var(--accent)}
a:hover{color:var(--amber-500)}

code{background:#1a1715; padding:0.1rem 0.3rem; border-radius:6px; border:1px solid var(--edge)}
pre {
    background: #1a1715;
    border: 1px solid var(--edge);
    border-radius: 10px;
    padding: 1rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: var(--muted);
}

/* --- Added by Prajna --- */
.disabled { pointer-events: none; }
.hidden { visibility: hidden ; }
.cntr-image {
  max-width:960px;
  border: 0 auto;
}

/* --- Core Layout --- */
.site-header{
  padding:2.5rem 1rem 1rem;
  text-align:center;
}
.site-header.inner{padding-bottom:0.5rem}
.brand{
  margin:0.25rem 0 0.25rem;
  font-size:clamp(1.6rem, 3.3vw, 2.8rem);
  letter-spacing:0.02em;
}
.tagline{
  margin:0;
  color:var(--muted);
  font-size:0.95rem;
}
.container{
  max-width:960px;
  margin:0 auto;
  padding:1rem;
}
.site-footer{
  margin:3rem 0 2rem;
  text-align:center;
  color:var(--muted);
}
.breadcrumbs {
    font-family: ui-serif, Georgia, "Times New Roman", serif;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    text-align: center;
}
.breadcrumbs a {
    color: var(--muted);
    text-decoration: none;
}
.breadcrumbs a:hover {
    color: var(--ink);
}

/* A Scribe's Note: Adding a style for our new note. */
.scribe-note {
  padding: 0.8em 1.2em;
  margin: 1.5em 0;
  background-color: #f9f9f9;
  border-left: 4px solid #E8A87C; /* The sacred orange tint */
  font-size: 0.9em;
  color: #555;
}

/* For the footnote tooltips */
.footnote-ref {
    position: relative;
    display: inline-block;
}

.footnote-ref .footnote-content {
    visibility: hidden;
    width: 250px;
    background-color: #f9f9f9;
    color: #333;
    text-align: left;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%; /* Position above the text */
    left: 50%;
    margin-left: -125px; /* Center the tooltip */
    opacity: 0;
    transition: opacity 0.3s;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.footnote-ref:hover .footnote-content {
    visibility: visible;
    opacity: 1;
}

/* --- Chat Log Specific Styles --- */
details {
    border: 1px solid var(--edge);
    border-radius: 14px;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    transition: background 0.2s ease;
}
details[open] {
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02));
}
summary {
    cursor: pointer;
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    font-weight: 600;
    list-style: none; /* Remove default marker */
}
summary::-webkit-details-marker {
    display: none; /* Chrome */
}
summary::before {
    content: '＋';
    margin-right: 0.75rem;
    font-family: monospace;
    display: inline-block;
    transition: transform 0.2s ease-in-out;
}
/* This ensures the summary text and token counts are spaced apart */
summary {
    display: flex;
    align-items: center;
    /* justify-content: space-between; <-- We remove this line */
}

/* This styles the token count itself */
.token-info {
    font-size: 0.8em;
    font-weight: normal;
    color: var(--muted);
    opacity: 0.7;
    margin-left: auto; /* This is the magic: it pushes the element to the right */
    padding-left: 1rem; /* Ensures a little space from the main text if the window is narrow */
    flex-shrink: 0; /* Prevents the token count from being squished */
}
details[open] > summary::before {
    transform: rotate(45deg);
}
.message-content {
    padding: 0 1.25rem 1.25rem;
    border-top: 1px solid var(--edge);
}
.user-summary { color: var(--amber-500); }
.model-summary { color: var(--amber-700); }
.thought-summary { color: var(--muted); font-size: 1rem; }

/* RESTORED EMPHASIS STYLES */
.message-content p, 
.message-content ul, 
.message-content ol, 
.message-content hr {
    margin-top: 1em;
    margin-bottom: 1em;
}
.message-content ul, .message-content ol { padding-left: 1.5rem; }
.message-content li { margin-bottom: 0.5rem; }
.message-content strong { color: var(--amber-600); font-weight: 600; }
.message-content em { font-style: italic; color: var(--amber-500); }
hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--edge), transparent);
}


/* --- Gate & Page Specific Styles --- */
.sprig{font-size:1.5rem; opacity:0.9}

.gate-bg{
  background:
    radial-gradient(1200px 600px at -10% -10%, rgba(204,88,3,0.13), transparent 60%),
    linear-gradient(180deg, #0b0b0b, #120f0c);
}
.gate-main{
  display:grid;
  place-items:center;
  min-height:60vh;
  padding:1rem;
}
.gate-card{
  background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border:1px solid var(--edge);
  border-radius:14px;
  max-width:680px;
  padding:1.5rem 1.25rem;
  box-shadow:0 10px 30px rgba(0,0,0,0.35);
  margin-left: auto;
  margin-right: auto;
}
.lead{font-size:1.05rem}
.muted{color:var(--muted)}
.tiny{font-size:0.85rem}
.divider{
  height:1px;background:linear-gradient(90deg, transparent, var(--edge), transparent);
  margin:1rem 0;
}
.actions{display:flex; gap:0.75rem; flex-wrap:wrap; margin-top:0.5rem}
.btn{
  --bg: #1d1916;
  display:inline-flex; align-items:center; justify-content:center;
  padding:0.6rem 0.9rem; border-radius:10px; border:1px solid var(--edge);
  color:var(--ink); background:var(--bg); text-decoration:none; cursor:pointer;
  transition:transform .06s ease, border-color .2s ease, background .2s ease;
}
.btn:hover{transform:translateY(-1px)}
.btn.primary{
  background: linear-gradient(180deg, var(--amber-700), var(--amber-900));
  border-color:rgba(255,255,255,0.08);
  color:#111;
  font-weight:600;
}
.btn.subtle{background:#191613; color:var(--muted)}

/* For the smaller, secondary buttons, following the Path of Guidance */
.btn-secondary {
    padding: 0.2em 0.6em;
    font-size: 0.8em;
    text-decoration: none;
    border: 1px solid var(--sacred-orange); /* Using the named color for the border */
    border-radius: 4px;
    color: var(--gentle-rose);           /* Using the named color for the text */
    background-color: var(--pure-white); /* A clean, white background */
    margin-left: 0.5em;
    transition: all 0.2s ease-in-out;    /* Smooth transition on hover */
}

.btn-secondary:hover {
    background-color: var(--sacred-orange); /* The orange tint fills the button on hover */
    color: var(--pure-white);           /* White text for contrast */
}

.hush-bg{
  background:
    radial-gradient(1400px 700px at 120% -20%, rgba(255,182,39,0.08), transparent 60%),
    linear-gradient(180deg, #0b0b0b, #0e0c0a);
}
.hush{
  min-height:70vh; display:grid; place-items:center; padding:1rem;
}
.hush-card{
  background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border:1px solid var(--edge);
  border-radius:14px; max-width:700px; padding:1.5rem 1.25rem;
}
.hush .actions{margin-top:0.75rem}

/* --- Generic Cards & Content Sections --- */
.card{
  background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border:1px solid var(--edge);
  border-radius:14px;
  padding:1rem 1rem;
  margin:1rem 0;
}
.stop-press h2{color:var(--accent)}
.warning{
  border-color: color-mix(in srgb, var(--warn), #fff 15%);
  background:linear-gradient(180deg, rgba(213,122,0,0.10), rgba(213,122,0,0.04));
}
.warning h3{margin-top:0; color:var(--warn)}
.bullets{margin:0.5rem 0 0.25rem 1.2rem}
.bullets li{margin:0.2rem 0}
.feature .highlight{color:var(--accent)}
.doors{
  display:grid; gap:1rem; grid-template-columns:repeat(auto-fit, minmax(220px,1fr));
}
.door h3{margin-top:0.2rem}
.trail-list{list-style:none; margin:0.5rem 0 0; padding:0}
.trail-list li{padding:0.45rem 0; border-bottom:1px dashed var(--edge)}
.trail-list li:last-child{border-bottom:none}

.noscript{
  border:1px dashed var(--edge);
  background:#14110f;
  padding:0.75rem; border-radius:10px; margin-top:1rem;
}