/* Home. A calm band at the top (greeting + encouragement line), one primary
   card, a tidy list of shortcuts, and a quiet "How it works". */
html:not([data-bg]) .homePage { background: var(--page-base); }
.homePage { --home-soft: #e2ece6; }
html[data-bg] .homePage { --home-soft: #ffffff1c; }

/* Band: Default keeps the teal-over-light-gray look, sized to its content so it
   never cuts through text. Other backgrounds show through it. */
.homeBand { padding: 26px 20px 76px; color: #fff; background-color: #123b3a; background-image: radial-gradient(70% 90% at 12% 0%, #1f5d54 0%, #1f5d5400 70%), radial-gradient(60% 80% at 100% 100%, #0c2f2f 0%, #0c2f2f00 72%); background-size: 180% 180%; animation: homeDrift 50s ease-in-out infinite alternate; }
html[data-bg] .homeBand { background-color: transparent; background-image: radial-gradient(70% 90% at 12% 0%, #ffffff10 0%, #ffffff00 70%); }
@keyframes homeDrift { from { background-position: 0% 0%; } to { background-position: 100% 70%; } }
.homeHeader { max-width: 560px; margin: 0 auto; padding: 0 4px; }
.homeHeader .brand { margin-bottom: 34px; }
.homeHeader .organizationLabel { margin-top:-23px; margin-bottom:19px; }
.homePage .settingsButton { border-color: #ffffff30; background: #ffffff12; }
.homeDate { color: #a9cfc2; font-size: 11px; font-weight: 650; letter-spacing: 1.5px; text-transform: uppercase; }
.homeGreeting { margin: 8px 0 10px; color: #fff; font-size: clamp(28px, 8.2vw, 34px); font-weight: 600; line-height: 1.15; letter-spacing: -.4px; overflow-wrap: anywhere; }
.encLine.homeLine { max-width: 440px; margin: 0; color: #d3e7df; font-size: 15.5px; line-height: 1.5; }

/* Content overlaps the bottom of the band. */
.home { position: relative; gap: 16px; margin-top: -52px; padding-top: 0; }
.home :is(.homeMain, .homeShortcuts, .homeGuide) { zoom: var(--text-zoom, 1); }
.homeMain, .homeShortcuts { min-width: 0; border-radius: 24px; background: #fff; box-shadow: 0 1px 2px #0b1f1c0f, 0 14px 34px #0b1f1c17; }
.homeMain { padding: 16px 16px 14px; }

.homeStatus { display: flex; align-items: center; gap: 8px; min-height: 20px; margin: 2px 2px 14px; color: #577567; font-size: 13px; font-weight: 550; line-height: 1.4; overflow-wrap: anywhere; }
.homeStatus[data-state="ready"]::before { content: ""; flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: #3aa877; box-shadow: 0 0 0 4px #3aa8772b; }

.workspaceLink { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 74px; padding: 14px 16px 14px 14px; border-radius: 18px; background: linear-gradient(135deg, #1c7658, #145c45); color: #fff; text-decoration: none; font-size: 16.5px; font-weight: 650; line-height: 1.25; box-shadow: 0 8px 20px #17684e33; -webkit-tap-highlight-color: transparent; }
.workspaceLink:active { transform: translateY(1px); filter: brightness(.95); }
.workspaceIcon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: #ffffff1f; }
.workspaceText small { display: block; margin-top: 3px; color: #cfe9dd; font-size: 12.5px; font-weight: 500; }
.goArrow { display: grid; opacity: .9; }

.homeAccount { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin: 14px 2px 0; color: #647f73; font-size: 13px; line-height: 1.45; }
.homeAccount span { min-width: 0; overflow-wrap: anywhere; }
.homeAccount strong { color: #2c4a3f; font-weight: 600; }
.subtleLink { color: #1d6a4e; font-size: 13px; font-weight: 650; text-underline-offset: 3px; }

/* Shortcuts: one card, quiet rows. */
.homeShortcuts { display: grid; padding: 6px 0; }
.shortcut { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 64px; padding: 11px 16px 11px 16px; color: #1f3f36; text-decoration: none; font-size: 16px; font-weight: 620; line-height: 1.25; -webkit-tap-highlight-color: transparent; }
.shortcut + .shortcut::before { content: ""; position: absolute; top: 0; left: 70px; right: 16px; border-top: 1px solid #edf2ef; }
.shortcut:active { background: #f4f8f6; }
.shortcutIcon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #ebf4ef; color: #1d6a4e; }
.shortcutText small { display: block; margin-top: 2px; color: #6b857a; font-size: 12.5px; font-weight: 500; overflow-wrap: anywhere; }
.shortcutChev { display: grid; color: #a3b8ae; }

/* How it works: right on the background, no box. */
.homeGuide { padding: 8px 8px 0; color: var(--page-ink); }
.guideHeading { margin-bottom: 12px; font-size: 13px; font-weight: 700; letter-spacing: .2px; }
.homeGuide ol { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.homeGuide li { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 1.45; }
.homeGuide li span { display: grid; place-items: center; flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; background: var(--home-soft); font-size: 11px; font-weight: 700; }

.homeFooter { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding: 10px 8px 4px; font-size: 12.5px; }
.homeFooter a { color: var(--page-ink); text-underline-offset: 3px; }

@media (max-width: 360px) { .homeBand { padding-left: 12px; padding-right: 12px; } }
@media (prefers-reduced-motion: reduce) { .homeBand { animation: none; } }

/* Home is a small reading room: a soft cover, a paper calling desk, and a
   simple shelf of places to continue. These rules intentionally sit last so
   background and dark-mode choices still apply underneath the design. */
.homePage { background: radial-gradient(circle at 12% 8%, #ffffff26 0 1px, transparent 1.5px) 0 0 / 18px 18px, var(--page-base); }
.homeBand { position: relative; min-height: 310px; padding: 28px 22px 112px; background-color: #29473b; background-image: radial-gradient(80% 110% at 6% -10%, #6e8d72 0%, #6e8d7200 65%), radial-gradient(75% 100% at 110% 110%, #122c29 0%, #122c2900 70%); }
.homeBand::after { content: ""; position: absolute; right: 8%; bottom: 26px; width: 92px; height: 118px; border: 1px solid #f3ead633; border-radius: 2px 16px 16px 2px; box-shadow: -12px 8px 0 #f3ead611, -24px 16px 0 #f3ead608; transform: rotate(6deg); pointer-events: none; }
.homeHeader { position: relative; z-index: 1; }
.homeHeader .brand { margin-bottom: 40px; font-family: Georgia, "Times New Roman", serif; font-size: 16px; letter-spacing: .4px; }
.homeDate { color: #d8e4cf; font-family: Georgia, "Times New Roman", serif; font-size: 13px; font-weight: 400; letter-spacing: .2px; text-transform: none; }
.homeHeader .organizationLabel { margin-top: -24px; margin-bottom: 23px; }
.homeKicker { margin: 0 0 7px; color: #c9d8c3; font-size: 11px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; }
.homeGreeting { max-width: 330px; margin: 3px 0 12px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(34px, 10vw, 42px); font-weight: 400; letter-spacing: -.9px; }
.encLine.homeLine { max-width: 310px; color: #e6ecda; font-family: Georgia, "Times New Roman", serif; font-size: 16px; font-style: italic; line-height: 1.55; }
.home { gap: 20px; margin-top: -86px; padding: 0 17px 32px; }
.homeMain, .homeShortcuts { border: 1px solid #dfd2b8; border-radius: 6px 18px 18px 6px; background: linear-gradient(100deg, #f7efdE 0%, #fffaf0 15%, #fffaf0 100%); box-shadow: 0 3px 8px #32241217, 0 18px 42px #3224121f; }
.homeMain { position: relative; padding: 21px 20px 18px 27px; overflow: hidden; }
.homeMain::before { content: ""; position: absolute; top: 0; bottom: 0; left: 12px; width: 1px; background: #d8b98c88; }
.homeChapter { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; color: #8a6941; font-size: 10px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }
.homeChapter i { flex: 1; height: 1px; background: linear-gradient(90deg, #d8b98c, transparent); }
.homeStatus { margin: 0 0 13px; color: #786b58; font-family: Georgia, "Times New Roman", serif; font-size: 14px; }
.homeStatus[data-state="ready"]::before { background: #b98b49; box-shadow: 0 0 0 4px #b98b4926; }
.workspaceLink { min-height: 88px; border-radius: 12px; background: linear-gradient(135deg, #58745d, #26483d); box-shadow: 0 8px 20px #27423840; font-family: Georgia, "Times New Roman", serif; font-size: 19px; font-weight: 400; }
.workspaceIcon { border-radius: 50%; background: #f4ead62b; }
.workspaceText small { color: #dfe7d5; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 11.5px; }
.homeAccount { margin: 14px 0 0; color: #766956; font-size: 12px; }
.homeAccount strong, .subtleLink { color: #705331; }
.homeShortcuts { display: grid; padding: 12px 0 7px; }
.shelfLabel { padding: 0 21px 10px; color: #896a43; font-family: Georgia, "Times New Roman", serif; font-size: 17px; font-style: italic; }
.shortcut { min-height: 69px; padding: 12px 20px; color: #493d2e; font-family: Georgia, "Times New Roman", serif; font-size: 17px; font-weight: 400; }
.shortcut + .shortcut::before { left: 74px; right: 20px; border-color: #eadfca; }
.shortcut:active { background: #f4ead9; }
.shortcutIcon { width: 38px; height: 38px; border-radius: 50%; background: #eee1c8; color: #785b35; }
.shortcutText small { color: #877965; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 11.5px; }
.shortcutChev { color: #b29a77; }
.homeGuide { position: relative; padding: 7px 14px 2px; color: var(--page-ink); }
.guideHeading { color: inherit; font-family: Georgia, "Times New Roman", serif; font-size: 19px; font-style: italic; font-weight: 400; }
.homeGuide li { font-family: Georgia, "Times New Roman", serif; font-size: 15px; }
.homeGuide li span { background: #ffffff2b; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.homeFooter { padding: 9px 14px 5px; font-family: Georgia, "Times New Roman", serif; }
html[data-theme="dark"] .homeMain, html[data-theme="dark"] .homeShortcuts { background: linear-gradient(100deg, #2f2a22, #252923); border-color: #514735; box-shadow: 0 18px 42px #00000040; }
html[data-theme="dark"] .homeMain::before { background: #9c7c4b99; }
html[data-theme="dark"] :is(.homeChapter,.shelfLabel,.homeAccount,.homeStatus) { color: #c6b89e; }
html[data-theme="dark"] :is(.shortcut,.homeAccount strong,.subtleLink) { color: #f2e7d3; }
html[data-theme="dark"] .shortcutText small { color: #c4b9a6; }
html[data-theme="dark"] .shortcut + .shortcut::before { border-color: #4e473b; }

/* Separate the two primary home actions without changing hidden auth states. */
.homeState > .workspaceLink + .workspaceLink { margin-top: 16px; }
