:root {
  --aco-ink: #102033;
  --aco-muted: #607287;
  --aco-blue: #156987;
  --aco-blue-dark: #0d4e67;
  --aco-line: #d9e5ee;
  --aco-soft: #f4f8fb;
  --aco-gold: #ffc107;
  --aco-red: #b42318;
  --aco-green: #16794b;
}

.aco-shell {
  box-sizing: border-box;
  width: min(100%, 1120px);
  margin: 0 auto 40px;
  padding: 0 14px 30px;
  color: var(--aco-ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

.aco-shell *, .aco-shell *::before, .aco-shell *::after { box-sizing: border-box; }
.aco-shell [hidden] { display: none !important; }
.aco-shell button, .aco-shell input, .aco-shell select, .aco-shell textarea { font: inherit; }
.aco-shell img, .aco-shell video, .aco-shell iframe { max-width: 100%; }

.aco-care-nav,
.aco-section-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.aco-care-nav { padding: 4px 0 16px; }
.aco-care-nav a,
.aco-section-pill {
  flex: 0 0 auto;
  scroll-snap-align: start;
  min-height: 44px;
  border: 1px solid var(--aco-line);
  border-radius: 999px;
  background: #fff;
  color: var(--aco-blue-dark);
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none !important;
}
.aco-care-nav a { padding: 11px 15px; }
.aco-care-nav a[aria-current="page"],
.aco-care-nav a:hover,
.aco-section-pill.is-active,
.aco-section-pill[aria-selected="true"] {
  border-color: var(--aco-blue);
  background: var(--aco-blue);
  color: #fff;
}

.aco-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 18px;
}
.aco-hero h1 {
  margin: 0;
  font-size: clamp(30px, 7vw, 44px);
  font-weight: 850;
  letter-spacing: -.035em;
  line-height: 1.05;
}
.aco-hero p { margin: 8px 0 0; color: var(--aco-muted); }

.aco-form { display: grid; gap: 16px; }
.aco-card {
  padding: clamp(16px, 4vw, 24px);
  border: 1px solid var(--aco-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16, 32, 51, .06);
}
.aco-card h2 { margin: 0 0 14px; font-size: 22px; }
.aco-card h3 { margin: 0 0 10px; font-size: 17px; }
.aco-label { display: block; margin: 0 0 7px; font-weight: 800; }
.aco-help, .aco-optional { color: var(--aco-muted); font-size: 14px; }
.aco-optional { margin-left: 5px; font-weight: 600; }
.aco-field { margin: 0 0 16px; }
.aco-field:last-child { margin-bottom: 0; }
.aco-field input[type="text"],
.aco-field input[type="number"],
.aco-field select,
.aco-field textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 13px;
  border: 1px solid #b9cbd8;
  border-radius: 12px;
  background: #fff;
  color: var(--aco-ink);
}
.aco-field textarea { min-height: 132px; resize: vertical; }
.aco-field input:focus,
.aco-field select:focus,
.aco-field textarea:focus,
.aco-shell button:focus-visible,
.aco-shell a:focus-visible,
.aco-shell summary:focus-visible {
  outline: 3px solid rgba(21, 105, 135, .25);
  outline-offset: 2px;
  border-color: var(--aco-blue);
}

.aco-video-actions { display: grid; gap: 10px; }
.aco-file-action { position: relative; display: block; }
.aco-file-action input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.aco-button,
.aco-file-action > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 13px;
  cursor: pointer;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  touch-action: manipulation;
}
.aco-button-primary,
.aco-file-action:first-child > span { background: var(--aco-blue); color: #fff; }
.aco-file-action:first-child > span { min-height: 62px; font-size: 19px; }
.aco-button-secondary,
.aco-file-action-secondary > span { border-color: var(--aco-blue); background: #fff; color: var(--aco-blue-dark); }
.aco-button-danger { border-color: #efb7b1; background: #fff; color: var(--aco-red); }
.aco-button:hover, .aco-file-action > span:hover { filter: brightness(.96); }
.aco-button:disabled { cursor: wait; opacity: .62; }

.aco-video-stage { margin-top: 14px; }
.aco-video-stage video,
.aco-observation video {
  display: block;
  width: 100%;
  max-height: 520px;
  border-radius: 14px;
  background: #07121e;
}
.aco-video-details { margin: 10px 0; color: var(--aco-muted); overflow-wrap: anywhere; }

.aco-disclosure {
  border: 1px dashed #b9cbd8;
  border-radius: 18px;
  background: var(--aco-soft);
}
.aco-disclosure > summary,
.aco-edit > summary {
  padding: 17px 19px;
  cursor: pointer;
  color: var(--aco-blue-dark);
  font-weight: 850;
  list-style-position: inside;
}
.aco-disclosure[open] > summary { border-bottom: 1px solid var(--aco-line); }
.aco-disclosure-body { padding: 18px; }
.aco-field-grid { display: grid; gap: 14px; }
.aco-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.aco-check,
.aco-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid var(--aco-line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}
.aco-check input, .aco-toggle input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--aco-blue); }
.aco-toggle { margin: 10px 0; font-weight: 800; }

.aco-form-actions { position: sticky; bottom: 8px; z-index: 4; padding: 10px; border-radius: 17px; background: rgba(244, 248, 251, .95); box-shadow: 0 8px 28px rgba(16, 32, 51, .15); backdrop-filter: blur(8px); }
.aco-progress { margin-top: 10px; }
.aco-progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: #dbe7ed; }
.aco-progress-fill { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--aco-blue); transition: width .25s ease; }
.aco-progress-text { display: block; margin-top: 8px; color: var(--aco-blue-dark); font-weight: 750; }
.aco-progress[data-state="error"] .aco-progress-text { color: var(--aco-red); }
.aco-progress[data-state="complete"] .aco-progress-fill { background: var(--aco-green); }

.aco-observation-list { display: grid; gap: 14px; }
.aco-observation-card { overflow: hidden; }
.aco-card-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.aco-card-heading time, .aco-status, .aco-updated { color: var(--aco-muted); font-size: 13px; }
.aco-inline-status { color: var(--aco-blue-dark); font-weight: 750; }
.aco-edit { margin-top: 14px; border-top: 1px solid var(--aco-line); }
.aco-edit > summary { padding-inline: 0; }
.aco-edit form { display: grid; gap: 12px; padding: 5px 0 0; }

.aco-section-pills {
  position: sticky;
  top: 0;
  z-index: 3;
  margin: 0 0 20px;
  padding: 10px 2px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
}
.aco-section-pill { padding: 10px 14px; cursor: pointer; }
.aco-section-pill span { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 5px; padding: 0 6px; border-radius: 999px; background: rgba(21, 105, 135, .12); font-size: 12px; }
.aco-section-pill.is-active span { background: rgba(255, 255, 255, .22); }
.aco-library-panel > header { margin: 0 0 16px; }
.aco-library-panel > header h2 { margin: 0; font-size: clamp(27px, 6vw, 38px); }
.aco-video-count { margin: 5px 0; color: var(--aco-muted); font-weight: 800; }
.aco-video-grid { display: grid; gap: 16px; }
.aco-video-card { overflow: hidden; border: 1px solid var(--aco-line); border-radius: 17px; background: #fff; box-shadow: 0 7px 22px rgba(16, 32, 51, .07); }
.aco-video-card h3, .aco-video-card > p { margin-inline: 16px; }
.aco-video-card h3 { margin-top: 15px; margin-bottom: 7px; font-size: 19px; }
.aco-video-card > p { margin-top: 0; }
.aco-player-placeholder, .aco-play, .aco-player-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.aco-player-placeholder, .aco-play { position: relative; overflow: hidden; padding: 0; cursor: pointer; background: #07121e; color: #fff; }
.aco-player-placeholder img, .aco-play img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.aco-player-placeholder:hover img, .aco-play:hover img { transform: scale(1.02); }
.aco-player-placeholder span, .aco-play span { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); display: grid; place-items: center; min-width: 86px; min-height: 48px; padding: 10px 16px; border-radius: 999px; background: rgba(16, 32, 51, .88); font-weight: 850; box-shadow: 0 5px 18px rgba(0, 0, 0, .28); }

.aco-login-notice { max-width: 680px; margin: 24px auto; padding: 20px; border: 1px solid var(--aco-line); border-radius: 16px; background: var(--aco-soft); }
.aco-login-notice a { color: var(--aco-blue-dark); font-weight: 800; }

@media (min-width: 620px) {
  .aco-shell { padding-inline: 22px; }
  .aco-video-actions { grid-template-columns: 1.25fr 1fr; }
  .aco-field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aco-check-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .aco-video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aco-button, .aco-file-action > span { width: auto; min-width: 190px; }
  .aco-form-actions .aco-button { width: 100%; }
}

@media (min-width: 940px) {
  .aco-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .aco-form > .aco-card:first-child, .aco-form > .aco-disclosure, .aco-form > .aco-form-actions { grid-column: 1 / -1; }
  .aco-check-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .aco-video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .aco-observation-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .aco-shell *, .aco-shell *::before, .aco-shell *::after { scroll-behavior: auto !important; transition: none !important; }
}
