/* 2026-11-20 site refinements */
/* Tool page header: category shortcuts */
.en-header>nav.ubis-category-nav.ubis-category-nav.ubis-category-nav{display:flex;align-items:center;gap:4px 16px;flex-wrap:nowrap;min-width:0}
.en-header>nav.ubis-category-nav.ubis-category-nav.ubis-category-nav a{display:inline-flex;align-items:center;min-height:44px;white-space:nowrap;color:#3d4a5c;font-weight:600;font-size:15px;text-decoration:none;border-bottom:2px solid transparent}
.en-header>nav.ubis-category-nav.ubis-category-nav.ubis-category-nav a:hover{color:#3159d9}
.en-header>nav.ubis-category-nav.ubis-category-nav.ubis-category-nav a[aria-current="true"]{color:#172334;border-bottom-color:#3159d9}
.en-header>nav.ubis-category-nav.ubis-category-nav.ubis-category-nav a.ubis-nav-info{color:#3159d9}
.en-header>nav.ubis-category-nav.ubis-category-nav.ubis-category-nav a:focus-visible{outline:3px solid #3159d9;outline-offset:2px;border-radius:4px}
@media(max-width:1100px){.en-header>nav.ubis-category-nav.ubis-category-nav.ubis-category-nav{order:3;width:100%;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;border-top:1px solid #eef1f6;padding-top:2px}.en-header>nav.ubis-category-nav.ubis-category-nav.ubis-category-nav::-webkit-scrollbar{display:none}}
@media(max-width:550px){.en-header>nav.ubis-category-nav.ubis-category-nav.ubis-category-nav{gap:4px 18px}.en-header>nav.ubis-category-nav.ubis-category-nav.ubis-category-nav a{font-size:14px}}

/* Home: compact recommended cards on phones */
@media(max-width:600px){
#ubis-modern-home .featured-grid{gap:10px}
#ubis-modern-home .featured-card.ubis-illustrated-card{flex-direction:row;align-items:stretch;min-height:96px}
#ubis-modern-home .featured-card .ubis-featured-art{position:relative;flex:0 0 96px;width:96px;aspect-ratio:auto;height:auto}
#ubis-modern-home .featured-card .ubis-featured-art img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
#ubis-modern-home .featured-card .ubis-featured-copy{flex:1;min-width:0;padding:12px 40px 12px 14px;display:flex;flex-direction:column;justify-content:center}
#ubis-modern-home .featured-card>.ubis-featured-copy strong{font-size:17px;margin:2px 0 4px}
#ubis-modern-home .featured-card .featured-label{font-size:11px}
#ubis-modern-home .featured-card .ubis-featured-description{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:13px;line-height:1.45}
#ubis-modern-home .featured-card .card-arrow{top:50%;right:14px;transform:translateY(-50%)}
}

/* The shared title control takes precedence over button rules inside individual apps. */
body.ubis-tool-page h1 > #ubis-favorite-toggle {
  appearance: none;
  display: inline-grid;
  place-items: center;
  box-sizing: border-box;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  margin: 0 0 0 10px;
  padding: 0;
  border: 1px solid #cbd4e3;
  border-radius: 50%;
  background: #fff;
  color: #536176;
  line-height: 1;
  vertical-align: middle;
  box-shadow: none;
  filter: none;
  transform: none;
  cursor: pointer;
}

body.ubis-tool-page h1 > #ubis-favorite-toggle > svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linejoin: round;
}

body.ubis-tool-page h1 > #ubis-favorite-toggle:hover {
  color: #3159d9;
  border-color: #9db0e9;
  background: #f5f8ff;
}

body.ubis-tool-page h1 > #ubis-favorite-toggle[aria-pressed="true"] {
  color: #8a5300;
  border-color: #d5a552;
  background: #fff5e0;
}

body.ubis-tool-page h1 > #ubis-favorite-toggle[aria-pressed="true"] > svg {
  fill: currentColor;
}

body.ubis-tool-page h1 > #ubis-favorite-toggle:focus-visible {
  outline: 3px solid #3159d9;
  outline-offset: 3px;
}

@media (max-width: 600px) {
  body.ubis-tool-page h1 > #ubis-favorite-toggle { margin-left: 6px; }
}

/* Single-column forms and side-by-side workspaces share the same panel colors. */
body.ubis-tool-page {
  --ubis-work-compact: 760px;
  --ubis-work-wide: 1064px;
  --ubis-work-surface: #fff;
  --ubis-work-border: #dce3ef;
  --ubis-work-radius: 16px;
  --ubis-work-padding: clamp(16px, 3vw, 28px);
  --ubis-work-shadow: 0 8px 24px rgb(23 35 52 / 4%);
}

body.ubis-tool-page #ubis-essential-tool {
  background: transparent;
}

body.ubis-tool-page :is(.udc.udc-single, .ubis-random.rt-single) :is(header, .rt-intro) > h1 + p {
  display: block;
}

body.ubis-tool-page :is(.udc, .ufc) > .workspace,
body.ubis-tool-page .ubis-random.rt-single :is(.rt-editor, .rt-stage),
body.ubis-tool-page #ubis-essential-tool .uft-calc-wrap .uet-panel {
  background: var(--ubis-work-surface);
  border: 1px solid var(--ubis-work-border);
  border-radius: var(--ubis-work-radius);
  box-shadow: var(--ubis-work-shadow);
}

body.ubis-tool-page :is(.udc, .ufc) > .workspace > :is(form, .results) {
  background: var(--ubis-work-surface);
  padding: var(--ubis-work-padding);
}

body.ubis-tool-page :is(.udc, .ufc) > .workspace > form { border-radius: 0; }

body.ubis-tool-page .udc.udc-single:not(.has-result) > .workspace,
body.ubis-tool-page .ufc > .workspace:has(> .results[hidden]),
body.ubis-tool-page .ubis-random.rt-single:not(.rt-show-stage) > .rt-workspace,
body.ubis-tool-page #ubis-essential-tool .uft-calc-wrap:is(
  [data-free-tool="bmi"], [data-free-tool="rent"], [data-free-tool="brokerage"],
  [data-free-tool="pyeong"], [data-free-tool="vat"], [data-free-tool="password"]
) > .uet-panel {
  max-width: var(--ubis-work-compact);
  margin-inline: auto;
}

body.ubis-tool-page .ubis-random.rt-single :is(.rt-editor, .rt-stage),
body.ubis-tool-page #ubis-essential-tool .uft-calc-wrap .uet-panel {
  padding: var(--ubis-work-padding);
}

body.ubis-tool-page .ubis-random.rt-single .rt-editor textarea {
  background: var(--ubis-work-surface);
}

body.ubis-tool-page .ubis-random.rt-single .rt-editor #rt-names {
  min-height: 148px;
  height: 164px;
  resize: vertical;
}

body.ubis-tool-page #ubis-essential-tool .uft-calc-wrap {
  padding-bottom: 24px;
}

body.ubis-tool-page #ubis-essential-tool .uft-calc-wrap > :not(.uet-header) {
  max-width: var(--ubis-work-wide);
  margin-inline: auto;
}

body.ubis-tool-page #app > .pdf-wrap {
  max-width: calc(var(--ubis-work-wide) + 56px);
}

/* Recent tools on the homepage */
#ubis-modern-home .ubis-upcoming-title {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: #586577;
  font-size: 15px;
  font-weight: 700;
}
#ubis-modern-home .ubis-mytools{display:grid;gap:20px;padding-top:28px}
#ubis-modern-home .ubis-mytools .section-heading{margin-bottom:14px}
#ubis-modern-home .ubis-mytools-clear{min-height:44px;padding:0 14px;border:1px solid #d6dde9;border-radius:8px;background:#fff;color:#536176;font-size:13px;font-weight:600;cursor:pointer}
#ubis-modern-home .ubis-mytools-list{list-style:none;margin:0;padding:0}
#ubis-modern-home .ubis-mytools-list li{min-width:0;margin:0}
#ubis-modern-home .ubis-mytools-list .ubis-tool-card{height:100%}
#ubis-modern-home .ubis-favorites-empty{
  padding:clamp(16px,3vw,24px);border:1px solid #d8e2f8;border-radius:12px;
  background:linear-gradient(120deg,#f1f5ff,#e7eeff);color:#172137;
}
#ubis-modern-home .ubis-favorites-empty h3{margin:0;font-size:1.125rem;line-height:1.4;word-break:keep-all}
#ubis-modern-home .ubis-favorites-empty p{margin:6px 0 14px;color:#4f5e72;font-size:.9375rem;line-height:1.6;word-break:keep-all}
#ubis-modern-home .ubis-favorites-empty a{
  display:inline-flex;align-items:center;min-height:44px;padding:8px 14px;border-radius:8px;
  background:#254bc2;color:#fff;font-size:.875rem;font-weight:700;text-decoration:none;
}
#ubis-modern-home .ubis-favorites-empty a:hover{background:#1a379c;color:#fff}

.ubis-tool-card .ubis-office-beta{align-self:flex-start;display:inline-flex;max-width:max-content;margin:0 0 5px;padding:2px 8px;border:1px solid #bdccff;border-radius:999px;background:#edf2ff;color:#1e409f;font-size:12px;font-weight:750;line-height:1.5}
#ubis-modern-home .ubis-mytools-list li:has(.ubis-office-favorite-remove){display:flex;flex-direction:column;align-items:stretch;gap:7px}
#ubis-modern-home .ubis-office-favorite-remove{align-self:flex-start;min-height:44px;padding:4px 10px;border:1px solid #d6dde9;border-radius:8px;background:#fff;color:#405673;font:inherit;font-size:13px;cursor:pointer}
