/* Turquoise / cream working surface inspired by the supplied Derviş reference. */
:root {
  --background: #faf7ef;
  --border: #e5ece5;
  --radius: 22px;
}
.topbar {
  height: 91px;
  background: linear-gradient(115deg, #f2fbf4eb, #fff7eced);
  border-bottom: 0;
}
.dark .topbar {
  background: #152b27eb;
}
.topbar .mobile-brand {
  color: var(--text);
}
.topbar .brand-symbol,
.brand-symbol {
  background: transparent;
  box-shadow: none;
  width: 48px;
  height: 48px;
}
.brand-symbol img {
  width: 48px;
  height: 48px;
  padding: 0;
}
.install-button {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px #25665306;
  border-radius: 12px;
}
#section-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 max(25px, calc((100vw - 1270px) / 2));
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  overflow-x: auto;
  scrollbar-width: thin;
  white-space: nowrap;
  min-height: 61px;
}
.section-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 59px;
  padding: 0 13px;
  color: var(--muted);
  font-size: 0.8rem;
  border-bottom: 2px solid transparent;
}
.section-link.active {
  color: var(--primary);
  border-color: var(--primary);
}
.section-link svg {
  width: 17px;
  height: 17px;
}
.workspace main {
  padding-top: 28px;
}
body:before {
  background-position: var(--scene-position, 50% 50%);
  opacity: var(--scene-opacity, 1);
  filter: blur(var(--scene-blur, 0));
  transform: scale(var(--scene-scale, 1));
  transform-origin: var(--scene-position, 50% 50%);
}
body.background-image:before {
  opacity: calc(var(--scene-opacity, 1) * 0.45);
}
.dark body:before {
  opacity: calc(var(--scene-opacity, 1) * 0.15);
}
.prayer-panel {
  background: linear-gradient(
    130deg,
    color-mix(in srgb, var(--surface) 95%, #d5f4ee),
    var(--surface)
  );
  padding: 27px;
  margin-bottom: 22px;
}
.prayer-panel h2 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 1.6rem;
}
.prayer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.prayer-tile {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 4px 10px;
  padding: 21px 17px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 17px;
}
.prayer-tile svg {
  grid-row: span 2;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--secondary);
  padding: 7px;
  color: var(--primary);
}
.prayer-tile strong {
  font:
    1.25rem Georgia,
    serif;
}
.prayer-tile small {
  font-size: 0.7rem;
}
.prayer-tile.completed {
  border-color: var(--primary);
  background: var(--secondary);
}
.path-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 25px;
}
.path-card {
  position: relative;
  overflow: hidden;
  padding: 24px 27px;
  border: 1px solid #a6cfc550;
  border-radius: 21px;
  background: linear-gradient(110deg, #e5f4ef, var(--surface));
  color: var(--text);
}
.path-card:nth-child(2) {
  background: linear-gradient(110deg, #fff0dc, var(--surface));
}
.path-card:after {
  content: "✦";
  font-size: 120px;
  position: absolute;
  right: 18px;
  top: -30px;
  opacity: 0.06;
}
.path-card h2 {
  font:
    1.75rem Georgia,
    serif;
  margin: 5px 0 10px;
}
.path-card span {
  font-size: 0.75rem;
  color: var(--muted);
}
.dark .path-card {
  background: linear-gradient(110deg, #25493c, var(--surface));
}
.dark .path-card:nth-child(2) {
  background: linear-gradient(110deg, #403b2c, var(--surface));
}
.program-hero {
  background: linear-gradient(
    120deg,
    #056f70,
    color-mix(in srgb, var(--primary) 75%, #198f8f)
  );
  min-height: 225px;
}
.program-hero h2 {
  font-size: 1.9rem;
}
.hero-ring > div {
  background: #126d6b;
}
.hero-ring {
  width: 134px;
  height: 134px;
}
.hero-ring strong {
  font-size: 39px;
}
.button:not(.secondary):not(.danger) {
  color: var(--on-primary, #fff);
}
.program-hero .button {
  color: #174e41;
}
.counter-value,
.content-card .pill {
  color: var(--text);
}
.weekday-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 5px 0 18px;
}
.weekday-options .check-row {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px;
  gap: 6px;
}
.color-editor {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.color-editor input[type="color"] {
  height: 54px;
  padding: 4px;
  cursor: pointer;
}
.field input[type="range"] {
  accent-color: var(--primary);
  width: 100%;
}
.field output {
  font-size: 0.75rem;
  color: var(--muted);
}
.module-grid .content-card {
  min-height: 250px;
}
.module-grid .icon-tile {
  background: linear-gradient(130deg, var(--secondary), #fff0d9);
}
.vird-main .field {
  font-size: 0.75rem;
  margin: 12px 0;
}
.vird-main .field input {
  font-size: 0.8rem;
}
.article-body {
  counter-reset: sections;
}
.article-body h2 {
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.article-body h2:before {
  counter-increment: sections;
  content: counter(sections, decimal-leading-zero) " ";
  font:
    12px Arial,
    sans-serif;
  color: var(--muted);
  margin-right: 8px;
}
.content-card p {
  line-height: 1.65;
}
.dark .module-grid .icon-tile {
  background: var(--secondary);
}
@media (max-width: 1024px) {
  #section-nav {
    padding-inline: 18px;
  }
  .section-link {
    padding-inline: 10px;
  }
  .prayer-grid {
    gap: 8px;
  }
  .prayer-tile {
    padding: 15px 10px;
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
  .prayer-tile svg {
    grid-row: auto;
  }
  .prayer-panel {
    padding: 22px;
  }
}
@media (max-width: 767px) {
  .topbar {
    height: 75px;
    padding-inline: 13px;
  }
  .topbar .mobile-brand .brand-symbol {
    width: 37px;
    height: 37px;
  }
  .brand-symbol img {
    width: 37px;
    height: 37px;
  }
  .install-button {
    background: var(--surface);
    color: var(--text);
    font-size: 10px;
    padding: 9px 10px;
  }
  .topbar #menu-toggle {
    min-width: 38px;
    width: 38px;
  }
  #section-nav {
    min-height: 49px;
    padding-inline: 10px;
  }
  .section-link {
    min-height: 49px;
    font-size: 11px;
    gap: 6px;
    padding-inline: 10px;
  }
  .section-link svg {
    width: 15px;
  }
  .welcome h1 {
    font-size: 1.9rem;
  }
  .prayer-panel {
    padding: 18px;
    margin-bottom: 17px;
  }
  .prayer-panel h2 {
    font-size: 1.22rem;
  }
  .prayer-panel .section-heading {
    align-items: flex-start;
    gap: 3px;
  }
  .prayer-panel .text-link {
    font-size: 10px;
  }
  .prayer-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
  }
  .prayer-tile {
    padding: 12px 3px;
    border-radius: 13px;
    gap: 7px;
  }
  .prayer-tile svg {
    width: 29px;
    height: 29px;
    padding: 5px;
  }
  .prayer-tile strong {
    font:
      12px Arial,
      sans-serif;
  }
  .prayer-tile small {
    font-size: 9px;
    line-height: 1.4;
  }
  .path-highlights {
    gap: 11px;
    margin-bottom: 18px;
  }
  .path-card {
    padding: 18px 14px;
    border-radius: 17px;
  }
  .path-card h2 {
    font-size: 1.3rem;
    margin: 7px 0;
  }
  .path-card span {
    font-size: 10px;
  }
  .path-card:after {
    font-size: 80px;
    right: 0;
    top: -10px;
  }
  .program-hero {
    min-height: 220px;
  }
  .program-hero h2 {
    font-size: 1.6rem;
  }
  .hero-ring {
    width: 108px;
    height: 108px;
  }
  .hero-ring strong {
    font-size: 31px;
  }
  .weekday-options {
    gap: 5px;
  }
  .weekday-options .check-row {
    font-size: 11px;
    min-height: 44px;
  }
  .vird-item {
    padding: 18px;
  }
  .vird-main {
    flex-basis: 100%;
  }
  .article-body p {
    font-size: 1rem;
  }
}
/* Sofi 1.3 — local SVG scenery and CSS motion, no remote assets. */
.topbar {
  background: linear-gradient(
    110deg,
    color-mix(in srgb, var(--secondary) 85%, white),
    var(--surface) 60%,
    color-mix(in srgb, var(--accent) 20%, var(--surface))
  );
}
.install-button {
  background: var(--primary);
  color: var(--on-primary, #fff);
  border-color: transparent;
  box-shadow: 0 7px 22px color-mix(in srgb, var(--primary) 22%, transparent);
}
.section-link.active {
  background: color-mix(in srgb, var(--secondary) 70%, transparent);
  border-radius: 14px 14px 0 0;
}
.card {
  box-shadow: 0 10px 38px color-mix(in srgb, var(--primary) 7%, transparent);
}
.prayer-panel {
  border-top: 3px solid var(--primary);
  background: linear-gradient(
    125deg,
    var(--surface),
    color-mix(in srgb, var(--secondary) 60%, var(--surface))
  );
}
.prayer-tile {
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.prayer-tile:nth-child(2) svg {
  color: #ab4d17;
  background: #ffead5;
}
.prayer-tile:nth-child(3) svg {
  color: #8443b9;
  background: #f0e2ff;
}
.prayer-tile:nth-child(4) svg {
  color: #b33168;
  background: #ffe2ed;
}
.prayer-tile:nth-child(5) svg {
  color: #305fa8;
  background: #e1edff;
}
.path-card {
  min-height: 160px;
  background: linear-gradient(
    115deg,
    color-mix(in srgb, var(--secondary) 90%, white),
    var(--surface)
  );
  border-color: color-mix(in srgb, var(--primary) 28%, transparent);
}
.path-card:nth-child(2) {
  background: linear-gradient(
    115deg,
    color-mix(in srgb, var(--accent) 27%, var(--surface)),
    var(--surface)
  );
}
.path-card:after {
  content: "";
  width: 155px;
  height: 155px;
  right: -30px;
  top: 10px;
  border: 18px double var(--primary);
  border-radius: 45% 45% 12% 12%;
  transform: rotate(30deg);
  opacity: 0.13;
  animation: arch-drift 14s ease-in-out infinite alternate;
}
.path-card:nth-child(2):after {
  border-color: var(--accent);
  animation-delay: -7s;
}
.path-card span {
  position: relative;
  z-index: 1;
  color: var(--text);
}
.path-card h2 {
  position: relative;
  z-index: 1;
}
.program-hero {
  background: linear-gradient(125deg, #005c63, var(--primary), #186381);
  background-size: 200% 200%;
  animation: color-tide 16s ease-in-out infinite;
  box-shadow: 0 18px 40px color-mix(in srgb, var(--primary) 22%, transparent);
  border: 1px solid #ffffff40;
}
.program-hero:after {
  background: radial-gradient(ellipse at 100% 100%, #61ffd288, transparent 65%);
}
.hero-ring {
  box-shadow:
    0 0 0 12px #ffffff08,
    0 0 0 25px #ffffff05;
  background: conic-gradient(#ffdc88 calc(var(--progress) * 1%), #ffffff25 0);
}
.hero-ring > div {
  background: #075a61;
}
.quick-card:nth-child(4n + 1) .icon-tile {
  background: #d5f8ec;
  color: #006e57;
}
.quick-card:nth-child(4n + 2) .icon-tile {
  background: #eee0ff;
  color: #7539a9;
}
.quick-card:nth-child(4n + 3) .icon-tile {
  background: #ffdfeb;
  color: #b32f65;
}
.quick-card:nth-child(4n) .icon-tile {
  background: #ffebcf;
  color: #9c5216;
}
body:not(.plain):not(.background-image):before {
  animation: scene-drift 24s ease-in-out infinite alternate;
}
.scene-preview {
  height: 190px;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  margin: 16px 0;
  background: var(--background);
  border: 1px solid var(--border);
  isolation: isolate;
}
.scene-preview:before {
  content: "";
  position: absolute;
  inset: -8%;
  z-index: -1;
  background-image: var(
    --scene,
    radial-gradient(ellipse at 20% 30%, var(--secondary), var(--background))
  );
  background-size: cover;
  background-position: var(--scene-position, center);
  opacity: var(--scene-opacity, 1);
  filter: blur(var(--scene-blur, 0));
  transform: scale(var(--scene-scale, 1));
  animation: scene-drift 24s ease-in-out infinite alternate;
}
.background-image .scene-preview:before {
  background-image: var(--custom-background);
}
.scene-preview figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 7px 12px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.75rem;
}
@keyframes scene-drift {
  from {
    transform: translate3d(-0.6%, 0, 0)
      scale(calc(var(--scene-scale, 1) * 1.04));
  }
  to {
    transform: translate3d(0.6%, -0.7%, 0)
      scale(calc(var(--scene-scale, 1) * 1.07));
  }
}
@keyframes arch-drift {
  from {
    transform: rotate(18deg) translateY(0);
  }
  to {
    transform: rotate(35deg) translateY(12px);
  }
}
@keyframes color-tide {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}
@media (hover: hover) {
  .prayer-tile:hover,
  .path-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px color-mix(in srgb, var(--primary) 12%, transparent);
  }
  .path-card {
    transition:
      transform 0.25s ease,
      box-shadow 0.25s ease;
  }
}
@media (max-width: 767px) {
  .path-card {
    min-height: 148px;
  }
  .path-card:after {
    width: 100px;
    height: 100px;
    border-width: 12px;
  }
  .scene-preview {
    height: 160px;
  }
  .install-button {
    background: var(--primary);
    color: var(--on-primary, #fff);
  }
}
html[data-motion="off"] *,
html[data-motion="off"] *:before,
html[data-motion="off"] *:after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
