/* Hallmark v2.0.0 · custom Nacréide · atmospheric · app · signature pearlescent twin · 2026-12-02 */
/* Critique: the conversation leads, memory and identity remain immediately accessible. */
/* waive 24b: optical spacing keeps the approved Nacréide interface proportions and mobile density. */
:root {
  --ink:#090a12;
  --surface:#10111b;
  --raised:#171823;
  --line:#ffffff1a;
  --text:#f0eff7;
  --muted:#a8a6b8;
  --accent:#c6bbff;
  --accent-strong:#a99bff;
  --cyan:#89e8ea;
  --error:#f0b5b5;
  --shade:#0008;
  --transparent:#0000;
  --font:'Nacreide',sans-serif;
  --container:1440px;
}

@font-face {
  font-family:Nacreide;
  src:url('/assets/texte.woff2') format('woff2');
  font-style:normal;
  font-weight:100 900;
  font-display:swap;
}

* {
  box-sizing:border-box;
}

html,body {
  overflow-x:clip;
}

html {
  scroll-behavior:smooth;
}

body {
  margin:0;
  background:var(--ink);
  color:var(--text);
  font:400 16px/1.6 var(--font);
  -webkit-font-smoothing:antialiased;
}

button,input,textarea,select {
  font:inherit;
}

button,a,input,textarea,select {
  -webkit-tap-highlight-color:var(--transparent);
}

button,a {
  touch-action:manipulation;
}

button {
  cursor:pointer;
}

button:disabled {
  opacity:.5;
  cursor:not-allowed;
  background:var(--raised);
  color:var(--muted);
}

a {
  color:inherit;
  text-decoration:none;
}

a:hover {
  text-decoration:underline;
  text-underline-offset:5px;
}

button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible {
  outline:2px solid var(--cyan);
  outline-offset:5px;
}

button {
  color:var(--text);
}

h1,h2,h3,p {
  margin:0;
}

h1,h2 {
  font-weight:450;
  line-height:1.04;
  letter-spacing:-.055em;
  overflow-wrap:break-word;
  min-width:0;
  text-wrap:balance;
}

h3 {
  font-size:18px;
  font-weight:500;
  line-height:1.4;
}

p {
  color:var(--muted);
}

[hidden] {
  display:none!important;
}

.visually-hidden,.skip-link:not(:focus) {
  position:absolute;
  width:1px;
  height:1px;
  overflow:clip;
  clip-path:inset(50%);
  white-space:nowrap;
}

button {
  border:0;
}

.topbar {
  max-width:var(--container);
  margin:auto;
  padding:28px 42px;
  display:flex;
  align-items:center;
  gap:40px;
  border-bottom:1px solid var(--line);
}

.brand {
  display:inline-flex;
  align-items:center;
  gap:12px;
  font-size:23px;
  font-weight:500;
  letter-spacing:-.05em;
}

.brand img {
  width:26px;
  height:30px;
}

.top-caption {
  color:var(--muted);
  font-size:13px;
}

.topbar nav {
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:28px;
  font-size:14px;
}

.topbar nav a {
  min-height:44px;
  display:flex;
  align-items:center;
}

.section-label {
  font-size:13px;
  color:var(--accent);
  margin-bottom:20px;
}

.welcome {
  max-width:var(--container);
  margin:0 auto;
  min-height:calc(100vh - 160px);
  padding:62px 7vw 70px;
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);
  gap:8vw;
  align-items:center;
}

.welcome h1 {
  font-size:clamp(54px,5.8vw,88px);
  margin-bottom:28px;
}

.lede {
  max-width:360px;
  font-size:18px;
  line-height:1.7;
  color:var(--text);
}

.fine {
  font-size:13px;
  line-height:1.7;
  color:var(--muted);
}

.welcome-copy>.fine {
  max-width:330px;
  margin-top:24px;
}

.text-button {
  background:none;
  color:var(--accent);
  padding:12px 0;
  text-align:left;
  font-size:14px;
  min-height:44px;
  text-decoration:underline;
  text-underline-offset:5px;
}

.text-button:hover {
  color:var(--text);
}

.welcome-copy>.text-button {
  margin-top:18px;
}

.creation {
  border:1px solid var(--line);
  border-radius:24px;
  background:var(--surface);
  overflow:clip;
  box-shadow:0 40px 90px var(--shade);
  max-width:480px;
}

.portrait-shell {
  height:170px;
  position:relative;
  overflow:clip;
}

.portrait-shell:after {
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,var(--transparent) 25%,var(--surface));
}

.portrait-shell img {
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:72% 43%;
  filter:saturate(.6);
  opacity:.85;
}

.portrait-caption {
  position:absolute;
  z-index:1;
  bottom:15px;
  left:30px;
  font-size:12px;
  color:var(--muted);
}

.creation form {
  padding:10px 30px 30px;
}

.creation h2 {
  font-size:28px;
  margin-bottom:25px;
}

label {
  display:block;
  font-size:13px;
  color:var(--muted);
  margin:17px 0 7px;
}

input,textarea,select {
  display:block;
  width:100%;
  background:var(--ink);
  color:var(--text);
  border:1px solid var(--line);
  border-radius:8px;
  padding:12px 14px;
  resize:vertical;
  min-width:0;
  line-height:1.5;
}

input::placeholder,textarea::placeholder {
  color:var(--muted);
  opacity:.7;
}

select {
  min-height:48px;
}

textarea {
  min-height:78px;
}

.primary,.subtle-button,.danger-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:20px;
  min-height:46px;
  padding:12px 20px;
  border-radius:8px;
  font-size:14px;
  font-weight:500;
  line-height:1.5;
  transition:background .2s,transform .2s;
}

.primary {
  background:var(--text);
  color:var(--ink);
}

.primary:hover {
  background:var(--accent);
  transform:translateY(-1px);
}

.primary:active {
  transform:translateY(0);
}

.primary span {
  font-size:22px;
  margin-left:auto;
}

.creation .primary {
  margin-top:26px;
  width:100%;
}

.subtle-button {
  background:var(--raised);
  border:1px solid var(--line);
  color:var(--text);
}

.subtle-button:hover {
  background:var(--surface);
  border-color:var(--accent);
}

.studio {
  max-width:var(--container);
  margin:auto;
  min-height:calc(100vh - 205px);
  display:grid;
  grid-template-columns:270px minmax(0,1fr);
}

.identity-rail {
  padding:36px 30px 35px 42px;
  border-right:1px solid var(--line);
  position:relative;
}

.twin-avatar {
  width:100%;
  aspect-ratio:1.5;
  border:1px solid var(--line);
  border-radius:16px;
  overflow:clip;
  margin-bottom:25px;
}

.twin-avatar img {
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:74% center;
  filter:saturate(.7);
}

.identity-rail .section-label {
  margin-bottom:7px;
}

.identity-rail h1 {
  font-size:34px;
  margin-bottom:15px;
}

.identity-rail #identity-description {
  font-size:13px;
  line-height:1.7;
  overflow-wrap:anywhere;
  white-space:pre-wrap;
  display:-webkit-box;
  -webkit-line-clamp:4;
  -webkit-box-orient:vertical;
  overflow:clip;
}

.memory-count {
  font-size:12px;
  margin:17px 0 27px;
  color:var(--accent);
}

.studio-tabs {
  display:grid;
  gap:5px;
}

.studio-tabs button {
  text-align:left;
  padding:13px 15px;
  border-radius:8px;
  background:none;
  color:var(--muted);
  min-height:48px;
  font-size:14px;
}

.studio-tabs button:hover {
  background:var(--surface);
  color:var(--text);
}

.studio-tabs button[aria-current=page] {
  color:var(--text);
  background:var(--raised);
  box-shadow:inset 2px 0 var(--accent);
}

.rail-note {
  font-size:12px;
  line-height:1.65;
  margin-top:40px;
}

.identity-rail>.text-button {
  font-size:12px;
}

.workspace {
  min-width:0;
  padding:38px 42px 38px;
}

.panel-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  margin-bottom:34px;
}

.panel-heading .section-label {
  margin-bottom:10px;
}

.panel-heading h2 {
  font-size:clamp(30px,3vw,44px);
}

#panel-conversation {
  display:flex;
  flex-direction:column;
  min-height:650px;
}

.conversation-empty {
  margin:auto;
  max-width:460px;
  text-align:center;
  padding:35px 10px 46px;
}

.conversation-orbit {
  position:relative;
  width:100px;
  height:90px;
  margin:0 auto 30px;
}

.conversation-orbit span {
  position:absolute;
  inset:12px;
  border:1px solid var(--accent);
  border-radius:50%;
  opacity:.5;
  transform:rotate(-30deg) scaleX(.55);
  animation:orbit-turn 20s linear infinite;
}

.conversation-orbit span:nth-child(2) {
  transform:rotate(30deg) scaleX(.55);
  animation-direction:reverse;
  animation-delay:-5s;
}

.conversation-orbit span:nth-child(3) {
  transform:rotate(90deg) scaleX(.55);
  animation-delay:-10s;
}

@keyframes orbit-turn {
  to {
    transform:rotate(330deg) scaleX(.55);
  }

}

.conversation-empty h3 {
  font-size:22px;
  letter-spacing:-.035em;
  margin-bottom:12px;
}

.conversation-empty p {
  font-size:14px;
  line-height:1.8;
}

.suggestions {
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:8px;
  margin-top:25px;
}

.suggestions button {
  font-size:12px;
  padding:10px 13px;
  min-height:40px;
  border-radius:30px;
  border:1px solid var(--line);
  background:var(--surface);
  color:var(--muted);
}

.suggestions button:hover {
  color:var(--text);
  border-color:var(--accent);
}

.messages {
  display:flex;
  flex-direction:column;
  gap:24px;
  padding-bottom:30px;
  min-width:0;
}

.message {
  max-width:90%;
  font-size:15px;
  overflow-wrap:anywhere;
}

.message.user {
  align-self:flex-end;
  background:var(--raised);
  border:1px solid var(--line);
  border-radius:16px 16px 3px 16px;
  padding:15px 20px;
}

.message.assistant {
  padding:5px 0;
  align-self:flex-start;
}

.message-label {
  color:var(--accent);
  font-size:12px;
  margin-bottom:10px;
}

.message p {
  color:var(--text);
  white-space:pre-wrap;
  line-height:1.85;
}

.sources {
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-top:14px;
}

.source-button {
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--surface);
  color:var(--muted);
  font-size:11px;
  min-height:34px;
}

.source-button:hover {
  border-color:var(--accent);
  color:var(--text);
}

.composer {
  position:sticky;
  bottom:14px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 44px;
  align-items:center;
  gap:10px;
  padding:10px 12px 7px;
  border:1px solid var(--line);
  border-radius:15px;
  background:var(--surface);
  box-shadow:0 16px 40px var(--shade);
  margin-top:auto;
}

.composer textarea {
  border:0;
  background:none;
  min-height:65px;
  max-height:200px;
  padding:10px;
  resize:vertical;
  font-size:15px;
}

.composer textarea:focus-visible {
  outline-offset:0;
}

.send-button {
  width:40px;
  height:40px;
  border-radius:50%;
  background:var(--text);
  color:var(--ink);
  font-size:22px;
}

.send-button:hover {
  background:var(--accent);
}

.composer-note {
  grid-column:1/-1;
  font-size:11px;
  line-height:1.5;
  padding:0 10px 3px;
}

.memory-layout {
  display:grid;
  grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);
  gap:42px;
}

.memory-layout>form {
  padding-right:30px;
  border-right:1px solid var(--line);
}

.memory-layout h3 {
  margin-bottom:25px;
}

.memory-layout .fine {
  margin-top:14px;
}

.form-actions {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:12px;
  margin-top:22px;
}

.memories-collection {
  min-width:0;
}

.memory-list {
  display:grid;
  gap:15px;
}

.memory-card {
  border:1px solid var(--line);
  border-radius:12px;
  padding:20px;
  background:var(--surface);
  scroll-margin-top:24px;
}

.memory-card.highlight {
  outline:2px solid var(--accent);
  outline-offset:4px;
}

.memory-card h3 {
  font-size:17px;
  margin:0 0 12px;
  overflow-wrap:anywhere;
}

.memory-card .memory-text {
  white-space:pre-wrap;
  font-size:14px;
  line-height:1.8;
  overflow-wrap:anywhere;
}

.memory-meta {
  margin-top:16px;
  font-size:11px;
}

.memory-card-actions {
  display:flex;
  gap:20px;
  margin-top:10px;
}

.memory-card-actions button {
  background:none;
  color:var(--muted);
  font-size:12px;
  min-height:36px;
  padding:4px 0;
}

.memory-card-actions button:hover {
  color:var(--accent);
}

#panel-identity {
  max-width:690px;
}

#panel-identity h3 {
  margin-bottom:14px;
}

#panel-identity>form>p,.danger-zone p {
  font-size:14px;
  line-height:1.8;
}

#identity-form>.subtle-button {
  margin-top:24px;
}

.setting-divider {
  height:1px;
  background:var(--line);
  margin:40px 0;
}

.danger-button {
  color:var(--error);
  background:none;
  border:1px solid var(--line);
  margin-top:20px;
}

.danger-button:hover {
  border-color:var(--error);
}

.unlock {
  max-width:480px;
  margin:90px auto 110px;
  padding:0 24px;
  text-align:center;
}

.unlock-mark {
  width:52px;
  margin:0 auto 40px;
}

.unlock-mark img {
  width:100%;
}

.unlock h1 {
  font-size:50px;
  margin-bottom:25px;
}

.unlock p {
  font-size:15px;
}

.unlock form {
  text-align:left;
  margin:30px 0 15px;
}

.unlock .primary {
  width:100%;
  margin-top:20px;
}

.global-status {
  position:fixed;
  bottom:24px;
  left:50%;
  transform:translateX(-50%);
  max-width:calc(100% - 32px);
  width:max-content;
  padding:0;
  border-radius:10px;
  background:var(--raised);
  box-shadow:0 10px 50px var(--shade);
  z-index:20;
  font-size:13px;
  color:var(--text);
}

.global-status:not(:empty) {
  padding:14px 22px;
  border:1px solid var(--line);
}

.global-status.error {
  color:var(--error);
}

footer {
  max-width:var(--container);
  margin:0 auto;
  border-top:1px solid var(--line);
  padding:24px 42px;
  display:flex;
  gap:25px;
  align-items:center;
  font-size:12px;
  color:var(--muted);
}

footer span {
  margin-right:auto;
}

.noscript {
  padding:40px;
  text-align:center;
}

.skip-link:focus {
  position:fixed;
  top:10px;
  left:10px;
  z-index:30;
  background:var(--text);
  color:var(--ink);
  padding:12px;
}

@media(min-width:1500px) {
  .welcome {
    padding-left:100px;
    padding-right:100px;
    gap:120px;
  }

}

@media(max-width:1100px) {
  .welcome {
    gap:5vw;
    padding-left:5vw;
    padding-right:5vw;
  }

  .studio {
    grid-template-columns:220px minmax(0,1fr);
  }

  .identity-rail {
    padding:30px 22px;
  }

  .workspace {
    padding:30px;
  }

  .panel-heading {
    align-items:flex-start;
  }

  .panel-heading>.subtle-button {
    max-width:165px;
  }

  .memory-layout {
    grid-template-columns:minmax(0,1fr);
    gap:30px;
  }

  .memory-layout>form {
    padding-right:0;
    border-right:0;
    padding-bottom:30px;
    border-bottom:1px solid var(--line);
  }

}

@media(max-width:720px) {
  .topbar {
    padding:18px 22px;
    gap:20px;
  }

  .top-caption {
    display:none;
  }

  .topbar nav {
    gap:22px;
  }

  .brand {
    font-size:22px;
  }

  .welcome {
    grid-template-columns:minmax(0,1fr);
    gap:38px;
    padding:40px 24px 50px;
    min-height:auto;
  }

  .welcome h1 {
    font-size:58px;
  }

  .welcome .section-label {
    margin-bottom:20px;
  }

  .welcome-copy>.fine {
    max-width:100%;
    margin-top:18px;
  }

  .welcome-copy>.text-button {
    margin-top:12px;
  }

  .lede {
    font-size:17px;
    max-width:330px;
  }

  .creation {
    max-width:none;
  }

  .portrait-shell {
    height:140px;
  }

  .creation form {
    padding:8px 24px 26px;
  }

  .studio {
    grid-template-columns:minmax(0,1fr);
  }

  .identity-rail {
    padding:22px 22px 0;
    border-right:0;
    border-bottom:1px solid var(--line);
    display:grid;
    grid-template-columns:50px minmax(0,1fr);
    column-gap:14px;
  }

  .twin-avatar {
    grid-column:1;
    grid-row:1/4;
    width:50px;
    height:64px;
    aspect-ratio:auto;
    border-radius:10px;
    margin-bottom:0;
  }

  .identity-rail .section-label {
    grid-column:2;
    font-size:11px;
    margin:0;
  }

  .identity-rail h1 {
    grid-column:2;
    font-size:27px;
    margin:2px 0;
  }

  .identity-rail #identity-description {
    display:none;
  }

  .identity-rail .memory-count {
    grid-column:2;
    margin:0;
    font-size:11px;
  }

  .studio-tabs {
    grid-column:1/-1;
    display:flex;
    gap:6px;
    margin-top:18px;
    overflow-x:auto;
    padding-bottom:8px;
  }

  .studio-tabs button {
    font-size:12px;
    white-space:nowrap;
    min-height:42px;
    padding:10px 12px;
  }

  .studio-tabs button[aria-current=page] {
    box-shadow:inset 0 -2px var(--accent);
  }

  .rail-note {
    grid-column:1/-1;
    grid-row:5;
    margin:0 0 12px;
    font-size:11px;
  }

  .identity-rail>.text-button {
    grid-column:1/-1;
    margin:0 0 8px;
    min-height:32px;
    font-size:11px;
  }

  .workspace {
    padding:28px 22px;
  }

  .panel-heading {
    gap:16px;
    margin-bottom:28px;
  }

  .panel-heading .section-label {
    font-size:11px;
  }

  .panel-heading h2 {
    font-size:32px;
  }

  .panel-heading>.subtle-button {
    font-size:11px;
    min-height:40px;
    max-width:130px;
    padding:9px 12px;
  }

  .conversation-empty {
    padding:30px 0 40px;
  }

  .conversation-empty h3 {
    font-size:20px;
  }

  .conversation-empty p {
    font-size:13px;
  }

  .conversation-orbit {
    width:80px;
    height:70px;
    margin-bottom:25px;
  }

  .suggestions {
    gap:7px;
  }

  .suggestions button {
    font-size:11px;
    padding:8px 11px;
  }

  .message {
    max-width:95%;
    font-size:14px;
  }

  #panel-conversation {
    min-height:590px;
  }

  .composer {
    bottom:8px;
  }

  .composer-note {
    font-size:10px;
  }

  .memory-layout {
    gap:27px;
  }

  .unlock {
    margin-top:60px;
  }

  .unlock h1 {
    font-size:42px;
  }

  footer {
    padding:24px 22px;
    gap:18px;
    flex-wrap:wrap;
    font-size:11px;
  }

  .form-actions {
    align-items:stretch;
  }

  .form-actions .primary,.form-actions .subtle-button {
    width:100%;
  }

}

@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior:auto;
  }

  *,*::before,*::after {
    animation:none!important;
    transition:none!important;
  }

}

.backup-import {
  max-width:620px;
  margin:0 auto 30px;
  padding:0 24px;
  color:var(--muted);
  font-size:13px;
}

.backup-import summary {
  cursor:pointer;
  min-height:44px;
  padding:12px 0;
}

.backup-import form {
  border-top:1px solid var(--line);
  padding-top:20px;
}

.backup-import .subtle-button {
  margin-top:20px;
}

.backup-import summary:focus-visible {
  outline:2px solid var(--cyan);
  outline-offset:4px;
}

:root { --font-editorial:'Nacreide Edition',serif; }
@font-face {
  font-family:'Nacreide Edition';
  src:url('/assets/edition-serif.woff2') format('woff2');
  font-style:normal;
  font-weight:400;
  font-display:swap;
}
.welcome h1 {
  font-family:var(--font-editorial);
  font-size:clamp(54px,6.1vw,88px);
  font-weight:400;
  line-height:1.04;
  letter-spacing:-.035em;
  max-width:9ch;
}
.studio-example-note { display:flex; flex-wrap:wrap; align-items:center; gap:12px 24px; padding:0 0 24px; margin-bottom:28px; border-bottom:1px solid var(--line); }
.studio-example-note p { flex:1 1 270px; font-size:13px; line-height:1.6; }
.studio-example-note a { display:inline-flex; align-items:center; min-height:44px; color:var(--accent); font-size:13px; text-decoration:underline; text-underline-offset:5px; }
@media(max-width:720px) {
  .welcome h1 { font-size:clamp(48px,12.8vw,60px); max-width:10ch; }
  .welcome .lede { max-width:36ch; font-size:16px; }
}
.studio-example-active #panel-conversation { min-height:0; }
.studio-example-active .conversation-empty { margin:0; max-width:540px; text-align:left; padding:0 0 24px; }
.studio-example-active .conversation-empty :is(.conversation-orbit,.suggestions) { display:none; }
.studio-example-active .conversation-empty h3 { font-family:var(--font-editorial); font-weight:400; font-size:clamp(25px,3vw,34px); letter-spacing:-.02em; }
@media(max-width:720px) {
  .studio-example-active .studio-example-note { padding-bottom:14px; margin-bottom:20px; gap:4px; }
  .studio-example-active .panel-heading { margin-bottom:22px; }
  .studio-example-active .conversation-empty { padding-bottom:18px; }
}
