:root {
  --ink: #173e68;
  --blue: #245e98;
  --paper: #f7f5e8;
  --pale: #e2edf7;
  --green: #42634b;
  --line: #b5c8d8;
  --muted: #536b7e;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    17px/1.5 ui-sans-serif,
    system-ui,
    -apple-system,
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
.button {
  border: 2px solid var(--ink);
  border-radius: 13px;
  background: var(--blue);
  color: white;
  padding: 11px 18px;
  font-weight: 750;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:hover,
.button:hover {
  filter: brightness(0.95);
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button.quiet,
.quiet {
  background: transparent;
  color: var(--ink);
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #477db6;
  outline-offset: 4px;
}
a {
  color: var(--ink);
  text-underline-offset: 4px;
}
header,
main,
footer {
  max-width: 1440px;
  margin: auto;
  padding: 28px 40px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--ink);
  gap: 20px;
}
header nav {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.brand {
  text-decoration: none;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -1px;
}
.brand span {
  display: block;
  font-size: 12px;
  letter-spacing: 2px;
  font-weight: 750;
  text-transform: uppercase;
}
main {
  padding-top: 44px;
}
.eyebrow {
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 2px;
}
.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
h1 {
  font-size: clamp(40px, 5.4vw, 76px);
  line-height: 1.03;
  letter-spacing: -3px;
  margin: 20px 0;
}
h2 {
  font-size: 25px;
  line-height: 1.2;
  margin: 12px 0;
}
h3 {
  font-size: 19px;
}
.intro {
  font-size: 21px;
  max-width: 730px;
  margin: 15px 0 36px;
  color: var(--muted);
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
}
.journey {
  min-width: 0;
}
#goal-form,
.next,
.operator-panel,
.signin {
  border: 2px solid var(--ink);
  border-radius: 22px;
  padding: 26px;
  background: #fffdf4;
}
#goal-form > label {
  font-weight: 800;
  font-size: 20px;
}
textarea,
input:not([type="checkbox"]),
select {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  padding: 11px 12px;
  margin-top: 7px;
}
textarea {
  resize: vertical;
}
label {
  display: block;
  margin-bottom: 15px;
}
input[type="checkbox"] {
  width: 19px;
  height: 19px;
  vertical-align: middle;
  margin-right: 9px;
}
#language {
  width: auto;
  margin: 0;
  padding: 5px;
}
.goal-options {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}
.goal-options label {
  flex: 1;
  min-width: 0;
}
.goal-options button {
  flex: none;
}
details {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 15px;
}
summary {
  cursor: pointer;
  font-weight: 750;
}
details p {
  font-size: 15px;
  color: var(--muted);
}
.flow {
  list-style: none;
  margin: 26px 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.flow li {
  min-width: 0;
}
.node {
  background: transparent;
  color: var(--ink);
  padding: 15px 10px;
  width: 100%;
  height: 100%;
  min-height: 145px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
  border-color: var(--line);
}
.node .number {
  font-size: 12px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 26px;
  height: 26px;
}
.node strong {
  font-size: 16px;
}
.node-summary {
  font-size: 12px;
  font-weight: 450;
}
.node[aria-current="step"] {
  background: var(--blue);
  color: white;
  border-color: var(--ink);
}
.node.complete {
  border-color: var(--blue);
  background: var(--pale);
}
.node.complete .number {
  background: var(--blue);
  color: white;
}
.next {
  min-height: 210px;
}
.next p {
  color: var(--muted);
}
.operator-panel {
  background: var(--pale);
  position: sticky;
  top: 24px;
  align-self: start;
  padding: 24px;
}
.panel-head {
  display: flex;
  gap: 12px;
  align-items: center;
}
.panel-head h2 {
  font-size: 20px;
  margin: 0;
}
.panel-head span:not(.operator-mark) {
  font-size: 12px;
  color: var(--muted);
}
.operator-mark {
  border: 2px solid var(--ink);
  border-radius: 14px;
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 25px;
  flex: none;
}
.state {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 30px;
  font-size: 13px;
  font-weight: 800;
  padding: 5px 12px;
  margin-top: 24px;
  background: var(--paper);
}
dl {
  margin: 20px 0;
}
dt {
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 17px;
}
dd {
  margin: 3px 0;
  font-size: 15px;
}
progress {
  width: 100%;
  height: 8px;
  accent-color: var(--blue);
}
.controls {
  display: flex;
  gap: 8px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.controls button {
  padding: 10px 13px;
  flex: 1;
}
.muted {
  color: var(--muted);
  font-size: 12px;
}
.history {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 300px;
  overflow: auto;
}
.history li {
  border-left: 2px solid var(--line);
  padding: 0 0 17px 12px;
  margin-left: 4px;
  font-size: 13px;
}
.history button {
  border: 0;
  padding: 0;
  background: none;
  color: var(--blue);
  font-size: 11px;
  text-align: left;
  overflow-wrap: anywhere;
}
.history time {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.text-button {
  display: block;
  text-align: left;
  background: none;
  border: none;
  padding: 0;
  color: var(--ink);
  text-decoration: underline;
  font-size: 14px;
  margin-top: 18px;
}
.actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.notice {
  background: var(--pale);
  border: 1px solid var(--blue);
  border-radius: 12px;
  padding: 14px;
  margin: 18px 0;
  overflow-wrap: anywhere;
}
.signin {
  max-width: 600px;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 55px;
  font-size: 13px;
  border-top: 1px solid var(--line);
}
dialog {
  border: 2px solid var(--ink);
  border-radius: 24px;
  padding: 28px;
  background: var(--paper);
  color: var(--ink);
  width: min(860px, calc(100% - 24px));
  max-height: 90dvh;
  overflow: auto;
}
dialog::backdrop {
  background: #09203880;
  backdrop-filter: blur(4px);
}
.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
.drawer-head h2 {
  margin: 0;
}
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.tabs button {
  background: none;
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 14px;
}
.tabs button[aria-selected="true"] {
  background: var(--blue);
  color: white;
}
#detail-content {
  padding-top: 15px;
}
#detail-content pre,
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    12px/1.5 ui-monospace,
    monospace;
  background: var(--pale);
  border-radius: 10px;
  padding: 15px;
}
#detail-content article {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.close-connect {
  float: right;
}
#scopes label {
  font-size: 14px;
  margin: 8px 0;
}
fieldset {
  border: none;
  padding: 8px 0;
}
.visually-hidden {
  position: absolute;
  clip: rect(0, 0, 0, 0);
  width: 1px;
  height: 1px;
  overflow: hidden;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1099px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .operator-panel {
    position: static;
  }
  .panel-head {
    max-width: 400px;
  }
  .controls {
    max-width: 500px;
  }
  .history {
    max-height: 220px;
  }
}
@media (max-width: 719px) {
  header,
  main,
  footer {
    padding-left: 20px;
    padding-right: 20px;
  }
  header {
    align-items: flex-start;
    flex-direction: column;
  }
  header nav {
    font-size: 13px;
    gap: 12px;
  }
  h1 {
    letter-spacing: -1.5px;
  }
  .title-row {
    align-items: flex-start;
  }
  .title-row > button {
    font-size: 12px;
    margin-top: 20px;
    padding: 8px 10px;
  }
  .intro {
    font-size: 18px;
  }
  .goal-options {
    align-items: stretch;
    flex-direction: column;
    gap: 3px;
  }
  .goal-options > button {
    align-self: flex-start;
  }
  .flow {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .node {
    min-height: 0;
    flex-direction: row;
    align-items: center;
    padding: 12px;
  }
  .node strong {
    min-width: 95px;
  }
  .number {
    flex: none;
  }
  .node-summary {
    margin-left: auto;
    text-align: right;
  }
  .operator-panel,
  #goal-form,
  .next {
    padding: 20px;
  }
  .controls {
    position: static;
    background: var(--pale);
    padding: 8px 0;
    z-index: 2;
  }
  .tabs button {
    flex: 1;
    padding: 9px;
  }
  dialog {
    border-radius: 17px;
    padding: 20px;
    max-height: 96dvh;
  }
  .layout {
    gap: 18px;
  }
  .actions {
    flex-direction: column;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

.node.complete[aria-current="step"] {
  background: var(--blue);
  color: white;
}
.node.complete[aria-current="step"] .number {
  background: var(--paper);
  color: var(--ink);
}

#result-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.mobile-start {
  display: none;
}
@media (max-width: 1099px) {
  .mobile-start {
    display: inline-flex;
    margin-top: 18px;
  }
}

.plan-card {
  border: 2px solid var(--line);
  border-radius: 22px;
  background: #fffdf4;
  padding: 24px;
  margin-bottom: 24px;
}
#dot-plan {
  padding-left: 24px;
}
#dot-plan li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.step-status {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
#dot-plan details {
  font-size: 13px;
  margin-top: 8px;
  padding-top: 8px;
  border: 0;
}
#dot-plan code {
  overflow-wrap: anywhere;
}

.setup-disclosure {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin: 16px 0;
  overflow-wrap: anywhere;
}
.setup-disclosure article,
#delegation-list article {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  overflow-wrap: anywhere;
}
.setup-disclosure h3 {
  margin: 0 0 6px;
  font-size: 15px;
}
.setup-disclosure p {
  margin: 6px 0;
  font-size: 14px;
}
#scopes code {
  display: block;
  padding: 4px 0;
  overflow-wrap: anywhere;
}
#revoke-review {
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 16px;
  margin-top: 20px;
  overflow-wrap: anywhere;
}
#manage-access {
  font-size: 14px;
}

.dot-inbox {
  margin: 20px 0;
  padding: 16px 0;
  border-block: 1px solid var(--line);
}
.dot-inbox h3 {
  margin: 0 0 8px;
  font-size: 16px;
}
.dot-inbox #queue-status {
  font-weight: 700;
  overflow-wrap: anywhere;
}
.dot-inbox ul {
  padding-left: 20px;
}
.dot-inbox li {
  margin-block: 10px;
  overflow-wrap: anywhere;
}
.dot-inbox a {
  color: inherit;
  text-underline-offset: 3px;
}

.prepared-tasks {
  margin: 30px 0;
}
.prepared-tasks h2 {
  margin: 0 0 8px;
  font-size: 26px;
}
.prepared-intro {
  max-width: 850px;
  margin: 0 0 20px;
  color: var(--muted);
}
.prepared-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.prepared-card {
  min-width: 0;
  background: #fffef7;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  overflow-wrap: anywhere;
}
.prepared-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: start;
  margin-bottom: 18px;
}
.prepared-card h3 {
  margin: 0;
  font-size: 21px;
  line-height: 1.3;
  flex: 1 1 220px;
}
.prepared-status {
  display: inline-block;
  background: var(--pale);
  color: var(--ink);
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 750;
}
.prepared-meta {
  display: grid;
  gap: 12px;
  margin: 0 0 16px;
}
.prepared-meta dt {
  font-size: 13px;
  font-weight: 800;
  color: var(--green);
}
.prepared-meta dd {
  margin: 3px 0 0;
  font-size: 14px;
}
.prepared-details {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.prepared-details summary {
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}
.prepared-details p,
.prepared-details h4,
.prepared-help,
.prepared-progress {
  font-size: 13px;
  line-height: 1.5;
}
.prepared-details h4 {
  margin: 18px 0 4px;
}
.prepared-scopes {
  font-family: ui-monospace, monospace;
}
.prepared-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.prepared-form label,
.prepared-handoff {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 650;
}
.prepared-form select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.prepared-form .prepared-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  font-weight: 500;
}
.prepared-consent input {
  flex: 0 0 auto;
  width: 18px;
  margin: 4px 0 0;
}
.prepared-help {
  margin: 3px 0;
  color: var(--muted);
}
.prepared-progress {
  margin: 14px 0;
}
.prepared-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 16px 0;
  font-size: 13px;
}
.prepared-links p {
  width: 100%;
  margin: 3px 0;
}
.prepared-card button,
.prepared-card .button {
  font-size: 14px;
  max-width: 100%;
}
.prepared-card > .prepared-help {
  margin: 14px 0;
}
.prepared-handoff {
  margin-top: 14px;
}
.prepared-handoff textarea {
  width: 100%;
  min-width: 0;
  font:
    12px/1.5 ui-monospace,
    monospace;
}
.prepared-card [hidden] {
  display: none !important;
}
@media (max-width: 850px) {
  .prepared-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 420px) {
  .prepared-card {
    padding: 16px;
  }
  .prepared-card h3 {
    font-size: 19px;
  }
}

/* Keep the actual goal/plan/progress first; setup stays available on demand. */
.connection-details,.practice-reviews { margin:0 0 18px; }
.connection-details>summary,.practice-reviews>summary { cursor:pointer;color:var(--muted);font-size:0.9rem; }
.practice-reviews[open] { border-bottom:1px solid var(--line);padding-bottom:16px; }

html[data-observer="true"] #goal-form,
html[data-observer="true"] .practice-reviews,
html[data-observer="true"] #saved,
html[data-observer="true"] .controls,
html[data-observer="true"] #queue-dot,
html[data-observer="true"] #agent-handoff,
html[data-observer="true"] #approval,
html[data-observer="true"] #open-brief { display:none!important; }

/* A small, human connection screen. No machine records or credential-like labels. */
#delegations-dialog {
  width: min(560px, calc(100% - 24px));
  font-size: 15px;
  line-height: 1.5;
}
#delegations-dialog h2 { font-size: 24px; margin: 4px 44px 8px 0; }
#delegations-dialog h3 { font-size: 17px; margin: 0 0 6px; }
#delegations-dialog > p { margin: 0 0 18px; }
#delegations-dialog .close-connect { padding: 6px 12px; min-height: 36px; }
#delegation-list .dot-access-card {
  padding: 16px;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--pale);
}
.dot-access-card p { margin: 6px 0; }
.dot-access-card details { margin: 12px 0; }
.dot-access-card ul { padding-left: 22px; }
.dot-access-card[data-state="active"] h3::before {
  content: "";
  display: inline-block;
  width: 9px; height: 9px; margin-right: 8px;
  background: var(--green); border-radius: 50%;
}
.dot-access-empty { padding: 16px 0; color: var(--muted); }
#past-connections { margin: 16px 0; }
.connection-removal { font-size: 13px; margin-top: 20px; }
#revoke-review { padding: 16px; border: 1px solid var(--line); border-radius: 14px; }
#revoke-review .actions { gap: 8px; }
#other-dot-setup { font-size: 13px; }
#scopes p { margin: 4px 0; }

/* Immediate, honest feedback; no estimated completion or artificial progress. */
.loading-spinner { display:inline-block; width:16px; height:16px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:oruk-loading .8s linear infinite; flex:0 0 auto; }
.opening-feedback { display:flex; align-items:center; gap:10px; font-size:14px; font-weight:500; line-height:1.5; color:var(--ink); }
.opening-feedback[hidden], .pickup-status[hidden] { display:none; }
.page-opening { padding:12px 0; }
[aria-busy="true"] { cursor:progress; }
@keyframes oruk-loading { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) { .loading-spinner { animation:none; } }
