:root {
  --ach-accent: #17a3b2;
  --ach-accent-hover: #1cc2d5;
  --ach-accent-active: #1dcade;
  --ach-accent-dark: #005580;
  --ach-header: #b9e1e6;
  --ach-ink: #333333;
  --ach-muted: #666666;
  --ach-panel: #ffffff;
  --ach-border: #dee2e6;
  --ach-soft: #f8f9fa;
  --ach-warning: #f6c226;
  --ach-danger: #ae303c;
  --ach-tag: #f8930a;
  --ach-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.18);
}

.ach-root {
  color: var(--ach-ink);
  font-family: Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", sans-serif;
  font-size: 11pt;
  line-height: 1.45;
}

.ach-launcher {
  align-items: center;
  background: var(--ach-accent);
  border: 0;
  border-radius: 50%;
  bottom: 22px;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.24);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  font-size: 28px;
  font-weight: 700;
  height: 58px;
  justify-content: center;
  position: fixed;
  right: 22px;
  width: 58px;
  z-index: 2147483000;
}

.ach-launcher:hover,
.ach-launcher:focus-visible {
  background: var(--ach-accent-hover);
  outline: 3px solid rgba(23, 163, 178, 0.22);
  outline-offset: 3px;
}

.ach-panel {
  background: var(--ach-panel);
  border: 1px solid var(--ach-border);
  border-radius: 8px;
  bottom: 92px;
  box-shadow: var(--ach-shadow);
  display: none;
  max-height: min(720px, calc(100vh - 124px));
  overflow: hidden;
  position: fixed;
  right: 22px;
  width: min(440px, calc(100vw - 32px));
  z-index: 2147483000;
}

.ach-root[data-open="true"] .ach-panel {
  display: flex;
  flex-direction: column;
}

.ach-header {
  align-items: center;
  background: var(--ach-header);
  border-bottom: 1px solid var(--ach-border);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px 16px;
}

.ach-title {
  font-size: 16.25px;
  font-weight: 700;
  margin: 0;
}

.ach-subtitle {
  color: var(--ach-muted);
  font-size: 12px;
  margin-top: 2px;
}

.ach-icon-button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--ach-ink);
  cursor: pointer;
  display: inline-flex;
  font-size: 18px;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.ach-icon-button:hover,
.ach-icon-button:focus-visible {
  background: #eeeeee;
  border-color: #cccccc;
  outline: none;
}

.ach-search {
  border-bottom: 1px solid var(--ach-border);
  padding: 14px 16px;
}

.ach-search-row {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr auto;
}

.ach-input {
  border: 1px solid #ced4da;
  border-radius: 6px;
  color: var(--ach-ink);
  font: inherit;
  min-width: 0;
  padding: 10px 11px;
}

.ach-input:focus {
  border-color: var(--ach-accent);
  box-shadow: 0 0 0 0.2rem rgba(23, 163, 178, 0.22);
  outline: none;
}

.ach-submit {
  background: var(--ach-accent);
  border: 1px solid var(--ach-accent);
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0 14px;
  white-space: nowrap;
}

.ach-submit:hover,
.ach-submit:focus-visible {
  background: var(--ach-accent-hover);
  border-color: var(--ach-accent-hover);
  outline: 3px solid rgba(23, 163, 178, 0.18);
  outline-offset: 2px;
}

.ach-context {
  color: var(--ach-muted);
  font-size: 12px;
  margin-top: 8px;
}

.ach-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.ach-suggestion {
  background: #ffffff;
  border: 1px solid var(--ach-border);
  border-radius: 6px;
  color: var(--ach-ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  padding: 5px 8px;
}

.ach-suggestion:hover,
.ach-suggestion:focus-visible {
  border-color: var(--ach-accent);
  color: var(--ach-accent-dark);
  outline: none;
}

.ach-results {
  overflow: auto;
  padding: 12px 12px 14px;
}

.ach-empty,
.ach-error,
.ach-loading {
  color: var(--ach-muted);
  padding: 18px 6px;
}

.ach-error {
  color: #8a3d2a;
}

.ach-result-section-label {
  color: var(--ach-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 10px 2px 6px;
  text-transform: uppercase;
}

.ach-result-section-label:first-child {
  margin-top: 0;
}

.ach-result {
  border: 1px solid var(--ach-border);
  border-radius: 8px;
  margin-bottom: 8px;
  padding: 10px 11px;
}

.ach-result[data-primary="true"] {
  border-color: rgba(23, 163, 178, 0.55);
  box-shadow: 0 1px 0 rgba(23, 163, 178, 0.16);
}

.ach-result-title-row {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.ach-result h3 {
  font-size: 15px;
  line-height: 1.3;
  margin: 0;
}

.ach-badge {
  background: var(--ach-accent);
  border-radius: 5px;
  color: #ffffff;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 6px;
  white-space: nowrap;
}

.ach-badge[data-type="manual"] {
  background: #f8f9fa;
  border: 1px solid #ced4da;
  color: var(--ach-muted);
}

.ach-badge[data-type="overview"] {
  background: var(--ach-warning);
  color: #333333;
}

.ach-summary,
.ach-excerpt {
  color: var(--ach-muted);
  margin: 7px 0 0;
}

.ach-result-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 7px;
}

.ach-toggle {
  background: transparent;
  border: 0;
  color: var(--ach-accent-dark);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 0;
}

.ach-toggle:hover,
.ach-toggle:focus-visible {
  color: var(--ach-ink);
  outline: none;
  text-decoration: underline;
}

.ach-guide-start {
  background: var(--ach-accent);
  border: 1px solid var(--ach-accent);
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 8px;
}

.ach-guide-start:hover,
.ach-guide-start:focus-visible {
  background: var(--ach-accent-hover);
  border-color: var(--ach-accent-hover);
  outline: 3px solid rgba(23, 163, 178, 0.18);
  outline-offset: 2px;
}

.ach-link-button {
  background: #ffffff;
  border: 1px solid var(--ach-border);
  border-radius: 6px;
  color: var(--ach-ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  text-decoration: none;
}

.ach-link-button:hover,
.ach-link-button:focus-visible {
  border-color: var(--ach-accent);
  color: var(--ach-accent-dark);
  outline: 3px solid rgba(23, 163, 178, 0.14);
  outline-offset: 2px;
}

.ach-result-body {
  border-top: 1px solid var(--ach-border);
  margin-top: 9px;
  padding-top: 2px;
}

.ach-result-body[hidden] {
  display: none;
}

.ach-steps {
  margin: 8px 0 0 20px;
  padding: 0;
}

.ach-steps li {
  margin: 4px 0;
}

.ach-workflow {
  background: #fafafa;
  border: 1px solid var(--ach-border);
  border-radius: 7px;
  margin-top: 9px;
  padding: 10px 10px 10px 12px;
}

.ach-workflow-header {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 6px;
}

.ach-workflow-title {
  font-size: 13px;
  margin: 0;
}

.ach-workflow .ach-steps {
  margin-top: 0;
}

.ach-cautions {
  border-left: 3px solid var(--ach-warning);
  color: #684126;
  margin-top: 8px;
  padding-left: 8px;
}

.ach-source {
  color: var(--ach-muted);
  font-size: 12px;
  margin-top: 8px;
}

.ach-source code {
  color: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

.ach-guide-panel {
  background: var(--ach-panel);
  border: 1px solid var(--ach-border);
  border-radius: 8px;
  box-shadow: var(--ach-shadow);
  max-height: calc(100vh - 44px);
  overflow: hidden;
  position: fixed;
  right: 22px;
  top: 22px;
  width: min(380px, calc(100vw - 32px));
  z-index: 2147483001;
}

.ach-guide-panel[hidden] {
  display: none;
}

.ach-guide-header {
  align-items: flex-start;
  background: var(--ach-header);
  border-bottom: 1px solid var(--ach-border);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
}

.ach-guide-title-block {
  min-width: 0;
}

.ach-guide-kicker {
  color: var(--ach-accent-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ach-guide-title {
  font-size: 15px;
  line-height: 1.25;
  margin: 1px 0 0;
}

.ach-guide-subtitle {
  color: var(--ach-muted);
  font-size: 12px;
  margin-top: 2px;
}

.ach-guide-controls {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
}

.ach-guide-body {
  max-height: calc(100vh - 128px);
  overflow: auto;
  padding: 12px 14px 14px;
}

.ach-guide-summary {
  color: var(--ach-muted);
  margin: 0 0 9px;
}

.ach-guide-progress {
  color: var(--ach-accent-dark);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.ach-guide-steps {
  counter-reset: ach-guide-step;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ach-guide-step {
  counter-increment: ach-guide-step;
  padding: 5px 0;
}

.ach-guide-step[data-complete="true"] .ach-guide-step-text {
  color: var(--ach-muted);
  text-decoration: line-through;
}

.ach-guide-step-row {
  align-items: flex-start;
  display: grid;
  column-gap: 10px;
  grid-template-columns: 2ch minmax(0, 1fr);
  row-gap: 6px;
}

.ach-guide-step-row::before {
  color: var(--ach-muted);
  content: counter(ach-guide-step) ".";
  font-weight: 700;
  line-height: 1.45;
  padding-top: 1px;
  text-align: right;
}

.ach-guide-check {
  align-items: flex-start;
  display: grid;
  gap: 8px;
  grid-column: 2;
  grid-template-columns: 18px minmax(0, 1fr);
}

.ach-guide-check input {
  justify-self: start;
  margin: 3px 0 0;
}

.ach-guide-step-text {
  min-width: 0;
}

.ach-step-action {
  background: #ffffff;
  border: 1px solid var(--ach-accent);
  border-radius: 6px;
  color: var(--ach-accent-dark);
  cursor: pointer;
  flex: 0 0 auto;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  grid-column: 2;
  justify-self: start;
  margin-left: 26px;
  padding: 5px 8px;
  white-space: nowrap;
}

.ach-step-action:hover,
.ach-step-action:focus-visible {
  background: #f8f9fa;
  outline: 3px solid rgba(23, 163, 178, 0.18);
  outline-offset: 2px;
}

.ach-guide-cautions {
  border-left: 3px solid var(--ach-warning);
  color: #684126;
  margin-top: 10px;
  padding-left: 8px;
}

.ach-root[data-guide-minimized="true"] .ach-guide-panel {
  width: min(320px, calc(100vw - 32px));
}

@media (max-width: 520px) {
  .ach-launcher {
    bottom: 16px;
    right: 16px;
  }

  .ach-panel {
    bottom: 84px;
    max-height: calc(100vh - 104px);
    right: 16px;
    width: calc(100vw - 32px);
  }

  .ach-guide-panel {
    border-radius: 8px 8px 0 0;
    bottom: 0;
    left: 0;
    max-height: 70vh;
    right: 0;
    top: auto;
    width: auto;
  }

  .ach-guide-body {
    max-height: calc(70vh - 84px);
  }

  .ach-step-action {
    justify-self: start;
  }

  .ach-search-row {
    grid-template-columns: 1fr;
  }

  .ach-submit {
    min-height: 40px;
  }
}
