:root {
  --navy: #061a3d;
  --navy2: #092657;
  --blue: #2969e8;
  --mint: #18b99a;
  --ink: #101c36;
  --muted: #6c7890;
  --line: #e4eaf2;
  --bg: #f6f9fd;
  --white: #fff;
  --shadow: 0 18px 50px rgba(16, 28, 54, 0.08);
}
* {
  box-sizing: border-box;
}
/* [hidden] is an attribute selector (specificity 0,0,1,0) — the same as a
   single class like `.page-action`, which sets its own `display` value.
   Without !important here, whichever rule happens to come later in the
   cascade wins the tie, so `el.hidden = true` on a `.page-action` (or any
   element with its own explicit display) silently does nothing visually
   even though the DOM property is set correctly - exactly what made the
   Cancel/Resume subscription buttons show at the same time. */
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background:
    radial-gradient(circle at 90% 0, #dfeeff 0, transparent 26rem), var(--bg);
  color: var(--ink);
  font:
    15px/1.55 Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 235px;
  padding: 30px 22px;
  background: linear-gradient(180deg, var(--navy), #04132e);
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.brand {
  color: #fff;
  text-decoration: none;
  font-size: 28px;
  font-weight: 800;
  margin: 0 10px 34px;
}
.sidebar nav {
  display: grid;
  gap: 8px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 15px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #aebbd0;
  font: inherit;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}
.nav:hover,
.nav.active {
  color: #fff;
  background: linear-gradient(135deg, #2869e9, #2459ca);
}
.upgrade {
  margin-top: auto;
  padding: 18px;
  border: 1px solid #ffffff18;
  border-radius: 15px;
  background: #ffffff09;
  display: grid;
  gap: 10px;
}
.upgrade strong {
  font-size: 17px;
}
.upgrade span {
  color: #b6c3d7;
  font-size: 12px;
}
.upgrade button {
  padding: 10px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--mint), #25d0a9);
  font-weight: 800;
  color: #063a35;
}
.mobile-head {
  display: none;
}
main {
  margin-left: 235px;
  padding: 38px clamp(22px, 4vw, 64px) 70px;
  max-width: 1600px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
}
.eyebrow {
  margin: 0 0 5px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
h1,
h2,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 5px;
}
h2 {
  font-size: 21px;
  margin-bottom: 7px;
}
.topbar p {
  color: var(--muted);
}
.secure {
  padding: 10px 14px;
  border-radius: 999px;
  background: #e7f9f4;
  color: #08745f;
  font-size: 12px;
  font-weight: 750;
}
.panel {
  background: #fffc;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.upload {
  padding: 42px 24px;
  text-align: center;
  border: 2px dashed #8db1ff;
  transition: 0.2s;
}
.upload.drag {
  background: #edf4ff;
  border-color: var(--blue);
  transform: scale(1.005);
}
.upload-icon {
  display: grid;
  place-items: center;
  width: 66px;
  height: 52px;
  margin: 0 auto 15px;
  border-radius: 50%;
  background: #dfeaff;
  color: var(--blue);
  font-size: 32px;
  font-weight: 900;
}
.upload p,
.upload small {
  color: var(--muted);
}
.link {
  border: 0;
  background: 0;
  color: var(--blue);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.section {
  margin: 34px 0;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.tools {
  display: grid;
  grid-template-columns: repeat(6, minmax(125px, 1fr));
  gap: 13px;
}
.tool {
  padding: 18px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: center;
  cursor: pointer;
  transition: 0.2s;
}
.tool:hover,
.tool.active {
  border-color: #8bb0ff;
  box-shadow: 0 10px 25px #2969e819;
  transform: translateY(-2px);
}
.tool b {
  display: block;
  margin-top: 9px;
}
.tool-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: auto;
  border-radius: 12px;
  background: #eef3ff;
  color: var(--blue);
  font-size: 20px;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.75fr);
  gap: 22px;
}
.files-panel,
.action-panel,
.recent {
  padding: 24px;
}
.count {
  display: inline-grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #e8efff;
  color: var(--blue);
  font-size: 12px;
}
.empty {
  padding: 34px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.file {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}
.file-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fee9e9;
  color: #dd3434;
  font-weight: 900;
}
.file small {
  display: block;
  color: var(--muted);
}
.remove {
  border: 0;
  background: transparent;
  color: #9aa6b9;
  font-size: 20px;
  cursor: pointer;
}
.action-panel {
  align-self: start;
  position: sticky;
  top: 24px;
}
.option {
  display: grid;
  gap: 6px;
  margin: 16px 0;
}
.option input,
.option select {
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
}
.primary,
.ghost {
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.primary {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--blue), #2358c8);
  color: #fff;
  box-shadow: 0 9px 22px #2969e832;
}
.primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.ghost {
  padding: 9px 12px;
  background: #eef2f8;
  color: var(--muted);
}
.progress {
  height: 5px;
  margin-top: 15px;
  border-radius: 99px;
  background: #e9edf4;
  overflow: hidden;
  display: none;
}
.progress span {
  display: block;
  width: 35%;
  height: 100%;
  background: var(--mint);
  animation: load 1s infinite alternate;
}
.status {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.recent {
  margin-top: 22px;
}
@keyframes load {
  to {
    transform: translateX(190%);
  }
}
@media (max-width: 1100px) {
  .tools {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    transition: 0.25s;
  }
  .sidebar.open {
    transform: none;
  }
  .mobile-head {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 15;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: #071c43;
    color: #fff;
  }
  .mobile-head button {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 22px;
  }
  main {
    margin-left: 0;
    padding: 25px 15px 60px;
  }
  .topbar {
    display: block;
  }
  .secure {
    display: inline-block;
    margin-bottom: 10px;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .action-panel {
    position: static;
  }
  .tools {
    grid-template-columns: repeat(2, 1fr);
  }
}
.app-footer {
  margin-left: 235px;
  padding: 20px 30px 30px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.app-footer a {
  color: var(--blue);
  font-weight: 700;
}
@media (max-width: 900px) {
  .app-footer {
    margin-left: 0;
  }
}

.mobile-tabs {
  display: none;
}
@media (max-width: 900px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }
  body {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
    background: #f8faff;
  }
  .mobile-head {
    min-height: 62px;
    padding: 8px 16px;
    padding-top: max(8px, env(safe-area-inset-top));
    background: #fff;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 5px 22px rgba(16, 28, 54, 0.06);
  }
  .mobile-head .formiva-wordmark {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
  }
  .mobile-head .formiva-initial {
    margin-right: -2px;
    color: #2969e8;
    font:
      italic 700 39px/0.72 "Segoe Script",
      "Brush Script MT",
      cursive;
    transform: rotate(-8deg) translateY(1px);
  }
  .mobile-head .formiva-rest {
    color: #101c36;
    font:
      800 25px/1 "Aptos Display",
      "Arial Narrow",
      Inter,
      sans-serif;
    letter-spacing: -0.055em;
  }
  .mobile-head button {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
    font-size: 0;
  }
  .mobile-head button::before {
    content: "☰";
    font-size: 22px;
  }
  main {
    padding: 16px 12px 34px;
  }
  .topbar {
    display: none;
  }
  .upload {
    padding: 28px 14px;
    border-radius: 16px;
  }
  .upload-icon {
    width: 58px;
    height: 46px;
    margin-bottom: 10px;
    font-size: 28px;
  }
  .upload h2 {
    margin-bottom: 3px;
    font-size: 17px;
  }
  .upload p {
    margin-bottom: 4px;
    font-size: 13px;
  }
  .upload small {
    font-size: 11px;
  }
  .convert-section,
  .section {
    margin: 24px 0;
  }
  .section-head h2 {
    font-size: 17px;
  }
  .section-head .eyebrow {
    display: none;
  }
  .formats {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px;
  }
  .formats button {
    min-width: 0;
    min-height: 47px;
    padding: 7px 4px;
    gap: 5px;
    border-radius: 9px;
    font-size: 10px;
    overflow: hidden;
  }
  .formats button b {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .formats i {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    font-size: 9px;
  }
  .tools {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .tool {
    display: flex;
    align-items: center;
    padding: 10px 9px;
    text-align: left;
    border-radius: 10px;
  }
  .tool b {
    margin: 0 0 0 8px;
    font-size: 11px;
  }
  .tool-icon {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    margin: 0;
    border-radius: 7px;
    font-size: 14px;
  }
  .workspace {
    gap: 12px;
  }
  .files-panel,
  .action-panel,
  .recent {
    padding: 16px;
  }
  .panel {
    border-radius: 14px;
  }
  .recent {
    margin-top: 14px;
  }
  .mobile-tabs {
    position: fixed;
    z-index: 30;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    min-height: 62px;
    padding: 5px 8px calc(5px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -8px 28px rgba(16, 28, 54, 0.08);
    backdrop-filter: blur(18px);
  }
  .mobile-tabs button {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 1px;
    border: 0;
    background: transparent;
    color: #6c7890;
    font: 700 10px/1.2 inherit;
  }
  .mobile-tabs button:first-child {
    color: var(--blue);
  }
  .mobile-tabs span {
    font-size: 20px;
  }
  .app-footer {
    display: none;
  }
}

.sidebar .nav {
  text-decoration: none;
}
.sidebar-account {
  margin: 18px 4px 10px;
  padding-top: 16px;
  border-top: 1px solid #ffffff18;
}
.sidebar-account a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #dce7f8;
  text-decoration: none;
  font-weight: 750;
}
.sidebar-account a:hover,
.sidebar-account a.active {
  background: #ffffff0d;
  color: #fff;
}
.account-panel {
  width: min(100%, 760px);
}
.account-plan {
  margin: 20px 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7faff;
}
.account-plan h2 {
  font-size: 34px;
  color: var(--blue);
}
.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.page-main {
  width: calc(100% - 235px);
  max-width: none;
  min-height: 100vh;
}
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.page-head h1 {
  margin-bottom: 5px;
}
.page-head p {
  max-width: 700px;
  color: var(--muted);
}
.page-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.page-card {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--shadow);
}
.page-card h2 {
  margin-bottom: 8px;
}
.page-card p {
  color: var(--muted);
}
.page-card.wide {
  grid-column: 1/-1;
  width: auto;
  background: #fff;
  color: inherit;
  font-weight: 400;
}
.page-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 15px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue), #2358c8);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
}
.page-action.alt {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.tool-directory {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.directory-tile {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  min-height: 126px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}
.directory-tile:hover {
  border-color: #8bb0ff;
  box-shadow: 0 12px 30px #2969e817;
}
.directory-tile .tool-icon {
  flex: 0 0 44px;
}
.directory-tile b,
.directory-tile span {
  display: block;
}
.directory-tile span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.setting-row:last-child {
  border-bottom: 0;
}
.setting-row label {
  font-weight: 750;
}
.setting-row small {
  display: block;
  color: var(--muted);
}
.setting-row input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--blue);
}
.empty-state {
  padding: 38px 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 14px;
}
.page-list {
  display: grid;
  gap: 9px;
}
.page-file {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.page-file small {
  display: block;
  color: var(--muted);
}
.page-file button {
  border: 0;
  background: transparent;
  color: #b42318;
  cursor: pointer;
}
.faq details {
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.faq summary {
  font-weight: 800;
  cursor: pointer;
}
.faq p {
  margin: 8px 0 0;
}
.page-mobile-head {
  display: none;
}
@media (max-width: 900px) {
  .page-grid,
  .tool-directory {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .sidebar {
    width: min(86vw, 320px);
    overflow-y: auto;
    box-shadow: 20px 0 55px #00102b45;
  }
  .sidebar .upgrade {
    margin-top: 18px;
  }
  .page-main {
    width: 100%;
    padding: 18px 12px 95px;
  }
  .page-mobile-head {
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 62px;
    padding: 8px 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }
  .page-mobile-head .formiva-wordmark {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
  }
  .page-mobile-head .formiva-initial {
    margin-right: -2px;
    color: #2969e8;
    font:
      italic 700 39px/0.72 "Segoe Script",
      "Brush Script MT",
      cursive;
    transform: rotate(-8deg);
  }
  .page-mobile-head .formiva-rest {
    color: var(--ink);
    font:
      800 25px/1 "Aptos Display",
      Inter,
      sans-serif;
    letter-spacing: -0.055em;
  }
  .page-menu {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    font-size: 21px;
  }
  .page-head {
    display: block;
    margin-bottom: 20px;
  }
  .page-head h1 {
    font-size: 28px;
  }
  .page-grid,
  .tool-directory {
    grid-template-columns: 1fr;
  }
  .page-card {
    padding: 18px;
  }
  .directory-tile {
    min-height: 112px;
    padding: 17px;
  }
  .mobile-tabs {
    display: none;
  }
  .formats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .formats button {
    min-height: 72px !important;
    padding: 11px 8px !important;
    overflow: visible !important;
    font-size: 13px !important;
  }
  .formats button b {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
  }
  .formats i {
    flex: 0 0 30px !important;
    width: 30px !important;
    height: 30px !important;
    font-size: 12px !important;
  }
  .tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .tool {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 112px;
    padding: 14px 8px;
    text-align: center;
  }
  .tool b {
    display: block;
    margin: 9px 0 0;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: visible;
  }
  .tool-icon {
    display: grid;
    place-items: center;
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    margin: 0;
    border-radius: 14px;
    font-size: 23px;
  }
}
@media (max-width: 360px) {
  .formats button {
    flex-direction: column;
    gap: 5px;
  }
  .tool {
    min-height: 104px;
    padding-inline: 5px;
  }
  .tool b {
    font-size: 12px;
  }
  .tool-icon {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    font-size: 21px;
  }
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
@media (max-width: 900px) {
  body {
    overscroll-behavior-y: none;
  }
  .mobile-head,
  .page-mobile-head {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  main,
  .page-main {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  .option input,
  .option select,
  .field input {
    font-size: 16px;
  }
  .sidebar {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
}
.app-bottom-tabs {
  display: none;
}
.destination {
  display: grid;
  gap: 4px;
  color: var(--ink);
  text-decoration: none;
}
.destination b {
  font-size: 20px;
}
.destination span {
  color: var(--muted);
}
@media (max-width: 900px) {
  .sidebar {
    display: none !important;
  }
  .page-menu,
  .mobile-head button {
    display: none !important;
  }
  .page-mobile-head,
  .mobile-head {
    justify-content: center;
  }
  .app-bottom-tabs,
  .mobile-tabs {
    position: fixed;
    z-index: 50;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: 66px;
    padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -8px 28px rgba(16, 28, 54, 0.09);
  }
  .app-bottom-tabs a,
  .mobile-tabs a,
  .mobile-tabs button {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    text-decoration: none;
    font:
      700 10px/1.15 Inter,
      sans-serif;
  }
  .app-bottom-tabs a.active {
    color: var(--blue);
  }
  .app-bottom-tabs span,
  .mobile-tabs span {
    font-size: 21px;
  }
}
