/* Application journeys for চারাগল্প. Shared shell styles load first. */
.application-page {
  --app-paper: #f7f4eb;
  --app-card: #fffdf7;
  --app-ink: #193128;
  --app-muted: #647169;
  --app-line: #d9dfd5;
  --app-green: #174d35;
  --app-green-2: #28724e;
  --app-leaf: #b9d36b;
  --app-terracotta: #b95d3f;
  --app-marigold: #edae32;
  --app-error: #a33a2b;
  --app-success: #226942;
  --app-shadow: 0 20px 60px rgba(30, 62, 47, .11);
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--app-ink);
  background: var(--app-paper);
  font-family: "Noto Sans Bengali", "Hind Siliguri", "Nirmala UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
.application-page *, .application-page *::before, .application-page *::after { box-sizing: border-box; min-width: 0; }
.application-page img, .application-page video { display: block; max-width: 100%; }
.application-page a { color: inherit; text-underline-offset: .22em; }
.application-page button, .application-page input, .application-page textarea, .application-page select { font: inherit; }
.application-page button, .application-page label, .application-page select { -webkit-tap-highlight-color: transparent; }
.application-page [hidden] { display: none !important; }
.application-page .shell { width: min(100% - 32px, 1240px); margin-inline: auto; }
.application-page .skip-link { position: fixed; z-index: 1000; top: 8px; left: 8px; padding: 10px 14px; transform: translateY(-160%); border-radius: 8px; color: white; background: var(--app-green); }
.application-page .skip-link:focus { transform: translateY(0); }
.application-page :focus-visible { outline: 3px solid var(--app-marigold); outline-offset: 3px; }
.application-page h1, .application-page h2, .application-page h3, .application-page p { margin-top: 0; }
.application-page h1, .application-page h2, .application-page h3 { line-height: 1.2; letter-spacing: -.025em; }
.application-page h1 { font-size: clamp(2.05rem, 5vw, 4.5rem); }
.application-page h2 { font-size: clamp(1.45rem, 3vw, 2.15rem); }
.application-page .eyebrow, .application-page .step-label { margin-bottom: 8px; color: var(--app-terracotta); font-size: .78rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }

/* Shared shell fallback */
.application-page .site-header { position: relative; z-index: 20; border-bottom: 1px solid rgba(23, 77, 53, .12); background: rgba(247, 244, 235, .94); backdrop-filter: blur(14px); }
.application-page .header-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.application-page .brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.application-page .brand-mark { width: 42px; height: 42px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50% 50% 46% 54% / 62% 57% 43% 38%; color: #fff; background: var(--app-green); font-size: .84rem; font-weight: 900; transform: rotate(-5deg); }
.application-page .brand > span:last-child { display: grid; line-height: 1.05; }
.application-page .brand strong { font-size: 1.25rem; }
.application-page .brand small { display: none; margin-top: 5px; color: var(--app-muted); font-size: .68rem; }
.application-page .header-nav { display: none; align-items: center; gap: 24px; }
.application-page .header-nav a { font-weight: 700; text-decoration: none; }
.application-page .header-nav a:hover { color: var(--app-green-2); }
.application-page .site-footer { margin-top: 70px; border-top: 1px solid var(--app-line); background: #efeadd; }
.application-page .footer-inner { display: flex; flex-direction: column; gap: 12px; padding-block: 28px; color: var(--app-muted); font-size: .9rem; }
.application-page .footer-inner p { margin: 0; }
.application-page .footer-inner nav { display: flex; flex-wrap: wrap; gap: 16px; }

/* Controls */
.application-page .button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; border-radius: 999px; padding: 10px 22px; cursor: pointer; font-weight: 800; text-align: center; text-decoration: none; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.application-page .button:hover { transform: translateY(-1px); }
.application-page .button:disabled { cursor: wait; opacity: .72; transform: none; }
.application-page .button-small { min-height: 42px; padding-inline: 16px; font-size: .88rem; }
.application-page .button-primary { color: #fff; background: var(--app-green); box-shadow: 0 9px 24px rgba(23, 77, 53, .18); }
.application-page .button-primary:hover { background: #0f3c29; }
.application-page .button-secondary { color: var(--app-green); border-color: var(--app-green); background: transparent; }
.application-page .button-ghost { color: var(--app-green); border-color: var(--app-line); background: #fff; }
.application-page .button-block { width: 100%; }
.application-page .button-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.application-page .button-loader { width: 18px; height: 18px; display: none; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: app-spin .65s linear infinite; }
.application-page .is-loading .button-loader { display: inline-block; }
@keyframes app-spin { to { transform: rotate(360deg); } }

.application-page .application-form { display: grid; gap: 22px; }
.application-page .field-group { display: grid; gap: 7px; }
.application-page .field-group > label, .application-page legend { font-weight: 800; }
.application-page fieldset { margin: 0; padding: 0; border: 0; }
.application-page legend { margin-bottom: 10px; }
.application-page .label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.application-page .field-hint, .application-page .char-count, .application-page .optional-text { color: var(--app-muted); font-size: .8rem; font-weight: 500; }
.application-page input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .application-page textarea, .application-page select { width: 100%; border: 1px solid #cbd5ca; border-radius: 12px; padding: 12px 14px; color: var(--app-ink); background: #fff; box-shadow: 0 1px 0 rgba(20, 49, 39, .03); }
.application-page input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .application-page select { min-height: 49px; }
.application-page textarea { min-height: 180px; resize: vertical; }
.application-page input::placeholder, .application-page textarea::placeholder { color: #89958d; opacity: 1; }
.application-page input[aria-invalid="true"], .application-page textarea[aria-invalid="true"], .application-page select[aria-invalid="true"] { border-color: var(--app-error) !important; background: #fff9f7 !important; }
.application-page .field-error { min-height: 0; color: var(--app-error); font-size: .82rem; font-weight: 700; }
.application-page .field-error:empty { display: none; }
.application-page .check-field { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; color: #405048; font-size: .88rem; }
.application-page .check-field input { width: 18px; height: 18px; flex: 0 0 auto; margin: 3px 0 0; accent-color: var(--app-green); }
.application-page .check-field-boxed { padding: 14px; border: 1px solid var(--app-line); border-radius: 12px; background: #f9f8f2; }
.application-page .form-status { border: 1px solid currentColor; border-radius: 12px; padding: 12px 14px; font-size: .9rem; font-weight: 700; }
.application-page .form-status.is-error { color: var(--app-error); background: #fff2ee; }
.application-page .form-status.is-success { color: var(--app-success); background: #eff9f2; }
.application-page .form-status.is-info { color: #315b68; background: #f0f7f8; }

/* Authentication */
.auth-page .auth-layout { display: grid; gap: 28px; padding-block: 28px; }
.auth-page .auth-story { position: relative; min-height: 460px; overflow: hidden; border-radius: 24px; color: #fff; background: var(--app-green); box-shadow: var(--app-shadow); }
.auth-page .auth-story-media, .auth-page .auth-story-media::after { position: absolute; inset: 0; }
.auth-page .auth-story-media::after { content: ""; background: linear-gradient(180deg, rgba(9, 35, 24, .18) 12%, rgba(9, 35, 24, .96) 100%); }
.auth-page .auth-story-media img { width: 100%; height: 100%; object-fit: cover; }
.auth-page .auth-story-copy { position: absolute; z-index: 1; inset: auto 20px 22px; max-width: 720px; padding: clamp(16px, 3vw, 24px); border: 1px solid rgba(255,255,255,.18); border-radius: 20px; color: #fff; background: #123a29; box-shadow: 0 16px 40px rgba(7, 25, 17, .24); }
.auth-page .auth-story-copy .eyebrow { color: #dff1cf; }
.auth-page .auth-story-copy h1 { max-width: 690px; margin-bottom: 14px; color: #fff; font-size: clamp(2rem, 6vw, 4.4rem); }
.auth-page .auth-story-copy > p:not(.eyebrow):not(.privacy-note) { max-width: 600px; margin-bottom: 18px; color: #f4f7f2; }
.auth-page .privacy-note { width: fit-content; margin: 0; padding: 7px 11px; border: 1px solid rgba(255,255,255,.42); border-radius: 999px; color: #fff; background: #092b1d; font-size: .8rem; }
.auth-page .auth-workspace { display: grid; gap: 22px; align-content: start; }
.auth-page .auth-card, .auth-page .auth-benefits { border: 1px solid rgba(23,77,53,.11); border-radius: 20px; background: var(--app-card); box-shadow: 0 12px 38px rgba(40, 62, 49, .07); }
.auth-page .auth-card { padding: 22px; }
.auth-page .auth-heading { margin-bottom: 20px; }
.auth-page .auth-heading h2 { margin-bottom: 8px; }
.auth-page .auth-heading > p:last-child { margin-bottom: 0; color: var(--app-muted); }
.auth-page .tab-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 22px; padding: 4px; border-radius: 12px; background: #eceee7; }
.auth-page .tab-button { min-height: 44px; border: 0; border-radius: 9px; cursor: pointer; color: var(--app-muted); background: transparent; font-weight: 800; }
.auth-page .tab-button.is-active { color: var(--app-green); background: #fff; box-shadow: 0 3px 12px rgba(25, 49, 40, .08); }
.auth-page .password-field { position: relative; }
.auth-page .password-field input { padding-right: 74px !important; }
.auth-page .password-toggle { position: absolute; top: 50%; right: 8px; min-height: 34px; border: 0; border-radius: 7px; padding-inline: 9px; transform: translateY(-50%); cursor: pointer; color: var(--app-green); background: #edf4ee; font-size: .78rem; font-weight: 800; }
.auth-page .password-meter { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.auth-page .password-meter span { height: 4px; border-radius: 4px; background: #dde2da; }
.auth-page .password-meter[data-strength="1"] span:first-child { background: var(--app-error); }
.auth-page .password-meter[data-strength="2"] span:nth-child(-n+2) { background: var(--app-marigold); }
.auth-page .password-meter[data-strength="3"] span { background: var(--app-success); }
.auth-page .form-options { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.auth-page .form-options > a { color: var(--app-green); font-size: .84rem; font-weight: 700; }
.auth-page .form-fine-print { margin: -8px 0 0; color: var(--app-muted); font-size: .75rem; text-align: center; }
.auth-page .auth-signed-in { padding-block: 20px 10px; text-align: center; }
.application-page .success-seal { width: 54px; height: 54px; display: grid; margin: 0 auto 14px; place-items: center; border-radius: 50%; color: #fff; background: var(--app-success); font-size: 1.6rem; box-shadow: 0 0 0 8px #e5f2e8; }
.auth-page .auth-signed-in h3 { margin-bottom: 8px; font-size: 1.55rem; }
.auth-page .auth-signed-in p { color: var(--app-muted); }
.auth-page .auth-benefits { padding: 22px; }
.auth-page .benefit-list { display: grid; gap: 14px; margin: 18px 0 0; padding: 0; list-style: none; }
.auth-page .benefit-list li { display: flex; gap: 13px; }
.auth-page .benefit-list li > span { width: 34px; height: 34px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 10px; color: var(--app-green); background: #e8f1da; font-weight: 900; }
.auth-page .benefit-list strong { display: block; }
.auth-page .benefit-list p { margin: 2px 0 0; color: var(--app-muted); font-size: .84rem; }

/* Composer */
.create-post-page .composer-intro { padding-block: 42px 30px; border-bottom: 1px solid var(--app-line); background: linear-gradient(110deg, #f7f4eb 50%, #eef0dd); }
.create-post-page .intro-inner { display: grid; gap: 22px; }
.create-post-page .intro-inner h1 { max-width: 760px; margin-bottom: 12px; }
.create-post-page .intro-inner > div:first-child > p:last-child { max-width: 750px; margin-bottom: 0; color: var(--app-muted); font-size: 1.04rem; }
.create-post-page .good-post-tip { display: flex; align-items: flex-start; gap: 12px; align-self: end; padding: 16px; border: 1px solid #d6ddbd; border-radius: 16px; background: rgba(255, 253, 247, .78); }
.create-post-page .good-post-tip > span { color: var(--app-terracotta); }
.create-post-page .good-post-tip p { margin: 0; font-size: .88rem; }
.create-post-page .composer-layout { display: grid; gap: 24px; padding-block: 30px; }
.create-post-page .composer-card, .create-post-page .live-preview-section, .create-post-page .guidelines-card { border: 1px solid rgba(23,77,53,.12); border-radius: 20px; background: var(--app-card); box-shadow: 0 12px 38px rgba(40, 62, 49, .06); }
.create-post-page .composer-card { padding: 20px; }
.create-post-page .section-heading, .create-post-page .preview-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.create-post-page .section-heading h2, .create-post-page .preview-heading h2 { margin-bottom: 0; }
.create-post-page .autosave-note { max-width: 250px; color: var(--app-muted); font-size: .75rem; text-align: right; }
.create-post-page .type-options { display: grid; gap: 10px; }
.create-post-page .type-option { position: relative; display: flex; align-items: center; gap: 11px; min-height: 76px; border: 1px solid var(--app-line); border-radius: 14px; padding: 12px; cursor: pointer; background: #fff; }
.create-post-page .type-option:has(input:checked) { border-color: var(--app-green); background: #f0f7ed; box-shadow: inset 0 0 0 1px var(--app-green); }
.create-post-page .type-option input { position: absolute; opacity: 0; pointer-events: none; }
.create-post-page .type-icon { width: 38px; height: 38px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 12px; color: var(--app-green); background: #e7eed8; font-size: 1.1rem; font-weight: 900; }
.create-post-page .type-option strong, .create-post-page .type-option small { display: block; }
.create-post-page .type-option small { color: var(--app-muted); font-size: .75rem; }
.create-post-page .form-grid-two { display: grid; gap: 18px; }
.create-post-page .upload-zone { min-height: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: 1.5px dashed #9fb09d; border-radius: 16px; padding: 24px 16px; cursor: pointer; color: var(--app-muted); background: #f8faf4; text-align: center; transition: border .15s, background .15s; }
.create-post-page .upload-zone:hover, .create-post-page .upload-zone.is-dragging { border-color: var(--app-green); background: #eff6e8; }
.create-post-page .upload-zone input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.create-post-page .upload-zone strong { color: var(--app-green); }
.create-post-page .upload-zone small { font-size: .76rem; }
.create-post-page .upload-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--app-green); font-size: 1.4rem; }
.create-post-page .media-preview-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.create-post-page .media-preview-item { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: 12px; background: #dfe6da; }
.create-post-page .media-preview-item img, .create-post-page .media-preview-item video { width: 100%; height: 100%; object-fit: cover; }
.create-post-page .media-preview-item .media-label { position: absolute; inset: auto 8px 8px; overflow: hidden; padding: 3px 7px; border-radius: 6px; color: #fff; background: rgba(14, 33, 25, .68); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.create-post-page .remove-media { position: absolute; z-index: 2; top: 7px; right: 7px; width: 32px; height: 32px; border: 0; border-radius: 50%; cursor: pointer; color: #fff; background: rgba(124, 34, 25, .88); font-size: 1rem; }
.create-post-page .upload-progress { margin-top: 13px; }
.create-post-page .progress-copy { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 5px; color: var(--app-muted); font-size: .8rem; }
.create-post-page progress { width: 100%; height: 8px; overflow: hidden; border: 0; border-radius: 999px; accent-color: var(--app-green); }
.create-post-page .composer-actions { display: flex; flex-direction: column-reverse; gap: 10px; padding-top: 5px; }
.create-post-page .composer-sidebar { display: grid; gap: 20px; align-content: start; }
.create-post-page .live-preview-section, .create-post-page .guidelines-card { padding: 20px; }
.create-post-page .live-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--app-success); font-size: .72rem; font-weight: 800; }
.create-post-page .live-badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px #e5f2e8; }
.create-post-page .post-preview-card { overflow: hidden; border: 1px solid var(--app-line); border-radius: 16px; background: #fff; }
.create-post-page .preview-author { display: flex; align-items: center; gap: 10px; padding: 15px; }
.create-post-page .avatar-placeholder { width: 40px; height: 40px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #fff; background: var(--app-terracotta); font-weight: 900; }
.create-post-page .preview-author div { flex: 1; }
.create-post-page .preview-author strong, .create-post-page .preview-author small { display: block; }
.create-post-page .preview-author small { color: var(--app-muted); font-size: .72rem; }
.create-post-page .preview-type { align-self: flex-start; border-radius: 999px; padding: 4px 8px; color: var(--app-green); background: #edf4e9; font-size: .67rem; font-weight: 800; }
.create-post-page .preview-content { padding: 0 15px 13px; }
.create-post-page .preview-content h3 { margin-bottom: 7px; font-size: 1.14rem; overflow-wrap: anywhere; }
.create-post-page .preview-content p { display: -webkit-box; overflow: hidden; margin: 0; color: #526158; font-size: .86rem; overflow-wrap: anywhere; -webkit-line-clamp: 5; -webkit-box-orient: vertical; }
.create-post-page .preview-media { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; max-height: 280px; overflow: hidden; background: #e3e8df; }
.create-post-page .preview-media > * { width: 100%; height: 140px; object-fit: cover; }
.create-post-page .preview-media > :only-child { grid-column: 1 / -1; height: 240px; }
.create-post-page .preview-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 15px; padding: 0; list-style: none; }
.create-post-page .preview-tags li { border-radius: 999px; padding: 3px 8px; color: var(--app-green); background: #edf4e9; font-size: .68rem; font-weight: 700; }
.create-post-page .preview-engagement { display: flex; justify-content: space-between; gap: 6px; border-top: 1px solid var(--app-line); padding: 11px 15px; color: var(--app-muted); font-size: .72rem; }
.create-post-page .guidelines-card h2 { margin-bottom: 12px; font-size: 1.28rem; }
.create-post-page .guidelines-card ul { display: grid; gap: 9px; margin: 0 0 17px; padding-left: 20px; color: var(--app-muted); font-size: .86rem; }
.create-post-page .guidelines-card a { color: var(--app-green); font-size: .86rem; font-weight: 800; }
.application-page .success-dialog { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(12, 31, 22, .7); backdrop-filter: blur(6px); }
.application-page .success-dialog-card { width: min(100%, 500px); border-radius: 22px; padding: 30px 22px; background: var(--app-card); box-shadow: var(--app-shadow); text-align: center; }
.application-page .success-dialog-card h2 { margin-bottom: 10px; }
.application-page .success-dialog-card > p:not(.eyebrow) { color: var(--app-muted); }

@media (min-width: 640px) {
  .application-page .shell { width: min(100% - 48px, 1240px); }
  .application-page .brand small { display: block; }
  .application-page .header-nav { display: flex; }
  .application-page .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
  .auth-page .auth-layout { padding-block: 44px; }
  .auth-page .auth-story-copy { inset: auto 34px 34px; }
  .auth-page .auth-card, .auth-page .auth-benefits { padding: 32px; }
  .auth-page .form-options { flex-direction: row; align-items: center; justify-content: space-between; }
  .auth-page .benefit-list { grid-template-columns: repeat(3, 1fr); }
  .create-post-page .intro-inner { grid-template-columns: minmax(0, 1fr) minmax(260px, .45fr); align-items: end; }
  .create-post-page .composer-card, .create-post-page .live-preview-section, .create-post-page .guidelines-card { padding: 28px; }
  .create-post-page .type-options { grid-template-columns: repeat(3, 1fr); }
  .create-post-page .type-option { align-items: flex-start; flex-direction: column; }
  .create-post-page .form-grid-two { grid-template-columns: 1fr 1fr; }
  .create-post-page .media-preview-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .create-post-page .composer-actions { flex-direction: row; justify-content: flex-end; }
  .create-post-page .composer-sidebar { grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr); }
}

@media (min-width: 1080px) {
  .auth-page .auth-layout { min-height: calc(100vh - 75px); grid-template-columns: minmax(0, 1.08fr) minmax(410px, .72fr); align-items: center; gap: 46px; padding-block: 48px; }
  .auth-page .auth-story { min-height: 720px; }
  .auth-page .auth-workspace { max-height: calc(100vh - 110px); overflow-y: auto; padding: 4px 14px 30px 4px; scrollbar-width: thin; }
  .auth-page .benefit-list { grid-template-columns: 1fr; }
  .create-post-page .composer-layout { grid-template-columns: minmax(0, 1.55fr) minmax(340px, .8fr); align-items: start; gap: 30px; padding-block: 42px; }
  .create-post-page .composer-sidebar { position: sticky; top: 22px; display: grid; grid-template-columns: 1fr; }
}

@media (min-width: 1400px) {
  .application-page .header-inner { min-height: 82px; }
  .auth-page .auth-layout { gap: 64px; }
  .auth-page .auth-card, .auth-page .auth-benefits { padding: 36px; }
  .create-post-page .composer-card { padding: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .application-page *, .application-page *::before, .application-page *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
