/* Redworking: original CSS implementation inspired by Skiper40 / CssLink.
   No React or JavaScript dependency; public navigation and promotional actions only. */
:root {
  --link-ease: cubic-bezier(.2, 0, 0, 1);
}

/* A quiet underline at rest; a directional reveal on navigation. */
:is(.back-link, .area-siblings a, .portal-footer a, .site-footer a,
    .site-header nav a, .session-links > a:not(.session-reserve), .text-link) {
  position: relative;
  text-decoration: none;
}
:is(.back-link, .area-siblings a, .portal-footer a, .site-footer a,
    .site-header nav a, .session-links > a:not(.session-reserve), .text-link)::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 240ms var(--link-ease), opacity 150ms ease;
  pointer-events: none;
}
.text-link::after { transform: scaleX(1); opacity: .35; }
.back-link::after { transform-origin: left; }
:is(.back-link, .area-siblings a, .portal-footer a, .site-footer a,
    .site-header nav a, .session-links > a:not(.session-reserve), .text-link):focus-visible {
  text-decoration: none;
  outline: 2px solid currentColor;
  outline-offset: 5px;
}
:is(.back-link, .area-siblings a, .portal-footer a, .site-footer a,
    .site-header nav a, .session-links > a:not(.session-reserve), .text-link):focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
  opacity: 1;
}
.text-link > span[aria-hidden="true"],
.rw-cta > span[aria-hidden="true"] {
  display: inline-block;
  flex-shrink: 0;
  transition: translate 240ms var(--link-ease);
}
.text-link:focus-visible > span[aria-hidden="true"],
.rw-cta:focus-visible > span[aria-hidden="true"] { translate: 3px 0; }

/* Solid brand colors stay readable throughout the fill transition. */
.rw-cta {
  --rw-base: #c04221;
  --rw-text: #fff;
  --rw-fill: #04543e;
  --rw-hover-text: #fff;
}
.rw-cta.action {
  --rw-base: #04543e;
  --rw-text: #f2e3c5;
  --rw-fill: #c04221;
  --rw-hover-text: #fff;
}
.rw-cta.secondary, .rw-cta.button-outline {
  --rw-base: transparent;
  --rw-text: #04543e;
  --rw-fill: #fcd7b9;
  --rw-hover-text: #04543e;
}
.rw-cta.area-cta {
  --rw-base: var(--ink, #f2e3c5);
  --rw-text: #04543e;
  --rw-fill: #fcd7b9;
  --rw-hover-text: #04543e;
}
.rw-cta.button-cream {
  --rw-base: #f2e3c5;
  --rw-text: #04543e;
  --rw-fill: #fcd7b9;
  --rw-hover-text: #04543e;
}
.how-notepad .rw-cta.button-cream {
  --rw-base: #04543e;
  --rw-text: #f2e3c5;
  --rw-fill: #c04221;
  --rw-hover-text: #fff;
}
.rw-cta.rw-cta {
  background: linear-gradient(var(--rw-fill), var(--rw-fill)) left bottom / 100% 0% no-repeat var(--rw-base);
  color: var(--rw-text);
  text-decoration: none;
  transform: none;
  filter: none;
  transition: background-size 280ms var(--link-ease), color 150ms ease, scale 150ms var(--link-ease);
}
.rw-cta.rw-cta:focus-visible {
  background-size: 100% 100%;
  color: var(--rw-hover-text);
  outline: 3px solid #04543e;
  outline-offset: 5px;
}
.area-sheet .rw-cta.rw-cta:focus-visible { outline-color: var(--ink); }
.rw-cta.rw-cta:active { scale: .96; }
.rw-cta.rw-cta:disabled, .rw-cta.rw-cta[aria-disabled="true"] {
  background-size: 100% 0%;
  color: var(--rw-text);
  scale: 1;
  opacity: .5;
  cursor: not-allowed;
}

/* The cube keeps its existing depth; only its invitation gets an accent. */
.cube-action .rw-link-label {
  font-size: inherit;
  background: linear-gradient(currentColor, currentColor) left bottom / 0% 1px no-repeat;
  padding-bottom: 3px;
  transition: background-size 280ms var(--link-ease);
}
.cube-action > span[aria-hidden="true"] {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid currentColor;
  border-radius: 50%;
  transition: translate 280ms var(--link-ease), background-color 150ms ease, color 150ms ease;
}
.cube-link:focus-visible .rw-link-label { background-size: 100% 1px; }
.cube-link:focus-visible .cube-action > span[aria-hidden="true"] {
  background: var(--ink);
  color: var(--face);
  translate: 3px 0;
}

/* Hover effects are for a mouse/trackpad. Touch retains immediate press feedback. */
@media (hover: hover) and (pointer: fine) {
  :is(.back-link, .area-siblings a, .portal-footer a, .site-footer a,
      .site-header nav a, .session-links > a:not(.session-reserve), .text-link):hover {
    text-decoration: none;
  }
  :is(.back-link, .area-siblings a, .portal-footer a, .site-footer a,
      .site-header nav a, .session-links > a:not(.session-reserve), .text-link):hover::after {
    transform: scaleX(1);
    transform-origin: left;
    opacity: 1;
  }
  .text-link:hover > span[aria-hidden="true"],
  .rw-cta:hover > span[aria-hidden="true"] { translate: 3px 0; }
  .rw-cta.rw-cta:hover:not(:disabled):not([aria-disabled="true"]) {
    background-size: 100% 100%;
    color: var(--rw-hover-text);
  }
  .cube-link:hover .rw-link-label { background-size: 100% 1px; }
  .cube-link:hover .cube-action > span[aria-hidden="true"] {
    background: var(--ink);
    color: var(--face);
    translate: 3px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rw-cta.rw-cta, .rw-cta > span[aria-hidden="true"],
  .text-link > span[aria-hidden="true"], .cube-action > span,
  :is(.back-link, .area-siblings a, .portal-footer a, .site-footer a,
      .site-header nav a, .session-links > a:not(.session-reserve), .text-link)::after {
    transition: none;
  }
  .rw-cta.rw-cta:active { scale: 1; }
  .rw-cta > span[aria-hidden="true"], .text-link > span[aria-hidden="true"],
  .cube-action > span[aria-hidden="true"] { translate: none !important; }
  .cube-link:is(:hover, :focus-visible, :active),
  .cube-link:is(:hover, :focus-visible) .cube-symbol { transform: none; }
}
