/* Shared palette. Loaded last so forms and navigation use the same visual language. */
:root {
  --petroleo: #103f50;
  --petroleo-panel: rgba(13, 57, 72, .93);
  --petroleo-texto: #f0faf9;
  --petroleo-suave: #c6e0e3;
  --petroleo-linea: #77a9b2;
  --turquesa: #0c7482;
  --papel-azul: #e5f1f3;
  --experience-ink: #163f50;
  --experience-sea: #126c7a;
  --experience-muted: #456a77;
  --experience-line: #b6d3da;
  --experience-paper: #e6f1f3;
}
body { background: #dfedf1; color: #193f50; }
button, input, select, textarea { font-family: inherit; }
:focus-visible { outline: 3px solid #0b7c91; outline-offset: 3px; }
button:disabled { cursor: not-allowed; }
#app .button:not(.secondary), #app .subscription-button:not(.secondary) {
  background: var(--turquesa);
  border-color: var(--turquesa);
  color: #f3fcfb;
}
#app :is(.button,.subscription-button):not(:disabled):hover {
  background: #0d5a6b;
  border-color: #0d5a6b;
  color: #f3fcfb;
}
#app .button.secondary {
  color: #18586b;
  background: #d7eaf0;
  border-color: #96bdc9;
}
#app :is(input,select,textarea):not([type=checkbox]):not([type=range]):not([type=hidden]) {
  background: #eaf4f5;
  color: #163e4e;
  border-color: #87acb8;
}
#app :is(input,textarea)::placeholder { color: #526f7b; opacity: 1; }
#app input[readonly] { background: #d9e8ec; color: #466974; }

/* Preserve the large two-line title and the compact reference navigation. */
#app .presentation-cover .ocean-project strong {
  display: block;
  width: auto;
  text-align: center;
  font-size: clamp(48px, 5vw, 74px);
  line-height: 1.12;
}
#app .presentation-cover .ocean-project strong > span { display: inline; }
#app .presentation-cover .ocean-project strong > .project-title-today { display: block; }
#app .entry-menu.entry-menu {
  background: rgba(10, 53, 67, .88);
  border: 1px solid #87bcc17a;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 26px #0c3d4d14;
  border-radius: 16px;
  padding: 12px 16px;
}
.entry-menu .entry-row {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: start;
  gap: clamp(10px, 1.2vw, 20px);
}
#app .entry-menu :is(a,small) { color: var(--petroleo-texto); }
.entry-row .entry-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  background: transparent;
  text-decoration: none;
  font: 600 14px/1.4 Arial, sans-serif;
}
#app .entry-menu .entry-link:hover { text-decoration: underline; text-underline-offset: 4px; }
#app .entry-menu .access-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  background: #0c7584;
  border: 1px solid #83c8cf;
  border-radius: 11px;
  font: 600 13px/1.4 Arial, sans-serif;
  text-decoration: none;
  white-space: nowrap;
}
.entry-row small { display: block; text-align: center; font: 11px/1.7 Arial, sans-serif; margin-top: 3px; }
#app .entry-menu .entry-tutor {
  width: 100%;
  box-sizing: border-box;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #81b5bf80;
  text-align: right;
  font: 12px/1.6 Arial, sans-serif;
  text-decoration: underline;
  text-underline-offset: 3px;
}
#app .shore-presentation { background: #e1eff1; }
#app .presentation-stages article, #app .project-introduction {
  background: #d9ecef;
  border-color: #a8cbd1;
}
#app .project-introduction h2 { color: #1b5a6b; }
#app .ocean-purpose { color: #214e60; }

/* Authentication. Photographs stay decorative and never contain interface text. */
#app .account-page { max-width: 1080px; }
#app .account-card {
  background: var(--petroleo-panel);
  color: var(--petroleo-texto);
  border: 1px solid #80aeb7;
  box-shadow: 0 18px 60px #103f501a;
  backdrop-filter: blur(10px);
}
#app .account-card-body, #app .account-role-switch { background: transparent; }
#app .account-card :is(h1,h2,p,label,a,small,dt,dd,.account-eyebrow) { color: var(--petroleo-texto); }
#app .account-card :is(.account-intro,.account-password-hint,.account-device-note,.account-identity dt) { color: var(--petroleo-suave); }
#app .account-story h2 { color: #f2fbfa; }
#app .account-role-switch { border-color: #6f9da9; }
#app .account-role-option { color: #d1e6e8; }
#app .account-role-option.is-current { background: #185363; border-color: #8ec7d0; color: #f1fbfa; }
#app .account-role-option:hover { background: #1b5261; }
#app .account-card :is(input,select) {
  background: #0e3545;
  border-color: #7aabb6;
  color: #eff9f9;
  color-scheme: dark;
}
#app .account-card input::placeholder { color: #abcbd3; }
#app .account-card input:focus { outline-color: #80d7d0; border-color: #9de9e2; }
#app .account-password button { color: #c2e0e3; }
#app .account-password button:hover { background: #22708355; }
#app .account-card .subscription-button { border: 1px solid #83cbd0; }
#app .account-card :is(.account-links,.account-identity) { border-color: #709eaa; }
#app .account-identity { background: #164a5b; }
#app .account-status { background: #205568; border-color: #7cabb4; }
#app .account-status.is-error { background: #533c46; border-color: #deaaa9; color: #fff0ed; }
#app .recovery-card { background: #164b5c; border-color: #7dabb4; }
#app .recovery-card code { background: #0d3545; color: #bdeeea; border: 1px solid #5b909f; }
#app .account-card :focus-visible { outline: 3px solid #8de0d8; outline-offset: 3px; }
#app .account-local { color: #456b78; }
#app .account-register .account-story { background-position: 50% 65%; }

/* Plans and review use the same dark translucent surfaces as account access. */
#app .subscription-page { background: transparent; }
#app .plans-intro { text-align: center; color: #416976; line-height: 1.7; }
#app :is(.subscription-option,.checkout-panel,.checkout-summary) {
  background: var(--petroleo-panel);
  color: var(--petroleo-texto);
  border: 1px solid #7caeb8;
  backdrop-filter: blur(10px);
}
#app :is(.subscription-option,.checkout-panel,.checkout-summary) :is(h1,h2,p,span,small,a,label,dt,dd,li) { color: var(--petroleo-texto); }
#app .subscription-option { display: flex; flex-direction: column; gap: 0; }
#app .subscription-option > .subscription-button { margin-top: auto; }
#app .subscription-option .subscription-button.secondary { background: #175569; border-color: #7eb5bf; }
#app .subscription-option-price { font-size: clamp(30px, 3vw, 38px); }
#app .checkout-panel input { background: #103c4c; color: #f0faf9; border-color: #81adb8; }
#app .checkout-panel :is(.payment-gateway,.payment-connection-note,.checkout-person) { background: #194c5c; border-color: #709fae; }
#app .subscription-steps .is-current { color: #124e62; }
#app .subscription-steps .is-current > span { color: #effafa; background: #176c7d; }

/* Interior pages retain the layout and use blue-tinted reading surfaces. */
#app :is(.app-shell,.onboarding-shell,.tutor-workspace) { background: #dfedf1; }
#app .app-shell > .topbar { background: #123e50; border-color: #396978; }
#app .app-shell .topbar :is(a,span,small,button) { color: #e6f5f5; }
#app .app-shell .topbar a[aria-current=page] { color: #b1efeb; border-color: #90d4d7; }
#app .app-shell .topbar button { background: #20586a; border-color: #6e9ca9; }
#app .app-shell :is(.card,.stage-card,.tutor-roster,.tutor-tile,.tutor-empty,.companion-list-item,.profile-account-settings),
#app .onboarding-content {
  background: #e7f2f4;
  border-color: #b0cdd6;
  box-shadow: 0 4px 16px #103f5006;
}
#app :is(.finance-stats article,.profile-data-list > div,.tutor-roster article) { border-color: #b1cfd5; }
#app .app-shell :is(.eyebrow,.field-help,.privacy-line,.gentle-note) { color: #456876; }
#app .app-shell .bottom-nav { background: #113e50; border-color: #477c8d; }
#app .app-shell .bottom-nav a { color: #c4dfe4; }
#app .app-shell .bottom-nav a[aria-current=page] { color: #a6eee6; background: #1d5668; }
#app .account-menu-card { max-width: 600px; margin-inline: auto; }
#app .account-menu-card h1 { margin-bottom: 24px; }
#app .account-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  border-bottom: 1px solid #b5cfd7;
  color: #174d61;
  text-decoration: none;
}
#app .account-menu-item svg:last-child { margin-left: auto; }
#app .account-menu-item:hover { background: #d8eaf0; }
#app .account-menu-logout { padding: 14px 0; margin-top: 20px; background: none; border: 0; color: #824451; cursor: pointer; font-size: 15px; }
#app .access-card { max-width: 620px; margin: 30px auto; padding: clamp(24px, 4vw, 40px); text-align: center; }
#app .access-card h2 { font-size: 30px; }
#app .access-card > p { line-height: 1.8; }
#app .access-card .button { margin-top: 15px; }

/* Messages have restrained blue panels and an unambiguous writing area. */
#app .conversation { --chat-line: #b3d1da; border-color: #a6c8d2; background: #e0eff2; }
#app .conversation :is(.conversation-title,.chat-person,.chat-settings,form[data-chat-compose]) { background: #d4e8ed; }
#app .conversation .chat-contacts { background: #d9eaf0; }
#app .conversation .chat-thread { background: #eaf4f6; }
#app .conversation .chat-contact { background: transparent; }
#app .conversation .chat-contact[aria-pressed=true] { background: #bddce3; border-color: #81b1bd; }
#app .conversation .chat-contact:hover { background: #c5e1e8; }
#app .conversation :is(.chat-start p,.chat-preview,.chat-list-note,.chat-person-copy > span,.chat-settings > summary,.chat-keyboard-hint) { color: #466875; }
#app .conversation .chat-bubble { background: #d3e6ec; color: #1d4555; border-color: #aecbd5; }
#app .conversation .chat-bubble.is-mine { background: #15566a; color: #f0f9fa; }
#app .conversation .chat-bubble.is-mine :is(.chat-message-author,time) { color: #c3e5e9; }
#app .conversation .chat-connection-note { background: #dbeaf0; color: #446a79; border-color: #b2ccd5; }
#app .conversation .chat-empty { background: #e3f0f3; }
#app .conversation .chat-presence { color: #436772; }
#app .conversation .chat-presence.is-online { color: #17624f; }

/* Decorative failures use the matching original artwork, with no repeated photograph. */
#app .photo-image.photo-fallback {
  object-fit: contain;
  background-image: url('../assets/stickers-originales.png');
  background-size: 400% 300%;
  background-position: var(--fallback-position, 0% 0%);
  background-color: transparent;
  border-radius: 10px;
}
@media (max-width: 760px) {
  #app .presentation-cover .ocean-project strong { font-size: clamp(38px, 8.5vw, 58px); }
  #app .account-card-body { padding-inline: 24px; }
  #app .account-home-link { font-size: 12px; width: auto; gap: 6px; }
  #app .entry-menu .entry-row { gap: 10px; }
  .entry-row .entry-link { font-size: 12px; }
  #app .entry-menu .access-start { font-size: 12px; padding-inline: 10px; }
}
@media (max-width: 380px) {
  #app .entry-menu.entry-menu { padding: 10px; }
  #app .entry-menu .entry-row { gap: 8px; }
  #app .entry-menu .access-start { padding-inline: 7px; font-size: 11px; }
  .entry-row .entry-link { font-size: 11px; }
  .entry-row small { font-size: 10px; }
  #app .account-topbar .account-brand { font-size: 11px; letter-spacing: .3px; }
  #app .account-home-link { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  #app * { scroll-behavior: auto; transition: none; }
}

#app .introduction-visual { background-image: linear-gradient(180deg,#123f5040,#123f50e8), url('../assets/orilla-turquesa.jpeg'); }
#app .tutor-navigation { background: #d3e7ed; border-color: #a9cbd5; }
#app .tutor-navigation a { color: #365f70; }
#app .tutor-navigation a[aria-current=page] { background: #174f64; color: #eefafa; }
#app .onboarding-shell .card { background: #e7f2f4; border-color: #b0cdd6; }
#app .conversation .chat-bubble:not(.is-mine) :is(.chat-message-author,time) { color: #3e6674; }
#app .conversation .chat-day span { color: #416b7a; background: #d2e6ec; }
#app .entry-menu .entry-tutor { min-height: 38px; }
@media (max-width: 900px) {
  #app .presentation-cover .ocean-header {
    grid-template-areas: 'project' 'login';
    grid-template-columns: minmax(0, 1fr);
  }
  #app .presentation-cover .ocean-project { padding-inline-end: 0; }
  #app .presentation-cover .entry-menu { justify-self: end; }
}
@media (max-width: 700px) {
  #app .presentation-cover .entry-menu { justify-self: stretch; }
}
@media (max-width: 380px) {
  #app .presentation-cover .ocean-project strong { font-size: 34px; }
}
