:root {
  color-scheme: light;
  --page: #fafaf8;
  --surface: #fff;
  --text: #262624;
  --muted: #62625d;
  --line: #dcdcd6;
  --action: #353532;
  --action-hover: #202020;
  --soft: #e9e9e6;
  --header: #f1f1ef;
  --edge: 6px;
  --paper-shadow: 0 1px 2px #22221809, 0 4px 14px #22221804;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 16px/1.5 "Segoe UI", Arial, sans-serif;
  accent-color: var(--action);
}
header { background: var(--header); color: #222222; }
.bar, main { max-width: 1024px; margin: auto; padding: 0 22px; }
.bar {
  min-height: 72px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  font-weight: 750;
  letter-spacing: .045em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand i {
  display: none;
}
.product {
  color: #565654;
  border-left: 1px solid #ccccc9;
  padding-left: 18px;
  font-size: 14px;
}
#account {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  font-size: 13px;
}
#account > span { overflow-wrap: anywhere; }
#account button { background: #e1e1de; color: #222222; }
main { padding-top: 28px; padding-bottom: 72px; }
h1 {
  font-size: clamp(28px, 4.5vw, 32px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.025em;
  margin: 14px 0 18px;
  overflow-wrap: anywhere;
}
h2 { font-size: 20px; font-weight: 600; line-height: 1.4; margin: 0 0 18px; }
h3 { font-size: 16px; font-weight: 600; margin: 20px 0 10px; }
.head, .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}
.card {
  margin: 20px 0;
  padding: clamp(16px, 2vw, 26px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--edge);
  box-shadow: var(--paper-shadow);
}
.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.section-heading > div { min-width: 0; }
.section-heading h2 { margin: 0; }
.section-heading p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  height: 36px;
  border-radius: 9px;
  color: var(--action);
  background: var(--soft);
}
.section-icon svg { width: 19px; height: 19px; }
.project-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 20px;
}
.project-sections > .card { min-width: 0; margin-top: 0; }
.media-empty {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 16px;
  border: 1px dashed #c8c8c1;
  border-radius: var(--edge);
  background: var(--page);
}
.media-empty svg { flex: none; width: 24px; height: 24px; color: var(--muted); }
.media-empty p { margin: 0; }
.login { max-width: 430px; margin: 8vh auto; }
.login h1 { margin-top: 0; }
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin: 12px 0 16px;
  min-width: 0;
}
input, textarea, select {
  width: 100%;
  min-width: 0;
  margin-top: 6px;
  padding: 10px 12px;
  font: 400 16px/1.5 "Segoe UI", Arial, sans-serif;
  border: 1px solid #a3a3a0;
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}
input::placeholder, textarea::placeholder { color: #6c6c66; opacity: 1; }
input:user-invalid, textarea:user-invalid, select:user-invalid { border-color: #9b4439; }
textarea { resize: vertical; }
input[type="file"] { padding: 8px; font-size: 14px; }
input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 7px 10px;
  border: 0;
  border-radius: 4px;
  background: var(--soft);
  color: #363636;
  font: inherit;
  cursor: pointer;
}
button, .action {
  font: 600 14px/1.45 "Segoe UI", Arial, sans-serif;
  cursor: pointer;
  border: 0;
  border-radius: 6px;
  padding: 10px 15px;
  background: var(--action);
  color: #fff;
  text-decoration: none;
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
}
button:not(:disabled):hover, .action:hover { background: var(--action-hover); }
button:disabled { opacity: .55; cursor: wait; }
.quiet { color: var(--action); background: #f7f7f5; box-shadow: inset 0 0 0 1px #d0d0ca; }
.quiet:not(:disabled):hover { background: #edede9; }
#account button:not(:disabled):hover { background: #cececb; }
.danger { color: #94372d; background: #fceeea; }
.danger:not(:disabled):hover { background: #f7dfd9; }
a { color: #343434; text-underline-offset: 3px; overflow-wrap: anywhere; }
.muted, small { color: var(--muted); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 400;
  border-radius: 14px;
  background: #eeeeeb;
  color: #444442;
  padding: 4px 10px;
  max-width: 100%;
}
.chip::before { content: ""; flex: 0 0 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.error { background: #fbe9e6; color: #872f25; }
.chip.waiting { background: #fff0cf; color: #704b19; }
.chip.configured { background: #e2f0e9; color: #24563b; }
.listitem { padding: 18px 0; border-top: 1px solid #ddddd9; overflow-wrap: anywhere; }
.listitem a { font-weight: 600; }
.tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tools > * { margin: 4px 0; }
details { margin-top: 16px; }
summary { cursor: pointer; font-weight: 600; color: #363636; }
.connection { padding: 22px 0; border-top: 1px solid var(--line); }
.connection:first-of-type { border-top: 0; }
.connection h3 { margin: 0 0 6px; font-size: 18px; }
.connection .row h3 { margin: 0; }
.connection details { padding-left: 12px; border-left: 2px solid var(--line); }
.connection summary { padding-block: 3px; font-size: 14px; }
.connection small { max-width: 75ch; }
.detail-body > :last-child { margin-bottom: 0; }
.listitem small { display: block; }
.listitem button + button { margin-inline-start: 6px; }
.competitor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) auto;
  align-items: end;
  gap: 12px;
}
.competitor button { margin-bottom: 16px; }
#notice { position: fixed; margin: 0; }
#notice:not(:empty) {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  background: #30302d;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  max-width: calc(100vw - 32px);
  overflow-wrap: anywhere;
  box-shadow: 0 4px 18px #20201924;
}
.error-text { color: #922e24; }
button:focus-visible, a:focus-visible, summary:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid #484848;
  outline-offset: 3px;
}
[hidden] { display: none !important; }
.passport { margin: 22px 0; border-top: 1px solid var(--line); padding-top: 20px; }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin: 16px 0; }
legend { font-weight: 600; padding: 0 6px; }
.passport-item { margin: 8px 0 18px; }
.passport-item input[type=color] { max-width: 100px; height: 44px; }
.connection small { display: block; margin: 10px 0; }
@media (max-width: 900px) {
  .project-sections { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 650px) {
  .bar, main { padding-left: 16px; padding-right: 16px; }
  .bar { gap: 12px; }
  .product { display: none; }
  .card { padding: 16px; }
  .grid, .competitor { grid-template-columns: 1fr; gap: 2px; }
  .head, .row { align-items: flex-start; flex-wrap: wrap; }
  .head h1 { margin-bottom: 5px; }
  #account { font-size: 13px; gap: 10px; }
  input[type="file"] { font-size: 16px; }
  .competitor button { justify-self: start; }
}
@media (pointer: coarse) {
  button, .action, summary { min-height: 44px; }
}

body { min-height: 100vh; min-height: 100dvh; }
header { border-bottom: 1px solid var(--line); }
.bar { max-width: 1280px; }
.signed-in { display: grid; grid-template-columns: 216px minmax(0,1fr); align-items: start; }
.signed-in > header {
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: auto;
  border: 0; border-right: 1px solid var(--line);
}
.signed-in .bar {
  min-height: 100%; padding: 28px 16px 20px; flex-flow: column;
  align-items: stretch; flex-wrap: nowrap; gap: 0;
}
.signed-in .brand, .signed-in .product { margin: 0 9px; }
.signed-in .product { padding: 0; border: 0; margin-top: 4px; font-size: 12px; }
#navigation { margin-top: 30px; font-size: 14px; }
body:not(.signed-in) :is(#navigation,#account) { display: none; }
#navigation nav { display: grid; gap: 4px; }
#navigation nav button {
  display: flex; align-items: center; gap: 11px; text-align: left; padding: 10px 12px;
  border-radius: 5px; background: transparent; box-shadow: none; font-weight: 500; color: var(--muted);
}
#navigation nav svg, .tools button svg { width: 17px; height: 17px; flex: none; }
.tools button:has(svg) { display: inline-flex; align-items: center; gap: 8px; }
#navigation nav button:hover { background: #e7e7e4; color: var(--text); }
#navigation nav button[aria-current="page"], .rail-current {
  background: #e1e1dc; color: var(--text); font-weight: 600;
  box-shadow: inset 2px 0 0 var(--action);
}
.rail-current { margin: 0; padding: 9px 12px; border-radius: 4px; }
.current-project { margin: 0 9px 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.current-project > * { display: block; overflow-wrap: anywhere; }
.current-project strong { margin-top: 6px; }
.signed-in #account { margin: auto 8px 0; padding-top: 16px; border-top: 1px solid var(--line); align-items: start; flex-direction: column; gap: 10px; }
.account-identity { overflow-wrap: anywhere; min-width: 0; }
.account-identity strong, .account-identity small { display: block; }
.account-identity small { margin-top: 2px; font-size: 12px; }
#account button { padding: 6px 11px; background: transparent; }
main { width: 100%; min-width: 0; }
.signed-in main { max-width: 1120px; margin: 0; padding: 16px 24px 64px; }
.project-navigation {
  position: relative; display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.project-control {
  display: inline-flex; align-items: center; padding: 7px 11px; min-height: 36px;
  border: 1px solid var(--line); border-radius: 4px; background: var(--surface);
  color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600;
}
.project-control:hover, .project-switcher[open] summary { background: var(--soft); border-color: #bdbdb6; }
.project-switcher summary { list-style: none; }
.project-switcher summary::-webkit-details-marker { display: none; }
.project-switcher summary::after {
  content: ""; width: 7px; height: 7px; border: solid currentColor;
  border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); margin-left: 10px;
}
.project-switcher[open] summary::after { transform: translateY(2px) rotate(225deg); }
.project-switcher { margin: 0; }
.project-options {
  position: absolute; top: calc(100% - 8px); left: 0; z-index: 2;
  width: min(100%, 26rem); max-height: min(22rem, 55vh); overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 5px;
  box-shadow: 0 6px 20px #0001; padding: 5px;
}
.project-options a { display: block; border-radius: 3px; padding: 9px; font-size: 14px; text-decoration: none; }
.project-options a:hover, .project-options a:focus-visible { background: var(--soft); }
.project-options p { margin: 8px; }
.project-caption { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
@media (pointer: coarse) {
  .project-control, .project-options a { min-height: 44px; }
}
.project-pane h1, .head h1 { font-size: clamp(28px,3vw,41px); letter-spacing: -.045em; margin: 24px 0; }
.head { flex-wrap: wrap; }
.list-heading { display: flex; align-items: center; gap: 10px; min-width: 0; }
.project-count {
  font-size: 13px; line-height: 1.5; padding: 1px 8px; color: var(--muted);
  background: var(--soft); border-radius: 12px; font-variant-numeric: tabular-nums;
}
.project-directory {
  margin-top: 8px; background: var(--surface); border: 1px solid var(--line);
  border-top: 2px solid var(--action); border-radius: var(--edge); box-shadow: var(--paper-shadow);
}
.project-directory > p { padding: 0 18px; }
.directory-row {
  display: grid; grid-template-columns: 35px minmax(0,1fr) 16px; gap: 13px;
  align-items: center; padding: 15px 18px; color: var(--text); text-decoration: none;
}
.directory-row + .directory-row { border-top: 1px solid var(--line); }
.directory-row:hover, .directory-row:focus-visible { background: #f3f3ef; }
.directory-info strong, .directory-info small { display: block; overflow-wrap: anywhere; }
.directory-info strong { font-size: 16px; font-weight: 600; }
.directory-info small { margin-top: 2px; font-size: 13px; }
.directory-row > svg:first-child {
  width: 35px; height: 35px; padding: 8px; background: var(--page);
  border: 1px solid var(--line); border-radius: var(--edge);
}
.directory-row > svg:last-child { width: 15px; height: 15px; color: var(--muted); }
.project-pane, .head, .tools, .connection, .card { min-width: 0; overflow-wrap: anywhere; }
.card, .folder-sheet { border-top: 2px solid var(--action); }
.detail-body > .section-heading:first-child, .detail-body > h2:first-child { display: none; }
.folder-tabs { display: flex; flex-wrap: wrap; gap: 3px; }
.folder-tabs button {
  position: relative; isolation: isolate; background: transparent; color: #444;
  border-radius: 0; font-size: 14px; padding: 10px 19px 10px 12px;
}
.folder-tabs button::before {
  content: ""; position: absolute; z-index: -1; inset: 0; background: #e6e6e3;
  border-radius: 5px 7px 0 0; clip-path: polygon(0 0,calc(100% - 8px) 0,100% 100%,0 100%);
}
.folder-tabs button, .folder-tabs button:not(:disabled):hover { background: transparent; box-shadow: none; }
.folder-tabs button:hover::before { background: #d8d8d5; }
.folder-tabs button[aria-pressed=true] { color: white; }
.folder-tabs button[aria-pressed=true]::before { background: var(--action); }
.folder-sheet { padding: 0 22px; margin: 0; background: white; border: 1px solid var(--line); border-top: 2px solid var(--action); border-radius: 0 3px var(--edge) var(--edge); box-shadow: var(--paper-shadow); }
.read-row { display: grid; grid-template-columns: minmax(120px,1fr) minmax(0,2.3fr); gap: 10px 18px; padding: 17px 0; align-items: baseline; }
.read-row + .read-row { border-top: 1px solid var(--line); }
.read-row > span { font-size: 13px; }
.read-value { white-space: pre-line; overflow-wrap: anywhere; max-width: 72ch; }
.read-value > div + div { margin-top: 5px; }
.read-value input[type=color] { width: 25px; height: 22px; padding: 0; margin: 0 8px 0 0; vertical-align: middle; }
.read-row.lead { display: block; }
.read-row.lead .read-value { margin-top: 4px; font-size: clamp(21px,2.6vw,29px); font-weight: 500; letter-spacing: -.025em; }
input[type=checkbox] { width: auto; margin: 0 8px; }
.login { border-top: 3px solid var(--action); padding: clamp(22px,4vw,34px); }
.login-title { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; }
.login-title svg { width: 24px; height: 24px; flex: none; }
.login-title h1 { margin: 0; font-size: clamp(24px,3vw,30px); }
.login button[type=submit] { width: 100%; margin-top: 4px; }
@media (max-width: 760px) {
  .signed-in { display: block; }
  .signed-in > header { height: auto; position: static; border: 0; border-bottom: 1px solid var(--line); }
  .signed-in .bar { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 13px 16px; gap: 7px; }
  .signed-in .brand { margin: 0; }
  .signed-in .product, .current-project { display: none; }
  #navigation { grid-row: 2; grid-column: 1/-1; margin: 0; }
  #navigation nav { display: flex; flex-wrap: wrap; gap: 2px; }
  #navigation nav button { padding: 7px 8px; gap: 6px; }
  .signed-in #account { grid-row: 1; grid-column: 2; margin: 0; padding: 0; border: 0; align-items: center; flex-direction: row; justify-content: flex-end; gap: 8px; }
  .signed-in .account-identity { max-width: 150px; text-align: right; }
  .signed-in #account button { padding: 4px 9px; }
  .signed-in main { padding: 14px 16px 48px; }
  .head { gap: 0 10px; }
  .head .tools { margin-bottom: 10px; }
  .folder-sheet { padding: 0 13px; }
  .folder-tabs button { padding: 8px 9px; font-size: 13px; }
  .read-row { display: block; }
  .read-value { margin-top: 4px; }
}
@media (max-width: 480px) {
  #navigation nav svg { display: none; }
  #navigation nav:has(> button:nth-child(5)) {
    display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 3px;
  }
  #navigation nav:has(> button:nth-child(5)) > button {
    grid-column: span 2; justify-content: center; padding-inline: 4px;
  }
  #navigation nav:has(> button:nth-child(5)) > button:nth-child(n+4) { grid-column: span 3; }
  .folder-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 2px; }
  .folder-tabs button { padding-inline: 6px; line-height: 1.3; }
  .signed-in .account-identity { max-width: 95px; font-size: 12px; }
  .signed-in .account-identity small { font-size: 11px; }
  .signed-in .bar { grid-template-columns: minmax(0,1fr) auto; }
  .signed-in .brand { font-size: 14px; }
  .head { row-gap: 8px; padding-block: 16px; }
  .head h1, .head .tools { margin: 0; }
  .directory-row { gap: 10px; padding: 12px; }
}
