:root {
  color-scheme: light;
  --ink: #202632;
  --muted: #858c9b;
  --line: #e9ecf2;
  --canvas: #f5f7fb;
  --white: #fff;
  --purple: #7057e8;
  --purple-dark: #6048d4;
  --purple-light: #f0edff;
  --green: #38a982;
  --shadow: 0 14px 40px rgba(36, 43, 66, .055);
  font-family: "DM Sans", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--ink); }
button, input, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; flex-direction: column; width: 250px; padding: 27px 17px 18px; background: var(--white); border-right: 1px solid #edf0f5; }
.brand { display: flex; gap: 11px; align-items: center; margin: 0 9px 39px; }
.brand-mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 13px; color: white; background: var(--purple); box-shadow: 0 6px 14px #7057e83b; font-size: 24px; font-weight: 700; }
.brand-mark span { transform: translateY(-1px); }
.brand-copy { display: flex; flex-direction: column; gap: 1px; }
.brand-copy strong { font: 800 18px "Manrope", sans-serif; letter-spacing: -.8px; }
.brand-copy strong span { color: var(--purple); }
.brand-copy small { color: #9ba0ad; font-size: 8px; letter-spacing: 1.2px; font-weight: 700; }
.side-label { margin: 0 11px 10px; color: #a3a8b3; font-size: 9px; letter-spacing: 1.35px; font-weight: 700; }
.primary-nav, .category-nav { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; width: 100%; min-height: 39px; gap: 12px; padding: 8px 11px; text-align: left; color: #737b8a; background: transparent; border: 0; border-radius: 9px; cursor: pointer; font-size: 12.5px; transition: .18s ease; }
.nav-item:hover { color: var(--purple); background: #f7f6ff; }
.nav-item.active { color: var(--purple); background: var(--purple-light); font-weight: 700; }
.nav-icon { width: 18px; text-align: center; font-size: 18px; line-height: 1; }
.nav-count { margin-left: auto; padding: 2px 7px; border-radius: 10px; background: #fff; color: #818895; font-size: 10px; }
.category-label { margin-top: 30px; }
.category-nav { gap: 2px; }
.category-nav .nav-item { min-height: 36px; font-size: 12px; }
.category-nav .nav-icon { font-size: 14px; }
.sidebar-note { position: relative; overflow: hidden; margin: auto 3px 17px; padding: 16px 14px 13px; border-radius: 12px; background: #f5f2ff; }
.sidebar-note strong { display: block; margin: 7px 0 5px; font: 700 12px "Manrope", sans-serif; }
.sidebar-note p { max-width: 160px; margin: 0; color: #858397; font-size: 10px; line-height: 1.6; }
.note-sparkle { color: var(--purple); font-size: 17px; }
.note-decoration { display: block; margin-top: 12px; color: #9e8df3; font-size: 10px; letter-spacing: 5px; }
.sidebar-footer { color: #969daa; font-size: 10px; text-align: center; }
.online-dot { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: #4ec39a; vertical-align: 1px; }
.main-area { min-height: 100vh; margin-left: 250px; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; height: 72px; padding: 0 4.3%; background: rgba(255,255,255,.92); border-bottom: 1px solid #edf0f5; backdrop-filter: blur(12px); }
.breadcrumbs { display: flex; gap: 10px; align-items: center; color: #a1a6b1; font-size: 11px; }
.breadcrumbs strong { color: #454c59; font-weight: 600; }
.crumb-slash { color: #d0d3db; }
.top-actions { display: flex; align-items: center; gap: 20px; }
.search-wrap { display: flex; align-items: center; width: min(290px, 34vw); height: 36px; gap: 8px; padding: 0 10px; border: 1px solid #e9ebf1; border-radius: 8px; background: #fbfcfe; }
.search-icon { color: #9298a6; font-size: 22px; line-height: 1; transform: rotate(-15deg); }
.search-wrap input { width: 100%; min-width: 0; padding: 0; color: var(--ink); background: none; border: 0; outline: none; font-size: 11px; }
.search-wrap input::placeholder { color: #9ba1ad; }
kbd { flex: none; padding: 3px 5px; border: 1px solid #e6e8ee; border-radius: 4px; background: white; color: #969ba7; font: 9px "DM Sans", sans-serif; }
.avatar { width: 31px; height: 31px; border: 0; border-radius: 10px; background: #edeaff; color: var(--purple); font: 700 12px "Manrope", sans-serif; }
.mobile-menu { display: none !important; }
.content { width: min(1260px, 100%); min-height: calc(100vh - 115px); margin: auto; padding: 30px 4.3% 24px; }
.welcome { position: relative; display: flex; min-height: 174px; align-items: center; justify-content: space-between; overflow: hidden; padding: 27px 38px; border-radius: 16px; background: linear-gradient(107deg, #f1eeff 0%, #f6f3ff 58%, #eeebff 100%); }
.welcome-copy { position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; color: #7b66df; font-size: 9px; letter-spacing: 1.05px; font-weight: 700; text-transform: uppercase; }
.welcome h1 { margin: 0; font: 800 clamp(23px, 3vw, 31px) "Manrope", sans-serif; letter-spacing: -1.15px; line-height: 1.25; }
.welcome h1 span { color: var(--purple); }
.welcome p { margin: 8px 0 0; color: #777c8a; font-size: 11px; }
.welcome-art { position: absolute; top: 50%; right: 45px; width: 204px; height: 156px; transform: translateY(-50%); }
.art-card { position: absolute; display: grid; place-items: center; width: 62px; height: 67px; border: 1px solid #fff; border-radius: 14px; background: rgba(255,255,255,.86); box-shadow: 0 12px 28px #4f3caf17; color: #7057e8; font: 600 22px "Manrope", sans-serif; }
.art-card.one { top: 13px; left: 14px; transform: rotate(-12deg); color: #f3a952; }
.art-card.two { top: 35px; left: 76px; width: 73px; height: 77px; transform: rotate(5deg); font-size: 29px; }
.art-card.three { top: 74px; right: 4px; transform: rotate(12deg); color: #58b996; }
.art-circle { position: absolute; right: 26px; bottom: -22px; width: 93px; height: 93px; border: 1px solid #dcd4ff; border-radius: 50%; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin: 27px 0 14px; }
.section-heading h2 { margin: 0; font: 700 16px "Manrope", sans-serif; letter-spacing: -.4px; }
.section-heading p { margin: 4px 0 0; color: #969ba7; font-size: 10px; }
.text-button { padding: 5px 0; color: var(--purple); border: 0; background: transparent; cursor: pointer; font-size: 10px; font-weight: 700; }
.featured-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.featured-card { position: relative; min-height: 116px; padding: 14px; border: 1px solid #eff0f4; border-radius: 12px; background: #fff; cursor: pointer; transition: transform .18s, box-shadow .18s, border-color .18s; }
.featured-card:hover, .calculator-card:hover { transform: translateY(-2px); border-color: #dcd6fc; box-shadow: var(--shadow); }
.featured-card .calc-icon { width: 31px; height: 31px; margin-bottom: 10px; }
.featured-card h3 { margin: 0; font: 700 11px "Manrope", sans-serif; }
.featured-card p { margin: 4px 0 0; color: #969ba7; font-size: 9px; }
.card-arrow { position: absolute; top: 13px; right: 13px; color: #b3b6c0; font-size: 15px; }
.calc-icon { display: grid; flex: none; place-items: center; width: 35px; height: 35px; border-radius: 10px; background: #f0edff; color: #7159dc; font-size: 17px; }
.tone-green { color: #299f78; background: #e9f8f2; }
.tone-orange { color: #de9140; background: #fff3e6; }
.tone-blue { color: #4e90d9; background: #eaf3ff; }
.tone-pink { color: #d36b95; background: #fff0f5; }
.tone-teal { color: #299f9b; background: #e8f8f7; }
.catalog-heading { margin-top: 29px; }
.filter-pills { display: flex; gap: 7px; overflow-x: auto; padding: 1px 0 5px; scrollbar-width: none; }
.filter-pills::-webkit-scrollbar { display: none; }
.filter-pill { flex: none; padding: 7px 11px; border: 1px solid #e9ebf1; border-radius: 7px; background: #fff; color: #818795; cursor: pointer; font-size: 9px; transition: .18s; }
.filter-pill:hover, .filter-pill.active { border-color: var(--purple); background: var(--purple); color: #fff; }
.calculator-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; margin-top: 14px; }
.calculator-card { position: relative; min-height: 108px; padding: 13px; border: 1px solid #eff0f4; border-radius: 11px; background: #fff; cursor: pointer; transition: transform .18s, box-shadow .18s, border-color .18s; }
.calculator-card .card-top { display: flex; align-items: center; justify-content: space-between; }
.calculator-card .calc-icon { width: 30px; height: 30px; border-radius: 9px; font-size: 15px; }
.calculator-card h3 { margin: 10px 0 4px; font: 700 10.5px "Manrope", sans-serif; }
.calculator-card p { overflow: hidden; margin: 0; color: #969ba7; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.favorite-toggle { display: grid; place-items: center; width: 25px; height: 25px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: #b6bac4; cursor: pointer; font-size: 17px; }
.favorite-toggle:hover, .favorite-toggle.is-favorite { color: #efa849; background: #fff8ed; }
.page-footer { display: flex; justify-content: space-between; width: min(1260px, 100%); margin: 0 auto; padding: 0 4.3% 17px; color: #a2a7b2; font-size: 9px; }
.page-footer .online-dot { width: 5px; height: 5px; }
.empty-state { grid-column: 1 / -1; padding: 45px 20px; text-align: center; border: 1px dashed #dcdee7; border-radius: 12px; color: #8b91a0; }
.empty-state strong { display: block; margin-bottom: 7px; color: #404754; font: 700 14px "Manrope", sans-serif; }
.empty-state p { margin: 0; font-size: 11px; }

/* Calculator workspace */
.calculator-workspace { max-width: 900px; margin: 4px auto; }
.back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 19px; padding: 4px 0; border: 0; background: none; color: #828997; cursor: pointer; font-size: 11px; }
.back-link:hover { color: var(--purple); }
.workspace-header { display: flex; align-items: center; gap: 14px; margin-bottom: 21px; }
.workspace-header .calc-icon { width: 48px; height: 48px; border-radius: 13px; font-size: 22px; }
.workspace-header h1 { margin: 0; font: 800 22px "Manrope", sans-serif; letter-spacing: -.7px; }
.workspace-header p { margin: 4px 0 0; color: #8e94a1; font-size: 11px; }
.workspace-favorite { margin-left: auto; border: 1px solid var(--line); background: white; }
.calculator-panel { display: grid; grid-template-columns: 1fr .85fr; overflow: hidden; min-height: 346px; border: 1px solid #ebedf2; border-radius: 14px; background: white; box-shadow: 0 8px 28px rgba(35,41,63,.035); }
.input-panel { padding: 24px; }
.panel-title { margin: 0 0 19px; font: 700 12px "Manrope", sans-serif; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 13px; }
.field { min-width: 0; }
.field.full-width { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 6px; color: #626a78; font-size: 10px; font-weight: 600; }
.input-control { display: flex; align-items: center; min-height: 39px; border: 1px solid #e7e9ef; border-radius: 7px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.input-control:focus-within { border-color: #a99af0; box-shadow: 0 0 0 3px #7057e812; }
.input-control input, .input-control select { width: 100%; min-width: 0; padding: 9px 10px; border: 0; outline: 0; background: transparent; color: #343b48; font-size: 11px; }
.input-control select { cursor: pointer; }
.input-control input::placeholder { color: #bbc0ca; }
.input-suffix { flex: none; padding: 0 10px 0 3px; color: #9ba1ad; font-size: 10px; }
.input-prefix { padding-left: 10px; color: #9399a6; font-size: 11px; }
.workspace-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; }
.primary-button { min-height: 36px; padding: 0 16px; border: 0; border-radius: 7px; background: var(--purple); color: white; cursor: pointer; font-size: 10px; font-weight: 700; transition: background .15s; }
.primary-button:hover { background: var(--purple-dark); }
.clear-button { padding: 7px 0; border: 0; background: transparent; color: #8f95a2; cursor: pointer; font-size: 10px; }
.clear-button:hover { color: #d16464; }
.result-panel { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 26px; background: #f8f7ff; border-left: 1px solid #f0edfc; }
.result-label { color: #8982b3; font-size: 9px; letter-spacing: 1px; font-weight: 700; text-transform: uppercase; }
.result-value { overflow-wrap: anywhere; margin: 9px 0; color: #39305f; font: 800 clamp(25px, 4vw, 37px) "Manrope", sans-serif; letter-spacing: -1.3px; }
.result-detail { color: #828196; font-size: 11px; line-height: 1.7; white-space: pre-line; }
.result-placeholder { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 14px; border-radius: 18px; background: #efecff; color: #8572e5; font-size: 28px; }
.result-note { margin-top: 20px; padding-top: 13px; border-top: 1px solid #ebe8f9; color: #9995b2; font-size: 9px; line-height: 1.6; }
.result-error { color: #bd5b5b; font-size: 11px; }
.calculator-hint { margin-top: 14px; color: #9ba0ab; font-size: 9px; line-height: 1.6; }
.keypad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.keypad button { min-height: 34px; border: 1px solid #e9e7f4; border-radius: 6px; background: #fff; color: #61568d; cursor: pointer; font-size: 11px; }
.keypad button:hover { border-color: #b6aaf0; background: #f5f2ff; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; padding: 10px 15px; border-radius: 8px; background: #252a35; color: white; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s; font-size: 11px; }
.toast.show { opacity: 1; transform: translateY(0); }
.mobile-backdrop { display: none; }
@media (min-width: 1450px) {
  .content { padding-top: 37px; }
  .welcome { min-height: 190px; }
  .calculator-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .sidebar { width: 220px; }
  .main-area { margin-left: 220px; }
  .calculator-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .featured-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .sidebar { width: 250px; transform: translateX(-102%); transition: transform .22s ease; box-shadow: 8px 0 35px #19223a12; }
  .sidebar.open { transform: translateX(0); }
  .mobile-backdrop.show { position: fixed; inset: 0; z-index: 15; display: block; background: #22283b55; }
  .main-area { margin-left: 0; }
  .topbar { height: 61px; padding: 0 17px; }
  .mobile-menu { display: grid !important; place-items: center; padding: 0; border: 0; background: none; color: #656d7c; font-size: 17px; }
  .breadcrumbs { margin-right: auto; margin-left: 11px; font-size: 10px; }
  .top-actions { gap: 10px; }
  .search-wrap { width: min(220px, 43vw); height: 34px; }
  .search-wrap kbd, .avatar { display: none; }
  .content { min-height: calc(100vh - 100px); padding: 19px 17px 20px; }
  .welcome { min-height: 162px; padding: 23px 20px; }
  .welcome-art { right: 6px; transform: translate(27%, -50%) scale(.8); opacity: .55; }
  .welcome-copy { max-width: 76%; }
  .welcome h1 { font-size: 24px; }
  .welcome p { max-width: 240px; font-size: 10px; line-height: 1.5; }
  .featured-grid { gap: 9px; }
  .featured-card { min-height: 110px; padding: 11px; }
  .calculator-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .calculator-card { min-height: 104px; padding: 11px; }
  .page-footer { gap: 12px; padding: 0 17px 14px; font-size: 8px; }
  .page-footer span:first-child { max-width: 50%; }
  .calculator-panel { grid-template-columns: 1fr; }
  .input-panel { padding: 20px; }
  .result-panel { min-height: 210px; padding: 21px; border-top: 1px solid #f0edfc; border-left: 0; }
  .workspace-header h1 { font-size: 20px; }
}
@media (max-width: 390px) {
  .featured-grid { grid-template-columns: 1fr 1fr; }
  .search-wrap { width: 40vw; }
  .welcome-copy { max-width: 88%; }
  .field-grid { grid-template-columns: 1fr; }
  .field.full-width { grid-column: auto; }
  .page-footer { flex-direction: column; gap: 5px; }
  .page-footer span:first-child { max-width: none; }
}
