/* Density calculator */
.density-page { overflow: hidden; color: #2a1535; background: #fff; }
.density-hero { position: relative; padding: 26px max(24px, calc((100% - 1180px) / 2)) 72px; background: linear-gradient(135deg, #fcf9ff 0%, #f2e6f9 58%, #fff 100%); isolation: isolate; }
.density-hero::before, .density-hero::after { content: ''; position: absolute; z-index: -1; pointer-events: none; border: 1px solid rgba(123, 47, 190, .11); border-radius: 50%; }
.density-hero::before { width: 620px; height: 620px; right: -230px; top: 76px; box-shadow: 0 0 0 34px rgba(123, 47, 190, .035), 0 0 0 70px rgba(123, 47, 190, .022); }
.density-hero::after { width: 230px; height: 230px; left: -135px; bottom: -110px; background: rgba(255, 255, 255, .25); }
.density-breadcrumbs { max-width: 1180px; margin: 0 auto; }
.density-heading { max-width: 840px; margin: 19px auto 0; text-align: center; }
.density-eyebrow { display: inline-flex; align-items: center; gap: 12px; color: var(--purple); font-size: 11px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.density-eyebrow-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 18px; background: rgba(255,255,255,.84); box-shadow: 0 11px 22px rgba(75, 30, 99, .12); }
.density-eyebrow-icon img { width: 75px; height: 75px; display: block; object-fit: contain; }
.density-heading h1 { margin: 18px 0 0; color: #331044; font-family: var(--display), Georgia, serif; font-size: clamp(48px, 7vw, 86px); font-weight: 500; line-height: .98; letter-spacing: -.065em; }
.density-hero-subtitle { max-width: 760px; margin: 20px auto 0; color: #77667f; font-size: 18px; line-height: 1.6; }
.density-calculator { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(390px, .9fr); max-width: 1180px; min-height: 550px; margin: 30px auto 0; overflow: hidden; border: 1px solid #ded1e6; border-radius: 30px; background: #fff; box-shadow: 0 30px 72px rgba(69, 27, 91, .15); }
.density-input-panel { padding: 31px; background: rgba(255,255,255,.96); }
.density-panel-topline, .density-result-topline { display: flex; justify-content: space-between; align-items: center; gap: 15px; color: #806b8a; font-size: 12px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.density-live, .density-result-status { display: inline-flex; align-items: center; gap: 7px; color: var(--purple); white-space: nowrap; }
.density-live i, .density-result-status i { width: 8px; height: 8px; display: inline-block; border-radius: 50%; background: #913dd3; box-shadow: 0 0 0 5px #f0e2f8; }
.density-panel-heading { display: flex; align-items: center; gap: 16px; margin-top: 25px; }
.density-panel-heading h2 { margin: 6px 0 0; color: #24122e; font-size: clamp(28px, 3vw, 39px); font-weight: 600; line-height: 1.03; letter-spacing: -.05em; }
.density-panel-icon { width: 74px; height: 74px; flex: 0 0 74px; display: grid; place-items: center; border-radius: 23px; background: linear-gradient(145deg, #f0e2f8, #fff); }
.density-panel-icon img { width: 110px; height: 110px; display: block; object-fit: contain; }
.density-kicker, .density-card-kicker { display: block; color: var(--purple); font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.density-panel-lead { max-width: 540px; margin: 17px 0 0; color: #776b7f; font-size: 16px; line-height: 1.55; }
.density-fields { display: grid; gap: 15px; margin-top: 24px; }
.density-field-group { min-width: 0; }
.density-field-label { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: #4e3b57; font-size: 14px; font-weight: 800; }
.density-field-label i { width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 8px; background: #f0e3f7; color: var(--purple); font-size: 12px; font-style: normal; font-weight: 900; }
.density-field-control { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 9px; }
.density-field-control input, .density-field-control select, .density-result-unit select, .density-converter-control input, .density-converter-control select { width: 100%; height: 56px; border: 1px solid #ddd0e4; border-radius: 15px; outline: 0; background: #fff; color: #271432; font: inherit; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease; }
.density-field-control input, .density-converter-control input { padding: 0 16px; font-size: 20px; font-weight: 800; }
.density-field-control input::placeholder, .density-converter-control input::placeholder { color: #b8aabe; font-size: 16px; font-weight: 500; }
.density-field-control select, .density-result-unit select, .density-converter-control select { padding: 0 13px; color: #4d3857; font-size: 14px; font-weight: 800; }
.density-field-control input:focus, .density-field-control select:focus, .density-result-unit select:focus, .density-converter-control input:focus, .density-converter-control select:focus { border-color: #994ed0; box-shadow: 0 0 0 4px rgba(143,59,209,.12); background: #fffdff; }
.density-hint { display: flex; align-items: flex-start; gap: 10px; margin-top: 17px; padding: 12px 14px; border-radius: 15px; background: #f8f0fb; color: #76657d; }
.density-hint > span, .density-note > span { width: 21px; height: 21px; flex: 0 0 21px; display: grid; place-items: center; border-radius: 50%; background: #e9d7f3; color: var(--purple); font-size: 12px; font-weight: 900; }
.density-hint p, .density-note p { margin: 0; font-size: 14px; line-height: 1.45; }
.density-actions { display: grid; grid-template-columns: minmax(0, 1fr) 105px; gap: 10px; margin-top: 19px; }
.density-submit, .density-reset, .density-converter-clear { min-height: 51px; border: 0; border-radius: 15px; font: inherit; font-size: 16px; font-weight: 900; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.density-submit { background: linear-gradient(120deg, #7523b9, #993ed0); color: #fff; box-shadow: 0 13px 24px rgba(123,47,190,.24); }
.density-submit span { margin-left: 8px; font-size: 18px; }
.density-submit:hover { box-shadow: 0 17px 30px rgba(123,47,190,.3); transform: translateY(-2px); }
.density-reset, .density-converter-clear { border: 1px solid #dfd0e5; background: #fbf8fc; color: #765d80; }
.density-reset:hover, .density-converter-clear:hover { background: #f3e9f7; }
.density-result-panel { position: relative; display: flex; flex-direction: column; padding: 31px; overflow: hidden; background: linear-gradient(145deg, #fffaff 0%, #f6eafb 58%, #eee0f7 100%); }
.density-result-panel::before, .density-result-panel::after { content: ''; position: absolute; pointer-events: none; border: 1px solid rgba(123,47,190,.12); border-radius: 50%; }
.density-result-panel::before { width: 510px; height: 510px; right: -270px; top: 95px; box-shadow: 0 0 0 30px rgba(123,47,190,.04), 0 0 0 60px rgba(123,47,190,.025); }
.density-result-panel::after { width: 180px; height: 180px; left: -100px; bottom: -45px; }
.density-result-unit { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; color: #8b6f94; font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.density-result-unit select { width: 150px; height: 39px; padding: 0 10px; font-size: 13px; letter-spacing: 0; text-transform: none; }
.density-result-content { position: relative; z-index: 1; display: flex; flex: 1; flex-direction: column; justify-content: center; min-height: 460px; }
.density-empty-state, .density-error-state { max-width: 360px; margin: auto; text-align: center; }
.density-empty-icon { width: 118px; height: 118px; display: grid; place-items: center; margin: 0 auto 17px; border: 1px solid #e1d2e8; border-radius: 31px; background: rgba(255,255,255,.75); box-shadow: 0 18px 34px rgba(84,35,107,.11); }
.density-empty-icon img { width: 160px; height: 160px; display: block; object-fit: contain; }
.density-empty-state h2, .density-error-state h2 { margin: 0; color: #351444; font-size: 31px; font-weight: 600; letter-spacing: -.045em; }
.density-empty-state p, .density-error-state p { margin: 11px 0 0; color: #806f87; font-size: 16px; line-height: 1.55; }
.density-error-state > span { width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 21px; background: #f6dce9; color: #ac356a; font-size: 30px; font-weight: 900; }
.density-result-ready { display: flex; flex-direction: column; align-items: center; text-align: center; animation: density-rise .38s ease both; }
.density-result-illustration { width: 170px; height: 154px; display: grid; place-items: center; margin-bottom: 12px; }
.density-result-illustration img { width: 154px; height: 154px; display: block; object-fit: contain; }
.density-result-ready small { color: #8b6b95; font-size: 12px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.density-result-ready strong { display: block; margin-top: 5px; color: #461254; font-size: clamp(49px, 6vw, 76px); font-weight: 850; line-height: .94; letter-spacing: -.07em; }
.density-result-ready > span { display: block; margin-top: 8px; color: #786583; font-size: 16px; font-weight: 800; }
.density-formula-result { width: min(410px, 100%); margin: 22px auto 0; padding: 15px 18px; border: 1px solid #e1d1e8; border-radius: 18px; background: rgba(255,255,255,.76); box-shadow: 0 12px 24px rgba(91,37,115,.07); text-align: left; }
.density-formula-result > span { color: #8a6a95; font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.density-formula-result strong { display: block; margin-top: 7px; color: #54226c; font-size: 19px; line-height: 1.35; }
.density-formula-result p { margin: 5px 0 0; color: #725f7c; font-size: 14px; line-height: 1.45; }
.density-formula-result p b { color: #7424b5; }
@keyframes density-rise { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.density-hero-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 19px auto 0; color: #79677f; font-size: 14px; text-align: center; }
.density-hero-note span { color: #7d2ab9; font-weight: 900; }
.density-converter-section { padding: 75px max(24px, calc((100% - 1100px) / 2)); background: #f8f1fb; }
.density-section-heading { display: flex; align-items: flex-start; gap: 17px; }
.density-section-number { width: 49px; height: 49px; flex: 0 0 49px; display: grid; place-items: center; border: 1px solid #dfd0e6; border-radius: 16px; background: #fff; color: var(--purple); font-size: 12px; font-weight: 900; box-shadow: 0 12px 23px rgba(85,31,109,.08); }
.density-section-heading p { margin: 0; color: var(--purple); font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.density-section-heading h2 { margin: 8px 0 0; color: #24142f; font-size: clamp(34px, 5vw, 60px); font-weight: 600; line-height: 1.02; letter-spacing: -.065em; }
.density-section-lead { max-width: 760px; margin: 19px 0 0 66px; color: #766b7d; font-size: 18px; line-height: 1.62; }
.density-converter-card { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 24px; margin-top: 34px; padding: 27px; border: 1px solid #ded1e7; border-radius: 25px; background: #fff; box-shadow: 0 19px 38px rgba(75,30,94,.07); }
.density-converter-controls { display: grid; grid-template-columns: 1.1fr 1fr 40px 1fr; gap: 10px; align-items: end; }
.density-converter-control label { display: block; margin-bottom: 8px; color: #4e3b57; font-size: 13px; font-weight: 800; }
.density-converter-control input, .density-converter-control select { height: 54px; }
.density-converter-arrow { display: grid; place-items: center; height: 54px; color: #8a32c6; font-size: 24px; font-weight: 700; }
.density-converter-output { display: flex; min-height: 132px; flex-direction: column; justify-content: center; padding: 18px; border-radius: 20px; background: linear-gradient(145deg,#f0e0f8,#faf5fd); }
.density-converter-output small { color: #896a94; font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.density-converter-output strong { margin-top: 6px; color: #4d1762; font-size: 30px; line-height: 1.08; letter-spacing: -.05em; }
.density-converter-output span { margin-top: 5px; color: #786582; font-size: 14px; }
.density-converter-clear { min-height: 44px; margin-top: 13px; font-size: 14px; }
.density-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 15px; color: #77667f; }
.density-content-section { padding: 82px max(24px, calc((100% - 1100px) / 2)); background: #fff; }
.density-tinted { background: #fbf7fd; }
.density-step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-top: 38px; }
.density-step-card { min-height: 285px; padding: 23px; border: 1px solid #e1d4e7; border-radius: 23px; background: #fff; box-shadow: 0 17px 35px rgba(75,30,94,.07); }
.density-step-visual { position: relative; width: 92px; height: 92px; display: grid; place-items: center; margin-bottom: 25px; border: 1px solid #e3d5e9; border-radius: 27px; background: linear-gradient(145deg,#fbf5fd,#fff); box-shadow: 0 12px 22px rgba(71,27,94,.1); }
.density-step-visual img { width: 124px; height: 124px; display: block; object-fit: contain; }
.density-step-visual i { color: #7c2ab5; font-size: 36px; font-style: normal; font-weight: 700; }
.density-step-visual b { position: absolute; right: -7px; bottom: -7px; width: 27px; height: 27px; display: grid; place-items: center; border: 3px solid #fff; border-radius: 10px; background: #8b32c6; color: #fff; font-size: 10px; }
.density-step-card h3 { margin: 0; color: #2d1838; font-size: 23px; font-weight: 650; letter-spacing: -.035em; }
.density-step-card p, .density-copy p, .density-formula-copy p, .density-example-card p { margin: 10px 0 0; color: #776b7f; font-size: 16px; line-height: 1.6; }
.density-formula-layout, .density-example-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 15px; margin-top: 37px; }
.density-example-layout { grid-template-columns: minmax(0, 1fr); }
.density-formula-card, .density-formula-copy, .density-example-card, .density-example-visual { min-height: 280px; padding: 28px; border: 1px solid #dfd3e5; border-radius: 25px; }
.density-formula-card { background: linear-gradient(145deg,#fffaff,#f2e5f8); }
.density-card-label { color: #8a6a95; font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.density-big-formula { display: flex; align-items: center; gap: 13px; margin-top: 25px; color: #4a155f; font-size: clamp(34px, 5vw, 61px); font-weight: 650; letter-spacing: -.06em; }
.density-big-formula i { color: #9550c2; font-style: normal; font-weight: 400; }
.density-big-formula span { font-size: 1.3em; line-height: .7; }
.density-formula-card p { max-width: 390px; margin-top: 20px; color: #77657e; font-size: 16px; line-height: 1.6; }
.density-formula-copy { background: #fff; }
.density-formula-copy h3, .density-example-card h3 { margin: 12px 0 0; color: #2d1739; font-size: 29px; font-weight: 600; letter-spacing: -.05em; }
.density-formula-list { display: grid; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.density-formula-list li { display: grid; grid-template-columns: 34px 1fr; gap: 9px; align-items: start; color: #75687d; font-size: 16px; line-height: 1.5; }
.density-formula-list b { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 9px; background: #f0e1f8; color: #7c2ab5; font-size: 12px; }
.density-example-card { background: linear-gradient(145deg,#fffaff,#f5ecf9); }
.density-example-flow { display: flex; align-items: center; gap: 10px; margin-top: 24px; }
.density-example-flow strong { min-width: 58px; padding: 12px 11px; border: 1px solid #e2d3e8; border-radius: 14px; background: #fff; color: #7626b4; font-size: 24px; text-align: center; }
.density-example-flow i { color: #906aa0; font-size: 14px; font-style: normal; }
.density-example-flow b { color: #7c2ab5; font-size: 25px; font-weight: 400; }
.density-example-card .density-example-result { margin-top: 22px; color: #4c1760; font-size: 20px; font-weight: 800; }
.density-example-visual { display: grid; place-items: center; overflow: hidden; background: #fbf7fd; }
.density-example-visual img { width: min(340px, 100%); height: 270px; display: block; object-fit: contain; }
.density-faq-grid { display: grid; gap: 11px; margin-top: 36px; }
.density-faq-grid details { border: 1px solid #e0d3e7; border-radius: 18px; background: #fff; box-shadow: 0 9px 21px rgba(75,30,94,.045); }
.density-faq-grid summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px; color: #2e183a; font-size: 18px; font-weight: 800; cursor: pointer; list-style: none; }
.density-faq-grid summary::-webkit-details-marker { display: none; }
.density-faq-grid summary::after { content: '+'; color: #842ec2; font-size: 27px; font-weight: 400; }
.density-faq-grid details[open] summary::after { content: '−'; }
.density-faq-grid details p { max-width: 900px; margin: -5px 22px 20px; color: #75687d; font-size: 16px; line-height: 1.62; }
@media (max-width: 900px) {
  .density-calculator { grid-template-columns: 1fr; }
  .density-result-panel { min-height: 500px; }
  .density-converter-card { grid-template-columns: 1fr; }
  .density-converter-output { min-height: 108px; }
}
@media (max-width: 720px) {
  .density-hero { padding: 18px 16px 54px; }
  .density-heading { margin-top: 15px; }
  .density-eyebrow { font-size: 10px; }
  .density-heading h1 { font-size: clamp(42px, 14vw, 63px); }
  .density-hero-subtitle { font-size: 16px; }
  .density-calculator { margin-top: 23px; border-radius: 22px; }
  .density-input-panel, .density-result-panel { padding: 22px 18px; }
  .density-panel-topline, .density-result-topline { align-items: flex-start; flex-direction: column; gap: 9px; }
  .density-panel-heading { margin-top: 18px; }
  .density-panel-heading h2 { font-size: 29px; }
  .density-panel-lead { font-size: 15px; }
  .density-field-control { grid-template-columns: minmax(0,1fr) 126px; }
  .density-actions { grid-template-columns: minmax(0,1fr) 92px; }
  .density-result-content { min-height: 385px; }
  .density-result-unit { align-items: flex-start; flex-direction: column; gap: 7px; }
  .density-result-unit select { width: 100%; }
  .density-converter-section, .density-content-section { padding: 57px 16px; }
  .density-section-heading { gap: 12px; }
  .density-section-number { width: 42px; height: 42px; flex-basis: 42px; border-radius: 14px; }
  .density-section-heading h2 { font-size: clamp(34px, 11vw, 48px); }
  .density-section-lead { margin-left: 0; font-size: 16px; }
  .density-converter-card { padding: 18px; border-radius: 21px; }
  .density-converter-controls { grid-template-columns: 1fr 1fr; }
  .density-converter-arrow { display: none; }
  .density-step-grid, .density-formula-layout, .density-example-layout { grid-template-columns: 1fr; }
  .density-step-card { min-height: 0; }
  .density-formula-card, .density-formula-copy, .density-example-card, .density-example-visual { min-height: 0; padding: 22px; }
  .density-big-formula { font-size: 42px; }
  .density-faq-grid summary { padding: 17px 18px; font-size: 16px; }
  .density-faq-grid details p { margin-left: 18px; margin-right: 18px; font-size: 15px; }
  .density-hero-note { align-items: flex-start; text-align: left; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .density-result-ready, .density-submit, .density-reset, .density-converter-clear { animation: none; transition: none; }
}
