* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --bg: #f4f6fa;
  --surface: #fff;
  --surface-2: #f3f6fb;
  --surface-3: #eaf0f7;
  --text: #16233a;
  --muted: #53657c;
  --faint: #69798c;
  --line: #dbe3ed;
  --accent: #265dd9;
  --accent-soft: #eaf1ff;
  --green: #087767;
  --green-bg: #def5eb;
  --violet: #6741bf;
  --violet-bg: #f0eaff;
  --amber: #946007;
  --amber-bg: #fff2d3;
  --shadow: 0 14px 38px -25px #1b345752;
  --font: -apple-system,BlinkMacSystemFont,"Inter","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  --mono: "SF Mono",Menlo,Monaco,Consolas,monospace;
  --radius: 14px;
}

:root[data-theme=dark] {
  color-scheme: dark;
  --bg: #0c1423;
  --surface: #121e30;
  --surface-2: #172539;
  --surface-3: #1e2f45;
  --text: #ecf2ff;
  --muted: #adbbce;
  --faint: #9cacc0;
  --line: #2b3c53;
  --accent: #8aafff;
  --accent-soft: #1c3155;
  --green: #7edcc6;
  --green-bg: #153a35;
  --violet: #c4acff;
  --violet-bg: #302644;
  --amber: #f5d28b;
  --amber-bg: #3c3322;
  --shadow: 0 14px 38px -22px #0009;
}

html,body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  overflow-wrap: break-word;
}

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

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

button {
  cursor: pointer;
}

button {
  border: 0;
  background: none;
  padding: 0;
}

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

button:disabled {
  cursor: default;
  opacity: .55;
}

button.btn:disabled,button.btn:disabled:hover {
  color:var(--muted);
  background:var(--surface-3);
  border-color:var(--line);
  box-shadow:none;
  opacity:1;
}

.demo-consent-hint {display:block;margin:4px 0 8px;color:var(--muted);font-size:13px;line-height:1.6}
.demo-consent-hint[hidden] {display:none}

a,button,input,select,textarea {
  touch-action: manipulation;
}

button,select,a {
  transition: background .16s,color .16s,border-color .16s,box-shadow .16s,transform .16s;
}

button:active:not(:disabled),.btn:active {
  transform: translateY(1px);
}

:focus-visible {
  outline: 3px solid #4b93fd;
  outline-offset: 3px;
}

section[tabindex="-1"]:focus,main[tabindex="-1"]:focus,#dialog-title:focus {
  outline: none;
}

::selection {
  background: #5481ea;
  color: #fff;
}

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

strong,b {
  font-weight: 650;
}

svg {
  flex-shrink: 0;
  vertical-align: middle;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none!important;
}

button,select {
  line-height: 1.35;
}

.sr-only,.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip:focus {
  position: fixed;
  top: 8px;
  left: 12px;
  z-index: 200;
  background: var(--surface);
  color: var(--accent);
  padding: 12px 20px;
  border-radius: 8px;
}

.btn,.icon-btn,.header-demo,.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  line-height: 1.25;
}

.btn {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 17px;
  min-height: 42px;
  font-size: 14px;
}

.btn.primary {
  background: #2e61dc;
  color: white;
  border-color: #2e61dc;
  box-shadow: 0 3px 8px #234eb023;
}

.btn.primary:hover {
  background: #2454c7;
}

.btn.secondary,.btn.ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

.btn.secondary:hover,.btn.ghost:hover,.icon-btn:hover {
  background: var(--surface-2);
  border-color: var(--faint);
}

.btn.small {
  min-height: 36px;
  font-size: 13px;
  padding: 8px 12px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
}

.text-link {
  color: var(--accent);
  font-size: 14px;
  justify-content: flex-start;
  min-height: 38px;
}

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

.brand,.brand-word {
  display: inline-flex;
  align-items: center;
}

.brand {
  gap: 10px;
  line-height: 1;
  white-space: nowrap;
}

.brand img {
  border-radius: 10px;
  box-shadow: 0 3px 7px #204eae25;
}

.brand-word {
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.brand-word b {
  font-size: 21px;
  letter-spacing: .08em;
  font-weight: 750;
}

.brand-word small {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 8px;
  letter-spacing: .22em;
  line-height: 1;
}

.brand.compact img {
  width: 31px;
  height: 31px;
}

.brand.compact .brand-word b {
  font-size: 17px;
}

.brand.compact .brand-word small {
  font-size: 7px;
}

.brand-home {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.pill,.code-label,.mono-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.3;
  white-space: nowrap;
}

.pill {
  padding: 4px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: var(--surface-3);
  color: var(--muted);
}

.pill.green,.tone-icon.green {
  background: var(--green-bg);
  color: var(--green);
}

.pill.amber,.tone-icon.amber {
  background: var(--amber-bg);
  color: var(--amber);
}

.pill.violet,.tone-icon.violet {
  background: var(--violet-bg);
  color: var(--violet);
}

.pill.blue,.tone-icon.blue {
  background: var(--accent-soft);
  color: var(--accent);
}

.pill.muted {
  background: var(--surface-3);
  color: var(--muted);
}

.tone-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  font-style: normal;
}

.mono-code {
  font-family: var(--mono);
  font-weight: 550;
  letter-spacing: .055em;
  color: var(--muted);
  font-size: 11px;
}

.tag-row,.row,.dialog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.subtle,.form-explain {
  color: var(--muted);
  line-height: 1.7;
}

.empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
  padding: 34px 18px;
  color: var(--muted);
}

.empty>span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--faint);
}

.empty strong {
  color: var(--text);
  font-size: 15px;
}

.empty p {
  font-size: 13px;
  line-height: 1.65;
}

.segmented {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
}

.segmented button {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  color: var(--muted);
}

.segmented button[aria-pressed=true] {
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 1px 5px #1728451f;
}

.field,.form-stack {
  display: grid;
  gap: 8px;
}

.field {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.form-stack {
  gap: 17px;
}

.field input,.field textarea,.field select,.form-input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--text);
  font-weight: 450;
  min-height: 43px;
}

.field input::placeholder,.field textarea::placeholder {
  color: var(--faint);
}

.field textarea {
  min-height: 84px;
  resize: vertical;
}

.form-stack>.btn {
  justify-self: start;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  max-width: calc(100% - 30px);
  background: #152339;
  color: #fff;
  border: 1px solid #3b4f68;
  border-radius: 10px;
  padding: 11px 17px;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 10px 30px #0b122633;
  z-index: 150;
  text-align: center;
  pointer-events: none;
}

.startup {
  display: grid;
  place-content: center;
  gap: 12px;
  min-height: 75vh;
  text-align: center;
}

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

body.modal-open {
  overflow: hidden;
}

dialog {
  margin: auto;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: 0 28px 95px #040b1e48;
  color: var(--text);
  width: min(540px,calc(100% - 34px));
  max-height: min(84dvh,880px);
  overflow: auto;
  overscroll-behavior: contain;
}

dialog.wide {
  width: min(760px,calc(100% - 34px));
}

dialog::backdrop {
  background: rgb(6 14 29 / .60);
  backdrop-filter: blur(3px);
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 24px 25px 17px;
  border-bottom: 1px solid var(--line);
}

.dialog-kicker {
  display: block;
  color: var(--accent);
  font-size: 11px;
  font-weight: 650;
  margin-bottom: 7px;
  letter-spacing: .04em;
}

.dialog-header h2 {
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: -.025em;
}

.dialog-x {
  flex: none;
  width: 36px;
  height: 36px;
}

.dialog-body {
  padding: 22px 25px 25px;
}

.dialog-actions {
  justify-content: flex-end;
  margin-top: 23px;
}

.body-copy,.form-explain {
  font-size: 14px;
  line-height: 1.8;
  margin: 12px 0 18px;
}

.form-explain:first-child {
  margin-top: 0;
}

.meta-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.meta-list>div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.meta-list dt {
  color: var(--muted);
}

.meta-list dd {
  margin: 0;
}

.success-block {
  display: flex;
  align-items: center;
  gap: 14px;
  line-height: 1.7;
}

.success-block i {
  color: var(--green);
}

@media(max-width:700px) {
  .btn,.btn.small,.icon-btn {
    min-height: 44px;
  }
  .icon-btn {
    min-width: 44px;
  }
  .dialog-header {
    padding: 19px 17px 13px;
  }
  .dialog-body {
    padding: 17px;
  }
  .dialog-x {
    height: 42px;
  }
  .field input,.field textarea,.field select {
    font-size: 16px;
  }
  .toast {
    bottom: max(17px,env(safe-area-inset-bottom));
  }
  .in-workbench .toast {
    bottom: calc(78px + env(safe-area-inset-bottom));
  }
  .segmented button,.text-link {
    min-height: 42px;
  }
  dialog,dialog.wide {
    width: min(100% - 20px,540px);
    max-height: 88dvh;
    border-radius: 14px;
  }
}

@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation-duration: .001ms!important;
    animation-iteration-count: 1!important;
    transition-duration: .001ms!important;
    scroll-behavior: auto!important;
  }
}
