/* Loaded only by the portal home. The account menu and alerts share ui.css. */
.portal-home {
  --paper: #f7f5ee;
  --home-ink: #162f29;
  --home-muted: #51635b;
  --home-rule: #c9cfc3;
  --page-width: min(1240px, calc(100% - 112px));
  --font: "Noto Sans KR", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--home-ink);
  background: var(--paper);
}
.hub-bar, .hub-main, .hub-footer {
  width: var(--page-width);
  margin-inline: auto;
}
.hub-skip {
  position: absolute;
  z-index: 10;
  top: 8px;
  left: 16px;
  padding: 10px 14px;
  color: var(--home-ink);
  background: var(--paper);
  transform: translateY(-160%);
}
.hub-skip:focus { transform: translateY(0); }

.hub-header {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid var(--home-rule);
}
.hub-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
}
.hub-bar .brand {
  flex: none;
  color: var(--home-ink);
  font: 650 25px/1 "Segoe UI", var(--font);
  letter-spacing: -.055em;
}
.hub-bar .brand-mark { width: 29px; height: 29px; }
.hub-bar .brand-mark rect { fill: #193b30; }
.hub-account-slot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  min-height: 40px;
}
.portal-home[data-loading="true"] .hub-account-slot::before {
  content: "";
  width: 116px;
  height: 12px;
  border-radius: 3px;
  background: var(--home-rule);
}
.hub-account-slot .site-actions { gap: 18px; }
.hub-account-slot .btn {
  min-height: 42px;
  padding-inline: 16px;
  border-radius: 5px;
  font-size: 14px;
}
.hub-account-slot .btn-secondary { padding-inline: 5px; border-color: transparent; color: var(--home-ink); background: transparent; }
.hub-account-slot .btn-secondary:hover { text-decoration: underline; }
.hub-account-slot .btn-primary { color: var(--paper); background: var(--home-ink); }
.hub-account-slot .btn-primary:hover { background: #265641; }
.hub-account-slot .menu { min-width: 0; max-width: 100%; }
.hub-account-slot .menu-button { max-width: min(280px, 100%); }
.hub-account-slot .menu-panel { width: min(280px, calc(100vw - 40px)); }
.hub-menu-tools { border-bottom: 1px solid var(--home-rule); padding-bottom: 6px; margin-bottom: 6px; }
.hub-menu-tools:empty { display: none; }
.hub-account-slot [data-action="devices"] { color: var(--danger); }

.hub-main { flex: 1; }
.hub-hero {
  display: grid;
  grid-template-columns: minmax(0, .93fr) minmax(0, 1.07fr);
  align-items: center;
  gap: clamp(28px, 4vw, 66px);
  padding-block: 32px;
  border-bottom: 1px solid var(--home-ink);
}
.hub-hero h1 {
  margin: 0;
  font: 700 clamp(49px, 5.4vw, 77px)/1.22 "Noto Serif KR", "Nanum Myeongjo", AppleMyungjo, Batang, serif;
  letter-spacing: -.085em;
}
.hub-lede {
  margin: 25px 0 0;
  color: var(--home-muted);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: -.035em;
}
.hub-cover {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1.7;
  object-fit: cover;
  object-position: 50% 53%;
  background: #1c382d;
}
.hub-service-section { padding-block: 30px 42px; }
.hub-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-bottom: 20px;
}
.hub-section-heading h2 { margin: 0; font-size: 27px; font-weight: 650; line-height: 1.3; letter-spacing: -.055em; }
.hub-section-heading p { margin: 0; color: var(--home-muted); font-size: 13px; }
.hub-service-section .alert { margin-bottom: 18px; }

.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px 23px;
}
.hub-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto 1fr auto;
  grid-template-areas: "picture" "heading" "description" "actions";
  min-width: 0;
}
.hub-visual {
  grid-area: picture;
  align-self: start;
  overflow: hidden;
  aspect-ratio: 2 / 1;
}
.hub-visual img { display: block; width: 100%; height: 100%; object-fit: contain; }
.hub-card-heading { position: relative; grid-area: heading; margin-top: 14px; }
.hub-title { margin: 0; font-size: clamp(20px, 1.72vw, 24px); font-weight: 675; line-height: 1.35; letter-spacing: -.057em; }
.hub-brand { margin: 3px 0 0; color: var(--home-muted); font: 500 13px/1.45 "Segoe UI", var(--font); }
.hub-description { grid-area: description; margin: 8px 0 0; color: #43544b; font-size: 14px; line-height: 1.58; letter-spacing: -.025em; }
.hub-card-footer { grid-area: actions; }

/* A visitor's single service link covers its entry in the catalogue. Once the
   server supplies an account-specific action, its own text and status are visible. */
.hub-card:not([data-state]) .hub-entry {
  position: absolute;
  inset: 0;
  overflow: hidden;
  text-indent: 100%;
  white-space: nowrap;
}
.hub-card:not([data-state]) .hub-title { padding-inline-end: 23px; }
.hub-card:not([data-state]) .hub-card-heading::before,
.hub-card:not([data-state]) .hub-card-heading::after {
  content: "";
  position: absolute;
  color: var(--home-muted);
  pointer-events: none;
}
.hub-card:not([data-state]) .hub-card-heading::before {
  top: .55em;
  right: 3px;
  width: 9px;
  height: 9px;
  border-top: 1.5px solid;
  border-right: 1.5px solid;
}
.hub-card:not([data-state]) .hub-card-heading::after {
  top: calc(.55em + 4px);
  right: 2px;
  width: 13px;
  border-top: 1.5px solid;
  transform: rotate(-45deg);
}
.hub-card:not([data-state]):hover .hub-title,
.hub-card:not([data-state]):focus-within .hub-title { text-decoration: underline; text-underline-offset: .18em; }
.hub-entry:focus-visible { outline: 2px solid var(--home-ink); outline-offset: 3px; }

.hub-status {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 12px 0 0;
  padding: 6px 9px;
  color: var(--home-muted);
  background: #ebece4;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.55;
}
.hub-status:empty { display: none; }
.hub-status::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.hub-card[data-state="available"] .hub-status { color: #20563e; background: #e3eee2; }
.hub-card[data-next-action="link_or_enroll"] .hub-status,
.hub-card[data-next-action="recover_link"] .hub-status,
.hub-card[data-state="entitlement_required"][data-next-action="review_access"] .hub-status { color: #754909; background: #fff1d5; }
.hub-card[data-state="suspended"] .hub-status,
.hub-card[data-state="expired"] .hub-status { color: #7a1b15; background: #fbe9e4; }
.hub-card[data-state] .hub-entry {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: var(--home-ink);
  font-size: 14px;
  font-weight: 650;
}
.hub-card[data-state] .hub-entry::after {
  content: "";
  width: 6px;
  height: 6px;
  border-top: 1.5px solid;
  border-right: 1.5px solid;
  transform: rotate(45deg);
}

.hub-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  min-height: 68px;
  padding-block: 14px;
  border-top: 1px solid var(--home-rule);
  color: var(--home-muted);
  font-size: 12px;
}
.hub-legal { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.hub-legal a { color: inherit; }

@media (max-width: 1000px) {
  .portal-home { --page-width: calc(100% - 72px); }
  .hub-hero { gap: 30px; }
  .hub-hero h1 { font-size: clamp(44px, 5.6vw, 57px); }
  .hub-grid { gap: 28px 18px; }
  .hub-section-heading h2 { font-size: 24px; }
}
@media (max-width: 800px) {
  .portal-home { --page-width: calc(100% - 48px); }
  .hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub-hero h1 { font-size: clamp(36px, 5.6vw, 45px); }
  .hub-lede { margin-top: 16px; font-size: 14px; }
}
@media (max-width: 620px) {
  .portal-home { --page-width: calc(100% - 40px); }
  .hub-bar { min-height: 59px; gap: 10px; }
  .hub-bar .brand { gap: 7px; font-size: 20px; }
  .hub-bar .brand-mark { width: 25px; height: 25px; }
  .hub-account-slot .site-actions { gap: 8px; }
  .hub-account-slot .btn { padding-inline: 10px; min-height: 36px; font-size: 13px; }
  .hub-hero { grid-template-columns: 1fr; gap: 20px; padding-block: 25px 22px; }
  .hub-hero h1 { font-size: clamp(39px, 11.2vw, 57px); line-height: 1.16; }
  .hub-lede { margin-top: 12px; font-size: 13px; line-height: 1.6; }
  .hub-cover { aspect-ratio: 1.9; }
  .hub-service-section { padding-block: 19px 26px; }
  .hub-section-heading { margin-bottom: 10px; }
  .hub-section-heading h2 { font-size: 22px; }
  .hub-section-heading p { font-size: 12px; }
  .hub-grid { grid-template-columns: 1fr; gap: 0; }
  .hub-card {
    grid-template-columns: minmax(88px, 34%) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    grid-template-areas: "picture heading" "picture description" "actions actions";
    column-gap: 15px;
    padding-block: 13px;
    border-bottom: 1px solid var(--home-rule);
  }
  .hub-card:last-child { border-bottom: 0; }
  /* The paper motifs fit inside the central 75% of each 2:1 cover. */
  .hub-visual { align-self: center; aspect-ratio: 1.5; }
  .hub-visual img { object-fit: cover; }
  .hub-card-heading { align-self: end; margin-top: 0; }
  .hub-title { font-size: clamp(16px, 4.55vw, 20px); }
  .hub-brand { margin-top: 2px; font-size: 12px; }
  .hub-description { margin-top: 4px; font-size: 12px; line-height: 1.5; }
  .hub-footer { min-height: 61px; font-size: 11px; }
}
