:root{
  --bg:#0b1821;
  --bg-soft:#102433;
  --panel:#12293a;
  --panel-2:#153247;
  --text:#f2f4f6;
  --muted:#c5d1d8;
  --line:rgba(255,255,255,.10);
  --shadow:0 16px 42px rgba(0,0,0,.22);
  --radius-xl:26px;
  --radius-lg:22px;
  --radius-md:18px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family: Georgia, "Times New Roman", serif;
  background:
    linear-gradient(180deg, rgba(7,15,21,.96), rgba(10,26,37,.98)),
    var(--bg);
  color:var(--text);
  min-height:100vh;
}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}

.login-body{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:100vh;
  background:
    radial-gradient(circle at 25% 20%, rgba(255,255,255,.04), transparent 30%),
    linear-gradient(180deg, rgba(6,14,21,.98), rgba(10,25,35,.98));
}
.login-shell{
  width:min(92vw, 700px);
  display:flex;
  align-items:center;
  justify-content:center;
}
.password-form{
  width:min(72vw, 430px);
}
.password-form input{
  width:100%;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(255,255,255,.05);
  color:#fff;
  border-radius:999px;
  padding:16px 22px;
  outline:none;
  font-size:1.05rem;
  backdrop-filter: blur(6px);
  box-shadow:var(--shadow);
}
.password-form input:focus{
  border-color:rgba(255,255,255,.35);
  background:rgba(255,255,255,.08);
}
.password-form.is-error input{
  border-color:rgba(255,160,160,.45);
}

.home-body{position:relative}
.home-body::before{
  content:"";
  position:fixed;
  inset:0;
  background:url("../img/quill.webp") center 24% / min(58vw, 760px) no-repeat;
  opacity:.06;
  pointer-events:none;
}
.page-shell{
  width:min(1280px, calc(100vw - 36px));
  margin:0 auto;
  padding:28px 0 24px;
  position:relative;
}
.site-header{margin-bottom:14px}
.brand-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
}
.brand-mark{
  display:flex;
  align-items:center;
  gap:10px;
}
.site-title{
  font-size:clamp(2rem, 3.5vw, 3rem);
  letter-spacing:.16em;
  margin:0;
  font-weight:600;
}
.site-um-logo{
  width:110px;
  height:auto;
  opacity:.95;
  margin-top:4px;
}
.top-nav{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:10px;
  margin-top:8px;
}
.top-nav a{
  padding:10px 14px;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(255,255,255,.03);
  color:var(--muted);
  font-size:.94rem;
}
.top-nav a:hover{
  background:rgba(255,255,255,.08);
  color:#fff;
}

.section{
  border:1px solid var(--line);
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border-radius:var(--radius-xl);
  box-shadow:var(--shadow);
}
.section-veil{
  margin-top:12px;
  margin-bottom:22px;
  padding:22px 22px 18px;
}
.section-heading h2,
.card-header h2{
  margin:0 0 6px 0;
  font-size:1.32rem;
  font-weight:600;
}
.section-heading p,
.card-header p{
  margin:0;
  color:var(--muted);
  line-height:1.45;
}
.feed-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:16px;
  margin-top:18px;
}
.feed-panel{
  border-radius:var(--radius-lg);
  padding:16px;
  background:rgba(255,255,255,.035);
  border:1px solid rgba(255,255,255,.08);
  min-height:210px;
}
.feed-panel h3{
  margin:0 0 12px;
  font-size:1rem;
  font-weight:600;
}
.feed-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.feed-item{
  padding:10px 12px;
  border-radius:14px;
  background:rgba(255,255,255,.04);
}
.feed-item a{
  display:block;
  font-size:.95rem;
  line-height:1.35;
}
.feed-item time{
  display:block;
  margin-top:6px;
  color:var(--muted);
  font-size:.82rem;
}
.loading{color:var(--muted)}

.section-grid{
  display:grid;
  grid-template-columns:1.35fr .85fr .85fr;
  gap:18px;
  align-items:start;
}
.card{
  border:1px solid var(--line);
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border-radius:var(--radius-xl);
  padding:20px;
  box-shadow:var(--shadow);
  min-height:100%;
}
.card-large{grid-row:span 2}
.platform-layout{
  display:grid;
  gap:14px;
  margin-top:18px;
}
.platform-box{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  border-radius:var(--radius-lg);
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
  padding:18px;
}
.platform-box-link:hover,
.platform-box-tiro:hover{
  background:rgba(255,255,255,.07);
}
.platform-text h3{
  margin:0 0 6px;
  font-size:1.08rem;
  font-weight:600;
}
.platform-text p{
  margin:0;
  color:var(--muted);
  line-height:1.45;
}
.round-link-group{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  justify-content:flex-end;
}
.round-link{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  min-width:96px;
  text-align:center;
  color:var(--text);
}
.round-link-icon{
  width:42px;
  height:42px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.14);
  box-shadow:0 6px 16px rgba(0,0,0,.18);
  overflow:hidden;
}
.round-link-icon img{
  width:31px; /* +40% vs old 22px */
  height:31px;
  object-fit:contain;
  border-radius:50%;
}
.round-link span:last-child{
  font-size:.82rem;
  line-height:1.2;
  color:var(--muted);
}
.platform-box-tiro{
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.platform-box-tiro .platform-text{
  flex:1 1 auto;
}
.tiro-logo{
  width:150px;
  height:auto;
  object-fit:contain;
  flex:0 0 auto;
  filter:drop-shadow(0 6px 12px rgba(0,0,0,.18));
  margin-left:18px;
}

.link-stack{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:18px;
}
.text-link{
  display:block;
  padding:13px 14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
  color:var(--text);
}
.text-link:hover{background:rgba(255,255,255,.07)}
.disabled-link{opacity:.75}

.sapientia-rail{
  position:fixed;
  right:16px;
  top:48%;
  transform:translateY(-50%);
  writing-mode:vertical-rl;
  text-orientation:mixed;
  padding:16px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.1);
  background:rgba(18,41,58,.72);
  color:#fff;
  box-shadow:var(--shadow);
  z-index:30;
}
.sapientia-rail:hover{background:rgba(27,56,78,.86)}

.site-footer{
  margin-top:20px;
  padding:14px 18px;
  display:flex;
  gap:18px;
  justify-content:center;
  align-items:center;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(255,255,255,.04);
}
.site-footer a{color:var(--muted)}
.site-footer a:hover{color:#fff}

.legal-page{
  width:min(980px, calc(100vw - 36px));
  margin:0 auto;
  padding:28px 0 40px;
}
.legal-card{
  padding:28px;
  border-radius:var(--radius-xl);
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  box-shadow:var(--shadow);
}
.legal-card h1,.legal-card h2{font-weight:600}
.legal-card p,.legal-card li{
  color:var(--muted);
  line-height:1.55;
}

@media (max-width: 1100px){
  .section-grid{grid-template-columns:1fr}
  .card-large{grid-row:auto}
  .feed-grid{grid-template-columns:1fr}
  .brand-row{flex-direction:column}
  .top-nav{justify-content:flex-start}
  .sapientia-rail{display:none}
  .platform-box-tiro{flex-direction:column; align-items:flex-start}
  .tiro-logo{margin-left:0; margin-top:10px}
}
