/*
 * Da Vat Hy Lures — Phase 23C.7
 * Profile & Alerts Simplification
 *
 * Profile = fishing setup + Morning Brief + Fishing Alerts.
 * Lower-frequency settings remain available but secondary.
 */

/* ===============================================================
   MY TACKLE BOX → PROFILE
   =============================================================== */

body.dvh21p2-returning:not(.dvh23b7-fi-focused) #pocket-more:target{
  display:block!important;
  margin:0!important;
}

body.dvh21p2-returning:not(.dvh23b7-fi-focused) #pocket-more:target ~ #pocket-profile,
body.dvh21p2-returning:not(.dvh23b7-fi-focused) #pocket-profile:target{
  display:block!important;
}

.dvh23c7-profile-hub{
  width:100%;
  padding:26px max(28px,calc((100vw - 1740px)/2 + 28px));
  background:#f5f0e5;
  color:#0b392d;
}

.dvh23c7-profile-head{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:20px;
  align-items:end;
}

.dvh23c7-profile-head h2{
  margin:4px 0 5px;
  color:#0b392d;
  font-family:Georgia,serif;
  font-size:clamp(1.7rem,2.5vw,2.55rem);
  line-height:1.02;
}

.dvh23c7-profile-head p{
  max-width:760px;
  margin:0;
  color:#68756f;
  font-size:.74rem;
  line-height:1.45;
}

.dvh23c7-completion{
  display:grid;
  justify-items:end;
  gap:1px;
  padding-left:18px;
  border-left:2px solid #e6a821;
}

.dvh23c7-completion strong{
  color:#0b392d;
  font-size:1.2rem;
}

.dvh23c7-completion small{
  color:#6e7b75;
  font-size:.58rem;
  text-transform:uppercase;
  letter-spacing:.07em;
}

.dvh23c7-profile-status{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  margin-top:15px;
  border-top:1px solid rgba(12,47,37,.12);
  border-bottom:1px solid rgba(12,47,37,.12);
}

.dvh23c7-profile-status>div{
  min-width:0;
  padding:11px 14px;
  border-right:1px solid rgba(12,47,37,.12);
}

.dvh23c7-profile-status>div:last-child{
  border-right:0;
}

.dvh23c7-profile-status span,
.dvh23c7-profile-actions article>span{
  display:block;
  color:#b77b12;
  font-size:.56rem;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.dvh23c7-profile-status strong{
  display:block;
  margin-top:2px;
  color:#0b392d;
  font-size:.88rem;
}

.dvh23c7-profile-status small{
  display:block;
  margin-top:2px;
  overflow:hidden;
  color:#6c7974;
  font-size:.59rem;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.dvh23c7-profile-actions{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-top:14px;
}

.dvh23c7-profile-actions article{
  min-width:0;
  display:flex;
  flex-direction:column;
  min-height:154px;
  padding:13px 14px;
  border:1px solid rgba(12,47,37,.13);
  border-radius:5px;
  background:#fffdf8;
}

.dvh23c7-profile-actions article>strong{
  margin-top:4px;
  color:#0b392d;
  font-size:.88rem;
  line-height:1.2;
}

.dvh23c7-profile-actions article>p{
  margin:5px 0 10px;
  color:#68756f;
  font-size:.62rem;
  line-height:1.4;
}

.dvh23c7-profile-actions article>a,
.dvh23c7-profile-actions article>button,
.dvh23c7-alert-actions>a,
.dvh23c7-alert-actions>button{
  width:max-content;
  max-width:100%;
  min-height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:auto;
  padding:7px 9px;
  border:1px solid rgba(12,47,37,.16);
  border-radius:4px;
  background:#fff;
  color:#0b4938;
  font:850 .61rem/1.1 Inter,Arial,sans-serif;
  text-decoration:none;
  cursor:pointer;
}

.dvh23c7-profile-actions article:nth-child(2)>a{
  border-color:#e6a821;
  background:#e6a821;
  color:#12372f;
}

.dvh23c7-alert-actions{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:auto;
}

.dvh23c7-profile-actions article>small{
  margin-top:6px;
  color:#738079;
  font-size:.55rem;
  line-height:1.3;
}

.dvh23c7-profile-links{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  margin-top:12px;
  padding-top:10px;
  border-top:1px solid rgba(12,47,37,.10);
}

.dvh23c7-profile-links a{
  color:#0b4938;
  font-size:.60rem;
  font-weight:850;
  text-decoration:none;
}

/* Existing progressive profile is now deliberately secondary. */
body.dvh21p2-returning #pocket-profile{
  width:calc(100% - 56px);
  max-width:1600px;
  margin:12px auto 24px!important;
  border-radius:6px!important;
}

body.dvh21p2-returning #pocket-profile .dvh21m68-profile-summary{
  min-height:50px!important;
  padding:9px 12px!important;
}

.dvh23c7-marketing-fold{
  padding:0!important;
  border-top:1px solid rgba(12,47,37,.12)!important;
  border-bottom:1px solid rgba(12,47,37,.12)!important;
}

.dvh23c7-marketing-fold>summary{
  min-height:46px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 10px;
  cursor:pointer;
  list-style:none;
}

.dvh23c7-marketing-fold>summary::-webkit-details-marker{
  display:none;
}

.dvh23c7-marketing-fold>summary span{
  display:flex;
  flex-direction:column;
  gap:1px;
}

.dvh23c7-marketing-fold>summary small{
  color:#6d7974;
  font-size:.58rem;
  font-weight:600;
}

.dvh23c7-marketing-fold>summary b{
  display:grid;
  width:25px;
  height:25px;
  place-items:center;
  border-radius:50%;
  background:#e7ede7;
  color:#0b4938;
}

.dvh23c7-marketing-fold[open]>summary b{
  transform:rotate(45deg);
}

.dvh23c7-marketing-fields{
  display:grid;
  gap:7px;
  padding:0 10px 10px;
}

/* ===============================================================
   ALERT PREFERENCES
   =============================================================== */

body.dvh23c7-alerts-body .dvh21e-wrap{
  width:min(1500px,calc(100% - 72px));
  margin:14px auto 48px;
}

body.dvh23c7-alerts-body .dvh23c7-alert-hero{
  min-height:145px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:22px;
  align-items:center;
  padding:22px 26px;
  border-radius:12px;
  background:linear-gradient(110deg,#073f31 0%,#0e513d 58%,#315f3f 100%);
}

body.dvh23c7-alerts-body .dvh23c7-alert-hero h1{
  margin:3px 0 5px;
  color:#fff;
  font-family:Georgia,serif;
  font-size:clamp(2.05rem,3.2vw,3.3rem);
  line-height:1;
}

body.dvh23c7-alerts-body .dvh23c7-alert-hero p{
  max-width:720px;
  margin:0;
  color:rgba(255,255,255,.78);
  font-size:.75rem;
}

.dvh23c7-alert-hero-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:7px;
}

.dvh23c7-alert-hero-actions a{
  min-height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:7px 10px;
  border:1px solid rgba(255,255,255,.26);
  border-radius:4px;
  background:rgba(255,255,255,.07);
  color:#fff;
  font-size:.61rem;
  font-weight:900;
  text-decoration:none;
}

body.dvh23c7-alerts-body .dvh21e-status{
  margin:9px 0;
  border-radius:5px;
  box-shadow:none;
}

body.dvh23c7-alerts-body .dvh21e-card{
  padding:14px 16px 18px;
  border-radius:7px;
}

.dvh23c7-alert-fold,
.dvh23c7-alert-advanced,
.dvh23c7-device-help{
  margin:8px 0;
  border-top:1px solid rgba(12,47,37,.13);
  border-bottom:1px solid rgba(12,47,37,.13);
  background:#fbfaf6;
}

.dvh23c7-alert-fold>summary,
.dvh23c7-alert-advanced>summary,
.dvh23c7-device-help>summary{
  min-height:46px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 10px;
  cursor:pointer;
  list-style:none;
  color:#0b392d;
}

.dvh23c7-alert-fold>summary::-webkit-details-marker,
.dvh23c7-alert-advanced>summary::-webkit-details-marker,
.dvh23c7-device-help>summary::-webkit-details-marker{
  display:none;
}

.dvh23c7-alert-fold>summary span,
.dvh23c7-alert-advanced>summary span{
  display:flex;
  flex-direction:column;
  gap:1px;
}

.dvh23c7-alert-fold>summary small,
.dvh23c7-alert-advanced>summary small{
  color:#6f7c76;
  font-size:.58rem;
}

.dvh23c7-alert-fold>summary b,
.dvh23c7-alert-advanced>summary b,
.dvh23c7-device-help>summary b{
  display:grid;
  width:25px;
  height:25px;
  place-items:center;
  border-radius:50%;
  background:#e7ede7;
  color:#0b4938;
  transition:transform .15s ease;
}

.dvh23c7-alert-fold[open]>summary b,
.dvh23c7-alert-advanced[open]>summary b,
.dvh23c7-device-help[open]>summary b{
  transform:rotate(45deg);
}

.dvh23c7-alert-fold-content,
.dvh23c7-alert-advanced-content{
  padding:0 10px 10px;
}

body.dvh23c7-alerts-body .dvh23c7-primary-alert{
  margin-top:12px;
  padding-top:12px;
  border-top:2px solid #e6a821;
}

body.dvh23c7-alerts-body #morning-fishing-brief{
  margin-top:16px;
  padding-top:14px;
  border-top:2px solid #e6a821;
}

body.dvh23c7-alerts-body .dvh21e-section-head h2{
  font-size:1.1rem;
}

body.dvh23c7-alerts-body .dvh21e-intro{
  max-width:900px;
  font-size:.67rem;
  line-height:1.4;
}

.dvh23c7-marketing-alerts{
  margin-top:15px;
}

.dvh23c7-device-help{
  padding:0!important;
  border-radius:0!important;
}

.dvh23c7-device-help p{
  margin:0;
  padding:0 10px 10px;
  font-size:.64rem;
}

/* Anchored sections should clear the shared Pocket header comfortably. */
#morning-fishing-brief,
#fishing-alert-settings,
#optional-updates{
  scroll-margin-top:150px;
}

@media(max-width:760px){
  .dvh23c7-profile-hub{
    padding:17px 14px 20px;
  }

  .dvh23c7-profile-head{
    grid-template-columns:1fr auto;
    gap:10px;
  }

  .dvh23c7-profile-head h2{
    font-size:1.34rem;
    white-space:nowrap;
  }

  .dvh23c7-profile-head p{
    grid-column:1/-1;
    font-size:.66rem;
  }

  .dvh23c7-completion strong{
    font-size:1rem;
  }

  .dvh23c7-profile-status{
    grid-template-columns:1fr;
  }

  .dvh23c7-profile-status>div{
    padding:9px 2px;
    border-right:0;
    border-bottom:1px solid rgba(12,47,37,.10);
  }

  .dvh23c7-profile-status>div:last-child{
    border-bottom:0;
  }

  .dvh23c7-profile-actions{
    grid-template-columns:1fr;
    gap:7px;
  }

  .dvh23c7-profile-actions article{
    min-height:0;
    padding:11px 12px;
  }

  .dvh23c7-profile-actions article>p{
    margin-bottom:8px;
  }

  body.dvh21p2-returning #pocket-profile{
    width:100%;
    margin:8px 0 18px!important;
    border-radius:0!important;
  }

  body.dvh23c7-alerts-body .dvh21e-wrap{
    width:100%;
    margin:0 auto 34px;
  }

  body.dvh23c7-alerts-body .dvh23c7-alert-hero{
    grid-template-columns:1fr;
    gap:12px;
    min-height:0;
    padding:17px 14px;
    border-radius:0;
  }

  body.dvh23c7-alerts-body .dvh23c7-alert-hero h1{
    font-size:1.62rem;
    white-space:nowrap;
  }

  .dvh23c7-alert-hero-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    width:100%;
  }

  .dvh23c7-alert-hero-actions a:last-child{
    grid-column:1/-1;
  }

  body.dvh23c7-alerts-body .dvh21e-status{
    margin:0;
    border-radius:0;
  }

  body.dvh23c7-alerts-body .dvh21e-card{
    padding:12px;
    border-radius:0;
  }

  body.dvh23c7-alerts-body .dvh21e-section-head{
    align-items:flex-start;
  }

  #morning-fishing-brief,
  #fishing-alert-settings,
  #optional-updates{
    scroll-margin-top:128px;
  }
}


/* ===============================================================
   Phase 23C.7A — Profile routing + mobile anchor correction
   =============================================================== */

/* The old Today "Details & setup" fold is superseded by the Profile hub.
   Its old #pocket-more ID was the cause of the Profile route landing wrong. */
.dvh23c7-legacy-setup{
  display:none!important;
}

/* The real Profile hub owns #pocket-more. */
body.dvh21p2-returning #pocket-more:target{
  display:block!important;
  scroll-margin-top:12px;
}

/* Alert Preferences is a Profile sub-page, not another full hero. */
.dvh23c7-profile-subnav{
  width:100%;
  display:grid;
  grid-template-columns:minmax(220px,.75fr) minmax(0,1.25fr);
  gap:18px;
  align-items:center;
  padding:12px max(28px,calc((100vw - 1500px)/2 + 28px));
  border-top:1px solid rgba(12,47,37,.10);
  border-bottom:1px solid rgba(12,47,37,.14);
  background:#f5f0e5;
  color:#0b392d;
}

.dvh23c7-profile-subnav>div{
  display:grid;
  gap:1px;
}

.dvh23c7-profile-subnav .eyebrow{
  color:#b77b12;
  font-size:.57rem;
  font-weight:950;
  letter-spacing:.10em;
  text-transform:uppercase;
}

.dvh23c7-profile-subnav strong{
  color:#0b392d;
  font-size:.92rem;
  line-height:1.15;
}

.dvh23c7-profile-subnav small{
  color:#6d7974;
  font-size:.58rem;
}

.dvh23c7-profile-subnav .dvh23c7-alert-hero-actions{
  display:grid;
  grid-template-columns:1fr 1fr auto;
  gap:7px;
  justify-content:stretch;
}

.dvh23c7-profile-subnav .dvh23c7-alert-hero-actions a{
  min-height:36px;
  padding:7px 10px;
  border:1px solid rgba(12,47,37,.15);
  border-radius:4px;
  background:#fffdf8;
  color:#0b4938;
  font-size:.61rem;
  font-weight:900;
  text-decoration:none;
}

.dvh23c7-profile-subnav .dvh23c7-alert-hero-actions a:last-child{
  background:#0b4938;
  color:#fff;
}

/* Desktop keeps room for the public + Pocket headers. */
#morning-fishing-brief,
#fishing-alert-settings,
#optional-updates{
  scroll-margin-top:112px;
}

@media(max-width:760px){
  /* On mobile the public/Pocket headers scroll away. A large scroll margin
     caused the previous alert section to remain visible above the target. */
  #morning-fishing-brief,
  #fishing-alert-settings,
  #optional-updates{
    scroll-margin-top:10px!important;
  }

  body.dvh21p2-returning #pocket-more:target{
    scroll-margin-top:8px;
  }

  .dvh23c7-profile-subnav{
    grid-template-columns:1fr;
    gap:9px;
    padding:12px 14px;
  }

  .dvh23c7-profile-subnav>div{
    grid-template-columns:auto 1fr;
    column-gap:7px;
    align-items:baseline;
  }

  .dvh23c7-profile-subnav .eyebrow{
    grid-column:1;
  }

  .dvh23c7-profile-subnav strong{
    grid-column:2;
    font-size:.85rem;
  }

  .dvh23c7-profile-subnav small{
    grid-column:1/-1;
  }

  .dvh23c7-profile-subnav .dvh23c7-alert-hero-actions{
    grid-template-columns:1fr 1fr;
  }

  .dvh23c7-profile-subnav .dvh23c7-alert-hero-actions a:last-child{
    grid-column:1/-1;
  }
}


/* Phase 23C.7B — contextual return from Morning Brief */
.dvh23c7b-back-notifications{
  width:max-content;
  max-width:100%;
  min-height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin:10px 0 4px;
  padding:7px 11px;
  border:1px solid rgba(12,47,37,.18);
  border-radius:4px;
  background:#fffdf8;
  color:#0b4938;
  font-size:.62rem;
  font-weight:900;
  text-decoration:none;
}

.dvh23c7b-back-notifications:hover,
.dvh23c7b-back-notifications:focus-visible{
  border-color:#d99a18;
  background:#fff8e9;
}

#profile-notification-menu{
  scroll-margin-top:112px;
}

@media(max-width:760px){
  .dvh23c7b-back-notifications{
    width:100%;
    min-height:42px;
    margin:11px 0 4px;
    font-size:.66rem;
  }

  #profile-notification-menu{
    scroll-margin-top:10px!important;
  }
}
