/* AstroCEO - wide screens: the tabs become a side menu (main tabs first, like the phone bar), pages use the full width, and Today is laid out as a dashboard. */
@media (min-width: 1100px) {
  body:has(header.bar) { padding-left: 256px }
  body:has(header.bar) .wrap { max-width: 1280px; padding-inline: 34px }
  header.bar, body:has(#app .view > .panel.hero) header.bar { position: fixed; top: 0; bottom: 0; left: 0; width: 256px; z-index: 6; padding: 26px 0 20px; overflow-y: auto; border-radius: 0 36px 36px 0; background: linear-gradient(180deg, rgba(var(--pg), .34) 0%, rgba(var(--pg), .10) 46%, rgba(224, 177, 90, .10) 100%), #0A0D20; box-shadow: 18px 0 50px -30px rgba(var(--pg), .8); transition: background .4s }
  [dir=rtl] body:has(header.bar) { padding-left: 0; padding-right: 256px }
  [dir=rtl] header.bar { left: auto; right: 0; border-radius: 36px 0 0 36px }
  header.bar .wrap { max-width: none !important; padding-inline: 18px !important; display: flex; flex-direction: column; gap: 20px; min-height: 100% }
  header.bar .bar-top { flex-direction: column; align-items: stretch; gap: 14px; padding: 0 6px }
  header.bar .brand h1 { font-size: 1.7rem !important }
  header.bar .brand small { display: block; margin-top: 8px; line-height: 1.5; color: rgba(241, 237, 226, .7) }
  header.bar .datenav { display: grid; grid-template-columns: 38px 1fr 38px; gap: 6px; padding: 6px; border-radius: 18px; background: rgba(255, 255, 255, .07) }
  header.bar .datenav:not(:has(#todayBtn:not([style*="none"]))) { display: none }
  header.bar .datenav button, header.bar .datenav input { border: 0; background: none; min-height: 38px; border-radius: 12px; padding: 0 }
  header.bar .datenav button { color: #E0B15A; font-size: 1.1rem }
  header.bar .datenav input { text-align: center; font-family: inherit; font-size: .9rem; font-weight: 600; min-width: 0; width: 100% }
  header.bar .datenav #todayBtn { grid-column: 1 / -1; font-size: .86rem; font-weight: 700; color: #1A1405; background: linear-gradient(135deg, #E0B15A, #F4D58A) }
  header.bar .hright { order: 9; justify-content: space-between }
  header.bar nav.tabs { display: flex; flex-direction: column; flex-wrap: nowrap; gap: 4px; overflow: visible; padding: 0; margin: 0; border: 0 }
  header.bar nav.tabs a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 0; border-radius: 16px; font-size: .86rem; font-weight: 600; color: rgba(241, 237, 226, .62); background: none; text-align: start; order: 20; transition: background .2s, color .2s }
  header.bar nav.tabs a::before { content: ""; width: 19px; height: 19px; flex: none; background: currentColor; -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat }
  header.bar nav.tabs a:hover { background: rgba(255, 255, 255, .06); color: #F1EDE2 }
  header.bar nav.tabs a[aria-current="page"] { color: #fff; background: linear-gradient(135deg, rgba(var(--pg), .75), rgba(var(--pg), .35)); box-shadow: 0 10px 26px -12px rgba(var(--pg), 1) }
  header.bar nav.tabs a[href="#today"] { order: 1; font-size: 1.02rem; padding-block: 13px; --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9l2.1 2.1M17 17l2.1 2.1M4.9 19.1L7 17M17 7l2.1-2.1'/%3E%3C/svg%3E") }
  header.bar nav.tabs a[href="#week"] { order: 2; font-size: 1.02rem; padding-block: 13px; --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4M7 15h10'/%3E%3C/svg%3E") }
  header.bar nav.tabs a[href="#month"] { order: 3; font-size: 1.02rem; padding-block: 13px; --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4M7.5 14h.01M12 14h.01M16.5 14h.01M7.5 17.5h.01M12 17.5h.01'/%3E%3C/svg%3E") }
  header.bar nav.tabs a[href="#ask"] { order: 4; font-size: 1.02rem; padding-block: 13px; --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l2.2 5.8L20 11l-5.8 2.2L12 19l-2.2-5.8L4 11l5.8-2.2z'/%3E%3C/svg%3E") }
  header.bar nav.tabs a[href="#planner"] { order: 11; --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3C/svg%3E") }
  header.bar nav.tabs a[href="#ahead"] { order: 12; --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 17l5-5 4 3 8-9'/%3E%3Cpath d='M15 6h5v5'/%3E%3C/svg%3E") }
  header.bar nav.tabs a[href="#chart"] { order: 13; --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 3v18M3 12h18M5.6 5.6l12.8 12.8'/%3E%3C/svg%3E") }
  header.bar nav.tabs a[href="#report"] { order: 14; --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h7l5 5v13H7z'/%3E%3Cpath d='M14 3v5h5M10 13h6M10 17h6'/%3E%3C/svg%3E") }
  header.bar nav.tabs a[href="#blog"] { order: 15; --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 6.5C10 5 7 4.5 3.5 5v13c3.5-.5 6.5 0 8.5 1.5 2-1.5 5-2 8.5-1.5V5C17 4.5 14 5 12 6.5z'/%3E%3Cpath d='M12 6.5v13'/%3E%3C/svg%3E") }
  header.bar nav.tabs a[href="#community"] { order: 15; --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h11a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H9l-4 3.5V15H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2z'/%3E%3Cpath d='M19 9h1a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2h-1v2.5L16 19h-4a2 2 0 0 1-2-2'/%3E%3C/svg%3E") }
  header.bar nav.tabs a[href="#account"] { order: 16; --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8.5' r='4'/%3E%3Cpath d='M4 21c0-4.4 3.6-7 8-7s8 2.6 8 7'/%3E%3C/svg%3E") }
  header.bar nav.tabs a[href="#billing"] { order: 17; --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='6' width='18' height='13' rx='3'/%3E%3Cpath d='M3 10.5h18M7 15h4'/%3E%3C/svg%3E") }
  header.bar nav.tabs a[href="#planner"] { margin-top: 16px; position: relative }
  header.bar nav.tabs a[href="#planner"]::after { content: ""; position: absolute; left: 14px; right: 14px; top: -9px; height: 1px; background: rgba(255, 255, 255, .10) }
  main#app { padding-top: 0 }
  #app .view:not(:has(> .panel.hero)) > :first-child, #app .view[data-bill] > .plans.bill-done + .panel { margin: 0; padding: 30px 30px 32px; border-radius: 0 0 44px 44px }
  #app .view { gap: 22px }
  /* Today as a dashboard: who you are on the left, the numbers on the right, then the business card with its plan, the chart, the match and the personal side. */
  #app .view:has(> .td-head) { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; padding-top: 26px }
  #app .view:has(> .td-head) > * { grid-column: 1 / -1 }
  #app .view > .td-head { grid-column: span 6; order: -3; align-self: stretch; margin: 0; padding: 34px 20px; border-radius: 40px 0 0 40px; display: grid; align-content: center; justify-items: center; background: linear-gradient(180deg, rgba(52, 44, 120, .88) 0%, rgba(30, 26, 76, .88) 55%, rgba(120, 92, 40, .62) 100%); box-shadow: 0 26px 50px -26px rgba(224, 177, 90, .5) }
  [dir=rtl] #app .view > .td-head { border-radius: 0 40px 40px 0 }
  #app .view:has(> .panel.hero:not(.has-mini)) > .td-head { grid-column: 1 / -1; border-radius: 40px }
  #app .view > .td-head .td-sign { width: 170px; height: 170px }
  #app .view > .td-head h2 { font-size: 2.4rem }
  #app .view > .td-block { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; gap: 22px; align-items: center }
  .td-block > .td-card:nth-child(1) { grid-column: 1 / -1 }
  .td-block > .td-card:nth-child(1) .td-ring .r { max-width: 118px }
  .td-block > .td-card:nth-child(1) .td-ring b { font-size: 1.35rem }
  .td-block > .td-card:nth-child(1) .td-ring span { font-size: .9rem }
  #app .view:has(> .td-head) > .two { grid-column: 1 / -1; grid-template-columns: 7fr 5fr; gap: 22px }
  #app .view > .panel.hero.td-chartonly { grid-column: span 6; order: -3; align-self: stretch; margin-inline-start: -22px; padding: 26px 20px; border-radius: 0 40px 40px 0; display: grid; align-content: center; background: linear-gradient(180deg, rgba(52, 44, 120, .88) 0%, rgba(30, 26, 76, .88) 55%, rgba(120, 92, 40, .62) 100%); box-shadow: 0 26px 50px -26px rgba(224, 177, 90, .5) }
  [dir=rtl] #app .view > .panel.hero.td-chartonly { border-radius: 40px 0 0 40px }
  #app .view > .panel.hero.td-chartonly .mini-chart { width: 100%; max-width: 300px }
  #app .view > .panel.hero.td-chartonly .mini-chart svg { max-width: 260px }
  #app .view:has(> .td-head) > .mt-card { grid-column: span 5; align-self: stretch; display: grid; align-content: center }
  #app .view:has(> .td-head) > .panel:nth-last-child(3) { grid-column: span 7; align-self: stretch }
  #app .view:has(> .td-head) > .panel:nth-last-child(2) { grid-column: span 7; padding-inline: 8px }
  #app .view:has(> .td-head) > .panel:nth-last-child(2) h2 { text-align: start }
  #app .view:has(> .td-head) > .panel:last-child { grid-column: span 5 }
  body:has(header.bar) > footer, body:has(header.bar) #root > footer { padding-top: 10px }
}
/* Wider screens: the three number cards share one row. */
@media (min-width: 1360px) {
  #app .view > .td-block { grid-template-columns: 1.3fr 1fr 1fr }
  .td-block > .td-card:nth-child(1) { grid-column: auto }
}
