:root {
  color-scheme: light;
  --bg: #f4f9fc;
  --surface: #ffffff;
  --surface-raised: #eef8fc;
  --line: #ccdde7;
  --text: #172e43;
  --muted: #51697c;
  --accent: #08788c;
  --accent-ink: #083447;
  --danger: #b42e42;
  --warning: #80521b;
  --radius: 18px;
  --radius-sm: 10px;
  --space: 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse at 88% 0%, #8de4f845, transparent 50%),
    radial-gradient(ellipse at 28% 70%, #d1ecff60, transparent 55%),
    var(--bg);
}
button, input, textarea, select { font: inherit; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: linear-gradient(115deg, #8ae5f5, #b6efff);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease-out, opacity 180ms ease-out;
}
button:hover, .button:hover { transform: translateY(-2px); }
button:active, .button:active { transform: translateY(0); }
button:disabled { opacity: .5; cursor: wait; transform: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.quiet { background: var(--surface-raised); border-color: var(--line); color: var(--text); }
.text { color: var(--accent); background: transparent; padding: 8px; }
.light { background: #ffffff; color: var(--accent-ink); border-color: #a9d4e2; }
p { margin: 8px 0; font-size: 14px; line-height: 1.75; color: var(--muted); }
small, .muted { color: var(--muted); }
small { font-size: 12px; line-height: 1.7; }
h1, h2, h3 { color: var(--text); }
h1 { margin: 14px 0; font-size: clamp(30px, 3.2vw, 44px); font-weight: 600; letter-spacing: -1.8px; line-height: 1.15; }
h1 span { color: var(--accent); font-size: .8em; }
h2 { margin: 0 0 12px; font-size: 17px; font-weight: 600; letter-spacing: -.35px; }
h3 { margin: 12px 0 8px; font-size: 15px; font-weight: 600; }
.eyebrow, .navlabel, .tag {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  letter-spacing: 1.5px;
  line-height: 1.7;
  color: var(--accent);
}
aside {
  width: 250px;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  padding: 32px 18px;
  background: #fafdfff2;
  border-right: 1px solid var(--line);
  overflow-y: auto;
}
.brand { display: flex; align-items: baseline; gap: 5px; color: var(--text); text-decoration: none; font-size: 29px; font-weight: 700; letter-spacing: -1.6px; }
.brand span { color: var(--muted); font-size: 22px; font-weight: 400; letter-spacing: -1px; }
.brand b { margin-left: auto; color: var(--accent); font-size: 32px; font-weight: 400; }
.workspace { display: flex; align-items: center; gap: 12px; padding: 16px 12px; margin: 32px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: linear-gradient(120deg, #e2f8ff, #f5fbff); font-size: 12px; font-weight: 600; }
.workspace small { display: block; font-size: 10px; font-weight: 400; }
.avatar { display: inline-grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border: 1px solid #8fc4d4; border-radius: 12px; background: #ddf6fc; color: var(--accent); font-size: 19px; }
.avatar.small { width: 34px; height: 34px; font-size: 16px; border-radius: 10px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.navlabel { color: var(--muted); margin: 0 12px 16px; font-size: 9px; }
nav { display: grid; gap: 6px; }
nav button { display: flex; justify-content: flex-start; width: 100%; background: transparent; color: var(--muted); padding: 12px; font-size: 12px; font-weight: 500; text-align: left; border-radius: var(--radius-sm); }
nav button.active { color: var(--accent); border-color: #9ddbe8; background: linear-gradient(100deg, #d6f5fc, #effaff); box-shadow: inset 3px 0 var(--accent); }
nav button span { width: 19px; font-size: 18px; text-align: center; }
nav button b { margin-left: auto; padding: 2px 6px; border-radius: 5px; background: var(--accent); color: #ffffff; font-size: 10px; }
.sidefoot { margin-top: auto; padding: 40px 12px 8px; }
.sidefoot>span { font-size: 35px; color: var(--accent); }
.sidefoot p { color: var(--text); font-size: 21px; letter-spacing: -.5px; line-height: 1.4; }
.sidefoot small { font-size: 10px; }
.shell { margin-left: 250px; }
header { min-height: 80px; padding: 16px 36px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); background: #ffffffc9; backdrop-filter: blur(16px); font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; letter-spacing: .5px; }
header>div { display: flex; align-items: center; gap: 20px; }
header button { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 12px; }
main { width: 100%; max-width: 1480px; padding: 40px 36px; margin: auto; overflow-wrap: anywhere; min-width: 0; }
.heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.heading p { max-width: 65ch; }
.heading>button { flex-shrink: 0; box-shadow: 0 4px 24px #1aafcf25; border-color: #77cddd; }
.banner { display: flex; align-items: center; gap: 16px; padding: 16px 20px; margin-bottom: 32px; background: linear-gradient(115deg, #e6f8ffdc, #f8fdff); border: 1px solid #b8e2ef; border-radius: var(--radius-sm); font-size: 12px; line-height: 1.6; color: var(--muted); }
.banner>span { font-size: 25px; color: var(--accent); }
.banner strong { display: block; color: var(--text); font-size: 13px; font-weight: 500; }
.banner button { margin-left: auto; font-size: 12px; }
.warning { color: var(--warning); border-color: #ddc79e; background: #fff5e1; padding: 12px; border-radius: var(--radius-sm); }
.sectionhead { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 8px 0 20px; }
.sectionhead h2, .sectionhead h3 { margin: 0; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 20px 0 24px; }
.metric, .panel { background: linear-gradient(140deg, #fffffffa, #f9fdffed); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space); }
.metric { position: relative; overflow: hidden; box-shadow: 0 8px 28px #1c638709; }
.metric::before { content: ''; position: absolute; top: 0; left: 24px; width: 48px; height: 2px; background: #20b7d6; box-shadow: 0 0 16px #1fc7e575; }
.metric>div { display: flex; align-items: center; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.network { color: var(--accent); font-size: 23px; }
.pill { display: inline-block; padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; background: #f0f7fb; color: #51697c; font-size: 10px; line-height: 1.5; }
.metric .pill { margin-left: auto; }
.metric h2 { font-size: 42px; font-weight: 400; letter-spacing: -2px; line-height: 1; margin: 28px 0 12px; }
.metric p { font-size: 12px; }
.metric small { font-size: 11px; }
.columns { display: grid; grid-template-columns: 1.55fr 1fr; gap: 24px; margin-bottom: 24px; }
.columns>* { min-width: 0; }
.green { position: relative; overflow: hidden; isolation: isolate; background: radial-gradient(ellipse at 100% 0%, #a7edfa85, transparent 75%), #eaf8fe; border-color: #b4dce9; }
.green::after { content: ''; position: absolute; z-index: -1; right: -86px; top: -110px; width: 280px; height: 280px; border: 1px solid #078cae35; border-radius: 50%; box-shadow: 0 0 0 24px #19b4db0a, 0 0 0 56px #19b4db0a, 0 0 0 90px #19b4db08; pointer-events: none; }
.green h2 { font-size: 34px; font-weight: 550; letter-spacing: -1.2px; line-height: 1.2; margin: 24px 0 16px; }
.green p { font-size: 13px; max-width: 46ch; }
.green .light { margin-top: 20px; }
.tag { font-size: 9px; }
.counters { display: flex; margin-bottom: 24px; padding: 16px 0 24px; border-bottom: 1px solid var(--line); }
.counters div { flex: 1; padding: 0 16px; border-right: 1px solid var(--line); }
.counters div:first-child { padding-left: 0; }
.counters div:last-child { border: 0; }
.counters b { display: block; margin-bottom: 8px; color: var(--text); font-size: 32px; font-weight: 500; font-variant-numeric: tabular-nums; }
.counters span { color: var(--muted); font-size: 12px; }
.task { display: flex; gap: 16px; align-items: center; padding: 16px 0; }
.task>span { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border: 1px solid #b4d8e6; border-radius: var(--radius-sm); background: #eaf8fd; color: var(--accent); font-size: 13px; }
.task strong { font-size: 13px; font-weight: 550; }
.task p { font-size: 12px; margin: 4px 0; }
.event { display: flex; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); font-size: 13px; }
.event>span { color: var(--accent); }
.event small { display: block; margin-top: 4px; }
.count { padding: 4px 8px; border-radius: 6px; background: #e2f6fc; color: var(--accent); font-size: 12px; }
footer { display: flex; justify-content: space-between; gap: 24px; padding: 24px 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.empty { text-align: center; padding: 40px 20px; margin: 16px 0; border: 1px dashed #aac5d6; border-radius: var(--radius-sm); background: #f3faff70; }
.empty>span { color: var(--accent); font-size: 32px; }
.empty p { max-width: 48ch; margin: 12px auto; font-size: 13px; }
.cards { display: grid; gap: 16px; }
.content-card { padding: 20px; background: #f9fcff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.caption { white-space: pre-wrap; color: var(--text); }
.meta { font-size: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.previews { display: flex; flex-wrap: wrap; gap: 12px; }
.previews img, .previews video { height: 160px; max-width: 100%; object-fit: contain; border-radius: var(--radius-sm); }
.media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.media { padding: 12px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.media img, .media video { width: 100%; height: 190px; object-fit: cover; border-radius: 6px; }
.media strong, .media small { display: block; overflow-wrap: anywhere; margin: 8px 0; }
.media strong { font-size: 13px; }
input, textarea, select { min-height: 46px; max-width: 100%; padding: 12px; border: 1px solid #7593a7; border-radius: var(--radius-sm); background: #fcfeff; color: var(--text); font-size: 14px; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input[type='checkbox'] { accent-color: var(--accent); }
textarea { min-height: 120px; resize: vertical; }
label { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; color: var(--text); font-size: 13px; line-height: 1.5; }
label input, label textarea, label select { width: 100%; }
.check { flex-direction: row; align-items: center; }
.check input { width: auto; min-width: 20px; min-height: 20px; }
.formrow { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
fieldset { margin: 24px 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
legend { font-size: 13px; color: var(--muted); }
dialog { width: calc(100% - 32px); max-width: 640px; max-height: 90dvh; padding: 28px; border: 1px solid #a4c6d8; border-radius: var(--radius); color: var(--text); background: #f8fcff; box-shadow: 0 24px 96px #22455a24; }
dialog::backdrop { background: #193b5266; backdrop-filter: blur(8px); }
dialog small { display: block; }
#form-error, #error { color: var(--danger); }
#toast:not(:empty) { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 20; max-width: 90%; padding: 16px 24px; background: #ecfaff; border: 1px solid #8fcbdc; color: var(--text); border-radius: var(--radius-sm); box-shadow: 0 12px 48px #24546b20; }
.login { max-width: 540px; margin: max(5vh, 24px) auto; padding: 40px; background: radial-gradient(ellipse at 100% 0%, #b5edff70, transparent 60%), #ffffffed; border: 1px solid #b9dce9; border-radius: 24px; box-shadow: 0 24px 100px #38738c18; }
.login .brand { margin-bottom: 48px; }
.login h1 { font-size: clamp(32px, 5vw, 44px); line-height: 1.14; }
.login form { margin: 32px 0; }
.login button { width: 100%; }
.connection { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.connection>div { min-width: 0; }
.connection .actions { flex-shrink: 0; }
.note { padding: 16px 0; border-top: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.range { display: flex; flex-wrap: wrap; gap: 16px; }
code { color: #126b85; font-size: .95em; overflow-wrap: anywhere; }
.skip { position: absolute; top: -100px; left: 12px; z-index: 50; padding: 12px; color: #ffffff; background: var(--accent); border-radius: 6px; }
.skip:focus { top: 12px; }
@media (max-width: 1150px) {
  aside { width: 218px; padding-inline: 14px; }
  .shell { margin-left: 218px; }
  main { padding: 32px 24px; }
  .columns { grid-template-columns: 1.15fr 1fr; gap: 16px; }
  .metric, .panel { padding: 20px; }
  .metric .pill { margin-left: 0; }
  .heading { align-items: flex-start; }
  .heading>button { max-width: 165px; }
  .banner { flex-wrap: wrap; }
  .banner button { margin-left: 32px; }
  .connection { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 760px) {
  aside { position: static; width: 100%; padding: 20px 16px 12px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .brand { font-size: 27px; }
  .brand span { font-size: 21px; }
  .brand b { margin-left: 8px; }
  .workspace, .navlabel, .sidefoot { display: none; }
  nav { display: flex; overflow-x: auto; gap: 8px; margin-top: 20px; padding: 4px 2px 8px; scrollbar-width: thin; scrollbar-color: #9fc9d9 transparent; }
  nav button { flex-shrink: 0; width: auto; white-space: nowrap; padding: 12px; gap: 8px; }
  nav button.active { box-shadow: inset 0 -2px var(--accent); }
  .shell { margin-left: 0; }
  header { min-height: 64px; padding: 12px 16px; gap: 12px; font-size: 9px; }
  header>span { max-width: 50%; line-height: 1.7; }
  header>div { gap: 0; }
  header .avatar { display: none; }
  header button { padding-inline: 12px; font-size: 11px; }
  main { padding: 28px 16px; }
  .heading { flex-direction: column; gap: 16px; margin-bottom: 24px; }
  .heading>button { max-width: none; }
  h1 { font-size: 32px; letter-spacing: -1.3px; }
  .heading p { font-size: 13px; }
  .banner { padding: 16px; margin-bottom: 24px; gap: 12px; }
  .banner>div { flex: 1; }
  .banner button { margin: 0; }
  .metrics, .columns { grid-template-columns: 1fr; gap: 16px; }
  .metric h2 { margin-top: 20px; font-size: 36px; }
  .metric .pill { margin-left: auto; }
  .metric small { display: block; }
  .sectionhead { flex-wrap: wrap; }
  .sectionhead h2 { font-size: 16px; }
  .green h2 { font-size: 32px; }
  .counters div { padding-inline: 12px; }
  .counters span { font-size: 11px; }
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .media img, .media video { height: 150px; }
  .formrow { grid-template-columns: 1fr; }
  input, textarea, select { font-size: 16px; }
  .login { width: calc(100% - 32px); margin: 24px auto; padding: 28px 24px; border-radius: var(--radius); }
  .login .brand { margin-bottom: 40px; }
  footer { padding: 24px 16px; flex-direction: column; gap: 8px; font-size: 10px; }
  dialog { padding: 24px 20px; }
}
/* Short entrance and composited cyan halos; never hide content by default. */
@keyframes studio-arrive {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.metric, .panel, .content-card, .media {
  position: relative;
  transition: transform 220ms ease-out;
}
.metrics>.metric, .columns>.panel, .cards>.content-card, .media-grid>.media {
  animation: studio-arrive 420ms ease-out backwards;
}
.metrics>.metric:nth-child(2), .columns>.panel:nth-child(2),
.cards>.content-card:nth-child(2), .media-grid>.media:nth-child(2) { animation-delay: 50ms; }
.metrics>.metric:nth-child(3), .media-grid>.media:nth-child(3) { animation-delay: 100ms; }
/* Separate decoration from content, so controls remain unobstructed. */
.metric::after, .panel::before, .content-card::before, .media::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid #43bdd6;
  box-shadow: 0 8px 28px #23b9d522, inset 0 0 24px #49d9f00c;
  opacity: 0;
  transition: opacity 240ms ease-out;
}
button, .button { position: relative; isolation: isolate; }
button::after, .button::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid #35abc5;
  box-shadow: 0 0 18px #24c2e03b, inset 0 0 12px #a3f3ff30;
  opacity: 0;
  transition: opacity 180ms ease-out;
}
button:not(:disabled):focus-visible::after, .button:focus-visible::after,
.metric:focus-within::after, .panel:focus-within::before,
.content-card:focus-within::before, .media:focus-within::before { opacity: 1; }
/* Touch devices get a brief press response, without sticky hover effects. */
button:not(:disabled):active, .button:active { transform: scale(.98); }
button:not(:disabled):active::after, .button:active::after { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .metric:hover, .content-card:hover, .media:hover { transform: translateY(-3px); }
  .metric:hover::after, .panel:hover::before,
  .content-card:hover::before, .media:hover::before,
  button:not(:disabled):hover::after, .button:hover::after { opacity: 1; }
}
@media (hover: none) {
  button:hover, .button:hover { transform: none; }
  button:not(:disabled):active, .button:active { transform: scale(.98); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  button, .button, .metric, .panel, .content-card, .media { transform: none !important; }
}
@media (max-width: 760px) {
  .banner>div { flex: 1 0 calc(100% - 48px); }
  .banner>button { flex-basis: 100%; justify-content: flex-start; padding-left: 0; }
}
/* Personal portrait: the original photo stays private and keeps its proportions. */
.luna-profile { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, 1fr); align-items: center; gap: 32px; margin-bottom: 32px; background: radial-gradient(ellipse at 100% 0%, #b9efff60, transparent 65%), #ffffffed; }
.luna-frame { width: 100%; aspect-ratio: 3 / 2; padding: 6px; border: 1px solid #90dbe9; border-radius: 24px; background: #e9faff; box-shadow: 0 0 0 5px #d4f5fc60, 0 8px 28px #22b6d41a; overflow: hidden; }
.luna-frame img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 18px; }
.luna-placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed #a8d5e1; border-radius: 18px; }
.luna-placeholder>span { color: var(--accent); font-size: 36px; }
.luna-placeholder p { font-size: 11px; text-align: center; }
.luna-intro { flex: 1; min-width: 0; }
.luna-intro h2 { font-size: 25px; letter-spacing: -.8px; margin: 8px 0; }
.luna-intro p { font-size: 13px; }
.luna-orbit { position: absolute; top: 16px; right: 20px; color: var(--accent); font-size: 28px; pointer-events: none; }
.portrait-choice { margin: 0; font-size: 11px; color: var(--muted); }
.portrait-choice select { font-size: 12px; max-width: 230px; }
@media (max-width: 760px) {
  .luna-profile { gap: 24px; }
  .luna-frame { width: 100%; }
  .luna-orbit { top: auto; bottom: 20px; right: 20px; }
  .luna-intro h2 { font-size: 23px; }
  .portrait-choice select { font-size: 16px; max-width: 100%; }
}

@media (max-width: 1100px) {
  .luna-profile { grid-template-columns: minmax(0, 1fr); }
}
